cancel
Showing results for 
Search instead for 
Did you mean: 

Need to debug the SAP Script from the transaction VF02

Former Member
0 Kudos

Hi Friends,

I am generating the Billing Invoice from the transaction VF02, Now I want to check for the bank detials in the SAP Script

for that I wated to debug the Script.

I have tried 3 ways,

1. Activate debugger in SE71 to the script and execute VF02

2. Kept Break Point in the OPEN_FORM in the driver program and Activate debugger in SE71 and execute VF02

3. In VF02 I have given Biling document Number and before saving gave the /h and saved, in the debugging Menu-Settings-Update Debugging, I have switched on

In all the above three cases the control is not stopped at the SAP Script.

Please look into this and advise me how can I stop control at Script ?

Accepted Solutions (1)

Accepted Solutions (1)

Harsh_Bansal
Contributor
0 Kudos

Hi,

You can try this option then -

Use a routine in program.

in sapscript you can have :

/: Define &var1&

/: Perform Get_var in Program Name_program

/:using &var2&

/:changing &var1&

/:ENDPERFORM

And then in the program in this routine i create a endless loop

data: a(1).

data: b(1).

while a = b.

if sy-uname eq 'user'.

break user.

a = '1'.

endif.

ENDWHILE.

Regards,

Harsh Bansal

Answers (4)

Answers (4)

former_member203305
Active Contributor
0 Kudos

Hi.

Follow this steps.

1.- Go to SE71 and activate the debug.

2.- Go to VF02, put the number of the billing doc without clic ENTER (stay in the same screen) and then on the toolbar to to "Billing Document" and then "Issue Output to" and then clic on Print Preview.

That should work.

Regards

Former Member
0 Kudos

Hi Miguel,

Thnks alot.

Its worked.

Regards,

Uma

Former Member
0 Kudos

Hi,

During saving of billing document the script is not triggered. After SAVE goto menu>Billing Document>Issue Output then select the o/p type then the script will be trigered.

Former Member
0 Kudos

Hi Shetty,

I did as you said but script not triggered.

Former Member
0 Kudos

HI,

Is ur output is getting displayed ?

If yes then check form it might be Smartform.

check the form name and program name in nace tcode

Former Member
0 Kudos

Hi

yes, output is: RD00

In NACE program is : ZRVADIN01

Form : ZRVINVOICE01(SAP SCript)

Edited by: umadommaraju85 on Mar 6, 2012 10:35 AM

Former Member
0 Kudos

Hi,

Just try the given two option

1. Start the debugger b4 u press the preview button and ten set a breakpoint at Function module call function OPEN_FORM.

2. Do u have mutiple client in ur system ? Are u setting the break point in the client in which ur test ?

Former Member
0 Kudos

Hi

Let me explain what I am doing exactly

VF02 - Billing Document then Enter - Menu GOTO - HEADER- OUTPUT - select RD00 - Press 'Repeat Output' Button on the bar

- select that output and - Communication Method on tha bar - change the printer to LOCL - then SAVE

After that we will come back to the VF02 initial screen and with the Info mesage "Billing Document 9000XXX Sved"

Spool has been generated - In SP01 I can see the invoice output.

All this process is in same client.

Please advise me now.

Former Member
0 Kudos

Hi,

Not sure i think this is related to the Communication Method parameter.

Is it happening for all Billing docs ?

Harsh_Bansal
Contributor
0 Kudos

Hi,

May be you have specified Printer thats why it is going to spool.

Set it to LOCL for time being..then you will be able to debug i think.

Regards,

Harsh Bansal

Former Member
0 Kudos

Bansal,

I have changed the printer to LOCL and tried even though not stopped.

Harsh_Bansal
Contributor
0 Kudos

Hi,

The first method should have worked.

Try activating debugger and then open VF02 again.

Make sure you are doing both these things in same client.

Regards,

Harsh Bansal

Former Member
0 Kudos

Hi Bansal,

Thanks for reply.

But sorry that is not working.

without stoping the control at the script spool has been generated.

In all the cases the same thing is happening.

Please suggest me is there any other ways to debug script while executing the transaction VF02.

former_member189779
Active Contributor
0 Kudos

Hi

Try using External Break Point and not session breakpoint in your driver program. And also activate debugeers in SE71