SAP ABAP SYNTAX FOR GET

The previous post regarding SAP abap syntax is regarding GENERATE and you can browse it if you are interested.

Basic form

GET dbtab.

Additions

1. ... LATE
2. ... FIELDS f1 ... fn

Effect

Processing event.

Gets the table dbtab for processing while the logical database is running. You can address all the fields from dbtab in the subsequent processing. You can also refer to fields from tables in the logical database on the access path to the table dbtab .

Note

You can use the event " GET dbtab. " only once in the report.

Example

The program uses the logical database F1S which has a structure where the table BOOKING appears below the table FLIGHT .

TABLES: SFLIGHT, SBOOK.

GET SFLIGHT.

WRITE: SFLIGHT-CARRID,

SFLIGHT-CONNID,

SLFIGHT-FLDATE,

SFLIGHT-PLANETYPE.

GET SBOOK.

WRITE: SBOOK-BOOKID,

SBOOK-CUSTOMID,

SBOOK-ORDER_DATE.

Addition 1

... LATE.

Effect

Executes the code following " GET dbtab LATE. " only when all the subordinate tables have been read and processed.

Example

Count the smokers among the bookings already made.

TABLES: SFLIGHT, SBOOK.

DATA SMOKERS TYPE I.

GET SFLIGHT.

ULINE.

WRITE: / SFLIGHT-SEATSMAX,

SFLIGHT-SEATSOCC.

SMOKERS = 0.

GET SBOOK.

CHECK SBOOK-SMOKER <> SPACE.

ADD 1 TO SMOKERS.

GET FLIGHT LATE.

WRITE SMOKERS.

ERP Master data and data warehouse concept

abap sales order management business process

No comments :

Post a Comment