cancel
Showing results for 
Search instead for 
Did you mean: 

Script Debugging(Breakpoint)

former_member181995
Active Contributor
0 Kudos

Hi All,

As i activate script debugger from executing the program RSTXDBUG.

when i ran the print program it takes me into script debugger and one pop-up came like command ,symbol, call function,text element,text.

basically i want debug a perticuler perform which written in script.

to reaching that perticuler perform i have to debug almost whole script.

so is there any way in (script debug) to reach direct a in perform.

Amit.

Accepted Solutions (1)

Accepted Solutions (1)

naimesh_patel
Active Contributor
0 Kudos

If you want to stop in perticular perform, than you can put a break point directly in the Subroutine in the Subroutine Pool. When you run the script, it will stop at the break point in the Subroutine. For this you don't even have to activate the debugging of the Script.

Regards,

Naimesh Patel

former_member181995
Active Contributor
0 Kudos

Naimesh,

Yes that fine, but how if I want to jump directly to &VBDPR-POSNR+2& (Which is written in main window, not in perform).

Is there any way in script, like in reports we can jump any where directly without using F6 and F5 by putting break-point on executable statements.

Looking forward hearing you again

Thank you.

Cheers

naimesh_patel
Active Contributor
0 Kudos

Ok.. I never tried this before.. but after couple of tries, I got it directly stopped at the variable.

1. Start debugging.

2. Run your program. So, popup will come

3. In the Popup, Remove the Astrik (*) from the CALL FUNCTION

4. In the Symbol (w/o &) enter VBDPR-POSNR.

And press OK.

It will stop, where it finds the first occurance of the VBDPR-POSNR.

Regards,

Naimesh Patel

former_member181995
Active Contributor
0 Kudos

Genius.

Picky Picky... Exactly what i was looking for

After couple of attempt your suggestion helps me lot to understand how script debuggeing goes and how to draw debuggeing as per our needs.

Before using your suggestion i had some 20-25 attempts to reach VBDPR-POSNR.

after applying your suggestion attempt goes down to only 7.

But if i remove check from includes also it tooks 4 steps.

i'm sure you would be aware about this as removing the check from INCLUDES it skips all INCLUDE statement too(Which make more easier for me), but anyway i want to add one step in your way:

1. Start debugging.

2. Run your program. So, popup will come

3. In the Popup, Remove the Astrik (*) from the CALL FUNCTION

4. In the Symbol (w/o &) enter VBDPR-POSNR.

5.And remove check of INCLUDES too.

And press OK.

Result it tooks me 3 step earlier at desired postion

(VBDPR-POSNR).

@Navin:If you are watching this thread,i'm sorry to unassigned your ruward as thought it is possible see Naimesh's suggestion.

Thank you.

Cheers.

Answers (4)

Answers (4)

Bharathi_j
Explorer
0 Kudos

HI,

In the command line type in the peroform and checkout....

otherwise give a hard break point whereever u require...

Let me know it works??

Bharathi.

former_member181995
Active Contributor
0 Kudos

Hi Bharti,

It wont work.

Amit.

former_member181995
Active Contributor
0 Kudos

Hi Friends,

As i have A text element having name ITEM_CONDITIONS_UNIT.

i put break-point in my driver program on WRITE_FORM of ITEM_CONDITIONS_UNIT. than how can i go into script at this text element ITEM_CONDITIONS_UNIT when debugger reachs at ITEM_CONDITIONS_UNIT's WRITE_FORM.

Is there any way?

Amit.

Former Member
0 Kudos

Hi jony,

U can put a break-point in the print program where ever u want..

Also activate the debugger in the script...

Now when u run the program it calls the debugger and a pop up comes...

1. If u want to debug step wise to reach the break-point in the prgrm then do F5 ...it will debug and when ur Text Element is called it stop at the point where u had put a break point in the print program.

2. Suppose u directly want to go to the break-point in the print program den when u get a pop-up asking u to press OK...or EXIT...Click Exit it willl directly call the break-poirt in the print program where u want to debug..

Hope this helps..

Thanx,

Navin.

former_member181995
Active Contributor
0 Kudos

Hi Naveen,

I want to go direct perticuler text-element in script not in print program.

because when i press F5 step by step its too time consuming,

so is there any way to reach direct a perticuler text element where i wrote my perform in script.

Amit.

Former Member
0 Kudos

Hi jony,

The only disadvantage of Scripts is you have to debug using F5 to reach to a certain point in the Script debugger..

There is no alternate solution to a call TEXT ELEMENT dynamically as we set breakpoints in programs...

Thanx,

Navin.

former_member181995
Active Contributor
0 Kudos

Refresh

Anyone else?

Is there any way guys?

Moved to the correct forum by moderator

Edited by: Matt on Nov 6, 2008 8:14 PM

Former Member
0 Kudos

hi check this...

https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/debugging%2b%2bscript%2b%2bif%2bthe%2brequir...

Check this info.

First check if the script is being called. To do this do the following

Before executing the program go SE71 transaction , In the menu you will find Utilities --> Activate Debugging.

Press Activate Debugging , this will activate SAP Script debugging.

Now try executing your program, if your program calls the script then the control will come to the script and then you can Press F5 to execute it step by step.

OR

Now when you execute the program, in the selections screen, top left you will have the command window, type /h and press enter, this activates debugging for the program, now execute the program and press F5 to see step by step execution.

When the function OPEN_FORM is called, press F6 and after execution see the value of SY-SUBRC.

Hope this resolves your query.

former_member181995
Active Contributor
0 Kudos

Any suggestions?