SAP Function Modules

CSOM_MATERIAL_SELECT SAP Function module







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

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


Pattern for FM CSOM_MATERIAL_SELECT - CSOM MATERIAL SELECT





CALL FUNCTION 'CSOM_MATERIAL_SELECT' "
  EXPORTING
    e_aennr =                   " aenr-aennr
  TABLES
*   plant =                     " cs01_csom_plant_tab
    mat =                       " cs01_csom_mat_tab
    cus =                       " cs01_csom_cus_tab
    psp =                       " cs01_csom_psp_tab
    .  "  CSOM_MATERIAL_SELECT

ABAP code example for Function Module CSOM_MATERIAL_SELECT





The ABAP code below is a full code listing to execute function module CSOM_MATERIAL_SELECT 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_plant  TYPE STANDARD TABLE OF CS01_CSOM_PLANT_TAB,"TABLES PARAM
wa_plant  LIKE LINE OF it_plant ,
it_mat  TYPE STANDARD TABLE OF CS01_CSOM_MAT_TAB,"TABLES PARAM
wa_mat  LIKE LINE OF it_mat ,
it_cus  TYPE STANDARD TABLE OF CS01_CSOM_CUS_TAB,"TABLES PARAM
wa_cus  LIKE LINE OF it_cus ,
it_psp  TYPE STANDARD TABLE OF CS01_CSOM_PSP_TAB,"TABLES PARAM
wa_psp  LIKE LINE OF it_psp .


SELECT single AENNR
FROM AENR
INTO @DATA(ld_e_aennr).


"populate fields of struture and append to itab
append wa_plant to it_plant.

"populate fields of struture and append to itab
append wa_mat to it_mat.

"populate fields of struture and append to itab
append wa_cus to it_cus.

"populate fields of struture and append to itab
append wa_psp to it_psp. . CALL FUNCTION 'CSOM_MATERIAL_SELECT' EXPORTING e_aennr = ld_e_aennr TABLES * plant = it_plant mat = it_mat cus = it_cus psp = it_psp . " CSOM_MATERIAL_SELECT
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_e_aennr  TYPE AENR-AENNR ,
it_plant  TYPE STANDARD TABLE OF CS01_CSOM_PLANT_TAB ,
wa_plant  LIKE LINE OF it_plant,
it_mat  TYPE STANDARD TABLE OF CS01_CSOM_MAT_TAB ,
wa_mat  LIKE LINE OF it_mat,
it_cus  TYPE STANDARD TABLE OF CS01_CSOM_CUS_TAB ,
wa_cus  LIKE LINE OF it_cus,
it_psp  TYPE STANDARD TABLE OF CS01_CSOM_PSP_TAB ,
wa_psp  LIKE LINE OF it_psp.


SELECT single AENNR
FROM AENR
INTO ld_e_aennr.


"populate fields of struture and append to itab
append wa_plant to it_plant.

"populate fields of struture and append to itab
append wa_mat to it_mat.

"populate fields of struture and append to itab
append wa_cus to it_cus.

"populate fields of struture and append to itab
append wa_psp to it_psp.

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