SAP Function Modules

MEPO_CONFIRMATION_PAI SAP Function module







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

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


Pattern for FM MEPO_CONFIRMATION_PAI - MEPO CONFIRMATION PAI





CALL FUNCTION 'MEPO_CONFIRMATION_PAI' "
  EXPORTING
    i_bstae =                   " ekpo-bstae    Confirmation Control Key
    i_ebeln =                   " ekko-ebeln    Document Number
    i_ebelp =                   " ekpo-ebelp    Item
*   i_ematn = SPACE             " ekpo-ematn    Material Number
    i_funkt =                   "               Editing function
*   i_kdatb = 0                 " ekko-kdatb
*   i_kdate = 0                 " ekko-kdate
*   i_meins = SPACE             " ekpo-meins    Unit of Measure
*   i_menge = 0                 " ekpo-menge    Quantity
*   i_trtyp = 'A'               " t168-trtyp    Transaction Type
*   i_txz01 = SPACE             " ekpo-txz01    Material Short Text
*   i_vorga = 'F'               " t160-vorga    Transaction/Event
    i_werks =                   " ekpo-werks    Plant
*   i_matnr =                   " ekpo-matnr
*   i_mprof =                   " ekpo-mprof
*   i_revlv =                   " ekpo-revlv
*   i_uptyp = SPACE             " ekpo-uptyp
  IMPORTING
    e_ekesok =                  "
    e_fcode =                   "               Function Code
    e_lamng =                   " ekes-menge
    e_vb_updkz =                "
* TABLES
*   xeket =                     " beket         Table of Schedule Lines
*   yeket =                     " ueket
    .  "  MEPO_CONFIRMATION_PAI

ABAP code example for Function Module MEPO_CONFIRMATION_PAI





The ABAP code below is a full code listing to execute function module MEPO_CONFIRMATION_PAI 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_ekesok  TYPE STRING ,
ld_e_fcode  TYPE STRING ,
ld_e_lamng  TYPE EKES-MENGE ,
ld_e_vb_updkz  TYPE STRING ,
it_xeket  TYPE STANDARD TABLE OF BEKET,"TABLES PARAM
wa_xeket  LIKE LINE OF it_xeket ,
it_yeket  TYPE STANDARD TABLE OF UEKET,"TABLES PARAM
wa_yeket  LIKE LINE OF it_yeket .


SELECT single BSTAE
FROM EKPO
INTO @DATA(ld_i_bstae).


SELECT single EBELN
FROM EKKO
INTO @DATA(ld_i_ebeln).


SELECT single EBELP
FROM EKPO
INTO @DATA(ld_i_ebelp).


SELECT single EMATN
FROM EKPO
INTO @DATA(ld_i_ematn).

DATA(ld_i_funkt) = 'some text here'.

SELECT single KDATB
FROM EKKO
INTO @DATA(ld_i_kdatb).


SELECT single KDATE
FROM EKKO
INTO @DATA(ld_i_kdate).


SELECT single MEINS
FROM EKPO
INTO @DATA(ld_i_meins).


SELECT single MENGE
FROM EKPO
INTO @DATA(ld_i_menge).


SELECT single TRTYP
FROM T168
INTO @DATA(ld_i_trtyp).


SELECT single TXZ01
FROM EKPO
INTO @DATA(ld_i_txz01).


SELECT single VORGA
FROM T160
INTO @DATA(ld_i_vorga).


SELECT single WERKS
FROM EKPO
INTO @DATA(ld_i_werks).


SELECT single MATNR
FROM EKPO
INTO @DATA(ld_i_matnr).


SELECT single MPROF
FROM EKPO
INTO @DATA(ld_i_mprof).


SELECT single REVLV
FROM EKPO
INTO @DATA(ld_i_revlv).


SELECT single UPTYP
FROM EKPO
INTO @DATA(ld_i_uptyp).


"populate fields of struture and append to itab
append wa_xeket to it_xeket.

