Application Development and Automation 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: 
Read only

Pointer not going to debugging in Script

rekha_manjunath2
Participant
0 Likes
1,701

Hi,

I have an issue where i need to debug the driver program and the script program to add a field in the script.

This is a customized transaction and print preview is not appearing. Print is going to spool request (SP01). They are using open form to call the form, but if i put a break point it is not coming to that point. After executing the transaction i am getting the message as per the attachment. Not able to figure how to get to the debugging point. They are using the call function "PRINT_OTF" is this function module used to send the print to spool request?

Kindly help. I am not able to get to the exact point of debugging.

Thanking you,

Regards,

Rekha

8 REPLIES 8
Read only

Former Member
0 Likes
1,642

Hi,

Debugging in Script is tricky. What I always do is simply use messages of type x to find out if a piece of code is reached and also with which data.

for instance:

message x016(rp) with sy-uname var1 var2 var3.

Kind regards, Rob Dielemans

Read only

0 Likes
1,642

Hi Rob,

Yes i was able to get all the details which is printing as message. They are using write statements.

But if i activate the debugger in Script (SE71) it is not going to that point as well as if i put a break point in driver program under the function module Open_form it is neither triggering that point, They use CALL SP01 in one of the statements which is calling the BDC.  Dont know how to debug this program to the value of a field which is passed in SCRIPT.

Please help

Regards,

Rekha

Read only

0 Likes
1,642

Please check below thread.

Read only

0 Likes
1,642

Hi Shyam,

I have tried this and its not going to SAP SCRIPT form. Its not a very simple SCRIPT debugging.

Regards,

Rekha

Read only

0 Likes
1,642

Hi Rekha,

It may be possible that you are activating debugger for a wrong script in SE71. Since you have the spool ID getting generated, you can look up the ID in table TSP01 to find out if there is an entry for the print program or related detail (field suffix2 in particular).

Hope this helps,

~Athreya

Read only

0 Likes
1,642

Hi Rekha,

I don't see that as a possible scenario, until there is a mistake in following the steps correctly.

Please make sure that:

1) you are referring correct print program and form

2) Not using External breakpoint

3) make a note that SAP Scripts are client-Dependent

Warm Regards,

Shyam Agrawal

Read only

0 Likes
1,642

Hi Athreya,

For activating the debugger script program form not necessary to be entered. The SCRIPT by default selects the correct SCRIPT form once activated.

Regards,

Rekha

Read only

rekha_manjunath2
Participant
0 Likes
1,642

Hi,

Pasting a piece of code which uses



* Structure to hold print task code information.

DATA : BEGIN OF gh_p.

         INCLUDE STRUCTURE j_2glpp1.       " Print task codes

DATA :   path LIKE j_2glplp-path,          " Path to VBFA

          bwarts LIKE j_2glplp-bwarts,      " Allowed movement types

          blarts LIKE j_2glplp-blarts,      " Allowed FI document types

          vgarts LIKE j_2glplp-vgarts,      " Allowed MM trans/events

          auarts LIKE j_2glplp-auarts" Allowed Sales document types

          fkarts LIKE j_2glplp-fkarts" Allowed Billing document types

          lfarts LIKE j_2glplp-lfarts" Allowed Delivery types

          routines LIKE j_2glplp-routines,     " User exit

          manual LIKE j_2glpp3-manual,

          active LIKE j_2glpp3-active,

          thirdparty LIKE j_2glpp3-thirdparty,

          stext  LIKE j_2glpp3-stext,

          series LIKE j_2glpp3-series,

          counter LIKE j_2glpp3-counter,

          lowlimit LIKE j_2glpp3-lowlimit,

          uplimit LIKE j_2glpp3-uplimit,

          lastdate LIKE j_2glpp3-lastdate,

          rfprntsk LIKE j_2glpp3-rfprntsk,

        END OF gh_p.



* Call  the appropriate routine.

   IF gh_p-logkind = 'ΤΙΜ'.

     PERFORM tim.

   ELSEIF gh_p-logkind = 'ΔΑ-ΤΙΜ'.

     PERFORM da_tim.

   ENDIF.


The debugger point goes to the 1st if condition and i get the messages.


Next it comes to the elseif condition and this is what i get while debugging.

After the pointer goes to PERFORM da_tim we go to the above screen. Once it comes to endfunction the print message is dispalyed as i have attached the 1st attachment.

Not able to get to the open form.

Regards,

Rekha