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

Former Member
0 Likes
378

Hi Friends,

I have a variable in my driver pgm called zvar.For this i am getting data based on a select query.So how can use this zvar in my sapscript.

Suppose if i have to write a if condition in script editor...&zvar& EQ 'abc'.Then no data is coming in Zvar...How can i do this?...

Regards

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
357

Hi ravi,

I you have done everything exactly in the same way you have mentioned here, it should come.

Anyhow, check if the value of Zvar is populated before the call to the OPen_form fm.

Activate the script debugger to see the value at run time,

Regards,

ravi

3 REPLIES 3
Read only

Former Member
0 Likes
358

Hi ravi,

I you have done everything exactly in the same way you have mentioned here, it should come.

Anyhow, check if the value of Zvar is populated before the call to the OPen_form fm.

Activate the script debugger to see the value at run time,

Regards,

ravi

Read only

Former Member
0 Likes
357

hi Ravi,

Check this way out

Example

DATA: RNAME(30) VALUE 'WRITE_STATISTIC',   "Form and program 
                                           "names must 
      PNAME(8)  VALUE 'ZYX_STAT'.          "be written in 
                                           "upper case 
PERFORM (RNAME)         IN PROGRAM ZYX_STAT. 
PERFORM WRITE_STATISTIC IN PROGRAM (PNAME). 
PERFORM (RNAME)         IN PROGRAM (PNAME). 

All three PERFORM statements have the same effect, that is, they call the subroutine 'WRITE_STATISTIC', which is defined in the program 'ZYX_STAT'.

Regards,

Santosh

Read only

messier31
Active Contributor
0 Likes
357

Hi Ravi,

Yes you to get the value from driver prog we use &ZVAR&.. and it works...

Try debugging the driver program to check whether proper value is getting populated in ZVAR..

If the check is not working in sapscript then switch the condition from sapscrpt to in driver program....

let us know ur findings...

Enjoy SAP.

Panakj Singh.