cancel
Showing results for 
Search instead for 
Did you mean: 

data declaration in SApscript

govind_parmar
Participant
0 Kudos

Hi Experts,

I have passed a T042I-ZLSCH variable from the print program to the script.

Upon doing syntax check on the form it gives an Error: Unknown symbol T042I-ZLSCH

I have declared this in print program

Thanks,

Govind

Edited by: Govind Parmar on Mar 20, 2008 7:18 AM

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

HI,

declare in the scense defining the variable in script itself.

for this we use DEFINE keyword.

govind_parmar
Participant
0 Kudos

Hi Mytri,

Thanks. But generally we dn't use DEFINE statement in SCRIPT. I am using lots of such variables in the script which are defined in driver program only and not in script. But there is no error message for those ones.

Former Member
0 Kudos

hi,

the script cant recognise bcoz it was not declared in script. unless it was defined in it, how can it know? thats why it just gives a warning that its unknown.

so if that is defined in driver program, we can ignore the warning. else we need to define it either in script or in driver program.

but when it was executed with a driver program, then there it checks for the variable with the name. so as we declars it in driver program, it takes that value n gives the output.

hope it helps u. any more doubts, post them.

reward if helpful.

govind_parmar
Participant
0 Kudos

How do we declare variable in the script. I have heard for the first time??

IF &T042I-ZSCHL& = 'G' in the window under an text element

Former Member
0 Kudos

Hi,

Just activate the SAPScript and run the print program and check that whwther it is displaying correctly or not.

Regards

Sandipan

govind_parmar
Participant
0 Kudos

Hi,

I have declared these variables in the driver program, and the output is also correct. But y it is giving an error which checking synatx.

Thanks

Former Member
0 Kudos

hi,

the script is not finding the variable means, just check it whether it was kept in a text element or not.

through text element only the script can find the variable which we assigned in driver program.

if u did all n still error coming means, it may b a warning, just check it. if its a warning, just ignore it, activate the scripe. now execute ur driver program, u will definitely have output.

hope it helps u. if still erro or any doubts, post them back.

reward if helpful.