Change Customer Sold to using BAPI

Hi Gurus,
              I am using BAPI_INQUIRY_CREATEFORMDATA2 for creating inquiry and changing with wrapper around.
I can create inquiry with above BAPI.
With out creating any further document i want to change sold to party, How can i do that?
Which structure and field i have to use to change Customer sold to party?, When i try to change i am getting error as customer sold to AG is not allowed to change. (I guess it is trying to change customer sold to in partners)
Thank you
Kris

I got it

Similar Messages

  • 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

  • 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

  • How to Change a Sales Order using BAPI

    Hi All
    How can we change the sales document using BAPI as the requirement is
    --> First we create a Sales order using a BAPI.
    --> If the sales order is changed then we get the changed order information alonge with the old order data in a CSV file.
    here i have the problem that we are uncertain which fields will be changed some times we may get the item changes or some times we may get the quantity changed information and some times the condition type may be changed . So how to handle this ?
    Thanks,
    Chindam

    Hi,
    try this
    DATA: IT_MESSAGE TYPE STANDARD TABLE OF BAPIRET2,
          WA_VBELN TYPE BAPIVBELN-VBELN.
    DATA: WA_BAPIHEAD TYPE BAPISDH1,
          WA_BAPIHEADX TYPE BAPISDH1X,
          WA_HEADDATA TYPE BAPISDH1.
    DATA: I_BAPIITEM TYPE STANDARD TABLE OF BAPISDITM,
          WA_BAPIITEM TYPE BAPISDITM,
            WA_DATA TYPE BAPISDITM,
          I_BAPIITEMX TYPE STANDARD TABLE OF BAPISDITMX,
          WA_BAPIITEMX TYPE BAPISDITMX.
    CHANGE ITEM DATA
    WA_BAPIITEM-ITM_NUMBER =WA_DATA-ITM_NUMBER.
    WA_BAPIITEM-REASON_REJ = WA_DATA-REASON_REJ. "(REASON FOR REJECTION)
    WA_BAPIITEMX-ITM_NUMBER = WA_DATA-ITM_NUMBER. "(ITEM NUMBER)
    WA_BAPIITEMX-UPDATEFLAG = 'X'.
    WA_BAPIITEMX-REASON_REJ = 'X'.
    APPEND WA_BAPIITEM TO I_BAPIITEM.
    APPEND WA_BAPIITEMX TO I_BAPIITEMX.
    TO CHANGE HEADER DATA
    WA_BAPIHEADX-UPDATEFLAG = 'U'.
    WA_BAPIHEADX-DLV_BLOCK = 'X'.
    WA_BAPIHEAD-SALES_ORG = WA_HEADDATA-SALES_ORG. "(COMPANY CODE)
    WA_BAPIHEAD-DLV_BLOCK = WA_HEADDATA-DLV_BLOCK. "(DELIVERY BLOCK)
    WA_VBELN = '0000000168'.
    CALL BAPI AND PASS THE VALUE
    CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
       EXPORTING
         SALESDOCUMENT               = WA_VBELN " (SALES AND DOCUMENT NO)
        ORDER_HEADER_IN             = WA_BAPIHEAD
         ORDER_HEADER_INX           = WA_BAPIHEADX
       TABLES
         RETURN                     = IT_MESSAGE
        ORDER_ITEM_IN               = I_BAPIITEM
        ORDER_ITEM_INX              = I_BAPIITEMX
    CLEAR IT_MESSAGE.

  • IS-RETAIL: How to update custom enhancement field using BAPI?

    Hi gurus,
    Like ECC BAPI: BAPI_MATERIAL_SAVEDATA,
    This BAPI(BAPI_MATERIAL_MAINTAINDATA_RT) is specific for IS-RETAIL to create and update material master data.
    But now If I append one custom field "ZFIELD" to end of table MARA, my question is how to update this custom enhancement field(ZFIELD) using BAPI(BAPI_MATERIAL_MAINTAINDATA_RT)
    Thanks in advance!

    Hi DongHai,
    I suggest you create your own BAPI. Just copy the codes in BAPI_MATERIAL_MAINTAINDATA_RT and add your custom fields. If you want to append the data of the custom field in table MARA, first, you have to create a structure table then goto SE11, type MARA and display. Click the APPEND STRUCTURE then choose the structure that you've created. Hope this will help.
    Rewards if useful
    Regards,
    Mark

  • Need to change CONTRACT End date using Bapi BAPI_CUSTOMERCONTRACT_CHANGE

    Hi,
    I need to change date of a contract and for the same I am using Bapi "BAPI_CUSTOMERCONTRACT_CHANGE".
    I am passing the following Parameters to the BAPI.
    SALESDOCUMENT  -- Have passed the Contract Number in this.
    CONTRACT_HEADER_IN -- Have passed the values of the following fields ::
    COLLECT_NO -- Sales Document number
    Sales_Org  -- Sales Organization
    Distribution Channes -- Dist. Channel
    Division -- Division
    CT_VALID_T -- New date which I want as the contract end date.
    CONTRACT_HEADER_INX -- Following values have been paased in this Structure.
    UPDATEFLAG -- 'U'.
    CT_VALID_T -- 'X'.
    Now when I run the BAPI with these inputs I get the output as ' Field 'GUEEN' cannot be copied, because it is not ready for input'.This is a information message. But the changes are not reflected in the contract. I have done the commit work after BAPI.
    When I changes the value for CT_VALID_T flag from 'X' to 'U' the message mentioned above does not come but the end result is same and changes are not reflected in the contract.
    I would be really helpful to you if get any kind of helf to know ehy the output is not coming.
    Thanks a Lot for your kind help!!!!
    Regards,
    Lalit Kabra

    Hi Lalit,
    The value for CT_VALID_T flag has to be 'X' in the CONTRACT_HEADER_INX structure.
    In this case, you receive an informative message "Field 'GUEEN' cannot be copied, because it is not ready for input'"
    That is the problem. You cannot change this field because your functional team has this field as "not ready for input" in change mode.
    Can you change this field in transaction VA42? If you can't modify it in dialog, you can't modify it with BAPI.
    Regards,

  • To change Unit of issue using BAPI

    Hi all
    CAN ANYONE TELL ME HOW TO CHANGE THE UNIT OF ISSUE OF MATERIAL UNDER General plant data/storage view using BAPI.
    Can any one tell me what all things i need to pass to BAPI_MATERIAL_SAVEDATA
    Thanks

    Hi,
    Try this sample code for updating the field..The issue_unit will be field to be modified..
    PARAMETERS: p_matnr TYPE matnr.
    PARAMETERS: p_werks TYPE werks_d.
    DATA: header LIKE bapimathead.
    DATA: plant  LIKE bapi_marc.
    DATA: plantx LIKE bapi_marcx.
    DATA: return TYPE bapiret2.
    header-material = p_matnr.
    header-storage_view = 'X'.
    plant-plant = p_werks.
    <b>plant-issue_unit = 'LB'.</b>
    plantx-plant = p_werks.
    plantx-issue_unit = 'X'.
    CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
         EXPORTING
              headdata   = header
              plantdata  = plant
              plantdatax = plantx
         IMPORTING
              return     = return.
    IF return-type  = 'E'.
      WRITE: / 'Error'.
    ELSE.
      COMMIT WORK.
    ENDIF.
    Thanks,
    Naren

  • Change customer sold-to in Inquiry

    HI Experts,
    I want to change the Customer SOld-to for an Inquiry,
    I was tried with BAPI_SALESORDER_CHANGE and BAPI_CUSTOMERINQUIRY_CHANGE in partnerchanges structure.
    but it says, You cannot change the partner sold-to.
    But in VA12 i can change the sold-to,
    is there anyhting i am missing?
    any help guys?
    Giri

    Hi Naren,
    i did the same i got this error message:
    E VPD                  006 You cannot change the entry in partner function AG
    i pass inquiry no: in SALESDOCUMENT input field.
    and 'U' for ORDER_HEADER_INX-UPDATEFLAG.
    in partner changes structure:
    inquiry no: 000000 U AG Old_number New_number values to the structure and execute.
    is there anyhting configuration required to achieve this or am i missing anything?
    any ideas?
    regards
    giri

  • How can I change Quotation EKPO-AGMEM using BAPI

    How can I change Quotation EKPO-AGMEM using BAPI

    As I said in my previous post, column headers in Excel are merely row 1 cells. May be I missing something here, so please be more explicit with your question.
    I guess you are using the Excel Report tools, and you want to modify an existing sheet. From my limited experience with the Excel Report tools, it is not possible to open an existing woorkbook (except as template...), so the answer to your question should be "Forget it"...
    The work around is to use the example I pointed for you before, and either to write the whole new colum headers as a string array, starting in A1, or to write a single string to a given cell in row 1.
    Hope this helps 
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        

  • 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.

  • How to change Service order quantity using BAPI/FM

    Hi All,
    Can any body tell me how to change the Service Order quantity (in IW32) using a FM or a BAPI.
    I tried using the BAPI: BAPI_ALM_ORDER_MAINTAIN but I am unable to change the quantity. May be I might be missing some parameter. If anybody has done this please let me know the parameters that needs to be passed or if there is any other way out.
    Points will be rewarded to useful answers!!
    Thanks,
    Susanth.

    Hi!
    I have used this BAPI.read the documentation properly and after calling this bapi call BAPI_TRANSACTION_COMMIT then only expected results com n get saved.
    for ex:
    call function 'BAPI_ALM_ORDER_MAINTAIN'
        tables
          it_methods              = itab_methods
          it_header               = itab_header
      IT_HEADER_UP            =
          it_header_srv           = itab_header_srv
      IT_HEADER_SRV_UP        =
          it_userstatus           = itab_userstatus
          it_partner              = itab_partner
      IT_PARTNER_UP           =
          it_operation            = itab_operation
      IT_OPERATION_UP         =
          it_relation             = itab_relation
      IT_RELATION_UP          =
          it_component            = itab_component
      IT_COMPONENT_UP         =
          it_objectlist           = itab_objectlist
      IT_OBJECTLIST_UP        =
          it_olist_relation       = itab_olist_relation
          it_text                 = itab_text
          it_text_lines           = it_text_lines
          it_srule                = itab_srule
      IT_SRULE_UP             =
          it_tasklists            = itab_tasklists
          extension_in            = itab_extension_in
          return                  = itab_return
          et_numbers              = itab_et_numbers
      call function 'BAPI_TRANSACTION_COMMIT'
       exporting
         wait          = 'X'
    IMPORTING
      RETURN        =
    reward points if helpful.

  • Changing Roles in CUA - Using BAPI's

    Hi Experts,
    My scenario is to Create and Change  SYSTEMS and ROLE of parent and children systems in CUA from Oracle .For that
    I am using BAPI_USER_LOCACTGROUPS_ASSIGN , I have been testing this BAPI in SAP system itself, But sometimes its working with respect to my input perfectly  , and few other times its not , Let me put my issue with Example:
    1) User created in SU01 without systems and roles .
    2) Using the above BAPI,  I can assign 3 Systems(1 parent and 2 child system ) and 3 Roles(1 for each),
    3) When i tried to change  roles of the child system i can achieve that ,
    But in 2nd time when i give only 1 parent and 1 child system with roles, in ACTIVITYGROUPS of a Table parameter in the BAPI,
    The role and systems are not get changed .
    My ques is :
    Is my approach wrong ? then  could you tell me the exact behavior of this BAPI with child and parent system?
    Note: After i tried in SAP system and also read lot of threads in SAP SDN , i am posting this que .
    Regards,
    Saravana.S
    Edited by: saravanasap on Jan 23, 2012 9:48 AM

    Hi Experts,
    My scenario is to Create and Change  SYSTEMS and ROLE of parent and children systems in CUA from Oracle .For that
    I am using BAPI_USER_LOCACTGROUPS_ASSIGN , I have been testing this BAPI in SAP system itself, But sometimes its working with respect to my input perfectly  , and few other times its not , Let me put my issue with Example:
    1) User created in SU01 without systems and roles .
    2) Using the above BAPI,  I can assign 3 Systems(1 parent and 2 child system ) and 3 Roles(1 for each),
    3) When i tried to change  roles of the child system i can achieve that ,
    But in 2nd time when i give only 1 parent and 1 child system with roles, in ACTIVITYGROUPS of a Table parameter in the BAPI,
    The role and systems are not get changed .
    My ques is :
    Is my approach wrong ? then  could you tell me the exact behavior of this BAPI with child and parent system?
    Note: After i tried in SAP system and also read lot of threads in SAP SDN , i am posting this que .
    Regards,
    Saravana.S
    Edited by: saravanasap on Jan 23, 2012 9:48 AM

  • Change Inbound Delivery(VL32N) using BAPI.

    Hi Experts,
                      Which BAPI can I use to change the Shiping & Administration data of Inbound Delivery (VL32N).
                      I would be passing the Inbound delivery No. as the input to BAPI.
                      Please suggest me the BAPI thru which I can change the above Inbound delivery data.
                      Thanks in advance for your answer & support.
    Regards
    Jitendra Gujarathi.

    Hi,
       Please try the BAPI BAPI_SHIPMENT_CHANGE.
    Regards
    Raj.

  • Changing the delivered quantity using  BAPI

    As  per the reqt,  for Internal customers  I m changing the delivered qty (LIPS-LFIMG) to a rounded quantity based on the KNMT-RDPRF(full box qty) value.
    I m passing the rounded quantity  to an BAPI_OUTB_DELIVERY_CHANGE , expecting it to change the delivery quantity value from the all the related delivery tables like the LIPS and others.
    But this BAPI is not functioning as desired, what might be the error and is there any other option by which which I can change  the deliverey quantity to an rounded qty in the field LIPS-LFIMG.
    Please help to resolve this.

    Hi Vishnu,
    At first I was surprised to see this question. We cannot change material number. Hence there are 2 options available:
    1) Create a copy of the material and change the material number to what you want at the time of creation of the new material by inserting code in the fm that generates a material number.
    2) use the field material_external to store the material number required. This field is available in the import parameter 'HEADDATA' of BAPI_MATERIAL_SAVEDATA.
    The second option should be better.
    Regards,
    Nimish

  • 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

