cancel
Showing results for 
Search instead for 
Did you mean: 

SAPScript: Is there a system symbol for SY-SYSID?

Former Member
0 Kudos

Hello all,

I am hoping this should be a quick resolution for the SAPScript experts out there.

I want to include a BITMAP image in the output of my SAPScript if it is being executed either in our Development or Quality environment. I do not want the image to be part of the output when the SAPScript is being executed in Production environment.

Is there a system symbol available that I can use to determine the system ID, similar to how we use SY-SYSID in ABAP programs? The only ones I have used in past experience are PAGE, DATE, and TIME.

If such a system symbol is not available, what is the next best alternative to achieve my objective?

Thanks,

Deepak

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

I read up on SAP Documentation at http://help.sap.com/saphelp_nw04/helpdata/en/d1/803279454211d189710000e8322d00/frameset.htm that I can refer to all the fields in the table SYST. It includes SYSID as well. Am I reading something incorrect?

naimesh_patel
Active Contributor
0 Kudos

Yes, all the fields of the SYST structure are avaliable in the SAPScript. You don't need to use the "Workaround" solution by calling the perform to get the required field from SYST.

You can insert the required system fields by:

Insert > Symbols > System Symbols > SYST (or Required structure) and than select the required field

Regards,

Naimesh Patel

Answers (2)

Answers (2)

Former Member
0 Kudos

I used the solution proposed by Pavan.

Former Member
0 Kudos

Hi,

we dont have any SAPSCRIPT symbol like SY_SYSID. I think u can code it in 'Z' program itself by calling a PERFORM subroutine in your SCRIPT.

eg:

In Script:

/: DEFINE &FLAG&.

/: PERFORM sys_name IN PROGRAM ZXXXXXX

/: CHANGING &FLAG&.

/: IF &FLAG& EQ 'X'.

/: INCLUDE BITMAP IMAGE.

/: ENDIF.

In Program ZXXXXXX:

FORM sys_name out_tab STRUCTURE itcsy.

  • Make the value of Flag as 'X' if the System name is either Quality or Devlopment.

if sy-sysid = 'DEV_SYS' OR sy-sysid = 'QTY_SYS'.

read table out_tab with key name = 'FLAG'.

if sy-subrc EQ 0.

out_tab-value = 'X'.

modify out_tab.

endif.

endif.

ENDFORM.

Hope it solves!!

Rgds,

Pavan

Former Member
0 Kudos

Hi,

Yes the structure is SYST, but i am not sure about whether we can use this in SAPSCRIPT or not. but can be used in Report Program..

Rgds,

Pavan