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: 

how to debug scripts,smartforms and particularly idocs

Former Member
0 Kudos

Hi friends

how to debug scripts,smartforms and particularly idocs

with thanks and regards

vivek

5 REPLIES 5

former_member181962
Active Contributor
0 Kudos

Debug Scripts:

goto transaction SE71.

Utilities->Activate Debugger.

Debug Smartforms.

Put a breakpoint in the smartform generated function module.

Debug Idocs,

Put a break point in the inbound/outbound processing function modules and then process the idocs using we19 transaction.

REgards,

Ravi

Former Member
0 Kudos

Hi Vivek,

There are 2 separate kinds of debugging available when you try to debug scripts.

1. <b>Debugging the print program</b> : This is the normal debugging we do for our report programs.

2. <b>Debugging the script itself</b> : You Can debug a SAP Script by activating debugger in two ways:

a .In SE71->Menu->Utilities->Activate Debugger, then debugger will be get activated and when your print program is executing Script Debugger will be in active and you can proceed with your debugging.

b. Goto se38-> RSTXDBUG ->Execute this same as going thru in se71-> Menu, now debugger will be activated.

<b>refer to the link below</b>

http://www.howforge.com/how-to-debugging-sapscript-form

Look at the BLOG here, it is well explained

/people/sudheer.junnuthula2/blog/2007/01/09/script-debugging

<b>DEBUG A SMARTFORM</b>

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

<b>SFTRACE</b> can be used for debugging SMARTFORMS.

<b>Read More here.</b>

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

See the Below thread for how to debug the Smartforms

<b>Reward pts if found usefull :)</b>

Regards

Sathish

Former Member
0 Kudos

Debugging smartforms :-

Hi.

In the Smartform, create a Code Node and within the Code Node you can hardcode a normal abap

Break Point.

Reward points if helpful.

Regards.

Srikanta Gope

ferry_lianto
Active Contributor
0 Kudos

Hi,

Welcome to SDN.

1) Debug Smartform:

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) Debug SAPScript

They are two ways to debug the SAPScript.

1) Use Tools - Word Processing - Layout Set (SE71). Enter name of layout set and then Utilities - Activate Debugger.

It is of no consequence which layoutset you enter when selecting the SAPscript debugger. (Menu path: Tools-Wordprocessing - Forms, Utilities - Activate Debugger) The next layoutset called will invoke the debugger.

2) Another way to set the SAPScript debugger is to run program RSTXDBUG.

When you debug Print program it is same as you debug any other ABAP program. While when you debug SAPScript, you actually debug the code ( scripting) you have written SAPScript Form.

3) Debug IDoc

You can use transaction WE19 - IDoc Testing Tool or place a break point for the corresponding function module IDoc process.

Regards,

Ferry Lianto

Former Member
0 Kudos

Hi Vivek.

<b>

DEBUG Smartform:

</b>

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

<b>

DEBUG Scripts</b>

1). Use Tools - Word Processing - Layout Set (SE71). Enter name of layout set and then Utilities - Activate Debugger.

It is of no consequence which layoutset you enter when selecting the SAPscript debugger. (Menu path: Tools-Wordprocessing - Forms, Utilities - Activate Debugger) The next layoutset called will invoke the debugger.

2). Another way to set the SAPScript debugger is to run program RSTXDBUG.

When you debug Print program it is same as you debug any other ABAP program. While when you debug SAPScript, you actually debug the code ( scripting) you have written SAPScript Form.

<b>DEBUG Idocs.

</b>

Go to WE19. Reprocess the IDOC. But before that,put a breakpoint in the function module which will be called during the IDOC processing.

Regards

Aneesh.