Application Development 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: 

SAP Script and print program

Former Member
0 Kudos

Hi

In my Print pgm , I m coding like...

concatenate data_id vbdkl-vbeln into new_delivery.

if likp-kunnr eq c_ship_party1

ship_check = 1.

how can I make the variables new_delivery and ship_check visible in my Sap Script. Please advise.

Thanks

Tharani

1 ACCEPTED SOLUTION

manuel_bassani
Contributor
0 Kudos

Hi Tharani,

A variable to be visible from SAPScript must be declared as global variable in the print program (not inside forms or other).

In sapscript use &new_delivery& &ship_check&

Regards, Manuel

5 REPLIES 5

manuel_bassani
Contributor
0 Kudos

Hi Tharani,

A variable to be visible from SAPScript must be declared as global variable in the print program (not inside forms or other).

In sapscript use &new_delivery& &ship_check&

Regards, Manuel

0 Kudos

hI

I have declard these variables as global only. but then I m getting the values ship_id but not new_delivery.

0 Kudos

Hi, you have to dig in a bit more to see

1) the variable names in prg and sapscript are exactly the same

2) the variable value is not being overwritten by something else before you call sapscript

3) the variable is declared globally and not locally

cheers

0 Kudos

HI,

The variable : new_delivery might not be populating the program , Debug the program and check the variable is populating or not.

The best way to display the values on SAP script is

call function 'TEXT_SYMBOL_SETVALUE'

exporting

name = '&new_delivery&'

value = < table field or any value >.

Hope this will be helpful.

0 Kudos

Hi,

Try also to do a syntax check of the SAPScript

in Se71 choose form->check->texts. Choose print program and press OK

Manuel