SAP Function Modules

PROMOTION_COND_TYPE_GROUPS SAP Function module







PROMOTION_COND_TYPE_GROUPS 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_COND_TYPE_GROUPS 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_COND_TYPE_GROUPS - PROMOTION COND TYPE GROUPS





CALL FUNCTION 'PROMOTION_COND_TYPE_GROUPS' "
  EXPORTING
*   group_type = ' '            " t6b2-kogruty
    iappl =                     " t180-kappl    Application
*   show_flag =                 " rwaka-char1
  IMPORTING
    cond_group =                " v_t6b2
* TABLES
*   condgr_tab =                " v_t6b2
  EXCEPTIONS
    NOT_FOUND = 1               "
    .  "  PROMOTION_COND_TYPE_GROUPS

ABAP code example for Function Module PROMOTION_COND_TYPE_GROUPS





The ABAP code below is a full code listing to execute function module PROMOTION_COND_TYPE_GROUPS 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:
ld_cond_group  TYPE V_T6B2 ,
it_condgr_tab  TYPE STANDARD TABLE OF V_T6B2,"TABLES PARAM
wa_condgr_tab  LIKE LINE OF it_condgr_tab .


SELECT single KOGRUTY
FROM T6B2
INTO @DATA(ld_group_type).


SELECT single KAPPL
FROM T180
INTO @DATA(ld_iappl).


DATA(ld_show_flag) = some text here

"populate fields of struture and append to itab
append wa_condgr_tab to it_condgr_tab. . CALL FUNCTION 'PROMOTION_COND_TYPE_GROUPS' EXPORTING * group_type = ld_group_type iappl = ld_iappl * show_flag = ld_show_flag IMPORTING cond_group = ld_cond_group * TABLES * condgr_tab = it_condgr_tab EXCEPTIONS NOT_FOUND = 1 . " PROMOTION_COND_TYPE_GROUPS
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "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_cond_group  TYPE V_T6B2 ,
ld_group_type  TYPE T6B2-KOGRUTY ,
it_condgr_tab  TYPE STANDARD TABLE OF V_T6B2 ,
wa_condgr_tab  LIKE LINE OF it_condgr_tab,
ld_iappl  TYPE T180-KAPPL ,
ld_show_flag  TYPE RWAKA-CHAR1 .


SELECT single KOGRUTY
FROM T6B2
INTO ld_group_type.


"populate fields of struture and append to itab
append wa_condgr_tab to it_condgr_tab.

SELECT single KAPPL
FROM T180
INTO ld_iappl.


ld_show_flag = some text here

SAP Documentation for FM PROMOTION_COND_TYPE_GROUPS


This function module is used to select and display all condition type groups that can be used to maintain higher-level purchasing condition ...See here for full SAP fm documentation

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