Maybe you are looking for

  • Cash Purcahse process in SAP

    Hi SAP Gurus, Can y help how we can best way handle cash purchase case where total purchase value is very less and our concern purchase section don't want to create order. My requirement is that stock updation as well as vendor payments should be don

  • J2EE Web services and JAX-RPC

    Hello.. While working with J2EE web services using JDeveloper and OC4J, I noticed that it really doesn't confirm to Sun's JAX-RPC standard. The Web Service interface class does not extend the "Remote" and all methods don't throw "RemoteException" as

  • Flash CS6 and the old Packager for iPhone?

    Hi, I was wondering: now that it's possible to select an Air SDK version in Flash CS6, would it also be possible to use Flash CS6 with the old 'packager for iPhone' that came with Flash CS5? I know, I know, I should get rid of that old thing, but rea

  • How does SAP calculate SC of the JE

    Dear All, I have a question on SC of JE We setup an exchange rate 1US=1.25CAD If we type in Debit(FC) USD400, then the system will have a CAD500 automatically GL_______Debit_____Credit_____Debit(FC)_____Credit(FC) 10XXX____CAD500__0_________USD400___

  • Since I loaded the last Firefox Security update, I can't play video on websites such as Netflix, how can I revert back or elimnate this issue?

    Since I loaded the last Firefox Security update, I can't play video on websites such as Netflix, how can I revert back or elimnate this issue?