Show TOC

 Flow Logic of Single Screen

If you create the single screen for the infotype using the Create Infotype transaction (PM01), the system prepares the flow logic.

The flow logic of infotypes in the SAP standard system usually follows this pattern:

Action PBO

PROCESS BEFORE OUTPUT.

MODULE BEFORE_OUTPUT.

MODULE get_header_subscreen.

CALL SUBSCREEN subscreen_header INCLUDING header_prog header_dynnr.

MODULE Pnnnn.

MODULE get_t582c_subscreen.

CALL SUBSCREEN subscreen_t582c INCLUDING subscr_prog subscr_dynnr.

MODULE HIDDEN_DATA.

You can carry out infotype-specific initialization procedures within PBO module Pnnnn . They enable you, for example, to fill the screen fields stored in structures Qnnnn and Znnnn .

If wage types are valuated indirectly, the amount field Q0014-BETRG in the process logic of the Recurring Payments and Deductions infotype (0014) must be filled since the amount is not stored on the database.

You must not change PBO modules BEFORE_OUTPUT and HIDDEN_DATA.

Action PAI

PROCESS AFTER INPUT.

MODULE EXIT AT EXIT-COMMAND.

CHAIN.

FIELD Pnnnn-feld1,...

MODULE INPUT_STATUS ON CHAIN-REQUEST.

ENDCHAIN.

PAI module INPUT_STATUS must be performed if the user makes an entry in a screen field. For this reason, all of the entry fields in the following chain must be counted. PAI module INPUT_STATUS sets internal system statuses.For example, if a value has been changed, the infotype data record is to be saved later.

MODULE PRE_INPUT_CHECKS.

PAI module PRE_INPUT_CHECKS is used to process the function code before the entry check. If you choose the Exit function, for example, the system stops processing the current single screen.

Once module PRE_INPUT_CHECKS has been processed, you can carry out your own entry checks or call up your own PAI modules.

You want an entry for the field Pnnnn-feld1 to be validated against table Tnnn:

FIELD Pnnnn-feld1

SELECT * FROM TABLE Tnnn WHERE feld1 = Pnnnn-feld1

ON INPUT

You want to perform module Modul_feld2 if the user makes an entry in field Pnnnn-feld2 :

FIELDPnnnn-feld2ON INPUT MODULEModul_feld2

At this point, the entry checks must be complete up to PAI module POST_INPUT_CHECKS . Once the following process has been carried out, it is no longer possible to change field contents.

PAI module POST_INPUT_CHECKS processes the function code after the entry checks. It also carries out general entry checks. The system checks, for example, whether the start date of the infotype record is before the end date of the record.

You must list all the fields that appear on the single screen in the following chain. You must also list fields that are only displayed, such as long texts.

CALL SUBSCREEN subscreen_t582c.

CHAIN.

FIELD Pnnnn-feld1,RP50M-SPRPS,Tnnn-felda,... .

MODULE POST_INPUT_CHECKS.

ENDCHAIN.

You must not change PAI modules EXIT , INPUT_STATUS , PRE_INPUT_CHECKS, and POST_INPUT_CHECKS .