SAP Function Modules

CMPROJECT_DATA_READ SAP Function module - Read Category management project data







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

Associated Function Group: CM_WF01
Released Date: Not Released
Processing type: Remote-Enabled
remote enabled module settings


Pattern for FM CMPROJECT_DATA_READ - CMPROJECT DATA READ





CALL FUNCTION 'CMPROJECT_DATA_READ' "Read Category management project data
  EXPORTING
    cmproject =                 " cmproject     Category Management: Project
*   read_wcmp = 'X'             " char1         Single-character flag
*   read_wcmpt = 'X'            " char1         Einstelliges Kennzeichen
*   read_wcmps = 'X'            " char1         Single-character flag
*   read_wcmpsd = 'X'           " char1         Single-character flag
*   read_wcmpuser = 'X'         " char1         Single-character flag
*   spras = SY-LANGU            " langu         Language key
  IMPORTING
    e_wcmp =                    " wcmp          Category Management: Project
* TABLES
*   tab_wcmpt =                 " wcmpt         CM Projektpflege: Beschreibung
*   tab_wcmps =                 " wcmps         TWCMPS
*   tab_wcmpsd =                " wcmpsd        Details for Category Management Step
*   tab_wcmpuser =              " wcmpuser      Category Management: Assignment User to role
    .  "  CMPROJECT_DATA_READ

ABAP code example for Function Module CMPROJECT_DATA_READ





The ABAP code below is a full code listing to execute function module CMPROJECT_DATA_READ 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_wcmp  TYPE WCMP ,
it_tab_wcmpt  TYPE STANDARD TABLE OF WCMPT,"TABLES PARAM
wa_tab_wcmpt  LIKE LINE OF it_tab_wcmpt ,
it_tab_wcmps  TYPE STANDARD TABLE OF WCMPS,"TABLES PARAM
wa_tab_wcmps  LIKE LINE OF it_tab_wcmps ,
it_tab_wcmpsd  TYPE STANDARD TABLE OF WCMPSD,"TABLES PARAM
wa_tab_wcmpsd  LIKE LINE OF it_tab_wcmpsd ,
it_tab_wcmpuser  TYPE STANDARD TABLE OF WCMPUSER,"TABLES PARAM
wa_tab_wcmpuser  LIKE LINE OF it_tab_wcmpuser .

DATA(ld_cmproject) = 'Check type of data required'.
DATA(ld_read_wcmp) = 'Check type of data required'.
DATA(ld_read_wcmpt) = 'Check type of data required'.
DATA(ld_read_wcmps) = 'Check type of data required'.
DATA(ld_read_wcmpsd) = 'Check type of data required'.
DATA(ld_read_wcmpuser) = 'Check type of data required'.
DATA(ld_spras) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_tab_wcmpt to it_tab_wcmpt.

"populate fields of struture and append to itab
append wa_tab_wcmps to it_tab_wcmps.

"populate fields of struture and append to itab
append wa_tab_wcmpsd to it_tab_wcmpsd.

"populate fields of struture and append to itab
append wa_tab_wcmpuser to it_tab_wcmpuser. . CALL FUNCTION 'CMPROJECT_DATA_READ' EXPORTING cmproject = ld_cmproject * read_wcmp = ld_read_wcmp * read_wcmpt = ld_read_wcmpt * read_wcmps = ld_read_wcmps * read_wcmpsd = ld_read_wcmpsd * read_wcmpuser = ld_read_wcmpuser * spras = ld_spras IMPORTING e_wcmp = ld_e_wcmp * TABLES * tab_wcmpt = it_tab_wcmpt * tab_wcmps = it_tab_wcmps * tab_wcmpsd = it_tab_wcmpsd * tab_wcmpuser = it_tab_wcmpuser . " CMPROJECT_DATA_READ
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_wcmp  TYPE WCMP ,
ld_cmproject  TYPE CMPROJECT ,
it_tab_wcmpt  TYPE STANDARD TABLE OF WCMPT ,
wa_tab_wcmpt  LIKE LINE OF it_tab_wcmpt,
ld_read_wcmp  TYPE CHAR1 ,
it_tab_wcmps  TYPE STANDARD TABLE OF WCMPS ,
wa_tab_wcmps  LIKE LINE OF it_tab_wcmps,
ld_read_wcmpt  TYPE CHAR1 ,
it_tab_wcmpsd  TYPE STANDARD TABLE OF WCMPSD ,
wa_tab_wcmpsd  LIKE LINE OF it_tab_wcmpsd,
ld_read_wcmps  TYPE CHAR1 ,
it_tab_wcmpuser  TYPE STANDARD TABLE OF WCMPUSER ,
wa_tab_wcmpuser  LIKE LINE OF it_tab_wcmpuser,
ld_read_wcmpsd  TYPE CHAR1 ,
ld_read_wcmpuser  TYPE CHAR1 ,
ld_spras  TYPE LANGU .

ld_cmproject = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_tab_wcmpt to it_tab_wcmpt.
ld_read_wcmp = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_tab_wcmps to it_tab_wcmps.
ld_read_wcmpt = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_tab_wcmpsd to it_tab_wcmpsd.
ld_read_wcmps = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_tab_wcmpuser to it_tab_wcmpuser.
ld_read_wcmpsd = 'Check type of data required'.
ld_read_wcmpuser = 'Check type of data required'.
ld_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 CMPROJECT_DATA_READ or its description.