SAP ME_CREATE_PO_HEADER Function Module for
ME_CREATE_PO_HEADER is a standard me create po header SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.
See here to view full function module documentation and code listing for me create po header FM, simply by entering the name ME_CREATE_PO_HEADER into the relevant SAP transaction such as SE37 or SE38.
Function Group: EINC
Program Name: SAPLEINC
Main Program: SAPLEINC
Appliation area: M
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function ME_CREATE_PO_HEADER pattern details
In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.CALL FUNCTION 'ME_CREATE_PO_HEADER'".
EXPORTING
* I_BEDAT = SY-DATLO "Purchase Order Date
* I_ERNAM = ' ' "Created By
* I_TEKKO = "
* I_TEKKOREL = ' ' "
* I_ADDRESS = "
* I_NO_CONDITION_COPY = "
* I_NO_MESSAGING = "
* I_NO_MESSAGE_REQ = "
* I_NO_AUTHORITY_CHECK = "Do not perform an authorization check
* I_VORGA = "
* I_SCMPROC = "SCM Process That Created the Purchase Order
I_BSART = "Order Type
* I_WERKS = "
* I_LTSNR = "
* I_LIFRE = "
* I_LLIEF = "
* I_CI_EKKO = "
* I_SPRAS = "Language Key
* I_BUKRS = ' ' "
* I_EKGRP = "Purchasing Group
I_EKORG = "Purchasing Organization
* I_KONNR = ' ' "Contract
* I_LIFNR = ' ' "Vendor
* I_RESWK = ' ' "Supplying Plant
* I_EBELN = ' ' "
IMPORTING
E_EKKO = "
IMPORTING Parameters details for ME_CREATE_PO_HEADER
I_BEDAT - Purchase Order Date
Data type: EKKO-BEDATDefault: SY-DATLO
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_ERNAM - Created By
Data type: EKKO-ERNAMDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_TEKKO -
Data type: TEKKOOptional: Yes
Call by Reference: No ( called with pass by value option)
I_TEKKOREL -
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_ADDRESS -
Data type: ADDR1_VALOptional: Yes
Call by Reference: No ( called with pass by value option)
I_NO_CONDITION_COPY -
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
I_NO_MESSAGING -
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
I_NO_MESSAGE_REQ -
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
I_NO_AUTHORITY_CHECK - Do not perform an authorization check
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
I_VORGA -
Data type: EKKO-STATUOptional: Yes
Call by Reference: No ( called with pass by value option)
I_SCMPROC - SCM Process That Created the Purchase Order
Data type: SCMPROCOptional: Yes
Call by Reference: No ( called with pass by value option)
I_BSART - Order Type
Data type: EKKO-BSARTOptional: No
Call by Reference: No ( called with pass by value option)
I_WERKS -
Data type: EKPO-WERKSOptional: Yes
Call by Reference: No ( called with pass by value option)
I_LTSNR -
Data type: EKPO-LTSNROptional: Yes
Call by Reference: No ( called with pass by value option)
I_LIFRE -
Data type: EKKO-LIFREOptional: Yes
Call by Reference: No ( called with pass by value option)
I_LLIEF -
Data type: EKKO-LLIEFOptional: Yes
Call by Reference: No ( called with pass by value option)
I_CI_EKKO -
Data type: EKKO_CIOptional: Yes
Call by Reference: No ( called with pass by value option)
I_SPRAS - Language Key
Data type: EKKO-SPRASOptional: Yes
Call by Reference: No ( called with pass by value option)
I_BUKRS -
Data type: EKKO-BUKRSDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_EKGRP - Purchasing Group
Data type: EKKO-EKGRPOptional: Yes
Call by Reference: No ( called with pass by value option)
I_EKORG - Purchasing Organization
Data type: EKKO-EKORGOptional: No
Call by Reference: No ( called with pass by value option)
I_KONNR - Contract
Data type: EKKO-KONNRDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_LIFNR - Vendor
Data type: EKKO-LIFNRDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_RESWK - Supplying Plant
Data type: EKKO-RESWKDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_EBELN -
Data type: EKKO-EBELNDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for ME_CREATE_PO_HEADER
E_EKKO -
Data type: EKKOOptional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for ME_CREATE_PO_HEADER Function Module
The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than 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 newer method of declaring data variables on the fly. 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), which i why i have stuck to the origianl for this example.| DATA: | ||||
| lv_e_ekko | TYPE EKKO, " | |||
| lv_i_bedat | TYPE EKKO-BEDAT, " SY-DATLO | |||
| lv_i_ernam | TYPE EKKO-ERNAM, " SPACE | |||
| lv_i_tekko | TYPE TEKKO, " | |||
| lv_i_tekkorel | TYPE TEKKO, " SPACE | |||
| lv_i_address | TYPE ADDR1_VAL, " | |||
| lv_i_no_condition_copy | TYPE ADDR1_VAL, " | |||
| lv_i_no_messaging | TYPE ADDR1_VAL, " | |||
| lv_i_no_message_req | TYPE ADDR1_VAL, " | |||
| lv_i_no_authority_check | TYPE ADDR1_VAL, " | |||
| lv_i_vorga | TYPE EKKO-STATU, " | |||
| lv_i_scmproc | TYPE SCMPROC, " | |||
| lv_i_bsart | TYPE EKKO-BSART, " | |||
| lv_i_werks | TYPE EKPO-WERKS, " | |||
| lv_i_ltsnr | TYPE EKPO-LTSNR, " | |||
| lv_i_lifre | TYPE EKKO-LIFRE, " | |||
| lv_i_llief | TYPE EKKO-LLIEF, " | |||
| lv_i_ci_ekko | TYPE EKKO_CI, " | |||
| lv_i_spras | TYPE EKKO-SPRAS, " | |||
| lv_i_bukrs | TYPE EKKO-BUKRS, " SPACE | |||
| lv_i_ekgrp | TYPE EKKO-EKGRP, " | |||
| lv_i_ekorg | TYPE EKKO-EKORG, " | |||
| lv_i_konnr | TYPE EKKO-KONNR, " SPACE | |||
| lv_i_lifnr | TYPE EKKO-LIFNR, " SPACE | |||
| lv_i_reswk | TYPE EKKO-RESWK, " SPACE | |||
| lv_i_ebeln | TYPE EKKO-EBELN. " SPACE |
|   CALL FUNCTION 'ME_CREATE_PO_HEADER' " |
| EXPORTING | ||
| I_BEDAT | = lv_i_bedat | |
| I_ERNAM | = lv_i_ernam | |
| I_TEKKO | = lv_i_tekko | |
| I_TEKKOREL | = lv_i_tekkorel | |
| I_ADDRESS | = lv_i_address | |
| I_NO_CONDITION_COPY | = lv_i_no_condition_copy | |
| I_NO_MESSAGING | = lv_i_no_messaging | |
| I_NO_MESSAGE_REQ | = lv_i_no_message_req | |
| I_NO_AUTHORITY_CHECK | = lv_i_no_authority_check | |
| I_VORGA | = lv_i_vorga | |
| I_SCMPROC | = lv_i_scmproc | |
| I_BSART | = lv_i_bsart | |
| I_WERKS | = lv_i_werks | |
| I_LTSNR | = lv_i_ltsnr | |
| I_LIFRE | = lv_i_lifre | |
| I_LLIEF | = lv_i_llief | |
| I_CI_EKKO | = lv_i_ci_ekko | |
| I_SPRAS | = lv_i_spras | |
| I_BUKRS | = lv_i_bukrs | |
| I_EKGRP | = lv_i_ekgrp | |
| I_EKORG | = lv_i_ekorg | |
| I_KONNR | = lv_i_konnr | |
| I_LIFNR | = lv_i_lifnr | |
| I_RESWK | = lv_i_reswk | |
| I_EBELN | = lv_i_ebeln | |
| IMPORTING | ||
| E_EKKO | = lv_e_ekko | |
| . " ME_CREATE_PO_HEADER | ||
ABAP code using 7.40 inline data declarations to call FM ME_CREATE_PO_HEADER
The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.| "SELECT single BEDAT FROM EKKO INTO @DATA(ld_i_bedat). | ||||
| DATA(ld_i_bedat) | = SY-DATLO. | |||
| "SELECT single ERNAM FROM EKKO INTO @DATA(ld_i_ernam). | ||||
| DATA(ld_i_ernam) | = ' '. | |||
| DATA(ld_i_tekkorel) | = ' '. | |||
| "SELECT single STATU FROM EKKO INTO @DATA(ld_i_vorga). | ||||
| "SELECT single BSART FROM EKKO INTO @DATA(ld_i_bsart). | ||||
| "SELECT single WERKS FROM EKPO INTO @DATA(ld_i_werks). | ||||
| "SELECT single LTSNR FROM EKPO INTO @DATA(ld_i_ltsnr). | ||||
| "SELECT single LIFRE FROM EKKO INTO @DATA(ld_i_lifre). | ||||
| "SELECT single LLIEF FROM EKKO INTO @DATA(ld_i_llief). | ||||
| "SELECT single SPRAS FROM EKKO INTO @DATA(ld_i_spras). | ||||
| "SELECT single BUKRS FROM EKKO INTO @DATA(ld_i_bukrs). | ||||
| DATA(ld_i_bukrs) | = ' '. | |||
| "SELECT single EKGRP FROM EKKO INTO @DATA(ld_i_ekgrp). | ||||
| "SELECT single EKORG FROM EKKO INTO @DATA(ld_i_ekorg). | ||||
| "SELECT single KONNR FROM EKKO INTO @DATA(ld_i_konnr). | ||||
| DATA(ld_i_konnr) | = ' '. | |||
| "SELECT single LIFNR FROM EKKO INTO @DATA(ld_i_lifnr). | ||||
| DATA(ld_i_lifnr) | = ' '. | |||
| "SELECT single RESWK FROM EKKO INTO @DATA(ld_i_reswk). | ||||
| DATA(ld_i_reswk) | = ' '. | |||
| "SELECT single EBELN FROM EKKO INTO @DATA(ld_i_ebeln). | ||||
| DATA(ld_i_ebeln) | = ' '. | |||
Search for further information about these or an SAP related objects