SAP Function Modules

PROMOTION_REBATE_START_FIND SAP Function module







PROMOTION_REBATE_START_FIND is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name PROMOTION_REBATE_START_FIND into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: WAK8
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM PROMOTION_REBATE_START_FIND - PROMOTION REBATE START FIND





CALL FUNCTION 'PROMOTION_REBATE_START_FIND' "
  EXPORTING
    pi_vkorg =                  " w_vkorg_header
    pi_vtweg =                  " w_vtweg_header
    pi_datab =                  " w_obs_fr
    pi_datbi =                  " w_obs_to
  TABLES
    pi_t_kunnr =                " wkunnr
    pe_t_filabh =               " wpromodep
    pe_t_filunabh =             " wpromoindep
  EXCEPTIONS
    WRONG_INPUT = 1             "
    NO_PROMOTION_FOUND = 2      "
    UNKNOWN_REBATE_LEVEL = 3    "
    UNKNOWN_ACTIVATION_LEVEL = 4  "
    MERCHANDISE_CATEGORY_ERROR = 5  "
    .  "  PROMOTION_REBATE_START_FIND

ABAP code example for Function Module PROMOTION_REBATE_START_FIND





The ABAP code below is a full code listing to execute function module PROMOTION_REBATE_START_FIND including all data declarations. The code uses the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the original method of declaring data variables up front. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8).

DATA:
it_pi_t_kunnr  TYPE STANDARD TABLE OF WKUNNR,"TABLES PARAM
wa_pi_t_kunnr  LIKE LINE OF it_pi_t_kunnr ,
it_pe_t_filabh  TYPE STANDARD TABLE OF WPROMODEP,"TABLES PARAM
wa_pe_t_filabh  LIKE LINE OF it_pe_t_filabh ,
it_pe_t_filunabh  TYPE STANDARD TABLE OF WPROMOINDEP,"TABLES PARAM
wa_pe_t_filunabh  LIKE LINE OF it_pe_t_filunabh .

DATA(ld_pi_vkorg) = 'Check type of data required'.
DATA(ld_pi_vtweg) = 'Check type of data required'.
DATA(ld_pi_datab) = 'Check type of data required'.
DATA(ld_pi_datbi) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_pi_t_kunnr to it_pi_t_kunnr.

"populate fields of struture and append to itab
append wa_pe_t_filabh to it_pe_t_filabh.

"populate fields of struture and append to itab
append wa_pe_t_filunabh to it_pe_t_filunabh. . CALL FUNCTION 'PROMOTION_REBATE_START_FIND' EXPORTING pi_vkorg = ld_pi_vkorg pi_vtweg = ld_pi_vtweg pi_datab = ld_pi_datab pi_datbi = ld_pi_datbi TABLES pi_t_kunnr = it_pi_t_kunnr pe_t_filabh = it_pe_t_filabh pe_t_filunabh = it_pe_t_filunabh EXCEPTIONS WRONG_INPUT = 1 NO_PROMOTION_FOUND = 2 UNKNOWN_REBATE_LEVEL = 3 UNKNOWN_ACTIVATION_LEVEL = 4 MERCHANDISE_CATEGORY_ERROR = 5 . " PROMOTION_REBATE_START_FIND
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 3. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 4. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 5. "Exception "Add code for exception here ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_pi_vkorg  TYPE W_VKORG_HEADER ,
it_pi_t_kunnr  TYPE STANDARD TABLE OF WKUNNR ,
wa_pi_t_kunnr  LIKE LINE OF it_pi_t_kunnr,
ld_pi_vtweg  TYPE W_VTWEG_HEADER ,
it_pe_t_filabh  TYPE STANDARD TABLE OF WPROMODEP ,
wa_pe_t_filabh  LIKE LINE OF it_pe_t_filabh,
ld_pi_datab  TYPE W_OBS_FR ,
it_pe_t_filunabh  TYPE STANDARD TABLE OF WPROMOINDEP ,
wa_pe_t_filunabh  LIKE LINE OF it_pe_t_filunabh,
ld_pi_datbi  TYPE W_OBS_TO .

ld_pi_vkorg = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_pi_t_kunnr to it_pi_t_kunnr.
ld_pi_vtweg = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_pe_t_filabh to it_pe_t_filabh.
ld_pi_datab = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_pe_t_filunabh to it_pe_t_filunabh.
ld_pi_datbi = 'Check type of data required'.

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name PROMOTION_REBATE_START_FIND or its description.