Today i have to create a ABAP Program use to create purchase order through excel uploaded and during create purchase order ( PO ) my functionalty team ask me to fill a custom field in header PO , as i know BAPI_PO_CREATE1  is a SAP standard function module to create purchase order and use Extensionin to populate custom field.

After finished code this program, then of course i will going to test run my program,  it is success to create purchase order, but when checked to return table, a error is ME887 Error transferring ExtensionIn data for enhancement CI_EKKODB  always appeared, although only W ( Warning ) type message but this error bring on this BAPI_PO_CREATE1 cannot populate custom field.

Exploring in Internet to find the answer , i couldn’t find any fix solution how to solve that’s problem, many people suggested to use enhancement like ME_BAPI_PO_CUST on put code on MAP2I_EXTENSIONIN method to populate custom field not worked.

MAP2I_EXTENSIONIN

These are a structure you can use in BAPI_PO_CREATE1 Extensionin.

  • BAPI_TE_MEPOACCOUNTING BAPI Customer Enhancement for MEPOACCOUNTING.
  • BAPI_TE_MEPOACCOUNTINGX BAPI Customer Enhancements for MEPOACCOUNTINGX.
  • BAPI_TE_MEPOHEADER BAPI Interface for Customer Enhancements for MEPOHEADER.
  • BAPI_TE_MEPOHEADERX BAPI Interface for Customer Enhancements for MEPOHEADERX.
  • BAPI_TE_MEPOITEM BAPI Interface for Customer Enhancements for MEPOITEM.
  • BAPI_TE_MEPOITEMX BAPI Interface for Customer Enhancements for MEPOITEMX.
  • BAPI_TE_MEPOSCHEDULE BAPI Customer Enhancements for MEPOSCHEDULE.
  • BAPI_TE_MEPOSCHEDULEX BAPI Customer Enhancements for MEPOSCHEDULEX.

Solution

BAPI_TE_MEPOHEADER

Step 1.

In my system, BAPI_TE_MEPOHEADER has a field with packed number. the solution is you must copy BAPI_TE_MEPOHEADER to ZBAPI_TE_MEPOHEADER and CI_EKKODB to ZCI_EKKODB and delete packed number field in Z copied structure.

Below is part of ZProgram to populate EXTENSIONIN Structure BAPI_PO_CREATE1

Step 2

Create Enhancement Point in L2012F23 Program

SAP System must know you use ZBAPI_TE_MEPOHEADER so you must create enhancement point in L2012F23  and add ZBAPI_TE_MEPOHEADER , take a look code line below.

Finally, run my program to create PO then … success.. 🙂

Incoming search terms:

Leave a Reply

Your email address will not be published. Required fields are marked *