Background Processing System Fields

SY-BATCH

X  -  if the ABAP program is running in the background, otherwise space.

For e.g.

SY-Batch is a system field symbol. It is used for Program is running in the background.

Background active (X)

IF SY-BATCH EQ SPACE.

WRITE: / 'Report was started on-line'.
WRITE: / 'Using variant:', SY-SLSET.

ELSE.

WRITE: / 'Report was started in background'.

ENDIF.
 

Batch Input

SY-BINPT

X   while a batch input session is running and when an ABAP program is called using 
     CALL TRANSACTION USING, otherwise space. 

     OPTIONS FROM in the CALL TRANSACTION USING statement can set SY-BINPT to space either for
     the entire duration of the program, or at the end of the BDC data. 
 

     SY-BINPT is always space during a CATT procedure.
 

Notes:

ABAP system fields are always available in ABAP programs. 

The runtime system fills them according to context. They can then be used in programs to query the system status. System fields are variables but you should always treat them as though they were constants, and only read them. If you change their values, important information for the flow of the program may be lost. In exceptional circumstances, system fields may be overwritten in an ABAP program to control the system – for example, SY-LSIND (for navigating to a detail list).

With one exception the names and data types of the system fields are stored in the ABAP Dictionary in the SYST structure and realized as components of the predefined structure SY in ABAP programs. 

The system field SY-REPID is not part of SYST or SY. Instead, every program contains the predefined constants SY-REPID and SYST-REPID, which both contain the name of the corresponding program. Furthermore, there are two predefined types of the same name, SY-REPID and SYST-REPID.

All system fields are addressed using SY field name and their types using SYST field name.

You can check SYST table for all the available system fields.

ABAP Tips


 

Read Also
Simple Program that Create Internal Table Dynamically

Get help for your ABAP problems
Do you have a ABAP Question?

ABAP Books
ABAP Certification, BAPI, Java, Web Programming, Smart Forms, Sapscripts Reference Books

More ABAP Tips

Main Index
SAP ERP Modules, Basis, ABAP and Other IMG Stuff

All the site contents are Copyright © www.erpgreat.com and the content authors. All rights reserved.
All product names are trademarks of their respective companies.  The site www.erpgreat.com is in no way affiliated with SAP AG. 
Every effort is made to ensure the content integrity.  Information used on this site is at your own risk. 
 The content on this site may not be reproduced or redistributed without the express written permission of 
www.erpgreat.com or the content authors.