Update appended field in a sales order

Hi, i'm trying to update an appended to VBAP Z field with FM SD_SALESDOCUMENT_CHANGE.
i'm using pivot structure 'BAPE_VBAP' and 'BAPE_VBAPX' .
clear ibapiextenin.
      ibapiextenin-structure  = 'BAPE_VBAP'.
      CONCATENATE i_vbeln iitens-itm_number'teste_ItemGP'
      INTO ibapiextenin-valuepart1.
      APPEND ibapiextenin.
      clear ibapiextenin.
      ibapiextenin-structure  = 'BAPE_VBAPX'.
      CONCATENATE i_vbeln iitens-itm_number '  X'
      INTO ibapiextenin-valuepart1.
      APPEND ibapiextenin.
and then i call fm lije this way:
CALL FUNCTION 'SD_SALESDOCUMENT_CHANGE'
    EXPORTING
      salesdocument    = i_vbeln
      order_header_in  = ibapisdhd1
      order_header_inx = ibapisdhd1x
      business_object  = 'BUS2032'
    TABLES
      item_in          = ibapisditm
      item_inx         = ibapisditmx
      schedule_in      = ibapischdl
      items_ex         = ibapisdit
      schedule_inx     = ibapischdlx
      extensionin      = ibapiextenin
      EXTENSIONEX      = ibapiextenex
      return           = ibapiret2
    EXCEPTIONS
      error_message    = 1.
<added code tags>
but content field doesn't appear updated.
Can someone help me ?
Thanks
Edited by: Suhas Saha on Nov 18, 2011 11:10 AM

Hi,
I don't see any appends for ibapiextenex and also no commit for the function.'
Instead of this
clear ibapiextenin.
ibapiextenin-structure = 'BAPE_VBAP'.
CONCATENATE i_vbeln iitens-itm_number'teste_ItemGP'
INTO ibapiextenin-valuepart1.
APPEND ibapiextenin.
clear ibapiextenin.
ibapiextenin-structure = 'BAPE_VBAPX'.
CONCATENATE i_vbeln iitens-itm_number ' X'
INTO ibapiextenin-valuepart1.
APPEND ibapiextenin.       "It should be INX here
pass it using the offset position something like this
clear ibapiextenin.
ibapiextenin-structure = 'BAPE_VBAP'.
ibapiextenin-valuepart1(10) = i_vbeln.
ibapiextenin-valuepart1+10(4) = i_item.
APPEND ibapiextenin.
clear ibapiexteninx.
ibapiexteninx-structure = 'BAPE_VBAPX'.
ibapiextenin-valuepart1(10) = i_vbeln.
ibapiextenin-valuepart1+10(1) = 'X'.
APPEND ibapiexteninx.
Kesav

