Entering content frameCode for Record Processing Locate the document in its SAP Library structure

If you want to perform calculations or other operations not associated with additional fields when processing data records in a loop, use the code for record processing.

Note

The code contains statements that check whether the record just read is to be processed according to the parameters or selection criteria.

The code is a standard component of every query report generated for an InfoSet without an underlying database. It is transparent to the user when maintaining queries.

When you get to the field group maintenance screen, choose Goto ® Code ® Record processing. This takes you to a screen that displays any existing code for record processing. It also displays or proposes (if new) the allocated sequence.

Note

You can also reach record processing code using the Extras function (see GET/GET LATE Code ).

The code for record processing is placed, together with the code for additional fields and SELECT statements for additional tables, in the section of the generated query report containing the loop processing of data records. The sequence specifications control the order within this section. Usually, the code for record processing is used for initialization purposes and appears before the additional fields and SAP tables. For this reason, the system proposes 0 as the sequence number.

On the screen for defining the code for record processing, you can thus perform the same operations as when you define the GET/GET LATE code (see GET/GET LATE Code).

Note

To ensure that query reports can be generated without problems, it is important that it is clear which fields are accessed in every piece of code. If some code contains ABAP statements that access certain fields implicitly, then an ABAP FIELDS statement must also be used in the code to ensure that all fields used are explicitly named. You can find an example of this and further information in Access Optimization in Queries

 

New Times for Coding

You can now enter coding for the ABAP times INITIALIZATION and AT SELECTION SCREEN OUTPUT: In doing so there are new options for influencing the content of the selection screen. You maintain these coding sections in the same way as all other coding sections.

 

 

Leaving content frame