"populate fields of struture and append to itab
append wa_yeket to it_yeket. . CALL FUNCTION 'MEPO_CONFIRMATION_PAI' EXPORTING i_bstae = ld_i_bstae i_ebeln = ld_i_ebeln i_ebelp = ld_i_ebelp * i_ematn = ld_i_ematn i_funkt = ld_i_funkt * i_kdatb = ld_i_kdatb * i_kdate = ld_i_kdate * i_meins = ld_i_meins * i_menge = ld_i_menge * i_trtyp = ld_i_trtyp * i_txz01 = ld_i_txz01 * i_vorga = ld_i_vorga i_werks = ld_i_werks * i_matnr = ld_i_matnr * i_mprof = ld_i_mprof * i_revlv = ld_i_revlv * i_uptyp = ld_i_uptyp IMPORTING e_ekesok = ld_e_ekesok e_fcode = ld_e_fcode e_lamng = ld_e_lamng e_vb_updkz = ld_e_vb_updkz * TABLES * xeket = it_xeket * yeket = it_yeket . " MEPO_CONFIRMATION_PAI
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_ekesok  TYPE STRING ,
ld_i_bstae  TYPE EKPO-BSTAE ,
it_xeket  TYPE STANDARD TABLE OF BEKET ,
wa_xeket  LIKE LINE OF it_xeket,
ld_e_fcode  TYPE STRING ,
ld_i_ebeln  TYPE EKKO-EBELN ,
it_yeket  TYPE STANDARD TABLE OF UEKET ,
wa_yeket  LIKE LINE OF it_yeket,
ld_e_lamng  TYPE EKES-MENGE ,
ld_i_ebelp  TYPE EKPO-EBELP ,
ld_e_vb_updkz  TYPE STRING ,
ld_i_ematn  TYPE EKPO-EMATN ,
ld_i_funkt  TYPE STRING ,
ld_i_kdatb  TYPE EKKO-KDATB ,
ld_i_kdate  TYPE EKKO-KDATE ,
ld_i_meins  TYPE EKPO-MEINS ,
ld_i_menge  TYPE EKPO-MENGE ,
ld_i_trtyp  TYPE T168-TRTYP ,
ld_i_txz01  TYPE EKPO-TXZ01 ,
ld_i_vorga  TYPE T160-VORGA ,
ld_i_werks  TYPE EKPO-WERKS ,
ld_i_matnr  TYPE EKPO-MATNR ,
ld_i_mprof  TYPE EKPO-MPROF ,
ld_i_revlv  TYPE EKPO-REVLV ,
ld_i_uptyp  TYPE EKPO-UPTYP .


SELECT single BSTAE
FROM EKPO
INTO ld_i_bstae.


"populate fields of struture and append to itab
append wa_xeket to it_xeket.

SELECT single EBELN
FROM EKKO
INTO ld_i_ebeln.


"populate fields of struture and append to itab
append wa_yeket to it_yeket.

SELECT single EBELP
FROM EKPO
INTO ld_i_ebelp.


SELECT single EMATN
FROM EKPO
INTO ld_i_ematn.

ld_i_funkt = 'some text here'.

SELECT single KDATB
FROM EKKO
INTO ld_i_kdatb.


SELECT single KDATE
FROM EKKO
INTO ld_i_kdate.


SELECT single MEINS
FROM EKPO
INTO ld_i_meins.


SELECT single MENGE
FROM EKPO
INTO ld_i_menge.


SELECT single TRTYP
FROM T168
INTO ld_i_trtyp.


SELECT single TXZ01
FROM EKPO
INTO ld_i_txz01.


SELECT single VORGA
FROM T160
INTO ld_i_vorga.


SELECT single WERKS
FROM EKPO
INTO ld_i_werks.


SELECT single MATNR
FROM EKPO
INTO ld_i_matnr.


SELECT single MPROF
FROM EKPO
INTO ld_i_mprof.


SELECT single REVLV
FROM EKPO
INTO ld_i_revlv.


SELECT single UPTYP
FROM EKPO
INTO ld_i_uptyp.

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