Similar Messages

  • This field cannot be updated as there are open sales order lines

    When trying to enable Item Attributes then I am getting a message "This field cannot be updated as there are open sales order lines". I cancelled the Sales Order ( which was having only 1 sales order line and that is also cancelled) but still I am getting the same message.
    How to overcome this problem.
    Khan

    Thanks Karthik & Sandeep........
    Issue got fixed. There was an open Sales order Line because of that line the issue was coming. After cancelling that SO Line, Users were able to update the Item field.
    Regards,
    Khan.
    http://moreapps4u.blogspot.com/

  • Field selection for  sales order

    hi all
    as per the client requirement i want to add some user fields in the sales order while creating  please guide how to add fields in the sales order
    regards
    sen

    Hello Sen,
    Please refer to the details described below, I found this in some website I hope this should work for you, anyhow please check with your technical consultant to see if this really works for  you;
    Adding custom fields to VBAK and VBAP.
    1. Choose the table VBAP or VBAK ( depending on header or item)
    2. click on button "append Structures" and it will propose you the standard name for the table ZAVBAP or ZAVBAK
    3. Add fields with prefix ZZ
    4. Go to TCode SE51 maintain user exit screens in program SAPMV45A
    - 8459 user exit item level
    - 8309 user exit header level
    Here you can then design your own layout. and define your flow logic
    PBO modules MV45AOZZ
    PAI modules MV45AIZZ
    Data definitions MV45ATZZ
    Subroutines in MV45AFZZ
    Regards
    Raj

  • How to update the condition price in sales order while creating the invoice

    Hi,
    How to update the condition price in the sales order to carry out the new price while creating the invoice?
    While creating the invoice it should update the condition price in sales order.
    Thanks,
    Balaram

    No, pricing is not there in delivery.
    I found an exit for VF01transaction where we can update the price in order.
    Can you please tell me how to update the price if I have the order, material numbers and conditions number?
    Thanks,
    Balaram

  • Update error in  RV_SALES_DOCUMENT_ADD during Sales order creation

    I get an Update/ ABAP runtime error during Sales order creation. The error occurs during processing of the update module -RV_SALES_DOCUMENT_ADD.
    This error does not occuring always, as I am sometimes able to create a Sales order without getting update error. I am getting the error of all types of Sales orders and even contracts.
    Am I missing any configuration parameters?
    Thanks,
    Chitra

    Yes , I can see the error in ST22.
    While exceuting VA01 (Oder type OR, Entering Sold-to-party, Purchase order NO, Material, Qty, Plant),
    - I get run-time error "Run-time error "GETWA_NOT_ASSIGNED" occurred".
        Analysis of error shows:
         Update terminated in "Update module: RV_SALES_DOCUMENT_ADD"
          Fails in the Read table in one of the form
            Termination occurred in the ABAP program "SAPLV45U" - in "VBAP_BEARBEITEN"
    The main program was "RSM13000 ". In the source code you have the termination point in
    line 147 (READ TABLE FYVBAP WITH KEY VBAP_KEY.)
    of the (Include) program "LV45UF0V".
    The ABAP's say the functional module is trying to do an 'UPDATE' instead of 'INSERT" in the internal table FYVBAP.
    Thanks,
    Csuman

  • Free Good Qty as non modifiable field in the Sales Order Level

    Dear Friends,
    I have successfully done the config change for the Free Goods, But now i want make the free good line item qty as a non modifiable field in the Sales Order Level.
    How can i do this.. Please advice.
    Thank U,
    Uwanthi

    Hi
    This is a standard behaviour in the system
    kindly use the below program and user exitexit
    MV45AFZZ and use "Userexit_filed_modification"
    Regfards
    Damu

  • How to make all fields mandatory in sales order T- code VA01 initial screen

    Dear all,
    how to make all fields mandatory in sales order T- code VA01 initial screen itself
    The fields are
    Sales Organization
    Distribution Channel
    Division
    Sales Office
    Sales Group
    Regards,
    Amar Reddy

    Hi,
    You can use Transaction Variant to achieve this functionality.Please go through the following link which helps you in creating the same.
    [Link|http://wiki.sdn.sap.com/wiki/display/Snippets/TransactionVariant-AStepbyStepGuidefor+Creation]
    Regards,
    Phani Prasad

  • How to make tax classification field mandatory in sales order ?

    Hi,
    while creating sales order, " how to make tax classification field mandatory ".
    Please tell me the procedure.
    In tcode OVA2. what are the entries for fields,table.
    Regards,
    sapsduser

    Dear ,
    Could you please share why you want to make tax Classification field mandatory in sales order.
    Maintain Tax classification field for customer in Customer Master Data = (Sales Area Data - Billing document Tab page)
    Tax Classification field for Material in Material Master Data = Sales Org. 1 View.
    While creating sales order and enter customer and material system automatically fetch the tax classification related data into sales order.
    Tax is calculated based on the ship to party.
    Hope this will help you.....
    Regards,
    Manoranjan.

  • Add field 'asset' in sales order line item account assignment tab

    Hi,
    I would like to add the following field: 'asset' in sales order line item account assignment tab.
    I can enter order, or wbs, but not Asset.
    How can I make this field visable?
    Anybody?
    thanks,
    klundert
    Edited by: Eric Van Zundert on Oct 30, 2010 8:43 AM

    Hi
    There is perform which moves the values to VBAP field.
    This PRCTR field is stored in VBAP (i.e., SO line item table)
    USEREXIT_MOVE_FIELD_TO_VBAP
    Hope it works.
    VVR

  • Additional field in the sales order screen

    I need some additional field in the sales order screen. There is
      also no screen exit available for VA01. Can I use this
      additional data B tab in header details by creating additional
      field in it. Please tell me how to use this tab or how to get
      different field in the sales order (header or item level).

    Hi,
       Yes. You can use this screen. For this either can modify the table VBAP with additional fields and put them on this screen.
      You have to code your logic to save these values in the include MV45AFZZ. The subscreens you have to use for this are 4462 or 8459.
    refer Screen exits - Urgent.
    with regards,
    Vamsi

  • FM for Updating Installation date in Contracts + sales orders Item level

    Hi
    Plesae give any FM for Updating Installation date in Contracts + sales orders Item level for contracts tab.
    Thanks and Regards,
    Vishnuvardhan....

    Have used the billing transaction to set a Default Billing date at time of blling.

  • Query Alert for a change in value of the Quantity field of the sales order

    Hi Experts,
    A query alert has been set up to alert the warehouse employee when a new sales order is created by a sales employee. Our client wants the warehouse employee alerted when the sales employee edits the quantity field of an already added sales order.
    Kindly assist in designing a query to notify of this change in the Quantity field of the sales order.
    David

    Try this one:
    SELECT T0.DocNum, T0.CardCode, T1.ItemCode, T3.Quantity 'Old Qty', T0.Quantity 'New Qty', MAX(T2.LogInstanc) 'Times Changed'
    FROM dbo.ORDR T0
    INNER JOIN dbo.RDR1 T1 ON T1.DocEntry = T0.DocEntry
    INNER JOIN dbo.ADOC T2 ON T2.DocNum = T0.DocNum AND T2.ObjType = '17'
    INNER JOIN dbo.ADO1 T3 ON T3.DocEntry = T2.DocEntry AND T3.ItemCode = T1.ItemCode
    WHERE T0.DocStatus = 'O' and T0.DocType = 'I' AND T1.Quantity != T3.Quantity
    GROUP BY T0.DocNum, T0.CardCode, T1.ItemCode, T1.Quantity, T3.quantity

  • Sales district field in Quotation/Sales order

    Hi Gurus,
                  on which screen i can see the "Sales district" field in Quotation/Sales order/Inquiry?
    Thank you
    ANil

    Hi,
    In Inquiry :
    Menu Bar : Go To: Header : Sales : Below u can see under Pricing and statistics
    Same in Quotation and Sales Order.
    Thanks,
    Raja

  • Need Profit centre field as mandatory field in the sales order

    Dear All,
    Normally Profit center data maintained in the material master, same data will get coipied to the sales order while creating sales order in VA01 transaction.
    My requirement is if profit center data is not maintained/available in the sales order system should give the error message
    For this I need Profit center field as mandatory field in the sales order(VA01).
    Can you please give possibilities ASAP.
    Give the SHD0 maintenance step by step.
    Regards,
    Murali.

    Hi Murali
    I beleive that you are talking about the Profit centre field not maintined in sales order hence not picked in delivery and billing and there is an FI posting error  (GL account error) because of that
    Profit centre is maintained in MMR and the same flows thro the sales cycle and i am quite sure if maintained in MMR it will be picked automatically and no need to make it mandatory in sales order( as the purpose is already solved)
    But there is no standard option in SAP like (even if Account assignment category of the material is not maintained in MMR it can be given in VF02 and the document can be released for accounting) to give the Profit centre in the billing and release the same
    Profit centre field field is picked from masters and flows in the entire flow and that field is greyed out (like no option of inserting it inbetween)
    As told by others incompletion log in sales doc type will take care for future orders and for the already created orders the standard option is cancel billing, reverse delivery and open the sales order and give   Profit centre field and process it (if only a few orders are there)
    But if the already created orders are many then from the FI Area  you need to go for development ( we also faced this issue as profit center not maintained in MMRs and hence accounting got hit and there were tons of billing docs and our FI consultant made some development to open it and solve it) FI consultant should be able to do this for already created orders
    Instead of making Profit centre field as mandatory field in the sales order better make it a mandatory entry in MMR
    Regards
    Raja

  • To Populate the profit center field in the sales order by user Exit.

    Hi All,
    Please let me know :
    How the user exit is used to populate the Profit center field in the Sales order?
    Please gurus answer  as quickly as possible as I require this urgently.

    If you want to overwrite the profit center in sale order (determined from the materail master) with a different profit center based some other criterion you can use profit center substitution rules. Check the wiki:
    [Profit Center Substitution in Sales Orders|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/erplo/profitCenterSubstitutioninSales+Orders]
    Regards,
    GSL.

Maybe you are looking for

  • IPhone 4S with iOS 6 can't connect to open Wi-Fi network on HP/H3C WX5004 controller

    After upgrading from iOS 5.1.1 to iOS 6, iPhone 4S devices can no longer connect to an open wi-fi network on our campus. We have a controller based WLAN from HP/H3C managed by a WX5004 controller with AP models WA2620-AGN and WA2620E-AGN. Symptom: In

  • How to make a vector into a shaper of transparency on a layer rather than shape of layer?

    I'm working on a drawing that somehow I've created a layer on -- all blue, that has what looks like a vector mask over it, but the vector mask, instead of shaping the layer, creates a transparancy in the layer. And I don't know how to reproduce this

  • InDesign Export to PDF Problem

    I have InDesign CS4, and today I am having a problem with exporting PDF files. I was using Gill Sans font, and when I exported the file, some of the text turned into little whit boxes. I have no idea why this is happening. Any suggestions? It was jus

  • CSV conversion problems in File adapter

    Hi, Hi, We had a problem with CSV conversions in file adapter.Our scenario is: IDOC>Xi>FTP(csv) Our target file should be show as when I open in notepad: "Active","1234","fdsfs","fsdfsdfs" "","","fsdfda"","Fsdfsfsdfsdf""12202003" Is this possible for

  • Crystal XI report formatting question

    I have a report specification where is data arranged in twelve months - Two rows of six months... Looks like two excel spreadsheets printed on the same landscape legal sized piece of paper.  There are three levels of drill down.  The twelve section h