Urgent: Bapi_po_change Extensionin Parameter...

Hi ,
I want to update a Zfield created in Database using BAPI_PO_CHANGE.
It would be more helpfull. IF any one can give a sample code for that ...
i have done the coding but the field is not getting updated ..
It will helpfull..if i can get the steps and any additional things to be done ....
i have used Extensionin parameter....

Hi Gokul,
Check the following link on Bapi_po_change, It's a sample program.
http://www.sap-img.com/abap/sample-abap-code-on-bapi-po-change.htm
reward points if helpful.

Similar Messages

  • Problems in the EXTENSIONIN Parameter of BAPI_PO_CREATE1

    Hello Experts,
    I have a cfeild in the table EKKO and want to fill it.
    I have try it over the EXTENSIONIN Parameter of BAPI_PO_CREATE1, but it doesn't work.
    The strucurtes BAPI_TE_MEPOHEADER and BAPI_TE_MEPOHEADERX has also the required customerfields included
    Some Ideas? why it doesn'works ?
    Thanx in Advance
    REPORT  Z_BAPI_PO_CREATE1.
    DATA: LS_POHEADER   TYPE TABLE OF BAPIMEPOHEADER WITH HEADER LINE  .
    DATA: LS_POHEADERX  TYPE TABLE OF BAPIMEPOHEADERX WITH HEADER LINE.
    DATA: LT_RETURN     type TABLE OF BAPIRET2.
    DATA: LT_POITEM     TYPE TABLE OF BAPIMEPOITEM  WITH HEADER LINE.
    DATA: LT_POITEMX    type TABLE OF BAPIMEPOITEMX WITH HEADER LINE .
    DATA: LT_ACCOUNT    type TABLE OF BAPIMEPOACCOUNT WITH HEADER LINE .
    DATA: LT_ACCOUNTX   TYPE TABLE OF BAPIMEPOACCOUNTX WITH HEADER LINE .
    DATA: LT_ADDRDELIV  type BAPIMEPOADDRDELIVERY .
    *********************Setze HEADER**************************
    LS_POHEADER-DOC_TYPE      = 'Z028'.
    LS_POHEADER-CREAT_DATE    = '01032006'.
    LS_POHEADER-ITEM_INTVL    = '00001'.
    *LS_POHEADER-VENDOR       = '0021000000'.
    LS_POHEADER-SUPPL_PLNT    = '4700' .
    LS_POHEADER-PURCH_ORG     = '2700' .
    LS_POHEADER-PUR_GROUP     = '701' .
    LS_POHEADER-CURRENCY      = 'EUR' .
    APPEND LS_POHEADER .
    *********************Setze HEADERX**************************
    LS_POHEADERX-DOC_TYPE    = 'X' .
    LS_POHEADERX-CREAT_DATE  = 'X' .
    LS_POHEADERX-ITEM_INTVL  = 'X' .
    LS_POHEADERX-SUPPL_PLNT  = 'X' .
    *LS_POHEADERX-VENDOR     = 'X' .
    LS_POHEADERX-PURCH_ORG   = 'X' .
    LS_POHEADERX-PUR_GROUP   = 'X' .
    LS_POHEADERX-CURRENCY    = 'X' .
    APPEND LS_POHEADERX .
    *********************Setze ITEMS**************************
    LT_POITEM-PO_ITEM                     = '00001' .
    LT_POITEM-MATERIAL                    = '023JK513' .
    LT_POITEM-PLANT                       = '4700' .
    LT_POITEM-STGE_LOC                    = '7001' .
    LT_POITEM-QUANTITY                    = '1' .
    LT_POITEM-PO_UNIT                     = 'PC' .
    LT_POITEM-ACCTASSCAT                  = 'K' .
    LT_POITEM-PERIOD_IND_EXPIRATION_DATE  = 'D' .
    APPEND LT_POITEM .
    *********************Setze ITEMSX**************************
    LT_POITEMX-PO_ITEM        = '00001' .
    LT_POITEMX-PO_ITEMX       = 'X' .
    LT_POITEMX-MATERIAL       = 'X' .
    LT_POITEMX-PLANT          = 'X' .
    LT_POITEMX-STGE_LOC       = 'X' .
    LT_POITEMX-QUANTITY       = 'X' .
    LT_POITEMX-PO_UNIT        = 'X' .
    LT_POITEMX-PERIOD_IND_EXPIRATION_DATE = 'X' .
    LT_POITEMX-ACCTASSCAT                  = 'X' .
    APPEND LT_POITEMX .
    *********************Setze ACCOUNTPARAMETER**************************
    LT_ACCOUNT-COSTCENTER = '1301000001' .
    LT_ACCOUNT-PO_ITEM    = '00001' .
    APPEND LT_ACCOUNT .
    LT_ACCOUNTX-COSTCENTER = 'X' .
    LT_ACCOUNTX-PO_ITEM    = '00001' .
    APPEND LT_ACCOUNTX .
    DATA:       ls_bapi_te_po_header    type          BAPI_TE_MEPOHEADER,
                ls_bapi_te_po_headerx    type          BAPI_TE_MEPOHEADERX,
                ls_bapi_extension       type          BAPIPAREX,
                it_bapi_extension       type table of BAPIPAREX           WITH HEADER LINE.
    ********************Setze EXTENSIONIN**************************
    ls_bapi_extension-structure     = 'BAPI_TE_MEPOHEADER' .
    *ls_bapi_te_po_header-po_number  = '' .
    ls_bapi_te_po_header-cfield    = '8204' .
    ls_bapi_extension-valuepart1    = ls_bapi_te_po_header .
    append ls_bapi_extension to it_bapi_extension .
    clear ls_bapi_extension .
    ls_bapi_extension-structure     = 'BAPI_TE_MEPOHEADERX' .
    *ls_bapi_te_po_header-po_number  =  '' .
    ls_bapi_te_po_headerx-cfield    = 'X' .
    ls_bapi_extension-valuepart1     = ls_bapi_te_po_headerx .
    append ls_bapi_extension to it_bapi_extension .
    CALL FUNCTION 'BAPI_PO_CREATE1'
      EXPORTING
        POHEADER    = LS_POHEADER
        POHEADERX   = LS_POHEADERX
      TABLES
        RETURN      = LT_RETURN
        POITEM      = LT_POITEM
        POITEMX     = LT_POITEMX
        POACCOUNT   = LT_ACCOUNT
        POACCOUNTX  = LT_ACCOUNTX
        EXTENSIONIN = it_bapi_extension
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.

    Hello,
    thank you for your response
    The Problem was on the BADI below:
    it wasn't implemented.
    BAPI_PO_CREATE1->PERFORM move_data_in ->PERFORM move_extensionin->PERFORM move_container_in->CALL BADI lr_badi->map2i_extensionin
    CALL BADI lr_badi->map2i_extensionin
            EXPORTING
              im_container = im_container
              im_name      = im_name
              im_error     = lf_exit
            CHANGING
              ch_struc     = ch_struc.
    Best Regards

  • Extensionin parameter in the Production Order Confirmation BAPI

    Hi All,
    I am looking for a Production Order Confirmation BAPI which has the Extensionin parameter to append values for custom fields in table AFRU.
    But i could not find one with the Extensionin parameter.
    Please let me know if there is any option or any other Production Order Confirmation BAPI which can meet this requirement.
    Thanks in Advance.
    Jaffer Ali.S

    First off, thanks for these posts.  Worked for me, too.
    Let me just add a little more clarification:
    1) First you call BAPI_PRODORDCONF_GET_HDR_PROP
    2) Then you must update the field ENTRY_QNT from the internal table you pass in to "goodsmovements" because function BAPI_PRODORDCONF_GET_HDR_PROP wipes that field out and you will miss the posting without this filled
    3) Then you call BAPI_PRODORDCONF_CREATE_HDR with the same internal table you got back from the first function inclusive of you putting back ENTRY_QNT.
    4) Commit work and wait.
    So, in summary, the first fm is needed and the first fm changes some fields in the "goodsmovements" internal table that you really need to get the posting to work in the second fm.
    And one more thing, the exact function that an earlier posted referenced to find out that both of the functions in this note were called together is:  PP_CATT_CONFBAPI_HDR.
    Message was edited by:
            Kenneth Goldstein

  • EXTENSIONIN PARAMETER IN BAPI_RESERVATION_CREATE1

    Hi Experts,
    I need the extension structure name to use when I have custom fields during the creation of a reservation via the BAPI, BAPI_RESERVATION_CREATE1.
    The thing is I am creating the reservation from srm, but for my cuf fields to be displayed, I need to pass them through the BAPI extension structure. I have tried all sorts of structures and they do not work.
    I need your help guys.
    Thabo.
    Edited by: Thabo Matsepe on Nov 25, 2008 1:10 PM

    Hi,
    In the EXTENSIONIN param Structure should be BAPI_TE_XXXXX(Which has the custom fields) .
    If you don't know one in se11 search with BAPI_TE_* , I am sure you will one which has ur fields.
    And then in Value part1 should have your data.
    For Ex. you want to send company code , asset no.
    first4 will be your comp code , Next 12 will ur Asset no .
    Please revert back if more help required.
    Also Check for similar work
    [Thread|https://forums.sdn.sap.com/click.jspa?searchID=19143539&messageID=6381845]
    Rhea.
    Edited by: rhea on Nov 25, 2008 3:31 PM
    Edited by: rhea on Nov 25, 2008 3:31 PM

  • BAPI_PO_CHANGE Extensionin problem

    Hi Experts,
    i'm tryng to assign the structure bapi_te_mepoheader at extensionin in this way:
    MOVE-CORRESPONDING pt_ifile TO s_bapi_te_mepoheader.
    pt_extensionin-valuepart1 = s_bapi_te_mepoheader.
    pt_extensionin-structure  = 'BAPI_TE_MEPOHEADER'.
    but it return error: "pt_extensionin-valuepart1 and s_bapi_te_mepoheader are not mutually convertible in a Unicode program" so i tried with a concatenate:
    CONCATENATE pt_ifile-ebeln wa_field-zzsaiso wa_field-zzsaisj ..[etc]...INTO valuepart RESPECTING BLANKS.
    but the QUAN and CURR data field types give me problems of irregular shifting of fields. 
    How can i solve this problem?
    thanks in advance,
    Cosimo.

    Hi Cosimo,
    Check like this and do for that bapi.
    DATA: wa_extensionin TYPE bapiparex,
    wa_bape_vbap TYPE bape_vbap,
    wa_bape_vbapx TYPE bape_vbapx,
    wa_bape_vbak TYPE bape_vbak,
    wa_bape_vbakx TYPE bape_vbakx,
    lv_posnr TYPE posnr.
    Processing the header extension
    CLEAR wa_bape_vbak.
    wa_bape_vbak-ZZFIELD = 'TEST'.
    wa_extensionin-structure = 'BAPE_VBAK'.
    wa_extensionin+30(960) = wa_bape_vbak.
    append wa_extensionin to lt_extensionin.
    clear wa_extensionin.
    Processing the line extension
    LOOP AT line_items INTO wa_lineitems.
    ADD 10 TO lv_posnr.
    CLEAR wa_bape_vbap.
    wa_bape_vbap-ZZFIELD = 'TET'.
    wa_extensionin-structure = 'BAPE_VBAP'.
    wa_bape_vbap-posnr = lv_posnr.
    wa_extensionin+30(960) = wa_bape_vbap.
    append wa_extensionin to lt_extensionin.
    clear wa_extensionin.
    CLEAR wa_bape_vbapx.
    wa_bape_vbapx-ZZFIELD = 'X'.
    wa_extensionin-structure = 'BAPE_VBAPX'.
    wa_bape_vbapx-posnr = lv_posnr.
    wa_extensionin+30(960) = wa_bape_vbapx.
    append wa_extensionin to lt_extensionin.
    clear wa_extensionin.
    ENDLOOP.
    Then the call to the BAPI
    CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
    EXPORTING
    order_header_in = ls_order_header_in
    order_header_inx = ls_order_header_inx
    IMPORTING
    salesdocument = lv_salesdocument
    TABLES
    return = lt_ret2
    order_items_in = lt_order_items_in
    order_items_inx = lt_order_items_inx
    order_partners = lt_order_partners
    order_keys = lt_order_keys
    extensionin = lt_extensionin.
    Note: If you have a need to force a different Business Object type or wish to see the extension return fields then use the function SD_SALESDOCUMENT_CREATE instead.
    CALL FUNCTION 'SD_SALESDOCUMENT_CREATE'
    EXPORTING
    sales_header_in = ls_order_header_in
    sales_header_inx = ls_order_header_inx
    business_object = 'BUS2032'
    IMPORTING
    salesdocument_ex = lv_salesdocument
    sales_header_out = lv_sales_header_out
    sales_header_status = lv_sales_header_status
    TABLES
    return = lt_ret2
    sales_items_in = lt_order_items_in
    sales_items_inx = lt_order_items_inx
    sales_partners = lt_order_partners
    sales_keys = lt_order_keys
    extensionin = lt_extensionin
    incomplete_log = lt_incomplete_log
    extensionex = lt_extensionex.
    Check this i did for sales order.
    Regards,
    Madhu.
    Moderator message: copy/pasted from previous discussions, please do not repeat, or your user ID might get deleted!
    BAPI Enhancement
    Edited by: Thomas Zloch on Sep 14, 2011 1:07 PM
    Hi Thomas,
    Hi,
    Actually this code i got from erpgenie.com and i implemented that in my system.If there is any issue related to extension i am giving this code.This is not just copy and paste.I already answered related to  extension three to four times.If it wrong giving code then it wont repeat.
    Edited by: madhurao123 on Sep 14, 2011 5:03 PM

  • Extensionin parameter in BAPI_COSTCENTER_CREATEMULTIPLE

    Hi,
      I  have created a BAPI "BAPI_COSTCENTER_CREATEMULTIPLE" and cost centers are created successfully but Custom fields are not updated. the below is the codePlease, help me.
      DATA: t_cclist TYPE STANDARD TABLE OF bapi0012_ccinputlist,
            wa_cclist TYPE bapi0012_ccinputlist,
            t_extin TYPE STANDARD TABLE OF bapiparex,
            wa_extin TYPE bapiparex,
            t_ret TYPE STANDARD TABLE OF bapiret2,
            wa_ret TYPE bapiret2.
      wa_cclist-costcenter = 'TST413'.
      wa_cclist-valid_from = sy-datum.
      wa_cclist-valid_to = '99991231'.
      wa_cclist-person_in_charge = 'DEVON'.
      wa_cclist-department = '000000032328'.
      wa_cclist-costcenter_type = 'O'.
      wa_cclist-costctr_hier_grp = 'FLD0000006'.
      wa_cclist-comp_code ='0132'.
      wa_cclist-profit_ctr = 'P0000016'.
      wa_cclist-addr_title = 'TITLE'.
      wa_cclist-addr_name1 = 'NAME 1'.
      wa_cclist-addr_city = 'NAME 2'.
      wa_cclist-addr_district = ' '.
      wa_cclist-addr_country = 'CA'.
      wa_cclist-addr_region = 'BC'.
      wa_cclist-jv_venture = '100000'.
      wa_cclist-jv_rec_ind = 'BI'.
      wa_cclist-jv_equity_typ = 'E01'.
      wa_cclist-jv_otype = 'C001'.
      wa_cclist-name = 'MANATOKAN HOL 100/06'.
      wa_cclist-descript = 'MANATOKAN HOL 100/06C-14-62-6W4M SL5-14'.
      APPEND wa_cclist TO t_cclist.
      CLEAR wa_cclist.
    Move custom fields to BAPI strcture
      CLEAR wa_extin.
      wa_extin-structure = 'BAPI_TE_CSKS'.
    wa_extin-valuepart1+0(10) = 'TST413'. "Cost Center
      wa_extin-valuepart1+10(4) = '100'.  "Acquisition
      wa_extin-valuepart1+14(4) = ''.   "Divestiture
      wa_extin-valuepart1+16(4) = ''. "Company Prior to Rollup
      wa_extin-valuepart1+20(20) = ''.  "Cost Center Groupings
      wa_extin-valuepart1+40(2) = ''.     "Business Segment
      wa_extin-valuepart1+42(6) = ''.   "Exploratory Play
      wa_extin-valuepart1+48(38) = ''.    "Peep GUID
      wa_extin-valuepart1+86(3) = ''.   "Surface Location Unique Well Identifier Survey System
      wa_extin-valuepart1+89(16) = ''.  "Surface Location Unique Well Identifier UWI
      wa_extin-valuepart1+105(25) = 'DEVON ENERGY CORPORATION'.    "Acquisition Description
      wa_extin-valuepart1+135(25) = ''.   "Divestiture Description
      wa_extin-valuepart1+160(30) = ''.   "Cost Center Groupings Description
      wa_extin-valuepart1+190(15) = ''.   "Business Segment Description
      wa_extin-valuepart1+205(25) = ''.   "Company Prior to Rollup Description
      wa_extin-valuepart2+0(30) = ''. "Exploratory Play Description
      wa_extin-valuepart2+30(10) = '20110607'. "Effective Date of Sale
      wa_extin-valuepart2+40(10) = '20110607'. "Closing Date
      wa_extin-valuepart2+50(10) = '20110607'. "Post Close/Binding Date
      wa_extin-valuepart2+60(8) = '25'.   "Location :Latitude
      wa_extin-valuepart2+68(1) = 'N'.   "Location:Latitude Direction
      wa_extin-valuepart2+69(9) = '36'.   "Location:Longitude
      wa_extin-valuepart2+77(1) = 'S'.   "Location:Longitude Direction
      wa_extin-valuepart2+78(3) = 'DLS'. "Unique Well Identifier: Survey System
      wa_extin-valuepart2+81(16) = '100052006908600'.    "Unique Well Identifier: UWI
      wa_extin-valuepart2+97(10) = ''.  "Service Provider
      wa_extin-valuepart2+107(6) = 'PROD'.    "Status
      wa_extin-valuepart2+113(10) = 'ARL SUCC'. "Tax Successor Code
      wa_extin-valuepart2+123(10) = 'DEV01OCT14'.   "Tax Stream Pool
      wa_extin-valuepart2+133(14) = '100'.   "Percent
      wa_extin-valuepart2+147(35) = ''. "Service Provider Description
      wa_extin-valuepart2+182(20) = 'PRODUCING'. "Status Description
      wa_extin-valuepart2+202(15) = 'ARL SUCCESOR'. "Tax Successor Description
      wa_extin-valuepart3+0(40) ='DEVON ACQD AFTER 2001-10-14'.  "Tax Stream Pool Description
      APPEND wa_extin TO t_extin.
      CLEAR wa_extin.
      CALL FUNCTION 'BAPI_COSTCENTER_CREATEMULTIPLE'
        EXPORTING
          controllingarea      = 'D001'
        TESTRUN              = ' '
        MASTER_DATA_INACTIVE = ' '
        LANGUAGE             =
        TABLES
          costcenterlist       = t_cclist
          return               = t_ret
          extensionin          = t_extin.
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
    Thanks,
    Deepthi.

    Custom fields are updated now. I have  created one BADI and moved into strctures.

  • Urgent : GET/ SET Parameter

    Hi All,
    I want to use an internal table of one program in another in runtime only, Program A will call Program B and the internal table in Program A have to be used in Program B.
    Can anyone tell me how to use the complete internal table in that way if it is at all possible?
    Please help ASAP.
    Regards
    Siddhartha Sengupta

    Hi
    the name is the variable, I don't know.
    The comands you need to use are:
    -1) Export the table to memory:
    EXPORT <TABLE> TO MEMORY ID <LABEL>.
    -2) Import the table from memory:
    IMPORT <TABLE> FROM MEMORY ID <LABEL>.
    In my code I've export the table in report Z1 and import it in the report Z2.
    The table ITAB to be exported/imported has to be defined in both reports.
    DATA: BEGIN OF ITAB OCCURS 0,
            FIELD1,
            FIELD2,
          END   OF ITAB.
    EXPORT ITAB TO MEMORY ID 'ZMY'.
    SUBMIT Z2 AND RETURN.
    REPORT Z2.
    DATA: BEGIN OF ITAB OCCURS 0,
            FIELD1,
            FIELD2,
          END   OF ITAB.
    IMPORT ITAB FROM MEMORY ID 'ZMY'.
    It's important you assign a label to the memory area to be used, here I've used ZMY, but you can use every label you want.
    I don't get any error in my system.
    Max

  • Urgent : Changing System Parametes

    Hello,
    How do we change system parameters in 6i reports during run time or at the beginning of the report design?
    Regards,
    Dinesh.

    Hi;
    please check below which could be helpful for your issue:
    Oracle Reports 6i Setup Guide for Oracle Applications 11i [ID 189708.1]
    http://www.stoneedge.com/help/OM_DOC/sys_parameter/Reports_System_Parameters_.html
    Regard
    Helios

  • BAPI_SALESORDER_CREATEFROMDAT2 EXTENSIONIN

    Hi,
    i want to create a SO by using bapi BAPI_SALESORDER_CREATEFROMDAT2 .
    Table vpap consists of an append structure ZAVBAP that into i put customer fields eg ZXXXXX type char.
    How do i fill EXTENSIONIN ?
    Tahnks

    Hi Sezer,
      I think the documentation of the function module helps u a lot for acheiving ur requirement. In that it is clearly given. See the below:
    The following description uses an example to explain how to proceed with customer enhancements to the SD tables VBAK, VBKD, VBAP and VBEP.
    The customer has added their own fields to table VBAP using the INCLUDE structure CUTEST. This structure contains 2 fields:
    CFIELD1, CHAR 10
    CFIELD2, CHAR 3.
    The customer also requires that these two fields can be maintained with the BAPI.
    1. Maintain structure CUTEST in table VBAP
    2. Because the BAPIs work with checkboxes, you must also define a CUTESTX checkbox for the customer structure. It should be structured like this:
    Field name       Data element
    CFIELD1            CHAR1
    CFIELD2          CHAR1
    3. Define these customer structures in the structures VBAPKOZ und VBAPKOZX using INCLUDE or APPEND.
    4. Add the customer structures to the BAPE_VBAP and BAPE_VBAPX BAPI structures using the APPEND technique.
    5. Adjust the following structures for customer enhancements to table VBAK:
    a) VBAKKOZ
    b) VBAKKOZX
    c) BAPE_VBAK
    d) BAPE_VBAKX
    6. Adjust the following structures for customer enhancements to table VBEK:
    a) VBEPKOZ
    b) VBEPKOZX
    c) BAPE_VBEP
    d) BAPE_VBEPX
    7. Generally, the data should be added to the BAPI interface in the internal communication structures (VBAKKOM, and so on). There, you can process the data in the SD tables (VBAK, and so on).
    8. If the EXTENSIONIN parameter contains customer data, you must complete at least the key fields in the relevant standard parameters.
    For example:
    You want to change customer field VBAP-CFIELD2 for item 20 to "XYZ" in order 4711.
    The following entries are expected:
    Import:     BAPIVBELN-VBELN       = '0000004711'  Document number
                BAPISDHD1X-UPDATEFLAG = 'U'           UPDKZ for doc header
    Tables:     BAPISDITM-ITM_NUMBER  = '000020'      Item number
                BAPISDITMX-ITM_NUMBER = '000020'      Item number
              + BAPISDITMX-UPDATEFLAG = 'U'           UPDKZ for item
    You must complete the EXTENSION table as follows:
    STRUCTURE                          VALUEPART1       1234561234567890123
    BAPE_VBAP                       0000004711000020                 XYZ
    BAPE_VBAPX                      0000004711000020       X
    In the above example, it is from scratch, this helps u a lot. Double click on ExtensionIN of the function module documetation and check out.
    Regards,
    Adithya K
    Yash Technologies Pvt. Ltd.
    Note: Don't forget to reward points if suggestion is useful.

  • Purchase Order item customer fields

    I have the following scenario:
    - I need to save some customer fields in Purchase Order item, when it is generated through the Shopping Cart (EBP).
    - When EBP will generate a PO in backend (R/3), it calls B470_PO_CREATE function module and inside it calls BAPI_PO_CREATE1 in R/3. This call does not use extensionin parameter.
    - I have all the values in PO_ITEMS parameters. (an append structure in bapi_mepoitem).
    - Trying to solve this, I think I have to use EXIT_SAPL2012_001 to create the extensionin parameter.
    - Anyone else has this problem?
    - How can I create the extensionin parameter? Is it only necessary to add 'BAPI_TE_MEPOITEM' and 'BAPI_TE_MEPOITEMX'?
    - Do you have an example?
    Thank you!

    Hi
    You have to extend CI_EKPODBX with the same fieldnames with type BAPIUPDATE (in SE11), and then while passing the EXTENSIONIN to the bapi, you have to flag those. Like the following:
    DATA: wa_extensionin TYPE BAPIPAREX,
    wa_BAPIPAREX TYPE BAPIPAREX,
    wa_BAPI_TE_MEPOITEM TYPE BAPI_TE_MEPOITEM,
    wa_BAPI_TE_MEPOITEMX TYPE BAPI_TE_MEPOITEMX.
    wa_BAPI_TE_MEPOITEM-po_item = <PO Line No.>.
    wa_BAPI_TE_MEPOITEM-ZZZ_FIELD1 = <z-field value>.
    wa_BAPIPAREX-STRUCTURE = 'BAPI_TE_MEPOITEM'.
    wa_BAPIPAREX-VALUEPART1 = wa_BAPI_TE_MEPOITEM.
    APPEND wa_BAPIPAREX TO extensionin.
    wa_BAPI_TE_MEPOITEMX-po_item = <PO Line No.>.
    wa_BAPI_TE_MEPOITEMX-ZZZ_FIELD1 = 'X'.
    wa_BAPIPAREX-STRUCTURE = 'BAPI_TE_MEPOITEMX'.
    wa_BAPIPAREX-VALUEPART1 = wa_BAPI_TE_MEPOITEMX.
    APPEND wa_BAPIPAREX TO extensionin.
    This will work. Please let me know if it does not.
    See related links ->
    Re: BAPI_PO_CREATE1 and EXTENSIONIN structure
    Re: Passing custom fields to BAPI
    Problem in populating userfields in PO using BAPI_PO_CREATE1
    Re: BAPI_PO_CHANGE
    Yann i need ur help..
    Re: Custom field values are not being transfered to the backend system
    Problem in populating userfields in PO using BAPI_PO_CREATE1
    Re: Implement ME_PROCESS_PO_CUST-Urgently!
    Re: Purchase Order (BAPI_PO_CREATE! --> EXTENSIONIN)
    Re: How to use BAPI extensions?
    Re: BAPI_PO_CREATE1 user fields not saving on EKPO
    BAPI_PO_CREATE1 - EXIT_SAPL2012_001
    Do let me know.
    Regards
    - Atul

  • PO doesn't get created, backend returns PO number with "S" message

    Hi experts,
    I need your kind assisstance with the following problem: when SC is sent to the backend, the backend system returns the PO number with a message that the PO has been created. When we check at the backend the PO is not created.... It happens only when customer fields are transfered in the table EXTENSIONIN.
    SRM Server 500.
    Thanks a lot for your help.
    Tomas Kraus

    Hi
    <u>What error are you getting in this case ?</u>
    <b>Question:</b>
    <u>You are using BAPI_PO_CREATE1 and BAPI_PO_CHANGE to supply user-defined fields for tables EKKO, EKPO and EKKN. During the update, a termination occurs with DBIF_RSQL_INVALID_REQUEST.</u>
    Answer:
    Check in the CI structures of the corresponding database table as to whether there are type P (packed) fields. Refer to the online documentation for user-defined fields and the ExtensionIn parameter:
    In BAPI table extensions, only CHAR data type fields and similar data types can be used by the customer. This restriction arises as a result of the BAPIPAREX reference structure of the extension parameters. In addition, the customer must not use standard table fields in the APPEND of the BAPI table extension because a 'move-corresponding' would also overwrite the SAP field.
    See Note 509898 for a solution approach.
    <b>Please go through the SAP OSS note -</b>Note 582221 - FAQ: BAPIs for purchase orders
    <b>for more details.</b>
    <u>Also go through the related SAP OSS Notes -></u>
    Note 390742 - Customer enhancements not transferred
    Note 336589 - BAPI_PO_CREATE: Customer enhancements
    Note 867018 - Customer fields transfer to the back end
    Note  445169 - BAPI_PO_GET_DETAIL: Integrated customer enhancements
    Note  395311 - BAPI_PO_CREATE: Customer enhancements not copied
    Note 631758 BAPI_PO_GETDETAIL: Incorrect ExtensionOut struc. name
    Hope this will definitely help.Do let me know.
    Regards
    - Atul

  • Reg:BAPI_INQUIRY_CREATEFROMDATA2

    Hi,
    Which is  the field  name for UNIT_PRICE in  the
    bapi BAPI_INQUIRY_CREATEFROMDATA2.
    Its urgent.
    Regards,
    Charu

    Hi Jonathan,
    I don't find price time in my system?  Are you perhaps on an IS solution?  IS Oil perhaps?
    Anyway, the way you can send extra data to this BAPI using the EXTENSIONIN parameter.
    First, find the dictionary table which holds the field you want to send (I would guess VBKD).  Then, add the field you want to send (using an append structure in transaction SE11) to the structure bape_<table_name> (for example bape_vbkd).
    Then, when you call the BAPI, add a row to the EXTENSIONIN parameter as follows:
    1. For the STRUCTURE field, just fill in with the text BAPE_<table_name> (for example BAPE_VBKD).
    2. For the VALUEPART1 field, you need to move the contents of the structure bape_<table_name>.  So first, load up the structure with data (for example 0000000000000000101501 for inquiry 0000000000 and item 000000 and price time 10:15 and 1 second using structure bape_vbkd), and then transfer it to VALUEPART1.
    The code within the BAPI will transfer the data from this extension to the appropriate ABAP table (note the field names in the actual table and the bape_<table_name> structure need to match).
    Hope that helps.
    Cheers,
    Brad

  • How to create the INBOUND Function Module for INBOUND IDOCs

    Hi Friends,
    Can any Suggest me How to proceed to Create an INBOUND Function Module for Processing the INBOUND IDOCS
    which are recieved from XI Server ?
    I am working in SAP-ISU
    Here i will recieve the INBOUND IDOCs for the Meter Reading Orders.
    We have a Standard INBOUND FUNCTION MODULE
    IDOC_INPUT_ISU_MR_UPLOAD
    which Uploads the Meter Reading Results.
    I copied the Same function Module into ZIDOC_INPUT_
    and working on it.
    Can any one suggest me, whether i am going in correct way or not.
    In IDOC_INPUT_ISU_MR_UPLOAD Inbound fun module,
    BAPI_MTRREADDOC_UPLOAD is used to Update or Insert the Meter Reading Results,
    My requirment is to Insert and Update the Meter Reading Orders which are Inbounded from XI.
    Can I Use the Same BAPI
    BAPI_MTRREADDOC_UPLOAD
    to Update the below fields,
    EABL-SERNR
    EABL-ZWNUMMER
    EABLG-ABLESGR
    EABL-V_ZWSTAND
    EABL-N_ZWSTAND
    EABL-ABLHINW
    EABL-ZSKIPC
    EABL-ADAT
    EABL-ATIMTATS
    EABL-ADATTATS
    EABL-ATIM
    EABL-ZMESSAGE
    EABL-ABLESER(Meter reader number)
    Kindly Suggest me,
    Thanks in Advance,
    Ganesh

    Hello Ganesh
    I think you are going completely astray with you z-function module for IDoc processing.
    If you look at TABLES parameter METERREADINGRESULTS (type BAPIEABLU ) of BAPI_MTRREADDOC_UPLOAD you will find many of the requested fields already:
    EABL-SERNR => BAPIEABLU-SERIALNO
    EABL-ZWNUMMER =>REGISTER
    EABLG-ABLESGR
    EABL-V_ZWSTAND
    EABL-N_ZWSTAND
    EABL-ABLHINW
    EABL-ZSKIPC
    EABL-ADAT
    EABL-ATIMTATS => ACTUALMRTIME
    EABL-ADATTATS => ACTUALMRDATE
    EABL-ATIM
    EABL-ZMESSAGE
    EABL-ABLESER(Meter reader number)
    Field EABL-ZMESSAGE appears to be custom field (at least I cannot find it on ECC 6.0). If this field was added using include CI_EABL then you probably can get these values into the BAPI using the EXTENSIONIN parameter.
    Check routine CHECK_UPLOADRECORDS in the BAPI which allows two extension structures:
    - BAPI_TE_EABL
    - BAPI_TE_EOSB
    Not surprisingly BAPI_TE_EABL contains the include CI_EABL.
    Regards
      Uwe

  • Update Contract Schedule lines using BAPI_CUSTOMERCONTRACT_CHANGE

    Dear All,
    I want to change the schedule line of a Sales Contract using the BAPI, BAPI_CUSTOMERCONTRACT_CHANGE however i do not find any table parameter to do the same as is available in the Quotation & Sales Order change BAPIs.. I checked OSS but did not find any note in this regard.. Kindly let me know if there is any way this can be done apart from using the EXTENSIONIN parameter for this BAPI.
    Thanks for your help.
    Cheers
    Nitesh

    Dear Dipak,
    Is it possible to update the schedule lines without using the EXTENSIONIN parameter for this BAPI ?? If so kindly let me know.
    Cheers
    Nitesh

  • Populating Customized fields in Sales Order Creation using BAPI

    Hi All,
    I have a requirement that, I need to populate 2 customized fields which are appedned in the VBAK tables through Append structure. I am using BAPI_SALESORDER_CREATEFROMDAT2 FM for creating it.
    Could anybody tell me how to send these 2 coustomized field values in this BAPI using EXTERNIN parameter.
    Regards
    Rajesh
    [email protected]

    Hi,
    To add data to custom fields there are two appraoches.
    <b>1)</b>Using the <b>EXTENSIONIN</b> in the Tables option in the FM <b>BAPI_SALESORDER_CREATEFROMDAT2</b>
    Check the Documentation for the same,
    <b>Customer Enhancement for VBAK, VBAP, VBEP</b>
    <i>Description</i>
    You can use this parameter to transfer user-specific enhancments to a BAPI. The customer has to complete the EXTENSION structure and the system automatically continues processing it. If you have not defined any user-specific fields, then you can transfer a blank EXTENSIONIN structure.
    <b>Technical information about Customer Enhancements</b>
    The following description uses an example to explain how to proceed with customer enhancements to the SD tables VBAK, VBKD, VBAP and VBEP.
    The customer has added their own fields to table VBAP using the INCLUDE structure CUTEST. This structure contains 2 fields:
    CFIELD1, CHAR 10
    CFIELD2, CHAR 3.
    The customer also requires that these two fields can be maintained with the BAPI.
    1. Maintain structure CUTEST in table VBAP
    2. Because the BAPIs work with checkboxes, you must also define a CUTESTX checkbox for the customer structure. It should be structured like this:
    Field name       Data element
    CFIELD1            CHAR1
    CFIELD2          CHAR1
    3. Define these customer structures in the structures VBAPKOZ und VBAPKOZX using INCLUDE or APPEND.
    4. Add the customer structures to the BAPE_VBAP and BAPE_VBAPX BAPI structures using the APPEND technique.
    5. Adjust the following structures for customer enhancements to table VBAK:
    a) VBAKKOZ
    b) VBAKKOZX
    c) BAPE_VBAK
    d) BAPE_VBAKX
    6. Adjust the following structures for customer enhancements to table VBEK:
    a) VBEPKOZ
    b) VBEPKOZX
    c) BAPE_VBEP
    d) BAPE_VBEPX
    7. Generally, the data should be added to the BAPI interface in the internal communication structures (VBAKKOM, and so on). There, you can process the data in the SD tables (VBAK, and so on).
    8. If the EXTENSIONIN parameter contains customer data, you must complete at least the key fields in the relevant standard parameters.
    <i>For example:</i>
    You want to change customer field VBAP-CFIELD2 for item 20 to "XYZ" in order 4711.
    The following entries are expected:
    Import:     BAPIVBELN-VBELN       = '0000004711'  Document number
                BAPISDHD1X-UPDATEFLAG = 'U'           UPDKZ for doc header
    Tables:     BAPISDITM-ITM_NUMBER  = '000020'      Item number
                BAPISDITMX-ITM_NUMBER = '000020'      Item number
              + BAPISDITMX-UPDATEFLAG = 'U'           UPDKZ for item
    You must complete the EXTENSION table as follows:
    STRUCTURE                          VALUEPART1       1234561234567890123
    BAPE_VBAP                       0000004711000020                 XYZ
    BAPE_VBAPX                      0000004711000020       X
    <b>Further Information</b>
    You can find more information in the BAPI programming guide in the chapter for enhancements to BAPIs.
    Notes
    You must complete the STRUCTURE field with the name of the relevant enhancement structure (BAPE_VBAK, BAPE_VBAP, BAPE_VBEP). You can complete the remaining fields with the append structures from the enhancement structures.
    At the moment, you can use the BAPI to store enhancements in the following structures:
    VBAK : An enhancement to header data requires an append structure to BAPE_VBAK and an enhancement to structure VBAKKOZ.
    VBAP : An enhancement to item data requires an append structure to BAPE_VBAP and an enhancment to structure VBAPKOZ.
    VBEP : An enhancement to schedule line data requires an append structure to BAPE_VBEP and an enhancement to structure VBEPKOZ.
    VBKD : If you are using an enhancement for header data, you must add an append structure to BAPE_VBAK. You also need to enhance structure VBAKKOZ. If it is for item data, you need to add an append structure to BAPE_VBAP. You must also enhance structure VBAPKOZ.
    If you also want to work with checkboxes, each X-structure must also contain an append structure.
    For example:
    A customer has created an order and wants to include the material long text (50 digits long).
    The EXTENSIONIN structure must be completed with BAPE_VBAP. Two fields have fixed definitions in this structure. These are in the VBAP host key (VBELN, POSNR). The customer sets up an append structure that contains field ZMAT50.
    Because the VBELN is normally blank when you create an order, the data can look like this:
    STRUCTURE   |BAPE_VBAP
    <b>2)</b> Create the Sales Document using the FM and when successfully craeted you will get the Sales Document No in the Export parameter <b>SALESDOCUMENT</b>.
    After its created and Committed using <b>BAPI_TRANSACTION_COMMIT</b> , do a <b>BDC</b> recording for the same to (<b>VA02</b> Change Sales Order) update the fields only and save the document.
    Regards,
    AS

