Entering content frame

Object documentation FILL Subroutines Locate the document in its SAP Library structure

&DEFINITION&

There is exactly one FILL subroutine for each 1:1 level. The name of the FILL subprogram is composed of the prefix FILL, the name of the relevant form level, and the name of the 1:1 level. READ subprograms are at the start of a print program, and called up once only, the calls of the FILL subprograms are dependent on the hierarchy in the application form.

Use

There is exactly one FILL subroutine for each 1:1 level. This FILL subprogram provides the relevant 1:1 level data for the current data record of the relevant form level. Just as with the GET subprograms, you can also follow both of the strategies described above for the data procurement for FILL subprograms.

Structure

The interface of a FILL subprogram contains the variables that are set as prerequisite or result for the call in by the Print workbench accordance with their hierarchical position. Within the READ subprogram however, you can use all global data areas (<T_*> or <WA_*>) of the same form level or all form levels higher in the hierarchy.
If 1:1 levels are beneath one another hierarchically, you can also use the global variables of the 1:1 level higher in the hierarchy.

Integration

The FILL subprograms are then called in the generated print program of an application form if the related form level is processed, that is, if the data records belonging to the form level are processed sequentially. The FILL subprograms return the data record of the 1:1 level belonging to the current run. The FILL subprograms are copied to the print program when you activate an application form.

Example

The source text of the FILL subprogram of the 1:1 level FLIGHT is as follows. Since the posting data is read from the database in the READ subprogram, you only have to extract data from the internal global table T_FLIGHT.

*&---------------------------------------------------------------------*

*& Form fill_form  FILL_BOOKING_FLIGHT

*&---------------------------------------------------------------------*

FORM fill_booking_flight

      USING  x_booking        TYPE sbook

             y_flight         TYPE spfli .

  CLEAR y_flight.

  READ TABLE t_flight INTO y_flight WITH KEY

                                 carrid = x_booking-carrid

                                 connid = x_booking-connid.

ENDFORM.                               " FILL_BOOKING_FLIGHT

 

Leaving content frame