Vous êtes sur la page 1sur 19

How to debug Smart Forms

By Gokul R, Iteanz Technologies


1. Go to your smart form, click on Environment->unction !o"ule #ame.
$. %ou &ill get a 'o'-u', in that function mo"ule name &ill (e "is'laye" co'y that function
mo"ule num(er
). Go to transaction *E)+ an" 'aste the generate" function mo"ule name

,. -lick on "is'lay, select .ttri(utes ta(. In that ta( "ou(le click on /rogram #ame fiel"

0. ollo&ing screen &ill a''ear, "ou(le click on last inclu"e
1. In this inclu"e first fe& lines &ill (e system generate" co"e, follo&e" (y our co"e
+. If &e &ant to check G23#4 varia(le an" set (reak'oint at that varia(le, give -TR5 6
an" give that varia(le name
7. #o& e8ecute your smartform, Break'oint &ill (e triggere" 9 you can "e(ug.
*ummary
:e can search for varia(le or internal ta(le or o(;ects in that inclu"e, set (reak'oint 9 "e(ug
it.
Two types to debug smartform
1. First type
1. .ctivate smartform . :hen you activate, It creates one function mo"ule.
$. Test<7= smartform ->It takes you to *E)+ &ith function mo"ule name
). -lick on >I*/5.% (utton->-lick on *earch (utton
,. If you use T.B5E no"e, you can search LOOP AT it_data <*elect in !ain
'rogram ra"io (utton in *earch 'o'u'=
0. If you use lo& 5ogic->/rogram lines ->%ou can search &ith PERFORM
%Con<&here n is the num(er=
$. Second type
1. %ou can use "irect BRE.?-/4I#T statement, &hen you use Fow Logi!"
#Program ines.
http://an-sap-consultant.blogspot.in/2010/12/abap-debugging-smartform.html
Wednesday, January 5, 2011
ABAP - How to debug a SAPscript?
MESSAGE
Hello Friends,
WELCOME to An SAP Consultant blog. I request you to send te !roble"s and solutions,
#i$ are sarable to %ello# $onsultants. I% you #ant to sare in%or"ation, !lease send
"ail to te.sa!.$onsultants&g"ail.$o"
'egards,
(log Moderator
First method.
Go to SE71 transaction.
lic! on ti!ities menu -" #cti"ate #ebugger.
Second $ethod.
Go to SE%& transaction.
'un $S%&#B' program.
MESSAGE
Hello Friends,
WELCOME to An SAP Consultant blog. I request you to send te !roble"s and solutions,
#i$ are sarable to %ello# $onsultants. I% you #ant to sare in%or"ation, !lease send
"ail to te.sa!.$onsultants&g"ail.$o"
'egards,
(log Moderator
Steps to follo(
1. Go to S$%7-"Enter )ob name-"E*ecute
2. Enter +,-G.no / before +,-G/ in command 0eld and place the cursor on the
)ob name. 1o( press E12E' button.
%. 3t ta!es 4ou to debug mode
5. 6lace the cursor in the function module and press () three times. 3t ta!es
4ou to the program
How to debug a smartform otherthan putting break-point in
initializatin section?
Question Submitted By ** $i+,-e,sat.
/ a!so 0aced t.is 1uestion22 $an
-
Answer
Posted By

'e: 7o( to debug a smartform otherthan putting brea!-point in
initiali8atin section9
Answ
er
: 1
by using the transactioin
SMARTFORM_TRACE
/s %.is Answer
3orrect ?
24 5es ; 1o
1 6ris.na"eni

'e: 7o( to debug a smartform otherthan putting brea!-point in
initiali8atin section9
Answ
er
: 2
Smartform will generate a FM goto SE37 an
ebug the FM!

'e: 7o( to debug a smartform otherthan putting brea!-point in
initiali8atin section9
Answ
er
: %
"i#
E$ecute the smartform# u can see a function
moule %&&&&'(!
Clic) on *OTO on the menu bar! Clic) on Main
+rogram! ,ou
canm see the inclues! clic) on the last inclue i!e
F&'!
an )ee+ the brea)-+oint.Shift/Control/'(0 at ur
esire
+oint!
Regars#
Maha
/s %.is Answer
3orrect ?
27 5es 7 1o
0 8a.a

'e: 7o( to debug a smartform otherthan putting brea!-point in
initiali8atin section9
Answ
er
: 5
"ey Maha#
Than)s for your answer!
Than)s#
1a)shman
0 Anna9aneni
/s %.is Answer
3orrect ?
5 5es 5 1o

'e: 7o( to debug a smartform otherthan putting brea!-point in
initiali8atin section9
Answ
er
: <
2y using SMARTFORM_TRACE !!"ow we can
ebug smartform3!!!!
Are there any other +roceures for 4ebugging
SMARTFORMS3
/s %.is Answer
3orrect ?
5 5es 1 1o
0 6ris.na
How to #ebug a SAP S9art0or9?
6osted in Smartforms on 2%/0=/2012
To "e(ug a smartform in @uality or testing system, go to tco"e *!.RT4R!*. Enter the
name of the smartform if you kno& or fin" the name of the smartform name from #.-E an"
"is'lay the smartform.
in" the statement in the smartform &here you &ant to 'lace the (reak-'oint.
Go to menu Environment A> unction !o"ule #ame to get the name of the function mo"ule
for the *martform.
-o'y the function mo"ule name in the 'o'u'.
Go to tco"e *E)+ <unction Buil"er=.
Enter the name of the function mo"ule an" go to !enu Goto A> !ain /rogram.
In the !ain /rogram click on I#> to search the statement &here you &ant to 'lace the
(reak-'oint.
Enter the te8t of the line &here you &ant to 'lace the (reak-'oint in the I#> 'o'u'.
/lace the (reak-'oint on the "esire" line.
#o& run the "river 'rogram, the control sto's at the (reak-'oint an" you can analyze the
smartform.
How to #ebug S9art0or9?
This @uestion is Assumed Answered.
#.ar9es. Arun-u9ar :yas #pr <> 200= 2:52 6$
>ear .ll,

Bo& to >e(ug a *martformC


Regar"s,
>harmesh
15250 ?ie(s
o %opics* #-#6

#@erage Aser 'ating


.0 ratings/
Re: How to Debug Smartform?
8artin 3eronio #pr <> 200= 2:5= 6$ .in response to ,harmesh
#run!umar ?4as/
Bi >harmesh,

:hen e"iting the smartform, you can get the function mo"ule name <&hich is
generate" (y the smartform "efinition= (y Environment > unction !o"ule #ame
from the menu.

In the function mo"ule, you can search for the relevant co"e you are trying to "e(ug.
It is hel'ful to search for names of varia(les etc.

-heers,

!artin
o 'eport #buse
o Bi!e .0/
Re: How to Debug Smartform?
'uest #pr <> 200= 2:<0 6$ .in response to ,harmesh #run!umar ?4as/
chk this threa"

ReD Bo& to >e(ug a *martform
o Bi!e .0/
Re: How to Debug Smartform?
;A:<<; 68A$ '#$/ #pr <> 200= 2:<% 6$ .in response to ,harmesh
#run!umar ?4as/
hi >harmesh,

/lease set a (reak 'oint in si"e the smartformD

BRE.? EF*ER#.!E>.

Then at the time of 'rintG 'revie& the 'rogram sto's there.

E8am'le D If you set the (reak 'oint in initializationas
BRE.? EF*ER#.!E>.
/rogram sto's at (reak 'oint. .fter that use *erach an" set more (reak 'oints.

-
>*earch the 'rogram logicGTe8telementG.""ress via search an" set the (reak 'oint at
that co"e.


4ther &ay to "e(ug smartform is to "e(ug the unction !o"ule of that smartforms. If
you &ant to "e(ug 'articular smartform no"e that the solution &oul" (e, insert a
H/rogram 5ineH ;ust a(ove the no"e you &ant to "e(ug an" this 'rogram line &rite a
normal a(a' (reak'oint. *o &henever you call the smartforms, it &ill sto' at this
(reak'oint an" you can "e(ug on&ar"s.

or

*TR.-E can (e use" for "e(ugging *!.RT4R!*.

Rea" !ore here.

htt'DGGhel'.sa'.comGsa'hel'3er'$II,Ghel'"ataGenG,JGc)"7a,aI0(11"0(1efII1IJ,1J$
fe)Gframeset.htm

if this is useful "onKt forget to re&ar" the 'oint

Regar"s,
naveen
o 'eport #buse
o Bi!e .0/
Re: How to Debug Smartform?
Priya J #pr <> 200= 2:<< 6$ .in response to ,harmesh #run!umar ?4as/
hi
check this threa"
ReD >e(ug *mart form

thanks,
'riya
o 'eport #buse
o Bi!e .0/
Re: How to Debug Smartform?
6.i9a"at. :i-rant. #pr <> 200= %:5% 6$ .in response to ,harmesh
#run!umar ?4as/
u can set a (reak 'oint in smartform co"e &in"o&.

F B.2E *ET 5I?E TBI*
BREAK-POINT

I think this &ill &ork..

Thanks
2ikranth ?himavath
o 'eport #buse
o Bi!e .0/
o Re: How to Debug Smartform?
9o.a99ad a $a4 17> 200= 11:%= #$ .in response to Chima@ath
?i!ranth/
%ou have to har" co"e BRE.?-/4I#T e8ternally in the co"e &here you &ant
to >e(ug in the *mart forms.
'eport #buse
Bi!e .0/
Re: How to Debug Smartform?
nagara= -u9ar nis.ta!a $a4 17> 200= 12:2% 6$ .in response to
,harmesh #run!umar ?4as/
Bi,

u can also "e(ug the smartform like this.

:hen u generate the smartform it &ill giv ethe smartformname.

#o& go to se)7 an" give sa'l<smartform name=, u &ill get all the inclu"es.

/lease re&ar" 'onits if u fine hel'ful.

Regar"s,
#agara;
o 'eport #buse
o Bi!e .0/
Re: How to Debug Smartform?
$a"i-u9ar Pa-a!apati $a4 17> 200= 12:<2 6$ .in response to
,harmesh #run!umar ?4as/
hi,

in the 'rogram lines 'lace the (reak 'oint on the c'"e you &rite there or if you have
any form routines &ritten then you can use &hat nagra; have sai" an" go into the
inclu"es an" 'lace the (reak 'oint over there
o 'eport #buse
o Bi!e .0/
Re: How to Debug Smartform?
Sandip 6a9dar $a4 17> 200= 12:<5 6$ .in response to ,harmesh
#run!umar ?4as/
Insi"e the H/rogramming 5ineH of smartform, &rite har"-co"e" (reak 'oint <Break
Fser3name or Break-/oint=. it &ill sto' there.

Reg"s
*an"i'
o 'eport #buse
o Bi!e .0/
Re: How to Debug Smartform?
8rutyun=aya %ripat.y #ug 2> 200= 2:10 6$ .in response to ,harmesh
#run!umar ?4as/
Bi
goo"

In the *martform, create a -o"e #o"e an" &ithin the -o"e #o"e you can har"co"e a
normal a(a'
Break /oint.

thanks
mrutyun
o 'eport #buse
o Bi!e .0/
o Re: How to Debug Smartform?
3.ris Bai!ey +an 1;> 2007 1:0% 6$ .in response to $rut4un)a4a
2ripath4/
.n" &hat if you &ant to "e(ug on the /ro"uction serverCL %ou canKt har"-
co"e a (reak 'oint.
'eport #buse
Bi!e .0/
Re: How to Debug Smartform?
$a=es. S $ar 1<> 2010 <:<% #$ .in response to hris -aile4/
BI >harmesh,

u can also "e(ug smartforms (y D

1. a''ly KBRE.?-/4I#TK in "river 'rogram
$. a''ly the (reak'oint in genrate" funtion mo"ule
). har" co"e the (reak'oint in smartform itself &hile
&riting co"es.

,. But in 'ro"uction u cant
&rite (reak 'oint in smartform. *o overcome this , see
(elo& metho".

Tco"e > smartforms > 7>
u &ill get a ! e8' D G1B->:BG*IIIII1)7
#o& go to *E)7 an" a"" K5K (efore * an" a"" KI1K an" the
en". *o this &ill (ecome G1B->:BG5*IIIII1)7I1
no& a"" (reak 'oint &here ever u &ant.



BEst Regar"s,
Ra;a
'eport #buse
Bi!e .1/
Re: How to Debug Smartform?
Jatender ;arang $ar 1<> 2010 <:<7 #$ .in response to ,harmesh
#run!umar ?4as/
Bi ,

%ou can "e(ug the *martform (y 'utting the (reak 'oint on the G54B.5 I#IT in the
unction !o"ule of the form.

Bo'e it &ill hel' you,
Maten"er

Vous aimerez peut-être aussi