Start of Content Area

Background documentation Module PAI_Subscreen  Locate the document in its SAP Library structure

The name of the module is comprised as follows: PAI_<relevant subscreen>. In our example, the module is called PAI_2013.

Module PAI_2013 forwards the call to a sub-program with the same name.

     

Sample source text:

   MODULE pai_2013 INPUT.

     PERFORM pai_2013.

   ENDMODULE.                 " pai_2013  INPUT

     

NoteIt is up to you whether you perform the implementation in a module or in a sub-program.

A sub-program has the advantage that it knows local variables. Conversely, a variable that has been declared in a module is global. You might need local variables for the PAI side.

You can see sub-program PAI_2013 below:

Sample source text:

   FORM pai_2013.

 

     CALL FUNCTION 'BRF_PAI'

       IMPORTING

         eo_instance = go_instance.

  

     CALL METHOD go_instance->set_screen_structure

       EXPORTING

         iv_screen  = '2013'

         iv_program = gc_this_program

         is_screen  = sbrf142.

  

   ENDFORM.                                                    " pai_2013   

 

Description:

On the PAI side, function module BRF_PAI is called (analogously to PBO, see PBO_<Subscreen>).

Function module BRF_PAI returns a reference to the current maintenance object (go_instance) as well as BRF-internal functions. This reference is needed for the second step. In this second step, the current screen structure SBRF142 is returned to the instance following the call of its method set_screen_structure.

Note If the subscreen does not contain any fields in a structure, it is not necessary to call method SET_SCREEN_STRUCTURE.

 

End of Content Area