SAP Function Modules

MS_READ_ENTRY_SHEET SAP Function module







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

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


Pattern for FM MS_READ_ENTRY_SHEET - MS READ ENTRY SHEET





CALL FUNCTION 'MS_READ_ENTRY_SHEET' "
  EXPORTING
    i_lblni =                   " essr-lblni    Entry Sheet Number
*   i_zekkn = SPACE             " eskn-zekkn
*   i_from_online = SPACE       " sy-calld
*   i_with_accounts = 'X'       " sy-calld
*   i_with_eskl = SPACE         " sy-calld
*   i_with_esll = SPACE         " sy-calld
*   i_existence_check = SPACE   " sy-calld
*   i_origin =                  " char1
  IMPORTING
    e_essr =                    " essr          Entry Sheet
    e_eskn =                    " eskn
* TABLES
*   t_eskn =                    " eskn          Account Assignments
*   t_eskl =                    " eskl          Service Lines
*   t_esll =                    " esll
  EXCEPTIONS
    SHEET_NOT_FOUND = 1         "
    ACCOUNT_NOT_FOUND = 2       "
    SHEET_NOT_BUFFERED = 3      "
    .  "  MS_READ_ENTRY_SHEET

ABAP code example for Function Module MS_READ_ENTRY_SHEET





The ABAP code below is a full code listing to execute function module MS_READ_ENTRY_SHEET 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_essr  TYPE ESSR ,
ld_e_eskn  TYPE ESKN ,
it_t_eskn  TYPE STANDARD TABLE OF ESKN,"TABLES PARAM
wa_t_eskn  LIKE LINE OF it_t_eskn ,
it_t_eskl  TYPE STANDARD TABLE OF ESKL,"TABLES PARAM
wa_t_eskl  LIKE LINE OF it_t_eskl ,
it_t_esll  TYPE STANDARD TABLE OF ESLL,"TABLES PARAM
wa_t_esll  LIKE LINE OF it_t_esll .


SELECT single LBLNI
FROM ESSR
INTO @DATA(ld_i_lblni).


SELECT single ZEKKN
FROM ESKN
INTO @DATA(ld_i_zekkn).

DATA(ld_i_from_online) = 'some text here'.
DATA(ld_i_with_accounts) = 'some text here'.
DATA(ld_i_with_eskl) = 'some text here'.
DATA(ld_i_with_esll) = 'some text here'.
DATA(ld_i_existence_check) = 'some text here'.
DATA(ld_i_origin) = 'some text here'.

"populate fields of struture and append to itab
append wa_t_eskn to it_t_eskn.

"populate fields of struture and append to itab
append wa_t_eskl to it_t_eskl.

"populate fields of struture and append to itab
append wa_t_esll to it_t_esll. . CALL FUNCTION 'MS_READ_ENTRY_SHEET' EXPORTING i_lblni = ld_i_lblni * i_zekkn = ld_i_zekkn * i_from_online = ld_i_from_online * i_with_accounts = ld_i_with_accounts * i_with_eskl = ld_i_with_eskl * i_with_esll = ld_i_with_esll * i_existence_check = ld_i_existence_check * i_origin = ld_i_origin IMPORTING e_essr = ld_e_essr e_eskn = ld_e_eskn * TABLES * t_eskn = it_t_eskn * t_eskl = it_t_eskl * t_esll = it_t_esll EXCEPTIONS SHEET_NOT_FOUND = 1 ACCOUNT_NOT_FOUND = 2 SHEET_NOT_BUFFERED = 3 . " MS_READ_ENTRY_SHEET
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 ELSEIF SY-SUBRC EQ 3. "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_essr  TYPE ESSR ,
ld_i_lblni  TYPE ESSR-LBLNI ,
it_t_eskn  TYPE STANDARD TABLE OF ESKN ,
wa_t_eskn  LIKE LINE OF it_t_eskn,
ld_e_eskn  TYPE ESKN ,
ld_i_zekkn  TYPE ESKN-ZEKKN ,
it_t_eskl  TYPE STANDARD TABLE OF ESKL ,
wa_t_eskl  LIKE LINE OF it_t_eskl,
ld_i_from_online  TYPE SY-CALLD ,
it_t_esll  TYPE STANDARD TABLE OF ESLL ,
wa_t_esll  LIKE LINE OF it_t_esll,
ld_i_with_accounts  TYPE SY-CALLD ,
ld_i_with_eskl  TYPE SY-CALLD ,
ld_i_with_esll  TYPE SY-CALLD ,
ld_i_existence_check  TYPE SY-CALLD ,
ld_i_origin  TYPE CHAR1 .


SELECT single LBLNI
FROM ESSR
INTO ld_i_lblni.


"populate fields of struture and append to itab
append wa_t_eskn to it_t_eskn.

SELECT single ZEKKN
FROM ESKN
INTO ld_i_zekkn.


"populate fields of struture and append to itab
append wa_t_eskl to it_t_eskl.
ld_i_from_online = 'some text here'.

"populate fields of struture and append to itab
append wa_t_esll to it_t_esll.
ld_i_with_accounts = 'some text here'.
ld_i_with_eskl = 'some text here'.
ld_i_with_esll = 'some text here'.
ld_i_existence_check = 'some text here'.
ld_i_origin = 'some text here'.

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