Skip to Content
0
Former Member
Apr 30, 2012 at 08:58 PM

Can you change program symbols using PERFORM in SAPscript?

152 Views

Hello All:

We have a situation where some of the standard SAP fields/values (program symbols) being passed to the SAPscript form are initial. For example, when multi-level packaging is used (Progam SDPACKDR), LVBPLP-VBELN, POSNR, and VEMNG are initial. These same fields are populated when single-level packaging is used. A large number of SAPscript forms have PERFORM statements that pass these values to ABAP routines in order to get other values needed for the HU labels. Now that some plants are using multi-level packaging, their labels are not printing with all of the necessary data.

I have added code to one of our SAPscript forms that checks the values of these 3 fields. If they are initial (zero, null, etc.), a PERFORM statement is executed that calls an ABAP subroutine that gets the appropriate values for these fields (to be used in the subsequent pre-existing PERFORM). I have verified that the ABAP subroutine is working properly and that the values are being stored in the table passed back to the SAPscript. However, when control is passed back to the SAPscript, the values of these program symbols are still initial. The really interesting part is that if a print preview is done first and the output is issued immediately afterwards without backing out of transaction VL74, the values are populated correctly for the labels to be printed.

Does SAP allow the values of program symbols to be changed like I have done or do I have something wrong in my ABAP and/or SAPscript? I have provided code samples below. Any and all help will be greatly appreciated. Thanks in advance!

Attachments

SAPscript.jpg (55.6 kB)
ABAP.jpg (140.8 kB)