Hi all,
I am checking system(developmen/sandbox/production) in sapscrpit and depending on sysytem I want to display a message in script.
Problem here is In script I use below code, For example: I dont want to print a message in development system.
In Development system:
IF &SY-SYSID& NE 'Development sys'
THIS IS TEST PRINOUT, PLEASE IGNORE IT !
ENDIF.
In this case the message gets printed, as IF condition is 'NE' message should not be printed. But message get printed.
when I debus the script sy-sysid doesnot get any value init.
Can we use sysytem filed directely in SAPSCRIPT or is there any other way to use system field in script.
thanks,
Shrinivas
Hi,
Try o declare a Global variable in your program and move the value of SY-SYSID into that valriable. In now in the Sapscript use tha variable for validation to print the required message.
IF &V_SYSID& NE 'Development sys'.
'Message'
ENDIF.
Thanks & Regards
Bala Krishna
Try checking with the system field "SYST-SYSID".
I checked this in snart form, bothe "SYST-SYSID" and "SY-SYSID" are working.
hope this is helpful.