cancel
Showing results for 
Search instead for 
Did you mean: 

how can we debugging scripts and smartforms

Former Member
0 Kudos

hi

experts can u help me for this

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

<b>1.sap scripts</b>

<b>This can done in two ways:</b>

In the form <b>Utilities->debugger / RSTXDBUG FM for debugging script</b>

The <b>Procedure for debugging SAP script is:</b>

Generally SAP script contains the Layout and corresponding print program.

First go to <b>SE71 and enter ur script name.</b> In the same screen go to Utilities->click on activate debugger option.

Now go to <b>SE 38 and enter ur Print Program name</b> and execute the program.

Now you can debug the script Page wise and window wise.

<b>2. sap smartforms</b>

<b>1</b>.In <b>the Smartform</b>, create a Code Node and within the Code Node you can hardcode a normal abap

Break Point.

<b>2</b>.Smart debugging:--> Execute the smartform.It will open a FM in se37 screen.

--> Press Display.

--> Press find(CTRL+F).

--> Enter command here at which you want to put the break point.

--> Select the radio button 'in main program'.It will open the point at which you want to put the breakpoint.

--> Put the breakpoint here and execute the smartform again.It will stop at the point where you put the breakpoint.

On activating smartform it will generate one function moudle, take that name and go to SE37 , Put your generated FM name and display.. check the code where you want debug.. place the break point there .. come back and then execute your dirver program .. it will stop you at your break point.

<b>3.</b>

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

reward points if it is usefull .....

Girish

Former Member
0 Kudos

YOU Can Debug Smartform  Using SFTRACE T-code .

If you want to debug Smartform in non-modifiable client, then you can try debugging Smartform using Transaction SFTRACE

Click On link Below ....

How To Trace Smartform

Former Member
0 Kudos

Hi,

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

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

2. Debugging the script itself : 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.

refer to the link below

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

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.

Former Member
0 Kudos

hi raviteja,

for script there are 2 ways by which u can debugg...

1) execute program RSTXDBUG, it will activate debugger .

2) gotot se71 --> in menu utilities --> select activate debugger..it will activate debugger.

so when u execute the transaction for that script it will go in debugging mode....

for smartform...

goto smartforms --> enter SF name...and execute.

it will goto se37 --> now click on display.

search for the code where u want to set break point.(use CNTRL+F)

second way is to write BREAK sy-uname in PROGRAM LINES node.....

this is how we set BP....

hope this may be helpfull....

please reward in case usefulll....

regards,

Praashant

Former Member
0 Kudos

Hi Raviteja,

Debug Script:

Go to SE71 enter the name of the script and press utilities on the menu bar and activate debugger.Then go to your driver program and run it ,it will take you to the script in debugging mode.

Debug Smartforms:

Go to smartforms insert a program line and write break-point if you want everybody to enter in a debugging mode everytime that smartform is used,or else if only you want to debug that smartform then insert a program line and write break User (User being your user id).

Regards,

Nikhil Moghe

Former Member
0 Kudos

Hi

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

script

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.

As per ur question there is nothing new with script debugging,

it is same as normal report debugging...

<b>Reward points for useful Answers</b>

Regards

Anji

Former Member
0 Kudos

Hi Raviteja,

For enabling the debugging in the SAP Scripts,

Goto Transaction Se71, enter the name of the script . Menu - Utilities - Activate Debugger.

For Debugging the Smartforms , U can go to the driver Program and insert a breakpoint in that , then when it calls the function module generated for the smartform , press F5 or u can insert a break point in the function module itself generated for the smartform.