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

DEFINE statement not working well in script between IF...ENDIF

Former Member
0 Likes
516

Hi Experts,

I have used Define statement in script for data assign to variable, But i need to use inside IF...ENDIF statement, So its its not assigning or Clearing also.Anyone can suggest how to use DEFINE statement in between IF...ENDIF.

Earlier i have used many times its worked fine but below mentioned logic why its not working fine.

/:   IF &T_ITEMS-LABEL_REQ& NE ' '

CL ,,,,<B2>|</>,,<B2>|</>,,<B2>|</>,,<B2>|</><B6>&T_ITEMS-LABEL_REQ&</>

/:  DEFINE &GV5& = 'LIQ'

/:  ENDIF.

This LIQ i want to assign in variable GV5 variable, this variable datatype is CHAR3.

Anybody can help  me  for this issue.

Thanks.

2 REPLIES 2
Read only

Former Member
0 Likes
465

Hi Ramesh

  You can write the code in the script  this way :

/:  DEFINE &GV5& = ' '

/:   IF &T_ITEMS-LABEL_REQ& NE ' '

CL ,,,,<B2>|</>,,<B2>|</>,,<B2>|</>,,<B2>|</><B6>&T_ITEMS-LABEL_REQ&</>

/: &GV5& = 'LIQ'

/:  ENDIF.

First define the variable and within IF condition you can assign it to the value.

Thanks

H.Anuvarshini

Read only

0 Likes
465

Hi Anuvarshini,

I have tried with your suggestion's but its not working, That value not assiging into variable.

Please suggest some other way.

Thanks,