cancel
Showing results for 
Search instead for 
Did you mean: 

Sap script symbol, how value is getting populated

Former Member
0 Kudos

We have a Delivery Note in which it says Total units = 56. But in debug I saw the symbol &UNIT(Z)& which is getting this value 56 on Devlivery.

I want to know from where this value is coming on layoutset? can any one please tell me....as this is not table field or custom variable that is coming from print program.

Thanks a lot.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

have you checked your sapsctipt for PERFORM xxxx IN PROGRAM xxxxxxx

changing UNIT

Maybe that is the reason it cannot find in the driver program.

by the way someone said in this thread that local variables could be printed.

That is WRONG ONLY global variables can be printed by sapscript

I mean with global parameters, parameters which are know in the top of the program ( or if called by a function module in the top of that function group)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi

Activate the Script Debugger and run the Tcode and also in the driver program place a break point on th WRITE_FORM for the window in which the this value is printed ...

surya

Former Member
0 Kudos

Does the program use performs? Because forms can use local variables with different name from the main one.

Former Member
0 Kudos

Yes the program uses many performs. The Include is RVADOPFO.

Former Member
0 Kudos

Hi,

I think through debugging only you can find the same.

In your script utilites activate debugger and your include set a break point in the open form and after reaching your include

in the debugging screen press f6 and find where your unit value is coming from.

In your script display check defination select here also you will find in which programs your form is triggered.

Your include is using in many program, if you know program then keep a break also in your program especially in write_form

function modules.

Thanks,

Phani.

alex_m
Active Contributor
0 Kudos

The UNIT should be declared in your driver program and the value may be set in program or in script.

Former Member
0 Kudos

I searched this symbol in print program but nothing exists like this varible UNIT.

alex_m
Active Contributor
0 Kudos

Try to do global search or see there are any include your main prog.