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 Data not appearning

Former Member
0 Likes
1,025

HI all,

I am new to SAP Script.

In a script I have declared variable in the driver program.

Also getting value in it. But the problem is the value is not appearing in the preview.

I declared that varia in script also. As  DEFINE &GV_CIN& = &T001Z-PAVAL&.

Still I am getting the output..

Is there anything that is missing?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
999

Hi All,

Issue solved..

I was putting the variable between the Perform and endperform..

Instead of that I put the same after the endperform..

HI all,

I am new to SAP Script.

In a script I have declared variable in the driver program.

Also getting value in it. But the problem is the value is not appearing in the preview.

I declared that varia in script also. As  DEFINE &GV_CIN& = &T001Z-PAVAL&.

Still I am getting the output..

Is there anything that is missing?

5 REPLIES 5
Read only

naveenvishal
Contributor
0 Likes
999

Hi Yash,

To transfer data use 'WRITE_FORM' Function Module as follows by passing Element name and Window of Element:

CALL FUNCTION 'WRITE_FORM'              

     EXPORTING                          

          ELEMENT = 'DEMO_ELEMENT'          

          WINDOW  = 'WINDOW1'          

     EXCEPTIONS                         

          OTHERS  = 01.                 

Note: 'DEMO_ELEMENT' is the element in SapScript where the data is used. Say,

/E  DEMO_ELEMENT

     &MARA-MATNR&

Hope this helps.

Regards,

Naveen Vishal

Read only

0 Likes
999

I think this solution can be included in a driver program.. But in my case the driver program is standard.

So how can I do that?

I have written my code in this Z report.

Should I add your code in that Z report?

Read only

0 Likes
999

Hi Yash,

Yes you have to add FM 'WRITE_FORM' in driver program. And Element in your SAPScript.

Now with the FM we are instructing the script to Write The Form having element (which we have defined in SAPScript) and Window (also in SAPScript).

Hope this helps.

Regards,

Naveen

Read only

Former Member
0 Likes
999

Hi,

what do you mean by driver programm? what is ur z-report when driver programm is standard?

To get a variable in the formular, you normaly dont use "define", you just write &T001Z-PAVAL& (for example with "*" in command line).

If you define a new variable by "define", you have to print it too.

Defines in formulars are just used for Customizing issue (saw this in standard formulars)

or to count pages, rows or stuff like that.

regards

Stefan Seeburger

Read only

Former Member
0 Likes
1,000

Hi All,

Issue solved..

I was putting the variable between the Perform and endperform..

Instead of that I put the same after the endperform..