Sales Order Original Order Quantity for Specific Item

Hi there
Where/How can I find the Original Order Quantity for Specific Sales Order?
SELECT * FROM ont.oe_order_lines_history where version_number=0 ( I have multiple version for that specific Order)
Do I have to use version number 0 to get the Original Order Quantity?
Thanks
ASIM

Hi there
I wrote the following query to get the first version of the Sales order Line which shows the original Order Quantity , this query is very slow, it complete in 1 minute and 20 seconds for one Item.
SELECT hist.header_id,
     hist.line_id,
     hist.promise_date,
     hist.ordered_item
FROM ont.oe_order_lines_history hist
WHERE LTRIM (hist.ordered_item, '0') = '37879'
AND hist.version_number =
(SELECT MIN (hist2.version_number)
FROM ont.oe_order_lines_history hist2
WHERE hist.header_id = hist2.header_id
AND hist.line_id = hist2.line_id)
Is it the right method to get the Original Quantity?
Thanks
ASIM

Similar Messages

  • Sales BOM its possible edit the quantity for child items in Sales Order

    Hello friends, this is my issue
    I need to use a Sales BOM but the problem is that the child items in any Document marketing, such as Sales Order, the quantity for that child items it´s possible to edit independant of the father item code, and I don´t want this because allows to users to change diferent quantity for child items versus the quantity of the father item code.
    Thanks in advance

    Thanks Gordon yes I know even with this solution the problem is the with transaction notification is not possible determine that event to block, or if you know how or get some tip, please send me, because I analyze the requirement and I couldn´t develop.
    Tks

  • Error in CNS0 :Sales unit is not valid for the item

    Dear Team ,
    we are using assembly process ,after creation of project from sales order ,requirments are pass to production planning (PP), Asign the bom to activites then we are going to delivery through project (cns0) at the time system shows error" sales unit is not valid for the item" we check the options in material master .please  help me on this issue.
    Thanks &Regards
    R.B.RAO

    Have a look at the following note:-
    Note 140551 - VL384 Stock transport order and batch selection
    G. Lakshmipathi

  • How can I access user permission for specific items in Sharepoint 2013 via REST API?

    I want to access user permissions for specific items like lists, documents, folders etc. via the REST API.
    Currently I am hitting the following endpoint:
    http://win-5a8pp4v402g/sharepoint_test/site_1/_api/web/getUserEffectivePermissions('win-5a8pp4v402g\\Sharepoint User 2')
    However the response looks like this:
       "d":
           "GetUserEffectivePermissions":
               "__metadata":
                   "type": "SP.BasePermissions"
               "High": "0",
               "Low": "0"
    I cant understand why high and low are both 0? I have added the user to a specific group. Also this is the same result for each of the users. Another thing to note is that I havent added the "Guest" user in the sharepoint server. So when I hit the endpoint for the Guest user, it still shows the same response. So I know there is something I am doing wrong.I want to access permission of a user for a specific item, say a document using the REST API. Can someone tell me how? What would be the endpoint?

    Thanks for the reply. Although this works for Lists, I need to get permissions of documents too. Here is what I have tried:
    http://win-5a8pp4v402g/sharepoint_test/site_1/_api/web/GetFileByServerRelativeUrl('/sharepoint_test/site_1/Documents/file1.txt')/GetUserEffectivePermissions(@user)?@user='i%3A0%23%2Ew%7Cwin-5a8pp4v402g%5Csharepoint%20user%201'
    And the response is:
       "error":
           "code": "-1, Microsoft.SharePoint.Client.ResourceNotFoundException",
           "message":
               "lang": "en-US",
               "value": "Cannot find resource for the request GetUserEffectivePermissions."
    Clearly this doesnt work for a file. Whats wrong?

  • Display Totol Stock & Open Order Quantity for line item while creating SO

    Dear Experts,
    We have requiremet that while creating SO (VA01) for each item it sould show the message (Popup Screen) about Total Stock & Total Open Oder quantity for that material when user enters the material, plant & storage location in line item.
    Please let me know your ideas in detail if anyone knows about this....
    Thanks in Advance
    Best Regards
    Venkatesh

    Dear Venkatesh
    It is a standard if you create sale order, whatever stock is available in MMBE, it will show during availability check but additionally if you want to see open orders, then you have to go for additional enhancement.
    thanks
    G. Lakshmipathi

  • If I ordered in store pickup for 2 items can I pick them up on one day

    I ordered a MacBook Air 11in upgraded so it won't come till the 12 of this month so I got a $100 iTunes gift cards with it. When I go to ordering select in store pickup for both items not thinking if they had a limit on the amount if days they will hold an item.  So I finished my order and then I get a notification later saying that my item is ready for pickup...then I realize my MacBook Air isn't going to be ready till the 12 so can I wait for my MacBook Air and pick them up on the same day or do I have to pick them up on separate days... Thanks

    they generally hold items for 5 days.  But if you call the store and explain the situation they will probably hold them longer, within reason.

  • Block Price change for specific Items.

    Hi,
    Any helpon this, we want to block  users to change the Price structure at the transaction level but also we want the flexibility of changing the price in specific items which is as per sample from customer . Means we have 100 items and we want the user cannot change the price of 90 items but other items  the users is allowed to change
    Regards
    Grayson

    Hi!
    Use this SP coding in SP_Transaction Notification.
    This SP is Specific for Purcahse Order, Item Property 1 should be checked, Price List No 1 should be updated.
    IF(@object_type = '22') and (@transaction_type in ('A', 'U'))
    begin
    IF Exists (select T0.Docentry from OPOR T0,POR1 T1,OITM I1,ITM1 I2 where  T0.Docentry= @list_of_cols_val_tab_del and
    T0.Docentry=T1.Docentry and T1.ItemCode=I1.ItemCode and I1.QryGroup1='Y' and I1.ItemCode=I2.ItemCode and I2.PriceList='1' and
    I2.Price != T1.Price )
    Begin
    SET @error = 2
    SET @error_message = 'Price should not be changed'
    End
    End

  • FM to get the free good quantity for an item.

    Hi alll,
    I need to populate freegood quantity to ipc. How can i get the free good quantity configured for an item ?.
    Thanks and Regards
    shanto aloor

    I am not sure wht is your requirement...but you can check FM - CRM_ORDER_MAINTAIN for this.

  • CO46 for sales order no exploded view for specific material

    Dear All,
    When using CO46 for a sales order it does everything correct exept for a specific material. It is displayed above the sales order in the hierarchy, like if it is not contained in it and there is no exploded view possible.
    When I look closer to the MRP for the material it has planned orders but the orders reducing quantity don't link to the sales order. The MRP element data is empty.
    Anybody has a clue?
    Thanks in advance,
    Michaë

    The material in the SOI created collective requirements. Change Material Master availability check to 02 and recreate SOI

  • Sales Order creation/ change date for the items

    I have a unique scenario and i need to get a Report for this
    A sales order is created for 4 line items.
    Out of these , for 2 line items a delivery is created. I need the sales order creation date and time  for these 2 items in a custom report
    Now the other 2 items go in to some kind of block- Now these are released by going in the sales order VA02 and after releasing the delivery is created. Again for these two items , i need the sales order change date as after a user goes and changes the sales order to remove the block only then delivery is created for these two items
    Also another scenario is the 2 line items go for back order and when we get stock  at tht time system confirms the stock and then the delivery is created for these. So also for this when this change occured i need to get the date for these 2 line items
    Can any one please suggest how to get this data  from the scenarios?
    I dont want to get the date when the delivery is created as i can get tht from the LIKP table. I need the sales order create and change dates for these.

    You may be aware, any changes to a document will be recorded in CDHDR (for header changes) and CDPOS (for item changes).  You can explore these two tables.
    thanks
    G. Lakshmipathi

  • Line with 0 quantity for main item with batch split

    Hello experts,
    I have one line item in delivery. Delivery split is there: There are 1 spilt items with 1 batch nos. The main item category and the batch split item category are TAN.
    My system is showing 2 line items in billing, the batch line with quantity and the main line with zero qty. How to prevent this and have only the lines item in invoice with batch/qty. I don´t want to see the main item with o quantity.
    In VTFL I have routine for copying requirements 004 and Billing Quantity B. I need to create another copying routine or I need to use another item category for batch lines?
    Thanks in advance
    Pablo

    Hi Pablo,
    It is advisable to have a different item category for Batch split items.
    If you want the batch split items to suppress and show only the Total in the Invoice. Yes it is possible.
    1) You can do this in the Copy controls in VTFL - Delivery to Billing, go to your Item category and go to Item details - Change the billing Qty to 'G'.
    2) Go to Shipping > Deliveries > Item categories Determination in Deliveries > Define item category.
    Go to your item category which is used in Batch Split
    Remove the Billing Revelance and make it blank and Save.
    Now when you create the Invoice for Batch split - Only the total quantity will be displayed without the subitems - like in Delivery note or Delivery..
    Please check and revert back for any more details
    Rgds
    Sunil.

  • How to enter Intial quantity for an items

    Hi Experts,
    I have to put initial quantity's for more than 10000 items. So please let me know the procedure how to go about it. Manually i think its not possible bcoz it will take huge amount of time. So please suggest me the solution. Waiting for ur earliest reply.

    Check this SAP Notes:
    864113     How to enter initial quantities for Stock via the DI or DTW
    [https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/smb_searchnotes/display.htm?note_langu=E&note_numm=864113]

  • Silence Lenovo Solution Center Alerts for specific items via registry/config file.

    I need to be able to customize the alerts generated by LSC.  Like disabling alerts for updates and backups (I handle those for end users via other tools).  Is there a registry setting or file I can edit to change these alerts?  Requesting my end users open up LSC and disable specific alerts isn't an option.
    Thanks for any advice in advance!

    Hello everybody,
    I have set DECLINE_SECURITY_UPDATES=true but still have the problem.
    David D'Acquisto's response-files, don't help in my case because I need a completely silent installation with all necessary information inside. But his files are largely empty. So I can't figure out with entry in it causes the problem.
    Metalink contains the following "solution":
    "Cause
    The name of one environment variable contains spaces and the installer is not able to convert them internatelly. For instance, there is a variable called "PATH ".
    Bug 8995616 "DB INSTALLER VALIDATES EMAIL AND FAILS".
    Solution
    - Check the Environment variables and be sure that none contains spaces or special characters on its name
    - retry the installation
    I don't see any problem in my environment variables, or which ones should I check?
    Many thanks in advance,
    Xenofon

  • Return order has more quantity than original order - one item

    Gurus,
    In one of the original sales order (VA01 tcode) having quantity as 1 (ie one line item) and then when return order is posted against that original order using order idoc .
    Return order idoc has only one quantity for that item. But return sales order created with two quantity for that item.
    Any way in our process Return order is created based on original order using original to return copy control.
    This is only one order got affected. We never get such a scenario in our SAP system.
    Any inputs will be greatly appreciated
    Thanks
    Praba
    Edited by: Prabaharan Rangasamy on Jan 12, 2011 5:50 PM

    Hello,
    Please check whether return sales order is really created via Idoc message. Go to sales order header and check the created by field under sales tab.
    It seems that the return sales order is created manually, and second line item (extra item) is added manually before this return sales order is actually saved, so the change log didn't appear
    Br,
    Tushar

  • Difference amount in sales order and billing document (For one line item)

    Hi Experts,
    User created sales order with 3 line items and billing document. but problem is that there is difference in value of sale order and billing only for line item 10. The remaining items values are same in sales order & billing doc.if I check in sales order condition I found that VPRS condition is used and the value is 692.13and the amount is 3245.26in sales order. But if suppose I check the same value in billing doc the value is 0.69 and the amount is 3245.28. Can u suggest me which configuration I have to check for this.
    I also checked change lock but there is no change in sales and billing document & Material
    Regards
    Sunina agarwal

    Morning Sunina
    Now consider this scenario
    Item a - 10
    Item b - 20
    Item c - 30
    and the validity of condition rec for item C is 31st of Jan
    after 31st JAN the record changes or there isn't any.
    In Copy control the pricing type is 'B' i.e., carry out new pricing.
    Now if the document is created in January it will take all the above prices. and this document is then billed in Feb. Now the copycontrol, whilst copying the prices, will predetermine the same.
    Now your task is to check if there was user intervention, check the pricing in order and check what condition types got affected in order and in billing.
    If your scenario is still not amongst the above cases...
    I don't know what to do, if you figure out please let us also know, god know when we would face the same scenario....
    Take care

Maybe you are looking for

  • Skype pops up, how do i stop it?

    Skype pops up. How do i stop it?

  • Best strategy for implementing a wizard?

    Hi all, I'm currently writing a wizard in java based on the wizard model provided from the sun developer network. The panel structure in the wizard is non linear. I want the content of later panels to be dependent on input from earlier panels. Specif

  • Urgent! Oracle Form 6

    Hi all... I'm new to Oracle Form... But i am using it to create a program using Oracle Form 6. I have one table called Customer. There is a button called 'Create New Customer' which will allow the user to create a new record when he/she clicks on it.

  • Lost centralized view..

    The first time I used Messages I could see multiple recipients in the list, for whatever reason they've switched to small individual windows, and I can't see an option to switch back to regular view. Mine are stuck like this: The only way I can switc

  • After update, Excel won`t wait for the server to respond, after clicking an Hyperlink

    Hello, I`m having a list of locations on a column and a list of their IP on the other column. I`m using it for checking the conection(I`m clicking on the Hyperlink (eg www.example.com) and if the browser opens a new window with that particular link(w