SAP Function Modules

PROMOTION_CHECK_GENERAL SAP Function module







PROMOTION_CHECK_GENERAL 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_CHECK_GENERAL into the relevant SAP transaction such as SE37 or SE80.

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


Pattern for FM PROMOTION_CHECK_GENERAL - PROMOTION CHECK GENERAL





CALL FUNCTION 'PROMOTION_CHECK_GENERAL' "
  EXPORTING
    pi_i_wakhd =                " wakhd         Promotion Header
  TABLES
    pi_t_wakpd =                " wakpd         Promotion Items
    pi_t_wagud =                " wagud         Plant Groups
    pi_t_wazbd =                " wazbd
    pi_t_waztd =                " waztd         Promotion Themes
    pi_t_waled =                " waled
    pi_t_wazwd =                " wazwd
    pi_t_waktd =                " waktd         Promotion Themes
    pi_t_wlbmd =                " wlbmd
    pi_t_wwmid =                " wwmid
    .  "  PROMOTION_CHECK_GENERAL

ABAP code example for Function Module PROMOTION_CHECK_GENERAL





The ABAP code below is a full code listing to execute function module PROMOTION_CHECK_GENERAL 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_wakpd  TYPE STANDARD TABLE OF WAKPD,"TABLES PARAM
wa_pi_t_wakpd  LIKE LINE OF it_pi_t_wakpd ,
it_pi_t_wagud  TYPE STANDARD TABLE OF WAGUD,"TABLES PARAM
wa_pi_t_wagud  LIKE LINE OF it_pi_t_wagud ,
it_pi_t_wazbd  TYPE STANDARD TABLE OF WAZBD,"TABLES PARAM
wa_pi_t_wazbd  LIKE LINE OF it_pi_t_wazbd ,
it_pi_t_waztd  TYPE STANDARD TABLE OF WAZTD,"TABLES PARAM
wa_pi_t_waztd  LIKE LINE OF it_pi_t_waztd ,
it_pi_t_waled  TYPE STANDARD TABLE OF WALED,"TABLES PARAM
wa_pi_t_waled  LIKE LINE OF it_pi_t_waled ,
it_pi_t_wazwd  TYPE STANDARD TABLE OF WAZWD,"TABLES PARAM
wa_pi_t_wazwd  LIKE LINE OF it_pi_t_wazwd ,
it_pi_t_waktd  TYPE STANDARD TABLE OF WAKTD,"TABLES PARAM
wa_pi_t_waktd  LIKE LINE OF it_pi_t_waktd ,
it_pi_t_wlbmd  TYPE STANDARD TABLE OF WLBMD,"TABLES PARAM
wa_pi_t_wlbmd  LIKE LINE OF it_pi_t_wlbmd ,
it_pi_t_wwmid  TYPE STANDARD TABLE OF WWMID,"TABLES PARAM
wa_pi_t_wwmid  LIKE LINE OF it_pi_t_wwmid .

DATA(ld_pi_i_wakhd) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_pi_t_wakpd to it_pi_t_wakpd.

"populate fields of struture and append to itab
append wa_pi_t_wagud to it_pi_t_wagud.

"populate fields of struture and append to itab
append wa_pi_t_wazbd to it_pi_t_wazbd.

"populate fields of struture and append to itab
append wa_pi_t_waztd to it_pi_t_waztd.

"populate fields of struture and append to itab
append wa_pi_t_waled to it_pi_t_waled.

"populate fields of struture and append to itab
append wa_pi_t_wazwd to it_pi_t_wazwd.

"populate fields of struture and append to itab
append wa_pi_t_waktd to it_pi_t_waktd.

"populate fields of struture and append to itab
append wa_pi_t_wlbmd to it_pi_t_wlbmd.

"populate fields of struture and append to itab
append wa_pi_t_wwmid to it_pi_t_wwmid. . CALL FUNCTION 'PROMOTION_CHECK_GENERAL' EXPORTING pi_i_wakhd = ld_pi_i_wakhd TABLES pi_t_wakpd = it_pi_t_wakpd pi_t_wagud = it_pi_t_wagud pi_t_wazbd = it_pi_t_wazbd pi_t_waztd = it_pi_t_waztd pi_t_waled = it_pi_t_waled pi_t_wazwd = it_pi_t_wazwd pi_t_waktd = it_pi_t_waktd pi_t_wlbmd = it_pi_t_wlbmd pi_t_wwmid = it_pi_t_wwmid . " PROMOTION_CHECK_GENERAL
IF SY-SUBRC EQ 0. "All OK 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_i_wakhd  TYPE WAKHD ,
it_pi_t_wakpd  TYPE STANDARD TABLE OF WAKPD ,
wa_pi_t_wakpd  LIKE LINE OF it_pi_t_wakpd,
it_pi_t_wagud  TYPE STANDARD TABLE OF WAGUD ,
wa_pi_t_wagud  LIKE LINE OF it_pi_t_wagud,
it_pi_t_wazbd  TYPE STANDARD TABLE OF WAZBD ,
wa_pi_t_wazbd  LIKE LINE OF it_pi_t_wazbd,
it_pi_t_waztd  TYPE STANDARD TABLE OF WAZTD ,
wa_pi_t_waztd  LIKE LINE OF it_pi_t_waztd,
it_pi_t_waled  TYPE STANDARD TABLE OF WALED ,
wa_pi_t_waled  LIKE LINE OF it_pi_t_waled,
it_pi_t_wazwd  TYPE STANDARD TABLE OF WAZWD ,
wa_pi_t_wazwd  LIKE LINE OF it_pi_t_wazwd,
it_pi_t_waktd  TYPE STANDARD TABLE OF WAKTD ,
wa_pi_t_waktd  LIKE LINE OF it_pi_t_waktd,
it_pi_t_wlbmd  TYPE STANDARD TABLE OF WLBMD ,
wa_pi_t_wlbmd  LIKE LINE OF it_pi_t_wlbmd,
it_pi_t_wwmid  TYPE STANDARD TABLE OF WWMID ,
wa_pi_t_wwmid  LIKE LINE OF it_pi_t_wwmid.

ld_pi_i_wakhd = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_pi_t_wakpd to it_pi_t_wakpd.

"populate fields of struture and append to itab
append wa_pi_t_wagud to it_pi_t_wagud.

"populate fields of struture and append to itab
append wa_pi_t_wazbd to it_pi_t_wazbd.

"populate fields of struture and append to itab
append wa_pi_t_waztd to it_pi_t_waztd.

"populate fields of struture and append to itab
append wa_pi_t_waled to it_pi_t_waled.

"populate fields of struture and append to itab
append wa_pi_t_wazwd to it_pi_t_wazwd.

"populate fields of struture and append to itab
append wa_pi_t_waktd to it_pi_t_waktd.

"populate fields of struture and append to itab
append wa_pi_t_wlbmd to it_pi_t_wlbmd.

"populate fields of struture and append to itab
append wa_pi_t_wwmid to it_pi_t_wwmid.

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_CHECK_GENERAL or its description.