Application Development 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: 

Debugging smartforms

Former Member
0 Kudos

Hi,

Is there any way to put a breakpoint in smartforms and debug it without inserting hard BREAKPOINT in the form.

I need this as i do not have Edit access to the form.

and i need to debug the program lines in the smartform.

I do not want to debug the FM associated with the smart form.

Regards,

Raghavendra.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Check this info.

Debug SF:

For Preview :

SMARTFORM-> execute->execute->pass values if require to import & table parameters ->execute-> on the pop up window give Printer name as LP01 and press print preview.

For debugging -

1. Write BREAK POINT in the code window.

2. Put a break point on the call function in the driver program

3. Put a break point in the generated Function module.

OR

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

OR

Four ways you can debugging.....

1.place SFTRACE inplace where we enter T_CODE and press ENTER.

after that press F8.

2 ./H

3 /SH

4.after generating the function module there is a button DEBUGGING

***************************

Refer to these related threads

********************************

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

7 REPLIES 7

Former Member
0 Kudos

Hi

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.

If you are using loop,then inside that create program line.In that, increment a counter like the normal abap program.Then display that counter.

To be more specific,

declare a variable in Global Definitions-Global data as below

cnt type i 0(default)

Then inside the loop,

in text element , drag the variable which is under Global data in field list .

After that create a program line,give cnt as input and output parameter.

In logic,write

cnt = cnt + 1.

Then you will get the desired output.

If your problem is solved,reward points and close the thread.If not,get back.

0 Kudos

Hi Naresh,

I have already mentioned in my post that as i do not have access to EDIT the form i cannot hard code BREAK-POINT in program lines.

0 Kudos

HI

in that program in display mode also you can set break points

like this

select the line where you want to put the break point

and

click on the STOP button which is exsists on application tool bar

thats it

when u execute that program when ever the control comes to that line it automatically stops it

<b>Reward if usefull</b>

former_member386202
Active Contributor
0 Kudos

Hi,

Set the breakpoint in Function module which is generated by smartform

and debugg.

Regards,

Prashant

Former Member
0 Kudos

Check this info.

Debug SF:

For Preview :

SMARTFORM-> execute->execute->pass values if require to import & table parameters ->execute-> on the pop up window give Printer name as LP01 and press print preview.

For debugging -

1. Write BREAK POINT in the code window.

2. Put a break point on the call function in the driver program

3. Put a break point in the generated Function module.

OR

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

OR

Four ways you can debugging.....

1.place SFTRACE inplace where we enter T_CODE and press ENTER.

after that press F8.

2 ./H

3 /SH

4.after generating the function module there is a button DEBUGGING

***************************

Refer to these related threads

********************************

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

Former Member
0 Kudos

HI,

There is no direct way of debugging the smartform other than hardcoding the break point in the program lines. Also since you do not want to debug the FM, I see only one option and that is: copy the statement / global variables which you want to debug and while debugging create a watchpoint on the variable. I think it should work.

Hope it helps.

Lokesh

Former Member
0 Kudos

Hi Raghav,

Take the Function module from the Smart form -> Environment -> Function Module Name.

Goto that Function Module and go to the Main Program of that FM. Keep the Break point in Program.

Whenever the smart form triggers it will stop at that break point and you can do debugging.

<b>Reward points for helpful answers</b>

Satish