‎2006 May 23 5:32 PM
Hello Friends,
I try to access a variable in SAP Script.
For ex.
IF &Y_VAR& EQ 'X'.
When the control goes here, during debuging, it simple omits the whole condition, including else part.
It's really a strange thing. Could any one suggest what is wrong here.
Senthil
‎2006 May 23 5:36 PM
‎2006 May 24 9:03 AM
Hi,
The code is
IF &Y_FLAG& EQ 'X'.
INCLUDE '0510011256' OBJECT VBBK ID '0001'
ELSE.
INCLUDE ...
ENDIF.
This code is in the Address window, and when debugging Y_FLAG holds the value X, but it simple skips the process. Y_FLAG is declared globally in the program.
Thank for your time.
Senthil
‎2006 May 24 9:18 AM
Hi,
Make sure that y_flag is of Char 1 (or) .
Try it as
IF &Y_FLAG& = 'X'.
<i>Hope This Info Helps YOU.</i>
Regards,
Lakshmi
‎2006 May 23 5:39 PM
chk if u have declared Y_VAR within a subroutine..if yes, then declare it globally...
‎2006 May 23 6:31 PM
As Bikash suggested might be variable not declared globally in the print program.
You do check(syntax check) at text element level.
Hope this helps.
Thanks and regards,
vamshi tallada
‎2006 May 23 7:40 PM
define the variable globally in the print program or
use CALL FUNCTION 'SET_TEXTSYMBOL'
EXPORTING
NAME = NAME
VALUE = VALUE.
if the variable is not globally defined.
For E.g
PERFORM SET_TEXTSYMBOL USING 'ITEM_FT' ITEM_FT
FORM SET_TEXTSYMBOL USING NAME VALUE.
CALL FUNCTION 'SET_TEXTSYMBOL'
EXPORTING
NAME = NAME
VALUE = VALUE.
ENDFORM. " SET_TEXTSYMBOL
and in the SAP Script use &ITEM_FT& variable.
‎2006 May 23 7:53 PM
This looks more like an activation issue even though you are seeing the code in debugging, you may be executing the older version of it. Activate all and then start your test from the begining.