‎2006 Oct 27 1:48 PM
Hi Friends,
How to define a variable in the form (SAP Scripts).
Which text element shall I use.
Thanx in advance,
Venu
‎2006 Oct 27 1:52 PM
Hi venu
Check this link
this contains a simple example
http://www.thespot4sap.com/articles/SAPscript_Introduction.asp
Regards sandeep
Reward points appriciated
‎2006 Oct 27 1:58 PM
Hi,
generally we define variables in the program that calls the form(script) and use it in ths cript.
like
data:var(10) type c. //in the call program(se38)
var = 'variable'.
&var& //use in script
Regards,
Sowjanya.
‎2006 Oct 27 2:04 PM
‎2006 Oct 27 2:14 PM
Hi,
I want to define a variable for the field vbrk <b>fikmg</b>, Can you please tell me how to define.
Thanx in advance.
Venu
‎2006 Oct 27 2:20 PM
&vbrk-fkimg& ?
What is your requirement? What do you want to print?
Message was edited by: Tomasz Kozerski
‎2006 Oct 27 2:25 PM
Using this field I have to do some calculations and print it on the layout, pls tell me how to do it.
Thanx n advance,
Venu
‎2006 Oct 27 2:33 PM
U can do that in the print program..why do you need to it in the script ???
‎2006 Oct 27 2:05 PM
Hi,
you can define text element in window as
/E EH1
/: DEFINE &NEW_PG& = 'X'
Regards
amole
‎2006 Oct 28 2:39 PM
Venu,
all variables and structures defined globally in the print program are available without any further steps in SAPSCRIPT forms.
All additionally needed variables are defined simply by use. You can set values by using DEFINE statemwnt or by using Sapscript perform. If you did not use perform before, look at documentation for the statement!
But note that only the variables global in print program carry all the characteristics for display, i.e. 1000 or decimal separator.
All 'pure' Sapscript variables are pure text. So if you need formatted output from a PERFORM subroutine, use write to ... in the ABAP form and pass the result to Sapscript.
Hope it helps,
Clemens