Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

how to debug a smartform

Former Member
0 Likes
946

hi

how to debug a smartform.

6 REPLIES 6
Read only

Former Member
0 Likes
757

Hi,

Add program lines node above the position where your want to analyze. Write break-point in the code within that.

Regards

Read only

Former Member
0 Likes
757

Hi,

To Debug the smartform u need to create program lines where u want to fetch or display the data.

In that program lines hardcode command BREAK-POINT

While executing the smartforms control will be stops at the break point.

Reward if helpful....

Read only

Former Member
0 Likes
757

hI,

when you activate the smartform it gerenates a FM, go to that FM and put break-point where you want.

sudheer.A

Read only

Former Member
0 Likes
757

Hi,

In the Smartform, within the Code Node you can hardcode a normal abap Break Point ..

Please set a break point in side the smartform:

BREAK <USERNAME>.

Then at the time of print/ preview the program stops there.

Example : If you set the break point in initializationas

BREAK <USERNAME>.

Program stops at break point. After that use Serach and set more break points.

-


>Search the program logic/Textelement/Address via search and set the break point at that code.

Other 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.

or

SFTRACE can be used for debugging SMARTFORMS.

Read More here.

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

See the Below thread for how to debug the Smartforms

Regards,

Priyanka.

Read only

Former Member
0 Likes
757

hi,

<u><b>1) DEBUG Smartform:</b></u>

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

Reshma

Read only

Former Member
0 Likes
757

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.