SYST Structure in ABAP

SYST Structure in ABAP

Related Trainings

SAP Training

SAP ABAP Training

SYST is a predefined structure in SAP. It is referenced through the shortcut SY in ABAP. You can view the contents of the structure using [SE11] – It contains roughly 171 fields. SAP will automatically fill the fields during run time thus enabling us to access these fields anytime during our ABAP programs to learn more about our environment, database and other currently processes. However, please be advised that these fields are mostly READ-ONLY but some of them can be written to as well ( Eg., SY-SUBRC can be set by a subroutine.

Important SY fields ( Select few are shown out of the total of 171 fields. Roughly 40 fields out of them are Obsolete – Meaning the system does not guarantee that these fields are correct/filled )


Know more about the Best SAP Training here. For Remote SAP Access or online SAP Access learn more by clicking on the links above.


SY-SUBRC
The Return Code of the preceding action. For example, if a sub-routine was executed previously, the status SY-SUBRC can be set in the code. Another example could be after executing an SQL Statement like an INSERT or a DELETE where the system sets the SY-SUBRC code to zero if the statement has been executed successfully.

SY-MANDT
Returns the Client that is currently executing the program.

SY-UNAME
Returns the name of the user executing the program.

SY-DATUM
Returns the current system date.

SY-TCODE
Returns the transaction code that executed the program.

SY-INDEX
Contains the number of the current index while being run in a loop ( For example, if the program is executing a LOOP this variable will return the number of the iteration )

SY-TABIX
This is specifically used for Internal Tables. It contains the current row number of the internal table.

To know more about SAP SYST structure, please take our SAP ABAP Training.

Advertisements

0 thoughts on “SYST Structure in ABAP

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s