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

HOW TO CREATE A VARIABLE IN SAP SCRIPT

Former Member
0 Likes
1,091

HI ALL,

CAN ANYONE TELL ME HOW TO CREATE A VARIABLE IN SAP SCRIPT.

THANK YOU,

BYE

TAKE CARE.

4 REPLIES 4
Read only

Former Member
0 Likes
724

Hi Ravi,

try this:

/: DEFINE &MYVARIABLE& := 'My content'

and you got the variable &MYVARIABLE& filled with text "My content"

Good luck

Jo

Read only

ramesh_kajuru
Explorer
0 Likes
724

Hi Ravi,

You can delcare a variable in the respective print program of that particular script and you can make use of that variable.

Read only

Former Member
0 Likes
724

Hi Ravi,

You can use like this


A text in the editor contains the following DEFINE commands:

/: DEFINE &mysymbol& = 'xxx xxx xxxxx xxxx' 
&mysymbol& 
/: DEFINE &mysymbol& = 'yyyyy yyy yyyy' 
/ &mysymbol& 

The printed text appears 

Read only

Former Member
0 Likes
724

Hello tehre,

YOu can define ht evariables as follows ::

DEFINE &name& = 'sachin'.

Second option is to define a global variable in print program and use it directly in the FORM.

Please reward points if useful.

cheers,