SAP Function Modules

CM_DI_READ_LIST_DATA SAP Function module







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

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


Pattern for FM CM_DI_READ_LIST_DATA - CM DI READ LIST DATA





CALL FUNCTION 'CM_DI_READ_LIST_DATA' "
  EXPORTING
    objty =                     " stpob-objty
*   spras =                     " sy-langu
*   idnrk =                     " stpo-idnrk
*   potx1 =                     " stpo-potx1
*   dokar =                     " stpo-dokar
*   doknr =                     " stpo-doknr
*   doktl =                     " stpo-doktl
*   dokvr =                     " stpo-dokvr
*   class =                     " stpo-class
*   klart =                     " stpo-klart
  IMPORTING
    return =                    "
    matdaten =                  "
* TABLES
*   seqmat01 =                  "
    .  "  CM_DI_READ_LIST_DATA

ABAP code example for Function Module CM_DI_READ_LIST_DATA





The ABAP code below is a full code listing to execute function module CM_DI_READ_LIST_DATA 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_return  TYPE STRING ,
ld_matdaten  TYPE STRING ,
it_seqmat01  TYPE STANDARD TABLE OF STRING,"TABLES PARAM
wa_seqmat01  LIKE LINE OF it_seqmat01 .


DATA(ld_objty) = some text here
DATA(ld_spras) = 'Check type of data required'.

SELECT single IDNRK
FROM STPO
INTO @DATA(ld_idnrk).


SELECT single POTX1
FROM STPO
INTO @DATA(ld_potx1).


SELECT single DOKAR
FROM STPO
INTO @DATA(ld_dokar).


SELECT single DOKNR
FROM STPO
INTO @DATA(ld_doknr).


SELECT single DOKTL
FROM STPO
INTO @DATA(ld_doktl).


SELECT single DOKVR
FROM STPO
INTO @DATA(ld_dokvr).


SELECT single CLASS
FROM STPO
INTO @DATA(ld_class).


SELECT single KLART
FROM STPO
INTO @DATA(ld_klart).


"populate fields of struture and append to itab
append wa_seqmat01 to it_seqmat01. . CALL FUNCTION 'CM_DI_READ_LIST_DATA' EXPORTING objty = ld_objty * spras = ld_spras * idnrk = ld_idnrk * potx1 = ld_potx1 * dokar = ld_dokar * doknr = ld_doknr * doktl = ld_doktl * dokvr = ld_dokvr * class = ld_class * klart = ld_klart IMPORTING return = ld_return matdaten = ld_matdaten * TABLES * seqmat01 = it_seqmat01 . " CM_DI_READ_LIST_DATA
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_return  TYPE STRING ,
ld_objty  TYPE STPOB-OBJTY ,
it_seqmat01  TYPE STANDARD TABLE OF STRING ,
wa_seqmat01  LIKE LINE OF it_seqmat01,
ld_matdaten  TYPE STRING ,
ld_spras  TYPE SY-LANGU ,
ld_idnrk  TYPE STPO-IDNRK ,
ld_potx1  TYPE STPO-POTX1 ,
ld_dokar  TYPE STPO-DOKAR ,
ld_doknr  TYPE STPO-DOKNR ,
ld_doktl  TYPE STPO-DOKTL ,
ld_dokvr  TYPE STPO-DOKVR ,
ld_class  TYPE STPO-CLASS ,
ld_klart  TYPE STPO-KLART .


ld_objty = some text here

"populate fields of struture and append to itab
append wa_seqmat01 to it_seqmat01.
ld_spras = 'Check type of data required'.

SELECT single IDNRK
FROM STPO
INTO ld_idnrk.


SELECT single POTX1
FROM STPO
INTO ld_potx1.


SELECT single DOKAR
FROM STPO
INTO ld_dokar.


SELECT single DOKNR
FROM STPO
INTO ld_doknr.


SELECT single DOKTL
FROM STPO
INTO ld_doktl.


SELECT single DOKVR
FROM STPO
INTO ld_dokvr.


SELECT single CLASS
FROM STPO
INTO ld_class.


SELECT single KLART
FROM STPO
INTO ld_klart.

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