cancel
Showing results for 
Search instead for 
Did you mean: 

Sapscript module for deliveries

Former Member
0 Kudos

Hi,

in a sapscript module for the outbound delivery printout I would display an header text (ID z001) if this text exists (is not blank), if the text doesn't exist the printout will display the following data:

&VBDKL-NAME1_SP&

&VBDKL-STRAS_SP&

&VBDKL-PSTLZ_SP&  &VBDKL-ORT01_SP&

&VBDKL-REGIO_SP&  &VBDKL-LAND1_SP&

In trx NACT for application V2 I edit the module and I wrote the following code:

INCLUDE &VBDKL-TDNAME& OBJECT VBBK ID Z001

&VBDKL-NAME1_SP&

&VBDKL-STRAS_SP&

&VBDKL-PSTLZ_SP&  &VBDKL-ORT01_SP&

&VBDKL-REGIO_SP&  &VBDKL-LAND1_SP&

After this, system displays in the printout the header text with id z001 and the other information (NAME1_SP, STRAS_SP and so on).

How can I create the above condition so that if header text with id z001 is blank, system will display only the other data (NAME1_SP, STRAS_SP.....) ?

Thanks

Best regards

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Try inserting commands in the SAPScript logic, like:

/: IF &VBDKL-TDNAME& <> ' '

/: INCLUDE &VBDKL-TDNAME& OBJECT VBBK ID Z001

/: ELSE.

   &VBDKL-NAME1_SP&

   &VBDKL-STRAS_SP&

   &VBDKL-PSTLZ_SP&  &VBDKL-ORT01_SP&

   &VBDKL-REGIO_SP&  &VBDKL-LAND1_SP&

/: ENDIF

supply a tdformat field entry (left two-char) as needed for the data values.

Former Member
0 Kudos

Hi,

what do you mean by statement ?:

"supply a tdformat field entry (left two-char) as needed for the data values"

Answers (0)