Maybe you are looking for

  • Error in phase MAIN_SHADOW/START_SHDI_FIRST (Upgrade EHP)

    Hello to all, (This plataform is an IBM DB2 for i5/OS) I´m performing a Enhancement Package upgrade in our sap system from EHP3 to EHP5, but I´m stuck in phase MAIN_SHADOW/START_SHDI_FIRST (STARTS THE SHADOW SYSTEM). This error show the following mes

  • Help Help Mac not working

    Ok so recently i updated my mac from mountain lion 10.8 to 10.8.2 and then i installed windows 7 exceptthe windows 7 install failed and gives the the messaging saying that an unexpected error took olace during the process and then it restarts and giv

  • Is there a workaround for XML datetime timezone in 9.2?

    pls help with a common problem. I want to extract (extractvalue) CDATA from a xs:datatime element, and then insert that into a TIMESTAMP WITH TIME ZONE column (in 9.2). I know and we all know that I cannot do this automagically via a registered schem

  • To find last run date of custom concurrent program in oracle apps

    Hello Exports, Can you pls tell me how to find last run date of custom concurrent program in oracle apps.( thr Backend query ) Thanks in advance, Edited by: 981527 on Mar 7, 2013 3:01 AM

  • Issue with To_number when we submit Shipping report from Document set

    Hi All We have a report in Shipping responsibility which works fine when we submit from Standard Request form, when we submit through Document set we are getting error as Invalid Number for to_number conversion in formula columns which is ok from sql