cancel
Showing results for 
Search instead for 
Did you mean: 

Sap Script: Debugger not stopping on break-point

Former Member
0 Kudos

My script is in the Header portion of the form.  The break-point is not stopping, I can't figure out why.  I made sure to Activate the Debugger from the menu first.  I assume it's acceptable to call a subroutine from the Header...this code is only intended to gather data within the FORM and output a text file, nothing is returned to the sap script.

Many thanks,

Phillip

The relevant code:

Order Number :  &CAUFVD—AUFNR&

Material: &CAIJFVD-14ATNR&

Description: &PSFC_HEAD-MATTEXT&

Batch: &AFPOD—CHARG&

DEFINE &OUTVAR1 &

PERFORM PROCESS_PRINT IN PROGRAM ZPKG_MFG_SOMEPROG_SUBROUTINE

USING &CAIJFVD-AUART&

USING &CAIJFVD-MATNR&

USING &AFPOD—CHARC&

USING &CAJJFVD-AUFNR&

USING &PSFC_HEAD—MATTEXT

CHANGING &OUTVAR1 &

ENDPERFORM

FORM in the PROGRAM ZPKG_MFG_SOMEPROG_SUBROUTINE (excerpt of relevant code):

FORM process_print TABLES itab STRUCTURE itcsy

                                             otab STRUCTURE itcsy.

{ DATA: declarations here for the form}

BREAK-POINT.

{ selects and assignments}

ENDFORM.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Phillip,

1. In Subroutines (PERFORM...) called from a SAPSCRIPT-Form, the ABAP-Debugger is active. SAPSCRIPT-Debugger is active before and after.

2. might be a copy-past error but maybe the problem is the missing closing '&' for symbol &PSFC_HEAD—MATTEXT

At least this would explain why the ABAP Debugger does not start.

Kind regards

Matthias

Former Member
0 Kudos

Hi Matthias,

Yes, the & is there, it did not paste in my example.  thank you for that.

Actually, the debugger does seem to start, I get the dialog to enter a COMMAND or CALL FUNCTION, but this part of the debugger I am not familiar with.  I step through (F5), but it seems to jump straight to the MAIN and not process the PERFORM command in my Header.

Thanks,

Former Member
0 Kudos

Hi Phillip,

debugger usually starts with the MAIN window and not necessarily from top to bottom.

Going through until you reach your window per F5 can be tedious.

The easiest way to make the debugger stop at the position you need: Uncheck everything at the startscreen of the SAPSCRIPT-Debugger (Warning Messages etc.) and in "Text element", enter the corresponding text element (the /E line).

If you don't have any text element in the HEADER window, you could enter "PERFORM" (without the "") in the "Command" field. Then, skip to your position per F8.

Kind regards

Matthias

Former Member
0 Kudos

Ok - I cleared the checkboxes and values, and placed PERFORM in the command field, used F8 until the print dialog appeared (which signals the end).  The PERFORM in the MAIN window fired but not the one in my Header.

I will also add that I'm testing this using transaction COPI.  Not sure if that is affecting it negatively or not.

Former Member
0 Kudos

If the Debugger does not stop, then there is probably some error between PERFORM and ENDPERFORM.

It's pretty much guessing from here on:

- In the code you pasted, there is CHARC instead of CHARG. A non-existent variable could be one reason.

- Do you have the "/:" set in all tag columns of the perform?

If all else fails, try to jump to the last PERFORM in the MAIN Window and then move per F6 to the HEADER Window.

Former Member
0 Kudos

Ok my error - I was missing an '&' character.  The corrected code is:

Order Number :  &CAUFVD—AUFNR&

Material: &CAIJFVD-14ATNR&

Description: &PSFC_HEAD-MATTEXT&

Batch: &AFPOD—CHARG&

DEFINE &OUTVAR1 &

PERFORM PROCESS_PRINT IN PROGRAM ZPKG_MFG_SOMEPROG_SUBROUTINE

USING &CAUFVD-AUART&

USING &CAUFVD-MATNR&

USING &AFPOD-CHARG&

USING &CAUFVD-AUFNR&

USING &PSFC_HEAD-MATTEXT&

CHANGING &OUTVAR1 &

ENDPERFORM

I am using the PC Editor.

I was able to get to the Header and my PERFORM command in the debugger, I stepped through using F6 and it never went to the subroutine to hit the break point.  * ALSO, I hit a break point in the FORM called in the MAIN window.  So it appears the form called from the Header isn't firing.

I am apparently still missing something.  But you are helping me get through it. I appreciate it.

Former Member
0 Kudos

I resolved my issue, it was the /: tags.

Thanks very much.

Answers (1)

Answers (1)

former_member220028
Active Contributor
0 Kudos

Hi,

why dont you call the perform inside your formular-programm?

as you figure out its hard to debug and not easy to read what the logic is.

regarding to MVC-Model the logic should stay in formular-programm and the layout is designed in sap-script.

Did any breakpoint take effect? I always use programm RSNAST00 to get in breakpoints in sapscript.

therefor you need to generate a formular that will get printed by job  - not by saving the appilcation.

regards

Stefan Seeburger