Custom fields update using BAPI: BAPI_SALESORDER_CHANGE

Hi,
      I have append one field into VBAP Table, and i want to update that filed value by using BAPI_SALESORDER_CHANGE FM. I have done all the coding but still its not updating the table. I have checked with SAP fields like order quantity, its upadating the database but the custom fileds are not upadting.
steps i have done:  Append field to :           VBAP,BAPE_VBAP,VBAPKOZ
                               Append Check field to : BAPE_VBAPX,VBAPKOZX
Here is the code : plz check and add ur comments
  DATA : l_wa_bapiparex        TYPE bapiparex,
         l_wa_ord_header        TYPE bapisdh1x,
         l_itab_bapiparex      TYPE STANDARD TABLE OF bapiparex INITIAL SIZE 0,
         l_itab_return         TYPE STANDARD TABLE OF bapiret2   INITIAL SIZE 0,
         l_wa_item              TYPE bapisditm,
         l_itab_item           TYPE STANDARD TABLE OF bapisditm  INITIAL SIZE 0,
         l_wa_itemx             TYPE bapisditmx,
         l_itab_itemx          TYPE STANDARD TABLE OF bapisditmx INITIAL SIZE 0,
         ORDER_HEADER_IN       LIKE BAPISDH1.
  l_wa_ord_header-updateflag = 'U'.
  ORDER_HEADER_IN-REF_DOC = '0000000244'.
*Populate Item detail
  l_wa_item-itm_number = '000010'.
  l_wa_item-NET_WEIGHT = '5000'.
  APPEND l_wa_item TO l_itab_item.
*Populate Item detail checkbox
  l_wa_itemx-itm_number = '000010'.
  l_wa_itemX-NET_WEIGHT = 'X'.
  l_wa_itemx-updateflag = 'U'.
  APPEND l_wa_itemx TO l_itab_itemx.
  l_wa_bapiparex-structure = 'BAPE_VBAP'.
  l_wa_bapiparex-valuepart1+0(10) = '0000000244'.
  l_wa_bapiparex-valuepart1+10(6) = '000010'.
  l_wa_bapiparex-valuepart1+16(15) = 'ABCDEF'.
  APPEND l_wa_bapiparex TO l_itab_bapiparex.
  CLEAR l_wa_bapiparex.
  l_wa_bapiparex-structure = 'BAPE_VBAPX'.
  l_wa_bapiparex-valuepart1+0(10) = '0000000244'.
  l_wa_bapiparex-valuepart1+10(6) = '000010'.
  l_wa_bapiparex-valuepart1+17(1) = 'X'.
  APPEND l_wa_bapiparex TO l_itab_bapiparex.
  clear l_wa_bapiparex.
  CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
    EXPORTING
      salesdocument    = '0000000244'
      order_header_in  = ORDER_HEADER_IN
      order_header_inx = l_wa_ord_header
    TABLES
      return           = return
      order_item_in    = l_itab_item
      order_item_inx   = l_itab_itemx
     schedule_lines   = l_itab_schedule
     schedule_linesx  = l_itab_schedulex
      extensionin      = l_itab_bapiparex.
IF SY-SUBRC = 0.
  CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
  WAIT          = 'X'
IMPORTING
  RETURN        =
ELSE.
   RAISE ERROR.
ENDIF.
I HAVE GONE THROUGH DEBUGGING AND FOUND ALL ARE GOING FINE...ITS UPDATING VBKOM AND VBKOMX STRUCTURE BUT AT LAST ITS NOT UPDATING THE CUSTOM FIELDS
Thanks,
Baidya

Sorry guys........this code is correct one.......there is a problem in IDES....i tried in client server its working fine
If anyone is having this type of requirement then copy this program.
thanks,
Baidya

