SAP Function Modules

MV_ADJUST_MSP_COMPUTE_TAB_PKTE SAP Function module







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

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


Pattern for FM MV_ADJUST_MSP_COMPUTE_TAB_PKTE - MV ADJUST MSP COMPUTE TAB PKTE





CALL FUNCTION 'MV_ADJUST_MSP_COMPUTE_TAB_PKTE' "
  EXPORTING
*   i_baujahr = '00000000'      " viob03-ybaujahr
*   i_bezdatum = SY-DATUM       " sy-datum
    i_bezflaeche =              " viob40-fqmflart
*   i_kz_bpktres_compute = 'X'  "
*   i_kz_sum_compute = 'X'      "
*   i_read_whole_msp = 'X'      "
    i_smietsp =                 " tiv20-smietsp
*   i_sstckbis = '000'          " viob03-sstckbis
    i_viob01 =                  " viob01
  IMPORTING
    e_kz_changed =              "
  TABLES
    e_tab_sum_pro_klasse =      " rtiv70_sum
    ie_tab_vimi02 =             " avimi02
    .  "  MV_ADJUST_MSP_COMPUTE_TAB_PKTE

ABAP code example for Function Module MV_ADJUST_MSP_COMPUTE_TAB_PKTE





The ABAP code below is a full code listing to execute function module MV_ADJUST_MSP_COMPUTE_TAB_PKTE 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_kz_changed  TYPE STRING ,
it_e_tab_sum_pro_klasse  TYPE STANDARD TABLE OF RTIV70_SUM,"TABLES PARAM
wa_e_tab_sum_pro_klasse  LIKE LINE OF it_e_tab_sum_pro_klasse ,
it_ie_tab_vimi02  TYPE STANDARD TABLE OF AVIMI02,"TABLES PARAM
wa_ie_tab_vimi02  LIKE LINE OF it_ie_tab_vimi02 .


SELECT single YBAUJAHR
FROM VIOB03
INTO @DATA(ld_i_baujahr).

DATA(ld_i_bezdatum) = '20210129'.

SELECT single FQMFLART
FROM VIOB40
INTO @DATA(ld_i_bezflaeche).

DATA(ld_i_kz_bpktres_compute) = 'some text here'.
DATA(ld_i_kz_sum_compute) = 'some text here'.
DATA(ld_i_read_whole_msp) = 'some text here'.

SELECT single SMIETSP
FROM TIV20
INTO @DATA(ld_i_smietsp).


SELECT single SSTCKBIS
FROM VIOB03
INTO @DATA(ld_i_sstckbis).

DATA(ld_i_viob01) = '20210129'.

"populate fields of struture and append to itab
append wa_e_tab_sum_pro_klasse to it_e_tab_sum_pro_klasse.

"populate fields of struture and append to itab
append wa_ie_tab_vimi02 to it_ie_tab_vimi02. . CALL FUNCTION 'MV_ADJUST_MSP_COMPUTE_TAB_PKTE' EXPORTING * i_baujahr = ld_i_baujahr * i_bezdatum = ld_i_bezdatum i_bezflaeche = ld_i_bezflaeche * i_kz_bpktres_compute = ld_i_kz_bpktres_compute * i_kz_sum_compute = ld_i_kz_sum_compute * i_read_whole_msp = ld_i_read_whole_msp i_smietsp = ld_i_smietsp * i_sstckbis = ld_i_sstckbis i_viob01 = ld_i_viob01 IMPORTING e_kz_changed = ld_e_kz_changed TABLES e_tab_sum_pro_klasse = it_e_tab_sum_pro_klasse ie_tab_vimi02 = it_ie_tab_vimi02 . " MV_ADJUST_MSP_COMPUTE_TAB_PKTE
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_kz_changed  TYPE STRING ,
ld_i_baujahr  TYPE VIOB03-YBAUJAHR ,
it_e_tab_sum_pro_klasse  TYPE STANDARD TABLE OF RTIV70_SUM ,
wa_e_tab_sum_pro_klasse  LIKE LINE OF it_e_tab_sum_pro_klasse,
ld_i_bezdatum  TYPE SY-DATUM ,
it_ie_tab_vimi02  TYPE STANDARD TABLE OF AVIMI02 ,
wa_ie_tab_vimi02  LIKE LINE OF it_ie_tab_vimi02,
ld_i_bezflaeche  TYPE VIOB40-FQMFLART ,
ld_i_kz_bpktres_compute  TYPE STRING ,
ld_i_kz_sum_compute  TYPE STRING ,
ld_i_read_whole_msp  TYPE STRING ,
ld_i_smietsp  TYPE TIV20-SMIETSP ,
ld_i_sstckbis  TYPE VIOB03-SSTCKBIS ,
ld_i_viob01  TYPE VIOB01 .


SELECT single YBAUJAHR
FROM VIOB03
INTO ld_i_baujahr.


"populate fields of struture and append to itab
append wa_e_tab_sum_pro_klasse to it_e_tab_sum_pro_klasse.
ld_i_bezdatum = '20210129'.

"populate fields of struture and append to itab
append wa_ie_tab_vimi02 to it_ie_tab_vimi02.

SELECT single FQMFLART
FROM VIOB40
INTO ld_i_bezflaeche.

ld_i_kz_bpktres_compute = 'some text here'.
ld_i_kz_sum_compute = 'some text here'.
ld_i_read_whole_msp = 'some text here'.

SELECT single SMIETSP
FROM TIV20
INTO ld_i_smietsp.


SELECT single SSTCKBIS
FROM VIOB03
INTO ld_i_sstckbis.

ld_i_viob01 = '20210129'.

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