Usually if the screen contains any required or mandatory input field & we run the Module pool program, the screen appears & if we want to come out of the program it will not allow us. We have to give the mandatory field on the screen & then we can come out of the program by clicking on the application tool bar buttons. To overrule this issue, generally we use AT EXIT-COMMAND at PAI of the screen to force come out from the screen that contains a required field without filling any value to it.
Lets take an example that we have two screens 9000 & 9001. In the 9000 screen we have required input field and a single record is displayed on 9001 screen based on the input.
<strong>Data : p_carr type spfli-carrid, |
|
wa_spflitypespfli, |
|
ok_codetypesy-ucomm.</strong> |
|
|
|
<strong>moduleSTATUS_9000output.</strong> |
|
<strong>SETPF-STATUSSTATUS. DOUBLE CLICK ON STATUS TO CREATE IT</strong> |
|
<strong>*SETTITLEBARxxx.</strong> |
|
|
|
<strong>endmodule.STATUS_9000OUTPUT</strong> |
|
|
|
<strong>moduleFORCE_EXITinput.</strong> |
|
<strong>CASEOK_CODE.</strong> |
|
<strong>WHENEXITORCANCEL.</strong> |
|
<strong>LEAVEPROGRAM.</strong> |
|
<strong>ENDCASE.</strong> |
|
<strong>endmodule.FORCE_EXITINPUT</strong> |
|
|
|
<strong>moduleUSER_COMMAND_9000input.</strong> |
|
<strong>caseok_code.</strong> |
|
<strong>WHENDISP.</strong> |
|
<strong>CALLSCREEN9001.</strong> |
|
<strong>WHENBACK.</strong> |
|
<strong>LEAVEPROGRAM.</strong> |
|
<strong>endcase.</strong> |
|
<strong>endmodule.USER_COMMAND_9000INPUT</strong> |
|
|
|
<strong>moduleSTATUS_9001output.</strong> |
|
<strong>*SETPF-STATUSxxxxxxxx.</strong> |
|
<strong>*SETTITLEBARxxx.</strong> |
|
<strong>SELECTSINGLE*FROMSPFLIINTOWA_SPFLIWHERECARRID=P_CARR.</strong> |
|
|
|
<strong>endmodule.STATUS_9001OUTPUT</strong> |
|
|
|
<strong>moduleUSER_COMMAND_9001input.</strong> |
|
<strong>caseok_code.</strong> |
|
<strong>whenBACK.</strong> |
|
<strong>LEAVETOSCREEN0.</strong> |
|
<strong>endcase.</strong> |
|
<strong>endmodule.USER_COMMAND_9001INPUT</strong> |
STEPS TO CREATE A “PF STATUS”
STEP-1 : Double click on ‘STATUS’ to create a pf status.
STEP-2: Provide a short description.
STEP-3: Now click on the ‘+’ plus button of the Function key & fill values ‘BACK’, ‘EXIT’ & ‘CANCEL’.
STEP-4: After this Double click on ‘EXIT’ & the following screen will come. Click on the value help of the Function Type field and choose the first entry. ‘E’ type as shown below.
STEP-5 : Now click yes to set ‘E’ for the EXIT & also set ‘E’ type also for ‘CANCEL’
<strong><u>FLOW LOGIC OF SCREEN 9000</u></strong> |
|
|
|
<strong>PROCESSBEFOREOUTPUT.</strong> |
|
|
|
<strong>MODULEstatus_9000.</strong> |
|
|
|
<strong>PROCESSAFTERINPUT.</strong> |
|
|
|
<strong>MODULEforce_exitATEXIT-COMMAND.</strong> |
|
|
|
<strong>MODULEuser_command_9000.</strong> |
<strong><u> |
|
</u><u>FLOW LOGIC OF SCREEN 9001</u></strong> |
|
|
|
<strong>PROCESSBEFOREOUTPUT.</strong> |
|
|
|
<strong>MODULESTATUS_9001.</strong> |
|
|
|
<strong>PROCESSAFTERINPUT.</strong> |
|
|
|
<strong>MODULEUSER_COMMAND_9001.</strong> |
OUTPUT: