BAPI_SALESORDER_CHANGE, QTY FIELD GETTING ADDED INSTEAD OF OVERWRITING

Hi,
I am using BAPI_SALESORDER_CHANGE  FM, I am trying to use the Update flag as 'U' I have passed the HEader and HEader_inx with sales area and the sales order number. In Item I have passe item number, material number, quantity and in Items_INx I have passed Update fklag as 'U' and 'X' to target quantity, and in schedule_lines table again I have passed item number scedule line number and Req_qty and then passed schedule_lines_inx with updateflag as U and req_qty as 'X', the qty which I am giving insterad of getting over written it is adding to the previous value.
For eq if the previous qty value is 10 if I pass 8 using this FM after comminting it is becoming as 18 , is this the functionality of this FM or can we over write the existing qty ?
Any updates ?
Edited by: Varun on Nov 24, 2009 12:33 PM

HI Varun,
To Change the Item Quantity you need to pass only item no and material in Item and do not pass target quantity in the Item.
And do the same in Item_inx, so in Item_inx pass only Item number, Update Flag  = 'U' and material = 'X'.
In scedule lines you pass item number,sched line and  req quantity eq '8'.
In scedule lines inx pass  item number,sched line,Update Flag  = 'U' and req_qty = 'X'. 
wa_order_item_in_chg-itm_number  = '000010'.
wa_order_item_in_chg-material   = 'YYY'.
APPEND wa_order_item_in_chg TO it_order_item_in_chg.
wa_order_item_inx_chg-itm_number = '000010'.
wa_order_item_inx_chg-updateflag = 'U'.
wa_order_item_inx_chg-material = 'X'.
APPEND wa_order_item_inx_chg TO it_order_item_inx_chg.
wa_schedule_lines_chg-itm_number =  '000010'.
wa_schedule_lines_chg-sched_line = '0001'.
wa_schedule_lines_chg-req_qty =  '8'.
APPEND wa_schedule_lines_chg TO it_schedule_lines_chg.
wa_schedule_linesx_chg-itm_number =  '000010'.
wa_schedule_linesx_chg-sched_line = '0001'.
wa_schedule_linesx_chg-updateflag = 'U'.
wa_schedule_linesx_chg-req_qty = 'X'.
APPEND wa_schedule_linesx_chg TO it_schedule_linesx_chg.

Similar Messages

  • Is it possible to set up a form with a submit button where the data in the fields gets added to an existing excel file, just like 'collect response' but without connecting to the internet?

    I have a form that I want to use to collect peoples information with a submit button. I am trying to get the data that gets inserted to be added to an existing excel doc when the submit button gets hit, the form then resets and someone else can fill in the same form, hit submit and his data gets added to the existing data in the same excel doc. It is basically the same as the 'collecting response' option but without having to be online. The form is going to be used at a boat-show and I am going to get people to fill it out on an iPad. Does anybody know if this is possible?

    You could connect a bunch of 3700s to each computer and do this . 
    Or...since you're the one who monitors the monthly limit, you could restrict an individual's internet access once you see that you guys are coming too close to the cap. 
    I don't work for Cisco. I'm just here to help.

  • User defined fields does not get added into database

    Hello Experts
                              User defined fields does not get added into database , when i click add button it
    shows data added sucessfully , but when i check data base no entry is made , only entry is made for
    B1 fields , like DocEntry ,DocNum etc.., no entry is made for U_fields..
    I have check every thing databound is also set to true
    Actually first few 6 data was added properly but now its not geeting added for user fields
    I have used 2 document row  child table for 2 matrix and for remaining Document table
    What might be the problem
    reply soon
    plz suggest

    Hello sir
    I have checked Default form , in that entry is made into database
    but running the form in screen painter in preview mode or through coding it does not get added for user field
    this id my binding code
    LoadFromXML("updateopd.srf")
                oForm = SBO_Application.Forms.Item("updopd")
                oForm.DataBrowser.BrowseBy = "txtpatid"
                'Adding combo in Obervation
                oItem = oForm.Items.Item("txtpatid")
                oEdit2 = oItem.Specific()
                oEdit2.DataBind.SetBound(True, "@UPDATE", "U_PID")
                oItem = oForm.Items.Item("txtmnane")
                oEdit3 = oItem.Specific()
                oEdit3.DataBind.SetBound(True, "@UPDATE", "U_FName")
                oItem = oForm.Items.Item("txtlname")
                oEdit3 = oItem.Specific()
                oEdit3.DataBind.SetBound(True, "@UPDATE", "U_LName")
    Plz suggest

  • Data getting added in DSO

    Hi ,
    I am having DSO in which data is coming from cube .In transformation ( Cube --> DSO )  Rule Type EQ "Direct Assignment  & Aggregation EQ 'Overwite'  & there is no Start & End routine present .
    Cube Data
    Planning Area  Plant   Country Customer Group Chiild Material  Parent Material   Quantity
    xxx                    yy        z                ABC              100                     10                    250
    xxx                    yy        z                ABC              100                     20                    150
    xxx                    yy        z                ABC              100                     30                     50
    DSO Data  ( Planning Area,  Plant ,  Country, Customer Group, Chiild Material are Key Field  & Quanity is data field )
    Planning Area  Plant   Country Customer Group Chiild Material   Quantity
    xxx                    yy        z                ABC              100                  450
    Ideally when data flowing from cube to dso ,dso data should get overwrite if key field are same but in mine case quanity is getting added .I don't know  please guide me .

    Hi ,
          If you need different records in DSO as per  your example (without adding the parent material) ,then load two different plant values in the InfoCube and see the result. For example , load Plant '100' and Plant '200' into your InfoCube first and then load these two records into your ODS. The records will not get aggregated and you will find two records in your ODS .But if you want only the last record,then you may need to write routine in your update rules.
    Hope it clarifies your doubt.
    Thanks.

  • Open Qty Field in Outbound Delivery

    Hi All,
    I would appreciate any assistance that you could offer on this issue.
    It is concerning the little known 'Open Qty' field in the outbound delivery.
    The business process here is to create outbound deliveries, which are then continually added to as and when stock becomes available.
    The Open Qty field should display the open qty from the sales order line, which includes the qty just delivered.
    So for example, a user attempts to add several lines to an existing outbound delivery (ie outbound delivery > deliver sales order).
    The user would then compare the qty delivered against the Open Qty - if they match then ok.  If the qty delivered is less than the open qty, then the user would delete this line as they are only interested in delivering the full qty.
    However the 'Open Qty' is not working as expected.  Eg if open qty on sales order is 2000.  But qty delivered is only 1500, the open qty would = 1500.  This is incorrect.  After the user saves the deliver and then re-checks he would see qty delivered = 1500 and Open Qty = 2000, so then he would know that the full qty was not delivered.
    This business has just migrated from 4.6c (where this field behaved correctly) to ECC 6.0.
    Thanks for any advice.
    Regards
    Guy

    Delivery qty - LIPS-LFIMG.
    You cannot get open quantity directly.
    use this way.
    Delivery qty   - LIPS-LFIMG.
    order qty       - VBAP-KWMENG.
    open qty = delivery qty - order qty.

  • Not able to see Metadata fields when adding the fields to the rule in UCM

    Not able to see Metadata fields when adding the fields to the rule even after creating them in information fields of configuration manager.It is happening for few fields only.We are using 10.1.3 version of UCM.Kindly provide a solution if any.

    Dhilipan,
    I am trying to setup AES at the current Customer.
    You are right on LR_JP to be linked to customs code list instead of ACE and I do achieve that if I were to maintain the Custom code list by maintaining the assignment for EAR in a separate test.
    I was infact trying to follow the link: http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/30c7015e-c191-2d10-71b9-95907dc8edd1?overridelayout=t…
    On this document, if you look at page# 14 thru 17, it has the steps I described in my original note with customs code still appearing in the drop down for 'EXCPT' for EAR.
    Nevertheless, I wanted to default Type = C50 when the license type for the line on the Customs declaration is 'EXCPT' but if you see the very last screen-shot below, even though the license type configuration has default value as 'C50' it did not get pulled into the line item Documents tab when I tried to pick the category as 'CUII'.
    Let me know your thoughts on defaulting the data into Customs declaration for AES filing.
    What I want to achieve is the following:
    When License type is 'EXCPT', system should default the type as 'C50'
    Should put the License type 'EXCPT' into the number field
    Should put the actual License# 'ENC' into the Supplement field
    Should put the ECCN # '5A002' into the Details field
    Thanks,
    Prashant.

  • Keeping the green checkmark of signature after fields get edited

    Hello.
    I have a PDF with signatures and fields in it.
    Everything seems fine except that, when I edit a field in a signed document a warning sign appears on the signature icon (instead of the green checkmark).
    My signature permits form edits, so the signature doesn't break, but why do I get this warning?
    Is this just to notify the user of the changes?
    Can I somehow get rid of it ? I think it will confuse the people how see it into thinking there is something very wrong with the signature.
    Thanks.

    Hi,
    The reason the green check mark goes away is because Acrobat has detected a change, but has not revalidated the signature to see if the change has invalidated the signature (that is, part of the signed data has been change), or is just an incremental change to the document that is not part of the signed data. The reason that Acrobat doesn't automatically revalidate the signature every time it detects a change to the document is because signature validation has a high computational overhead (it is at its core a cryptographic operation, and anything that involves cryptography takes a lot of CPU cycles). If we were to validate every time you typed in a character the system would bog down and you would never be able to get any work done inside of Acrobat.
    So, Acrobat knows right away that the document is "dirty" (that is, there are unsaved changes) as soon as you do something, but it won't re-validate the signature until you tell it to because it is so CPU intensive.
    I'm not sure which version of Acrobat you are using, but beginning with version 9 we took the green checkmark off of the signature field and added a notation to the Document Message Bar so as to not be so distracting as when the green check mark went away.
    The bottom line is, as you surmised, the change in the status icon is just telling you that Acrobat no longer knows the signature status, and not an is not a definitive indication that the signature in invalid.
    Steve

  • Row getting added in the end of the scroll

    Hi -
    I am using a scroll area on a page on level 1. The issue iam encountering is that when ever i click the plus sign to add a second or third row (assume one record already exists in scroll 1) , the row gets added in the end of the scroll and also the fields are blank. However as delievered the new row should get added on the top of the scroll meaning 1 of 2 not 2 of 2, and also it should carry forward the values from the prior row. Please any suggestion or help is greatly appreciated.

    I figured it out. The reason it was happening was because, my scroll record had another key field after EFFDT and EFFSEQ, due to which the delivered copy forward logic for new rows in scroll did not work and the row was getting added in the end or after the first blank row always.

  • Fix Date & Qty Field in Schedule Lines Sales Order

    Dear Friends,
    I want to understand the need and use of the Fix Date & Qty field check in the sales order -> Item -> Schedule Lines.
    Can anybody explain me the need of the same.
    Regards,
    Harsh

    If the availability check for an item determines that the item cannot be delivered fully on the requested delivery date, and, as a result one or more schedule lines have to be created for later delivery dates, the customer can decide whether to accept these delivery dates and quantities.
    You can record the customer's decision either by setting an indicator in the Fixed date and qty field or by leaving this field blank. The field is displayed both on the schedule line overview screen and on the availability screen.
    <b>Customer Accepts the Schedule Line Proposal</b>
    If the customer accepts the schedule lines which are proposed by the system, mark the Fixed date and qty field. The system then transfers the requirements for the schedule lines to material requirements planning.
    <b>Customer Requires Goods Earlier</b>
    If the customer requires the goods earlier than the date that the system can confirm after the availability check, leave the Fixed date and qty field blank. The system then only passes on the requirements for the requested delivery date and does not take the quantities and dates confirmed by the system after the availability check into account. In this case, it is assumed that the requested delivery date can be kept to because, for example, additional production capacity may become free. The system only confirms the sales order once the entire order quantity can be delivered on the requested delivery date. In the subsequent delivery processing, the sales order is only considered to be completed when the entire order quantity has been delivered or when all partial delivery agreements have been fulfilled.
    A fixed item is considered to be completed once the entire confirmed quantity (which can be smaller than the originally requested order quantity)has been delivered. Therefore, it does not make sense to fix the confirmed quantity to 0 as the item is considered to be completed from the start.
    During rescheduling, the fixed quantities and dates are no longer taken into account.
    The same info u can get easily from help.sap.com
    Message was edited by:
            sam masker

  • How to hide columns that are getting added dynamically to UI Element 'Table

    In SRM 7.0 while displaying a RFx, click on "responses and awards" button.
    In the response comparision tab once the user selects response number and clicks on "compare all responses".
    Item details table is displayed with fields item number,internal number,item description,........,Price etc.
    Requirement is  to hide the price column from the table.
    The UI element type is 'Table'.
    But the catch is there is no column price visible at layout design level.
    This field is getting added dynamically at run time.
    When i right click and see the 'more field help' at the front end i get the field id as 'GRP_1_COL_3_TXTV'.
    lo_table ?= view->get_element( id = 'ITEMS_TABLE' ).
    lo_column = lo_table->get_column( id = 'GRP_1_COL_3_TXTV').
    ASSERT lo_column IS NOT INITIAL.
    lo_column->set_visible( EXPORTING value = '01' ).
    I had written the above code in the pre-exit of WDDOMODIFYVIEW.
    But i am getting dump as assertion failed.it says no column by name 'GRP_1_COL_3_TXTV'.
    Please help me inhow to hide fields or buttons getting generated dynmically.
    Regards,
    Venkat Raghavan.

    Hi Anitha,
    What i understood from your question is,you want to control the table from your inputs.I have a one question for you what do you want to show defaultly i.e when you run the application what you want to show,either no table or table with some values.
    Any how i am giving solution in this way.
    If both inputs are given proper table output is displayed
    Write your below logic in the WDDOMODIFYVIEW )
    Here i am assuming that you already have a table element in the view.
    Get the values entered in the input fields and compare those 2 values ,if the condition is satisfied then bind the values which you want to show in the table to the context node.
    but if only 1 input is given a column is empty in the output table so i want to hide this column dynamically at runtime based on my inputs
    You are telling that you know the empty column.If so get the view element reference and use the REMOVE_COLUMN to remove the column.
    data:lr_table type ref to cl_wd_table,
           lr_column type ref to L_WD_TABLE_COLUMN.
    lr_table ?= view->get_element( 'TABLE1' ).
    CALL METHOD LR_TABLE->REMOVE_COLUMN
        EXPORTING
          ID          = 'TABLE1_color'
         INDEX      =
        RECEIVING
          THE_COLUMN = lr_column.
    i want to hide some empty rows also at runtime based on inputs.
    Removing the rows is very simple.if you know the key fields data of internal table from your input fields then do in this way.
    delete itab from wa where key1= "12" and key2="abd".
    Now bind the internal table to context node.
    LO_ND_hcm->BIND_TABLE(
          NEW_ITEMS            = it_final
          SET_INITIAL_ELEMENTS = ABAP_TRUE ).

  • Issue After Rating field is added to the Discussion Board List in SharePoint 2013

    Hi ,
    We are facing issues After Rating field is added to the Discussion Board List in SharePoint 2013. We are getting below error while adding a new item or editing a new item. Please help on this.
    Ashish Kumar Baranwal

    Users which were getting issues actually getting below error:
    [COMException (0x81020014): One or more field types are not installed properly. Go to the list settings page to delete these fields.<nativehr>0x81020014</nativehr><nativestack></nativestack>]
       Microsoft.SharePoint.Library.SPRequestInternalClass.AddOrUpdateItem(String bstrUrl, String bstrListName, Boolean bAdd, Boolean bSystemUpdate, Boolean bPreserveItemVersion, Boolean bPreserveItemUIVersion, Boolean bUpdateNoVersion, Int32& plID,
    String& pbstrGuid, Guid pbstrNewDocId, Boolean bHasNewDocId, String bstrVersion, Object& pvarAttachmentNames, Object& pvarAttachmentContents, Object& pvarProperties, Boolean bCheckOut, Boolean bCheckin, Boolean bUnRestrictedUpdateInProgress,
    Boolean bMigration, Boolean bPublish, String bstrFileName, ISP2DSafeArrayWriter pListDataValidationCallback, ISP2DSafeArrayWriter pRestrictInsertCallback, ISP2DSafeArrayWriter pUniqueFieldCallback) +0
       Microsoft.SharePoint.Library.SPRequest.AddOrUpdateItem(String bstrUrl, String bstrListName, Boolean bAdd, Boolean bSystemUpdate, Boolean bPreserveItemVersion, Boolean bPreserveItemUIVersion, Boolean bUpdateNoVersion, Int32& plID, String&
    pbstrGuid, Guid pbstrNewDocId, Boolean bHasNewDocId, String bstrVersion, Object& pvarAttachmentNames, Object& pvarAttachmentContents, Object& pvarProperties, Boolean bCheckOut, Boolean bCheckin, Boolean bUnRestrictedUpdateInProgress, Boolean bMigration,
    Boolean bPublish, String bstrFileName, ISP2DSafeArrayWriter pListDataValidationCallback, ISP2DSafeArrayWriter pRestrictInsertCallback, ISP2DSafeArrayWriter pUniqueFieldCallback) +565
    [SPException: One or more field types are not installed properly. Go to the list settings page to delete these fields.]
       Microsoft.SharePoint.SPGlobal.HandleComException(COMException comEx) +146
       Microsoft.SharePoint.Library.SPRequest.AddOrUpdateItem(String bstrUrl, String bstrListName, Boolean bAdd, Boolean bSystemUpdate, Boolean bPreserveItemVersion, Boolean bPreserveItemUIVersion, Boolean bUpdateNoVersion, Int32& plID, String&
    pbstrGuid, Guid pbstrNewDocId, Boolean bHasNewDocId, String bstrVersion, Object& pvarAttachmentNames, Object& pvarAttachmentContents, Object& pvarProperties, Boolean bCheckOut, Boolean bCheckin, Boolean bUnRestrictedUpdateInProgress, Boolean bMigration,
    Boolean bPublish, String bstrFileName, ISP2DSafeArrayWriter pListDataValidationCallback, ISP2DSafeArrayWriter pRestrictInsertCallback, ISP2DSafeArrayWriter pUniqueFieldCallback) +2336
    Ashish Kumar Baranwal

  • ALV edit (qty field is not convertable)

    in my ALV program i have used one field MENGE (13,3) (QTY field) in the out put it is showing as 1.000,
    when user going to enter a value (5) it is showing as 0.005 but user need it as 5.000.
    please solve this question experts.....
    Regards
    Prasad.EV

    hi venkatesh,
    MENGE is QTY field,
    instead of that u can give F (float) field then user can enter 5 it will be display 5.000.... that is best way to use it..
    points please.. (if u have satisfied.)
    Prasad.
    Edited by: EV prasad on Jun 6, 2008 10:10 AM

  • In htmldatatable only one row is getting added... why??

    Hello everyone,
    I'm designing a htmldatatable. In that I'm putting 3 columns and 3 rows. But only first row is getting added not the other 2. Why is this happening??
    Here is my code....
    private HtmlDataTable table = (HtmlDataTable)app.createComponent(HtmlDataTable.COMPONENTTYPE);
         _table.setValue("table");
         _table.setVar("table");
    _table.setBorder(1);
         _table.setRows(3);
         int columns = 3;
    // Set columns.
    for (int i = 0; i < columns; i++) {
    // Set header (optional).
    UIOutput header = (UIOutput)app.createComponent(HtmlOutputText.COMPONENT_TYPE);
    header.setValue(headers);
    // Set column.
    UIColumn column = new UIColumn();
    column.setHeader(header);
    ValueBinding myItem = FacesContext.getCurrentInstance().getApplication().createValueBinding("#{textBean.myList["+0+"]["+i+"]}");
    UIOutput output = new UIOutput();
    output.setValueBinding("value",myItem);
    column.getChildren().add(output);
    column.setId("col" + i);
    // Add column.
    _table.getChildren().add(column);
         getChildren().add(_table);
         setStyleClass( DEFAULT_STYLE_CLASS );
    This is the bean through which data is coming...
    textBean>>>
    public List getMyList() {
              String[] row1 = {"ID1", "Name1", "Value1"};
    String[] row2 = {"ID2", "Name2", "Value2"};
    String[] row3 = {"ID3", "Name3", "Value3"};
    myList.add(Arrays.asList(row1));
    myList.add(Arrays.asList(row2));
    myList.add(Arrays.asList(row3));
              return myList;
         public void setMyList(List myList) {
              this.myList = myList;
    Thanks...

    I have tried this also....
    UIOutput text =     (UIOutput)app.createComponent(HtmlOutputText.COMPONENT_TYPE);
    ValueBinding valueBinding = app.createValueBinding("#{textBean.myList["+0+"]["+i+"]}");
    text.setValueBinding("value", valueBinding);
    column.getChildren().add(text);
    UIOutput text1 =     (UIOutput)app.createComponent(HtmlOutputText.COMPONENT_TYPE);
    ValueBinding valueBinding1 = app.createValueBinding("#{textBean.myList["+1+"]["+i+"]}");
    text1.setValueBinding("value", valueBinding1);
    column.getChildren().add(text1);
    UIOutput text2 =     (UIOutput)app.createComponent(HtmlOutputText.COMPONENT_TYPE);
    ValueBinding valueBinding2 = app.createValueBinding("#{textBean.myList["+2+"]["+i+"]}");
    text2.setValueBinding("value", valueBinding2);
    column.getChildren().add(text2);
    _table.getChildren().add(column);
    Instead of----
    ValueBinding myItem = FacesContext.getCurrentInstance().getApplication().createValueBinding("#{textBean.myList["+0+"]["+i+"]}");
    UIOutput output = new UIOutput();
    output.setValueBinding("value",myItem);
    column.getChildren().add(output);
    But not working.... :(

  • Picking Qty field is disabled

    Hi,
    i am trying to create a outbound delivery vl02n but picked qty field is disabled. can any on pl help me?
    Basically i am trying to do a STO with delivery. betw..plant to plant in same company code.
    How to activate that field.
    In LT03 also system is not recognizing the storage bin.
    does any one have any end-end procedure document for STO with delivery including the creating outbound delivery, picklist etc...
    i got a BB doc from help.sap but that didnot give the transactions part..
    [email protected]
    I appreciate your help.
    Thanks
    Madhu

    if the storage location is warehouse managed, then the field pick quantity in the delivery gets disabled, because the picking needs to be done in WM only.
    What message does LT03 actually give to you? Please include the message number.

  • ABC Analysis from transaction MC40 - Qty field

    Hi All,
    I recently got to know about MC40 and i dont understand some areas of it.
    After executing MC40, i will get the list of materials sorted already for A, B , and C.
    However, when i click on double line, it then shows me Qty field as well. Now when i look at this quantity field, i dont understand where system is getting it or how!
    When i check MB51, the quantity system proposed does not equal to the total consumption, total receipt, or the difference between both.
    I also noticed that if i increase the number of days for analysis, the quantity increases.
    Please can somebody tell me the formula SAP is using to get the Quantity here.
    Much appreciated.

    Hi,
    Im still not getting a clear picture.
    From that forum post, it is just explaining which field is related to MIBC (CC phys inv ind) and MC40 (ABC Indicator).
    What im wondering is, now in MC40, i inserted a whole bunch of materials and also the number of days.
    When i check the results in double line, the quantity that SAP proposes is very weird. I cannot seem to find it anywhere. I checked previous consumption, totaled it up and it still does not come to that figure.
    Someone please explain to me how SAP is calculating the Quantity field in MC40 output.

Maybe you are looking for

  • Received HTTP response code 500 : Internal Server Error in XI

    Hi, I have configured a scenario SOAP to RFC in XI. when I am sending a message from web service, I got following error <SOAP:Fault>                <faultcode>SOAP:Server</faultcode>                <faultstring>Server Error</faultstring>             

  • Lightroom and Bridge

    Ok, we all know there is great integration between Lightroom and Photoshop, as there should be. What about Bridge? Or is Bridge being phased out even though it of course is integrated with almost all Adobe products?

  • Offset problem in select query

    Hi experts, I have a select query , in my where condition , comparing fields types are different following is my select query SELECT spras  prctr  ktext FROM cepct INTO CORRESPONDING FIELDS OF TABLE it_cepct FOR ALL ENTRIES IN it_vbsegd              

  • HideMe508 class in Netscape 7.0

    When displaying a query region in Netscape 7.0, the contents of the "label" tag, which looks something like : <label for="f04_0003" class="hideMe508">NAME</label> gets displayed (in the above case, NAME gets displayed) when it should not be. Ie, Nets

  • HT1725 the songs I have downloaded on an album skip after a few seconds - how do I fix this?

    I have just bought an album from Itunes Store on my laptop, it says all of the songs have been downloaded, but some of them skip half way through the song, how do I fix this?