cancel
Showing results for 
Search instead for 
Did you mean: 

debug a smart form

Former Member
0 Kudos

Hi experts,

I want to debug a smartform , what is the procedure ?

can any body explain me briefly?

Thanks

vamsi.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi vamsi,

smartform debugging:

1. Execute the smartform (execute button in SMARTFORMS transaction)

2. Take the generated function module and display it in SE80.

3.Find the smartforms Elements (text elements, windows, code lines, loops) in this and set Soft break points.

Correct name is SMARTFORM_TRACE.

Tcode - SFTRACE

Regards...

Arun.

Reward points if useful.

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi,

The the best way to debug the form is to put a breakpoint in the function module generated by the smartform.

Procedure:

Open the smartform we want to debug.

Goto Environment -> Function module name.

Open the function module in SE37. From the menu GOTO -> main program. Open the last include.

This incude contains the entire code ie the code we have written in initalization + form routines + program lines + sap generated code.

Even we can search for the text nodes, folders, templates, tables, graphics, address nodes etc with their names.

Put a breakpoint at any point you want.

If we issue any doc which triggers this form, when the control reaches the break point it will stop.

Please note that hard-coding the break points in the code ( Program lines ) is not recommended and it can´t be done unless if it is development server.

So, always put a session break point in the related function module.

We can use SFTRACE transaction to know the sequence of the control flow.

If you want to break at each and every text that is printed on the output form put the break points in the forms.

1. %write_text to break at text element.

2. %WRITE_TEXT_MODULE to break at text module.

3. %WRITE_INCLUDE_TEXT to break at include text.

Please put a break point at the first sy-subrc check.

If the control reaches this point, you can find the name of the element in the varible NAME and the content in the text node in %TEXT.

Its easy to understand the sequence of the printing if we put a breakpoint as stated above.

Regards,

Satish.

former_member196280
Active Contributor
0 Kudos

Different ways we can debug smart forms.

1)goto tcode SFTRACE --> click "trace on"

2) Get the function module name and set break points in function module name.

Reward if useful.

Regards,

SaiRam

Former Member
0 Kudos

hi vamsi krishna,

in smartform wherever u want to debugg on that window right click,

select program lines,

in that we can write syntax like <b>break-point.</b>

then excute, cursor comes to the <b>break-point</b> and stops then u can check.

reward points if helpful.

regards,

seshu.

Former Member
0 Kudos

hi vamsi,

Keep an external break-point in the programing lines where you want to debug.

Create programing lines and then u can hard code ""break-point.""

Hope this helps.

Reward points if helpful.

anversha_s
Active Contributor
0 Kudos

hi,

1) DEBUG Smartform:

1) One way to debug smartform is to debug the Function Module of that smartforms.

If you want to debug particular smartform node that the solution would be,

insert a "Program Line" just above the node you want to debug and this program line write a normal abap breakpoint.

So whenever you call the smartforms, it will stop at this breakpoint and you can debug onwards.

2) SFTRACE can be used for debugging SMARTFORMS.

Read More here.

http://help.sap.com/saphelp_erp2004/helpdata/en/49/c3d8a4a05b11d5b6ef006094192fe3/frameset.htm

Rgds

Anversha