07-11-2010 9:09 AM
Hi,
What is the purpose of "IS SUPPLIED" and "IS REQUESTED" and in which cases we do these ABAP statements.
Thanks,
Sandeep
07-11-2010 10:13 AM
Hi,
IS SUPPLIED is used to check if an optional importing parameter e.g. of a method is supplied. Usually this condition is used to default the value if it is not supplied and the default is too complex to hard define it in the parameter definition. Example:
IF iv_from_dt IS SUPPLIED.
lv_from = iv_from_dt.
ELSE.
" if no start is supplied we take the first of this year as default
lv_from(4) = sy-datum(4).
lv_from+4(4) = '0101'.
ENDIF.
IS REQUESTED is used to check if a certain exporting parameter has been requested (is further processed) by the caller e.g. of the method. Often function modules or methods have more than one exporting parameter e.g. one structure with data / keys for calculations and one with data / keys and the corresponding texts for printing in a report. If the caller only needs the structure with the data as it does not need any text information the called function module can skip getting the texts and save runtime.
Kind Regrads
Roman
07-11-2010 10:23 AM
Could you tell us why the ABAP documentation is not sufficient, what you don't understand?
[ABAP documentation - IS SUPPLIED|http://help.sap.com/abapdocu_70/en/ABENLOGEXP_SUPPLIED.htm]
[ABAP documentation - IS REQUESTED|http://help.sap.com/abapdocu_70/en/ABENLOGEXP_REQUESTED.htm]