Program Flow for Online Programs

When you transmit data from a form, the Environment (lapm or the IOS programs) first performs edits based on the form definition, and then transfers control to the online program. When control is transferred to the program, the S1@EDTTRN (Edit Transaction) procedure is called, which in turn invokes all edits for the program. If all edits pass, control transfers to S1@PRCTRN (Process Transaction).

The first edit that is performed is S1@EDTACC (Edit Access). This procedure edits the key fields on the form. If these edits are passed, S1@EDTDT (Edit Data) edits the other nondetail fields on the form. If a form has a detail area, S1@EDDTTR (Edit Detail Transaction) edits the detail fields on the form. S1@EDDTTR performs edits that must be passed before a record can be deleted (for example, you cannot delete a department that has active employees).

If all the edits are passed, the data on the form is processed. The form function determines the procedure that is called. Respectively, the A, C, D, and I form functions performs S1@A410, (Add), S1@C420 (Change), S1@D430 (Delete), and S1@I480 (Inquire). If the form has a detail area, S1@A410 and S1@C420 perform S1@L422 (Process Detail) for each detail on the form.

Online Program Flow Example

The following diagram shows the program flow of an online program that does not process detail records. The flow is the same for all online procedures, but there is some variation in the procedure names.

Illustration: Online program flow