ME_CREATE_PO 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 ME_CREATE_PO into the relevant SAP transaction such as SE37 or SE80.
Associated Function Group:
OIAL
Released Date:
Not Released
Processing type: Normal fucntion module
CALL FUNCTION 'ME_CREATE_PO' "Create Purchase Order
EXPORTING
* i_bedat = SY-DATUM " ekko-bedat
i_bsart = " ekko-bsart
* i_bukrs = " ekko-bukrs
* i_ekgrp = " ekko-ekgrp
i_ekorg = " ekko-ekorg
* i_konnr = SPACE " ekko-konnr
* i_lifnr = SPACE " ekko-lifnr
* i_reswk = SPACE " ekko-reswk
* i_new_item_number = 'X' "
* i_no_commit = ' ' " ekpo-statu
* i_ticket_header = " oij_el_ticket_h Universal Ticket Table
* i_ticket_item = " oij_el_ticket_i Universal Ticket Item Table
* i_oijnomh = " oijnomh OIL-TSW: Nomination Header Table
* i_oijnomi = " oijnomi OIL-TSW: Nomination Item
* i_oijimport = " roij_el_import TSW: Parameter Imported to CIP Functions
IMPORTING
e_ebeln = " ekko-ebeln
e_ebelp = " ekpo-ebelp
TABLES
xeket = " eket
xekkn = " ekkn
xekpo = " iekpo
xemsg = " emsg
EXCEPTIONS
ERROR_HEADER = 1 "
NO_ITEMS = 2 "
. " ME_CREATE_PO
The ABAP code below is a full code listing to execute function module ME_CREATE_PO 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).
| ld_e_ebeln | TYPE EKKO-EBELN , |
| ld_e_ebelp | TYPE EKPO-EBELP , |
| it_xeket | TYPE STANDARD TABLE OF EKET,"TABLES PARAM |
| wa_xeket | LIKE LINE OF it_xeket , |
| it_xekkn | TYPE STANDARD TABLE OF EKKN,"TABLES PARAM |
| wa_xekkn | LIKE LINE OF it_xekkn , |
| it_xekpo | TYPE STANDARD TABLE OF IEKPO,"TABLES PARAM |
| wa_xekpo | LIKE LINE OF it_xekpo , |
| it_xemsg | TYPE STANDARD TABLE OF EMSG,"TABLES PARAM |
| wa_xemsg | LIKE LINE OF it_xemsg . |
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_ebeln | TYPE EKKO-EBELN , |
| ld_i_bedat | TYPE EKKO-BEDAT , |
| it_xeket | TYPE STANDARD TABLE OF EKET , |
| wa_xeket | LIKE LINE OF it_xeket, |
| ld_e_ebelp | TYPE EKPO-EBELP , |
| ld_i_bsart | TYPE EKKO-BSART , |
| it_xekkn | TYPE STANDARD TABLE OF EKKN , |
| wa_xekkn | LIKE LINE OF it_xekkn, |
| ld_i_bukrs | TYPE EKKO-BUKRS , |
| it_xekpo | TYPE STANDARD TABLE OF IEKPO , |
| wa_xekpo | LIKE LINE OF it_xekpo, |
| ld_i_ekgrp | TYPE EKKO-EKGRP , |
| it_xemsg | TYPE STANDARD TABLE OF EMSG , |
| wa_xemsg | LIKE LINE OF it_xemsg, |
| ld_i_ekorg | TYPE EKKO-EKORG , |
| ld_i_konnr | TYPE EKKO-KONNR , |
| ld_i_lifnr | TYPE EKKO-LIFNR , |
| ld_i_reswk | TYPE EKKO-RESWK , |
| ld_i_new_item_number | TYPE STRING , |
| ld_i_no_commit | TYPE EKPO-STATU , |
| ld_i_ticket_header | TYPE OIJ_EL_TICKET_H , |
| ld_i_ticket_item | TYPE OIJ_EL_TICKET_I , |
| ld_i_oijnomh | TYPE OIJNOMH , |
| ld_i_oijnomi | TYPE OIJNOMI , |
| ld_i_oijimport | TYPE ROIJ_EL_IMPORT . |
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 ME_CREATE_PO or its description.