Similar Messages

  • Issue with Custom Field updation through BAPI FM

    Hi All,
    I am going to update some custom filelds in BUt050. So for these custom fields, I want to fill buffer memory so that I can track the changes through buffer. So I was calling FM BAPI_BUPR_CONTP_CHANGE and passing following parameters.
              businesspartner = < bp number>
              contactperson   = < Contact Number>
              validfromdate   = '00010101'
              validuntildate  = '99991231'
              centraldata     =  blank
              centraldata_x   = blank
    I am keeping central data blank as there is no standard field to update.
    But it is returning me a message that no changes are made.
    can any one has any idea how can I send custom field change in buffer?

    As my goal is to update custom fields in BUt050 from WEB UI, I was planning to fill the memory buffer with the changed values by calling FM  ''BUB_BUPR_MEMORY_FILL'.
    So I have to get memory first. But if I dont call the FM 'BAPI_BUPR_CONTP_CHANGE', then the memory will not be filled.
    That is the reason to call the function module.

  • Customer Master Update using BAPI

    Hi all,
        I am using class CMD_EI_API for updating customer master, but this class does not supports processing of  license data ( databaase table -> KNVL ) and Permitted Alternative Payee data ( database table -> KNZA ) for customer. Are there any BAPIs which support saving of KNVL and KNZA data.
    Regards,
    Kaushal Shah.

    Not released too
    @kaushal-Please read the doc of the class, it would have been mentioned that it will not do any validation and the correct data must be supplied.

  • Updating Condition Rate in SO using BAPI 'BAPI_SALESORDER_CHANGE'

    Hi,
    I want to update the price related to condtions(both automatic and manual) in Sales Order items from input file. I am using bapi 'BAPI_SALESORDER_CHANGE' to for this.
    I used follwing code,
    wa_so_cond-itm_number = wa_input-so_item.
    wa_so_cond-cond_type  = wa_input-kschl.
    wa_so_cond-cond_st_no = '011'.
    wa_so_cond-cond_count = '00'.
    wa_so_cond-cond_value = wa_input-kbetr.
    APPEND wa_so_cond TO i_so_cond.
    CLEAR wa_so_cond.
    wa_so_condx-itm_number = wa_input-so_item.
    wa_so_condx-cond_type  = wa_input-kschl.
    wa_so_condx-cond_st_no = '011'.
    wa_so_condx-cond_count = '00'.
    wa_so_condx-updateflag = c_u.
    wa_so_condx-cond_value = c_x.
    APPEND  wa_so_condx TO i_so_condx.
    CLEAR wa_so_condx.
    But this is creating a new line in conditions instead of updating the existing line, even though the existing line is a inactive by crerating a new line I want to update the exsting line with new condition rate instead of creating a new line. Please help me if you have any soultion for this.
    Thanks in Advance,
    Prasad JVV.

    Hi Sandipan,
    I used APPEND to fill the conditions_in & conditions_inx, without filling the tables how can I modify?
    Thanks,
    Prasad JVV.

  • Custom field updation in bapi_salesorder_createfromdat2 structures

    hi friends,
    custom field updation in bapi_salesorder_createfromdat2 structures
    i having a problem while creating a salesorder in vao1 tcode
    i unable to find the WWDLC FIELD AND DATA ELEMENT IS
    RKEG_WWDLC (delivery to country) in item data-> account assingment-> profit centre-> delivery to country
    how to enchance the field in bapi structures.
    thanks
    geetha.

    good

  • Customer -master upload using bapi

    hai ..
      can any body send me some example for customer master  creation using bapi ..
      in this account -group is mandatary..
    but i did.nt find  acc-group in bapi structures ..
    plz do helpful ..
    Tanx in advance ..

    Hi,
    Check the below links.
    [http://abaplovers.blogspot.com/2008/03/customer-master-bapis-function-modules.html|http://abaplovers.blogspot.com/2008/03/customer-master-bapis-function-modules.html]
    [http://abap.wikiprog.com/wiki/BAPI_CUSTOMER_CREATEFROMDATA1|http://abap.wikiprog.com/wiki/BAPI_CUSTOMER_CREATEFROMDATA1]
    Reward if found helpful.
    Regards,
    Boobalan Suburaj

  • I am unable to upload the customer master data using BAPI.?

    Hi Guru's,
    i am unable to upload the customer master data using BAPI.(BAPI_CUSTOMER_CREATEFROMDATA1)
    Please guide me how upload the data...
    Thanks in iadvance
    Srinivas...

    Hello Srinivas
    This BAPI does not allow to create a new customer from scratch but only to copy an existing customer to a new one and change its address data.
    The reference customer has to be provided using IMPORTING parameter PI_COPYREFERENCE. See also the BAPI documentation for more details.
    The BAPI does the same like transaction XD01 with Reference.
    Regards
      Uwe

  • VBRP Z fields update by bapi ?

    Hi,
    i have to update some Z fields in table VBRP. Which bapi can i use to maintain these custom fields ?
    with kind regards,
    Hans

    Ok Hans
    I know that, but bill document is an internal document, so usually all fields are from sales order and delivery, so it should be used the copy routines.
    A BAPI has the same behavior of transaction so I don't know if it allows to fill z-field.
    Try to check the std fm RV_INVOICE_CREATE or try to look for BAPIBILL
    Max

  • Reg: Mandatory fields updation with BAPI

    Hi..
    We are working on BDC using BAPI. In this if flat files contians only 4 fields and the mandatory fields in the application are seven then system needs to through error message. But with BAPI the program is updating the database without throwing error eventhough all mandatory fileds are not filled up with data.. Where exactly we need to do modifications to get error message when mandatory fields are not filled up with input.
    Regards

    Hi Verendra
    Sometimes the function modules/BAPI's used by SAP do a direct update on the database tables. In such scnearios the entries are created in the system even though if the mandatory entries are not filled.
    If the number of mandatory fields are small, then before the BAPI call,  check if all the mandatory fields are filled or not;throw error in case of empty fields & bypass the BAPI call.
    In case the mandatory fields are too high, then in that case, please use BDC recording to update the data.
    Regards
    Chetan
    PS:Reward points if you find this helpful.

  • Badi for Z-Fields updating using BAPI_CONTRACT_CREATE

    Hi Experts,
    I need badi name required for updating Custom fields in contract while creating purchase contract.
    I am using BAPI_CONTRACT_CREATE for creating contract.
    Thanks & Regards,
    Sushant singh

    1. did you pass your z-fields to BAPI_CONTRACT_CREATE
    using EXTENSIONIN strucutre?
    2. put break-point into your BADI and check if program stops there....
    reards,darek

  • Custom fields updation in EBAN Table for bapi_pr_create - Extensionin

    Hi all,
    My requirement is PR creation by BAPI_PR_CREATE Function Module .
    for pr item level customer added 10 fields in the EBAN table append structure CI_EBANDB. .
    i am creating PR by using Funcation module BAPI_PR_CREATE.
    In this Function Module I have to pass the structure name and field values in the EXTENTIONIN .
    what is the structure name I have to pass and how populate data in to the EBAN table.
    after that i have to create PR and updating 10 two custom field values in the EBAN Table.
    how to proceed for updating the customer field values in the eban table.
    thanks in advance.
    sri

    In the Extensionin pass the values
    Structure - EBAN
    VALUEPART1 - Pass the value for customer fields.
    Please reward if useful.

  • Custom field creation using ajax in SP 2010

    Hi,
    If anybody create custom field using ajax toolkit, kindly share me the link or steps.
    Thanks,
    Senthil

    yes. I have created custom field using Ajax toolkit which one available by default in VS 2010 under Ajax controls menu. do we need any other details on this, let me know.
    I just drag and drop the Ajax update panel in aspx page that used in custom field solution. then i just run the code and see the result on the new form in  the custom list. so i dont think, we need to do more work on this.
    Thanks,
    Senthil

  • Custom field update in Purchase Requisition Final Release

    Hi,
      We have PR release strategy at Item level.
    In PR table EBAN include I have added new field as ZZREL_DT (for final release date), This Field I want to update when final release will get triggred for the PR item.
    For updating this custom field I have try with  Enhancement 'M06B0002' but system is not updating  the value in new field , and as in BADI 'ME_REQ_POSTED', the IM_EBAN is an importing structure ,system is not allowing to change the value if we implement this BADI.
    Is there any user exit or BADI, to update this custom field, I want to update the system date when user releasing the PR item with ME54N or ME55 transaction.
    Regards,
    Zafar

    Hi ,
    Try with create new tab in PR item level, add field in custom tab example Final release Tab.
    Try to fetch data from EBAN table when final release happened ( based on status ) the date will update in this table. I hope this is helpful.
    Use user exit to create custom tab and custom field 
    enhancement MEREQ001 : check this enhancement.
    user exit EXIT_SAPLMEREQ_0*
    I hope it is helpful

  • Deleting field value using bapi

    Hi all,
    I want to delete a field VBAP-FIXMG from a report because it is wrong fixed.
    but i want to delete it using a bapi.
    can any one help me out which bapi to use and how to use it.
    thanks.

    Hi,
    Use the BAPI " BAPI_SALESORDER_CHANGE". U can check the docuemntation of it and also where used list to see if we can use the bapi.
    Regards,
    Nagaraj

  • Custom fields transfer using ESOA in SRM 7.0 system

    Hi SRM experts,
    I have a requirement where in I will have to add some custom fields in the SRM central contract as well as the replicated contract in the backend ECC. I would like to understand how to handle the SRM ,ECC and  XI part of the custom field mapping development since the central contract is transferred through XML medium.
        Currently I am on SRM 7.0 and ECC 6 Enh 4 using ESOA
        1. any SRM and ECC badi needs to be implement ?
        2. XI proxy need to modify ?
        Kindly advice and provide your valuable inputs
    Thanks in advance.

    Thanks for the information Tim,
    In SRM u2013SUS system ,while transferring custom fields from SRM to SUS system we use XML OUT BADI and XML IN BADI  and XI structure enhancement.
    Is that same technique is available for contact transfer with custom fields to ECC using ESOA.
    Thanks in advance

Maybe you are looking for