2014 Jun 26 10:00 AM
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?
2014 Jun 26 10:56 AM
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?
2014 Jun 26 10:08 AM
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
2014 Jun 26 10:23 AM
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?
2014 Jun 26 10:27 AM
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
2014 Jun 26 10:39 AM
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
2014 Jun 26 10:56 AM
Hi All,
Issue solved..
I was putting the variable between the Perform and endperform..
Instead of that I put the same after the endperform..
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |