SAP Function Modules

MS_READ_SERVICE_PACKAGE SAP Function module







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

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


Pattern for FM MS_READ_SERVICE_PACKAGE - MS READ SERVICE PACKAGE





CALL FUNCTION 'MS_READ_SERVICE_PACKAGE' "
* EXPORTING
*   no_cond = SPACE             "
*   no_change_doc = SPACE       "
*   no_text = SPACE             "
  TABLES
    i_packno =                  " pack_tab
    i_eslh =                    " eslh
    i_esll =                    " esll          Service Lines
*   i_esuh =                    " esuh          Limits
*   i_esuc =                    " esuc          Limits with Contract Reference
*   i_eskl =                    " eskl
*   i_konv =                    " konv          DOcument Condition
*   i_a081 =                    " a081
*   i_a082 =                    " a082
*   i_a215 =                    " a215
*   i_konh =                    " konh
*   i_konp =                    " konp
*   i_konm =                    " konm
*   i_konw =                    " konw
*   i_stxh =                    " stxh          Text header
*   i_stxl =                    " stxl          Long Text
*   i_cdhdr =                   " cdhdr         Change Document Header
*   i_chpos =                   " cdpos         Change document position
    .  "  MS_READ_SERVICE_PACKAGE

ABAP code example for Function Module MS_READ_SERVICE_PACKAGE





The ABAP code below is a full code listing to execute function module MS_READ_SERVICE_PACKAGE 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_i_packno  TYPE STANDARD TABLE OF PACK_TAB,"TABLES PARAM
wa_i_packno  LIKE LINE OF it_i_packno ,
it_i_eslh  TYPE STANDARD TABLE OF ESLH,"TABLES PARAM
wa_i_eslh  LIKE LINE OF it_i_eslh ,
it_i_esll  TYPE STANDARD TABLE OF ESLL,"TABLES PARAM
wa_i_esll  LIKE LINE OF it_i_esll ,
it_i_esuh  TYPE STANDARD TABLE OF ESUH,"TABLES PARAM
wa_i_esuh  LIKE LINE OF it_i_esuh ,
it_i_esuc  TYPE STANDARD TABLE OF ESUC,"TABLES PARAM
wa_i_esuc  LIKE LINE OF it_i_esuc ,
it_i_eskl  TYPE STANDARD TABLE OF ESKL,"TABLES PARAM
wa_i_eskl  LIKE LINE OF it_i_eskl ,
it_i_konv  TYPE STANDARD TABLE OF KONV,"TABLES PARAM
wa_i_konv  LIKE LINE OF it_i_konv ,
it_i_a081  TYPE STANDARD TABLE OF A081,"TABLES PARAM
wa_i_a081  LIKE LINE OF it_i_a081 ,
it_i_a082  TYPE STANDARD TABLE OF A082,"TABLES PARAM
wa_i_a082  LIKE LINE OF it_i_a082 ,
it_i_a215  TYPE STANDARD TABLE OF A215,"TABLES PARAM
wa_i_a215  LIKE LINE OF it_i_a215 ,
it_i_konh  TYPE STANDARD TABLE OF KONH,"TABLES PARAM
wa_i_konh  LIKE LINE OF it_i_konh ,
it_i_konp  TYPE STANDARD TABLE OF KONP,"TABLES PARAM
wa_i_konp  LIKE LINE OF it_i_konp ,
it_i_konm  TYPE STANDARD TABLE OF KONM,"TABLES PARAM
wa_i_konm  LIKE LINE OF it_i_konm ,
it_i_konw  TYPE STANDARD TABLE OF KONW,"TABLES PARAM
wa_i_konw  LIKE LINE OF it_i_konw ,
it_i_stxh  TYPE STANDARD TABLE OF STXH,"TABLES PARAM
wa_i_stxh  LIKE LINE OF it_i_stxh ,
it_i_stxl  TYPE STANDARD TABLE OF STXL,"TABLES PARAM
wa_i_stxl  LIKE LINE OF it_i_stxl ,
it_i_cdhdr  TYPE STANDARD TABLE OF CDHDR,"TABLES PARAM
wa_i_cdhdr  LIKE LINE OF it_i_cdhdr ,
it_i_chpos  TYPE STANDARD TABLE OF CDPOS,"TABLES PARAM
wa_i_chpos  LIKE LINE OF it_i_chpos .

DATA(ld_no_cond) = 'some text here'.
DATA(ld_no_change_doc) = 'some text here'.
DATA(ld_no_text) = 'some text here'.

"populate fields of struture and append to itab
append wa_i_packno to it_i_packno.

"populate fields of struture and append to itab
append wa_i_eslh to it_i_eslh.

"populate fields of struture and append to itab
append wa_i_esll to it_i_esll.

"populate fields of struture and append to itab
append wa_i_esuh to it_i_esuh.

"populate fields of struture and append to itab
append wa_i_esuc to it_i_esuc.

"populate fields of struture and append to itab
append wa_i_eskl to it_i_eskl.

"populate fields of struture and append to itab
append wa_i_konv to it_i_konv.

"populate fields of struture and append to itab
append wa_i_a081 to it_i_a081.

"populate fields of struture and append to itab
append wa_i_a082 to it_i_a082.

"populate fields of struture and append to itab
append wa_i_a215 to it_i_a215.

"populate fields of struture and append to itab
append wa_i_konh to it_i_konh.

"populate fields of struture and append to itab
append wa_i_konp to it_i_konp.

"populate fields of struture and append to itab
append wa_i_konm to it_i_konm.

"populate fields of struture and append to itab
append wa_i_konw to it_i_konw.

"populate fields of struture and append to itab
append wa_i_stxh to it_i_stxh.

"populate fields of struture and append to itab
append wa_i_stxl to it_i_stxl.

"populate fields of struture and append to itab
append wa_i_cdhdr to it_i_cdhdr.

"populate fields of struture and append to itab
append wa_i_chpos to it_i_chpos. . CALL FUNCTION 'MS_READ_SERVICE_PACKAGE' * EXPORTING * no_cond = ld_no_cond * no_change_doc = ld_no_change_doc * no_text = ld_no_text TABLES i_packno = it_i_packno i_eslh = it_i_eslh i_esll = it_i_esll * i_esuh = it_i_esuh * i_esuc = it_i_esuc * i_eskl = it_i_eskl * i_konv = it_i_konv * i_a081 = it_i_a081 * i_a082 = it_i_a082 * i_a215 = it_i_a215 * i_konh = it_i_konh * i_konp = it_i_konp * i_konm = it_i_konm * i_konw = it_i_konw * i_stxh = it_i_stxh * i_stxl = it_i_stxl * i_cdhdr = it_i_cdhdr * i_chpos = it_i_chpos . " MS_READ_SERVICE_PACKAGE
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_no_cond  TYPE STRING ,
it_i_packno  TYPE STANDARD TABLE OF PACK_TAB ,
wa_i_packno  LIKE LINE OF it_i_packno,
ld_no_change_doc  TYPE STRING ,
it_i_eslh  TYPE STANDARD TABLE OF ESLH ,
wa_i_eslh  LIKE LINE OF it_i_eslh,
ld_no_text  TYPE STRING ,
it_i_esll  TYPE STANDARD TABLE OF ESLL ,
wa_i_esll  LIKE LINE OF it_i_esll,
it_i_esuh  TYPE STANDARD TABLE OF ESUH ,
wa_i_esuh  LIKE LINE OF it_i_esuh,
it_i_esuc  TYPE STANDARD TABLE OF ESUC ,
wa_i_esuc  LIKE LINE OF it_i_esuc,
it_i_eskl  TYPE STANDARD TABLE OF ESKL ,
wa_i_eskl  LIKE LINE OF it_i_eskl,
it_i_konv  TYPE STANDARD TABLE OF KONV ,
wa_i_konv  LIKE LINE OF it_i_konv,
it_i_a081  TYPE STANDARD TABLE OF A081 ,
wa_i_a081  LIKE LINE OF it_i_a081,
it_i_a082  TYPE STANDARD TABLE OF A082 ,
wa_i_a082  LIKE LINE OF it_i_a082,
it_i_a215  TYPE STANDARD TABLE OF A215 ,
wa_i_a215  LIKE LINE OF it_i_a215,
it_i_konh  TYPE STANDARD TABLE OF KONH ,
wa_i_konh  LIKE LINE OF it_i_konh,
it_i_konp  TYPE STANDARD TABLE OF KONP ,
wa_i_konp  LIKE LINE OF it_i_konp,
it_i_konm  TYPE STANDARD TABLE OF KONM ,
wa_i_konm  LIKE LINE OF it_i_konm,
it_i_konw  TYPE STANDARD TABLE OF KONW ,
wa_i_konw  LIKE LINE OF it_i_konw,
it_i_stxh  TYPE STANDARD TABLE OF STXH ,
wa_i_stxh  LIKE LINE OF it_i_stxh,
it_i_stxl  TYPE STANDARD TABLE OF STXL ,
wa_i_stxl  LIKE LINE OF it_i_stxl,
it_i_cdhdr  TYPE STANDARD TABLE OF CDHDR ,
wa_i_cdhdr  LIKE LINE OF it_i_cdhdr,
it_i_chpos  TYPE STANDARD TABLE OF CDPOS ,
wa_i_chpos  LIKE LINE OF it_i_chpos.

ld_no_cond = 'some text here'.

"populate fields of struture and append to itab
append wa_i_packno to it_i_packno.
ld_no_change_doc = 'some text here'.

"populate fields of struture and append to itab
append wa_i_eslh to it_i_eslh.
ld_no_text = 'some text here'.

"populate fields of struture and append to itab
append wa_i_esll to it_i_esll.

"populate fields of struture and append to itab
append wa_i_esuh to it_i_esuh.

"populate fields of struture and append to itab
append wa_i_esuc to it_i_esuc.

"populate fields of struture and append to itab
append wa_i_eskl to it_i_eskl.

"populate fields of struture and append to itab
append wa_i_konv to it_i_konv.

"populate fields of struture and append to itab
append wa_i_a081 to it_i_a081.

"populate fields of struture and append to itab
append wa_i_a082 to it_i_a082.

"populate fields of struture and append to itab
append wa_i_a215 to it_i_a215.

"populate fields of struture and append to itab
append wa_i_konh to it_i_konh.

"populate fields of struture and append to itab
append wa_i_konp to it_i_konp.

"populate fields of struture and append to itab
append wa_i_konm to it_i_konm.

"populate fields of struture and append to itab
append wa_i_konw to it_i_konw.

"populate fields of struture and append to itab
append wa_i_stxh to it_i_stxh.

"populate fields of struture and append to itab
append wa_i_stxl to it_i_stxl.

"populate fields of struture and append to itab
append wa_i_cdhdr to it_i_cdhdr.

"populate fields of struture and append to itab
append wa_i_chpos to it_i_chpos.

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