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

SAP Script and print program

Former Member
0 Likes
685

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
Read only

manuel_bassani
Contributor
0 Likes
644

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
Read only

manuel_bassani
Contributor
0 Likes
645

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

Read only

0 Likes
644

hI

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

Read only

0 Likes
644

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

Read only

0 Likes
644

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.

Read only

0 Likes
644

Hi,

Try also to do a syntax check of the SAPScript

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

Manuel