Skip to Content

BAPI_PO_CREATE1 - Extensionin parameters not updating the value

Hi All,

We want the functionality of updating 2 customer specific fields in table EKPO while creating PO with BAPI_PO_CREATE1. The documentation for the BAPI says that we can use the customer enhancement SAPL2012 for the same as shown.

We are passing the customer specific fields for item of PO via the parameter EXTENSIONIN of the BAPI. But still we are not able to update the fields.

It will be really helpful if someone can provide any inputs regarding how to update the customer specific fields in the database table

After passing the fields we want to write any codes to populate the same in table ?

Regards,

Saravanan M

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Apr 27, 2009 at 06:01 AM

    Hi,

    Step 1 : First extend the table EEKO with custom fileds .

    Step 2 : Extend Structure BAPI_TE_MEPOHEADER and BAPI_TE_MEPOHEADERZ with same fields.

    Step 3 : While extending BAPI_TE_MEPOHEADERX , make sure that for custom fields you have to give 1 CHAR ( BAPI UPDATE ).

    Step 4 : In program you have collect the custom field values and pass append both structures ( ie BAPI_TE_MEPOHEADER and BAPI_TE_MEPOHEADERX ) to EXTENSIONIN Structure and values to EXTENSIONIN VALUEPART1.

    Example :

    DATA : BEGIN OF T_EXTENSIONIN OCCURS 0.

    INCLUDE STRUCTURE BAPIPAREX .

    DATA: END OF T_EXTENSIONIN .

    DATA : T_BAPI_TE_MEPOHEADER TYPE BAPI_TE_MEPOHEADER.

    DATA : T_BAPI_TE_MEPOHEADERX TYPE BAPI_TE_MEPOHEADERX.

    DATA : T_CUSTDATA_IN TYPE BAPI_TE_MEPOHEADER.

    DATA : T_CUSTDATA_INX TYPE BAPI_TE_MEPOHEADERX.

          • Customer Data

          T_CUSTDATA_IN-ZZRLDATE = '20040110'.

          T_CUSTDATA_IN-ZZRADATE = '20041210'.

          T_CUSTDATA_IN-ZZPOSTATUS = 'OPEN'.

          T_CUSTDATA_IN-ZZSTATE = 'TN'.

          T_CUSTDATA_IN-ZZCITY = 'MEP'.

          T_CUSTDATA_INX-ZZRLDATE = 'X'.

          T_CUSTDATA_INX-ZZRADATE = 'X'.

          T_CUSTDATA_INX-ZZPOSTATUS = 'X'.

          T_CUSTDATA_INX-ZZSTATE = 'X'.

          T_CUSTDATA_INX-ZZCITY = 'X'.

          ********move custom data

          MOVE 'BAPI_TE_MEPOHEADER' TO T_EXTENSIONIN-STRUCTURE.

          *CLEAR T_BAPI_TE_PO_HEADER-PO_NUMBER.

          MOVE-CORRESPONDING T_CUSTDATA_IN TO T_BAPI_TE_MEPOHEADER.

          MOVE T_BAPI_TE_MEPOHEADER TO T_EXTENSIONIN-VALUEPART1.

          APPEND T_EXTENSIONIN.

          MOVE 'BAPI_TE_MEPOHEADERX' TO T_EXTENSIONIN-STRUCTURE.

          *CLEAR T_BAPI_TE_PO_HEADER-PO_NUMBER.

          MOVE-CORRESPONDING T_CUSTDATA_INX TO T_BAPI_TE_MEPOHEADERX.

          MOVE T_BAPI_TE_MEPOHEADERX TO T_EXTENSIONIN-VALUEPART1.

          APPEND T_EXTENSIONIN.

                                            Finally pass this T_EXTENIONIN to BAPI_PO_CREATE1 ( EXTENSIONIN )..

                                            Thanks,

                                            Shailaja Ainala.

                                            Add comment
                                            10|10000 characters needed characters exceeded

                                          • May 17, 2015 at 06:24 AM

                                            Dear Saravanan,

                                            I am facing the same issue now. I see that you have solved this issue.

                                            Can you please let me know how to solve the issue.

                                            Regards,

                                            Rama

                                            Add comment
                                            10|10000 characters needed characters exceeded