Special Keywords in Function Modules

by Suresh Kumar Parvathaneni

IS REQUESTED and IS SUPPLIED are the two special keywords supplied by SAP for use in function modules. 

Consider the following code in a function module:
  If CARRNAME is requested.
    Select single CARRNAME from SCARR
        Where carrid eq I_carrid.

The statement “If CARRNAME is requested” is true if the actual parameter was specified for the formal parameter CARRID, when the function module call was made. IS REQUESTED is allowed only in a function module and not even in a subroutine called by the function module. Suppose the call to the above function module in the program is as follows:

     CARRID = 'AA'
   CONNID = connid
*  CARRNAME = carrname .

Since CARRNAME value is not requested in the program, the statement “If CARRNAME is requested” fails, thus avoiding unnecessary expensive database operation.

This checks whether the parameter <p> was passed during runtime (IMPORTING). For this the parameter <p> should be optional, else the system raises an error. This statement can be used in function modules and methods.


Please send us your feedback/suggestions at webmaster@SAPTechnical.COM 

HomeContribute About Us Privacy Terms Of Use • Disclaimer • SafeCompanies: Advertise on SAPTechnical.COM | Post JobContact Us  

Graphic Design by Round the Bend Wizards

footer image footer image