SAP Function Modules

MERCHANDISE_GROUP_SINGLE_SEL SAP Function module







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

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


Pattern for FM MERCHANDISE_GROUP_SINGLE_SEL - MERCHANDISE GROUP SINGLE SEL





CALL FUNCTION 'MERCHANDISE_GROUP_SINGLE_SEL' "
  EXPORTING
    i_matkl =                   " mara-matkl    Base Material Group
*   i_spras =                   " sy-langu      Language
  IMPORTING
    e_t023t =                   " t023t
    e_t023 =                    " t023
  EXCEPTIONS
    NO_BASIS_MG = 1             "
    NO_MG_TEXT = 2              "
    .  "  MERCHANDISE_GROUP_SINGLE_SEL

ABAP code example for Function Module MERCHANDISE_GROUP_SINGLE_SEL





The ABAP code below is a full code listing to execute function module MERCHANDISE_GROUP_SINGLE_SEL 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_e_t023t  TYPE T023T ,
ld_e_t023  TYPE T023 .


SELECT single MATKL
FROM MARA
INTO @DATA(ld_i_matkl).

DATA(ld_i_spras) = 'Check type of data required'. . CALL FUNCTION 'MERCHANDISE_GROUP_SINGLE_SEL' EXPORTING i_matkl = ld_i_matkl * i_spras = ld_i_spras IMPORTING e_t023t = ld_e_t023t e_t023 = ld_e_t023 EXCEPTIONS NO_BASIS_MG = 1 NO_MG_TEXT = 2 . " MERCHANDISE_GROUP_SINGLE_SEL
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 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_e_t023t  TYPE T023T ,
ld_i_matkl  TYPE MARA-MATKL ,
ld_e_t023  TYPE T023 ,
ld_i_spras  TYPE SY-LANGU .


SELECT single MATKL
FROM MARA
INTO ld_i_matkl.

ld_i_spras = '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 MERCHANDISE_GROUP_SINGLE_SEL or its description.