Line Numbers in Sales Order Lines

In a Sales Order, my line items are shown as 1.1, 1.2, 1.3, 1.4 , 1.5 & 1.6
but my select returns line_number = 1
select line_id,line_number from oe_order_lines_all where header_id = 6250
and the result is
Line_id Line_number
5428 1
5429 1
5430 1
5431 1
5432 1
5433 1
how would I write a generic decode to show the line_numbers as 1.1, 1.2, 1.3 ....

.. or dense_rank() ? :
SELECT line_id,
          line_number
       || '.'
       || DENSE_RANK () OVER (PARTITION BY header_id ORDER BY header_id)
                                                                  line_number
  FROM oe_order_lines_all
WHERE header_id = 6250

Similar Messages

  • AR Invoice Line Numbers and Sales Order line numbers are not in Sync.

    Hi,
    There is an AR Invoic with 2 lines and SO with 2 lines. The line numbers on the Invoice and SO are not in Sync. SO line No 2 is Invoice line No1 and SO line No1 is Invoice Line No2. What determines the Invoice line numbering?
    Thanks

    Hi,
    Goto the T.Code "VOV7".
    Select your item category.
    Details.
    Maintain the Completion rule as "A(Item is completed with the first reference)".
    Save.
    If you do this after the follow on document is created,the item is completed and you cannot reject the item.
    For your second question,
    Goto the T.Code "VTLA".
    Select your valid combination.
    Click on item.Select your item category.Details.
    There is a check box called as "Update document flow".Tick that one.
    Save.
    Regards,
    Krishna.

  • Line id in sales order lines and source_line_id in wsh delivery details are entirely different

    i am trying to get serial number based on sales order line,i am getting no data since   AND WSH.SOURCE_LINE_ID = OOL.LINE_ID is failing,Please help me.Im not getting what wrong im doing
    SELECT OOH.ORDER_NUMBER
         ,OOH.FLOW_STATUS_CODE
         ,OOH.CUST_PO_NUMBER
         ,OOL.ORDERED_ITEM
         ,OOL.LINE_ID
         ,OOL.ORDERED_QUANTITY
         ,OOH.ORDER_TYPE_ID
        ,WSN.FM_SERIAL_NUMBER
    FROM SO_ORDER_TYPES_ALL SOT
         ,OE_ORDER_HEADERS_ALL OOH
         ,OE_ORDER_LINES_ALL OOL
         ,WSH_SERIAL_NUMBERS WSN
         ,WSH_DELIVERY_DETAILS WSH
    WHERE 1=1
      AND WSN.DELIVERY_DETAIL_ID = WSH.DELIVERY_DETAIL_ID
      AND WSH.SOURCE_LINE_ID = OOL.LINE_ID
      AND OOL.SOURCE_TYPE_CODE = 'EXTERNAL'
      AND OOH.HEADER_ID = OOL.HEADER_ID
      AND OOH.ORDER_TYPE_ID = SOT.ORDER_TYPE_ID
      AND SOT.NAME = 'US Distributor Order'

    what is the status of SO and SO line ?
    Have you manually check the line_id and source_line_id from backend using select statement ?

  • AR Invoice Presentation / Invoice Lines diff than Sales Order Lines

    Hi,
    Due to business rules I got the following requirement, I'd like to get advice or second opinions please:
    Instead of showing 200 lines we want to show 1 line in the invoice summarizing the job done.
    The requirement is:
    The invoice should summarize the Order Lines, meaning that we want to have different lines in the invoice than those in the orders composing the invoice. The total amounts must equal between both, the invoice and the orders lines been invoiced.
    For example:
    We need to create an Invoice for 2 Sales orders with 10 lines each, each line for $1 usd.
    The invoice could be in any of these situations:
    - Having only one line composing the 2 orders. The invoiced amount is $20.
    - Having 2 lines composing the 2 orders. The invoiced amount is $20 ($10 line 1, $10 line 2)
    The description on the invoice lines must be completly open.
    Internaly, the link/reference between the invoice line and the order line(s) composing it must be kept.
    This must work with 1 or more Sales Orders (partial or complete)
    Can be done via autoinvoice or not. (The user is able to compose and reference the invoice manually)
    ¿Is there already something done that I can use? Just point me on one direction and I'd be happy to investigate.
    I already have 1 or 2 ideas of how to achieve this without customizing at all.
    Just wanted to check and get advice and second opinions on this before taking a decision.
    Technical Spec:
    Oracle EBS 11i (11.5.10.2)
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0
    Thanks in advance.
    Juan Alcocer

    seems to error
    APP-AR-11526
    ORA-28115
    seems the security policy is implemented at your database leval and check which ID you are using to insert the record.Check with your DBA, for security to resolve first for ORA-28115.
    Disabled in case if you have any custom triggers defined on RA_CUSTOMER_TRX_ALL.
    Few Documentation for ORA-28115
    ORA-28115 with EXEMPT ACCESS POLICY privilege
    A user USER1 has been granted select, insert, update, delete on all
    tables of an application schema (USER2) that uses row-level security.
    The RLS policies cover select, insert, update, and delete, and have check option enabled. USER1 has also been granted EXEMPT ACCESS POLICY system privilege.
    Each table in the USER2 schema has a trigger that causes insertion of
    a row into an audit table whenever DML is performed. When USER1 performs DML on a USER2 table, the operation fails with

  • Help required in identifying Line Charges in Sales Order Lines

    Dear All,
    I want to know the column or calculation used for retrieving Line Charges present in
    sales order->Line_items->Pricing tab.
    Thanks and Regards,
    Mahesh

    I got the solution . We can get the line charges column as (requested_quantity*unit_selling_price)/33.33.
    Thanks and Regards,
    Mahesh

  • How update amount of charge line for a sales order  line id

    I have a modifier which are qualified for a order line id, i want to update the amount of charges if the Shipping date is > 1 day than resquest date, as I do not have the advances pricing module so i have to do a customization for this condicion.
    I want to now how to update these, Does exist a API in order to do that ? or Can i go directly to oe_price_adjustments table and modify the data ??
    Thanks
    Fernando

    Hi Fernando,
    I'd probably do this in Adv. Pricing using a dynamic formula + factor list (two diff charge levels dependent on schedule ship date minus request date) against a booking event modifier. Obviously, you don't have dynamic formulas in Basic Pricing but could you handle this via creating a new pricing attribute? The charge levels could be maintained on a lookup rather than hardcoded and used in the calculation by your new pricing attribute.
    Whatever approach you go for would also need to cope with the scenarios that you either rescheduled the order or manually amended the request date because obviously the gap between request date and SSD would change.
    Your first suggestion is feasible, the second not a good move - I'm not sure how much it costs to licence Adv. Pricing but you could always offset the cost against the cost of developing and maintaining a custom update routine.
    Regards,
    Jon

  • Sales Order Line item category not getting Re detemining Correctly

    Dear all,
                I need  help regarding the Sales order item category redetermination.
                we are having two item categories YNAE and YNAG and it contains schedule  line categories CP and CB ( i.e for item         category  YNAE schedule line category is CP and for item category YNAG schedule line category is CB),
    for YNAG Purchase Requisition is automatically created becz of functional setting on save and it is working fine.
    For every line item in sales order line item level item category YNAE will be determined by default as per functional settings.
             Now my requirement is that, if sales order line item doesn't contain 100% confirmed quantity, than i needs to change the default line item category YNAE to YNAG which i am trying to do it in USEREXIT_PRICING_PREPARE_TKOMP becz in this exit i am getting the values in XVBAP and XVBEP and  it is working fine .
             But schedule line category is not getting redetermined automatically what i mean is, if i change the item category to YNAG from YNAE in user exit corresponding schedule line category CB of YNAG is getting determined automatically at the schedule line level and if ichange the schedule line categories in XVBEP in exit USEREXIT_PRICING_PREPARE_TKOMP, changes are reflecting at the schedule line level but Purchase requisation is not getting created for schedule line on SAVE and its delivary dates are also not getting determined properly. If i press the option ATP check at the schedule line level than very things will getting corrected.
       I feel that i am not doing this in proper way, do u have any idea about how to redetermine item category. please let me know if u have any idea .
    Regards,
    Vaddepally Manoj

    USEREXIT_PRICING_PREPARE_TKOMP is the wrong location - that exit is for pricing communication preparation only.  Your primary location for item category determination is USEREXIT_SOURCE_DETERMINATION (MV45AFZB).  In your simple scenario, you could consider making an availability check at this point with some assumptions and then assign the item category accordingly.  Otherwise, you can re-assign item category and schedule line category in USEREXIT_MOVE_FIELD_TO_VBEP.  The exit is called once before ATP (for ATP-relevant schedule line categories) and once afterwards.  The call is recursive if you re-assign another ATP-relevant category.

  • Quantuty on the Sale Order line item

    HI,
    Can anyone suggest how to control the Quantity on the sales order line item.
    Sale order line item should not be reduced below the delivered or invoiced quantity. For EX:Sale order line item 10 has 200kgs,delivery quantity created aganist that order is 100kgs, now the system should not allow us to change the sale order line item quantity below the delivery quantity i.e 100kgs.
    Thanks in Advance.

    In the transaction OVAH, for the message class V4 and message number 083, in the category column, change the entry from W to E. Then system will issue hard error when you change the order qty to below delivered qty.
    Regards
    Sai

  • Keep Quote line item numbers in Sales order

    While creating a Sales order from Quote, SAP always creates line items with 100,200,300...and so on.
    If quote has 3 line items say 100,110, & 120 and we create a sales order with reference to this quote in VA01. The sales order line items become 100,200 & 300.
    The requirement is for Sales order to also have same line item numbers i.e. 100,110 & 120.
    To retain quote line item numbers in Sales order the ABAP change will be in VOFM or user exit?

    Hi,
    It is not a straight forward thing. Adding data to table XVBAP won't work. It will create inconsistency. There are so many other tables involve here too, like, VBPA, VBUP, VBKD, KONV. There can be other tables too based on how your sales order is configured.
    Also, modifying these tables (XTAB, YTAB ) in this user-exit may cause database inconsistency.
    Regards,
    RS

  • How to enter serial number for sale order line  which is in shipped status

    Hi All,
    We have 2 different items which are defined as Serialized at Sale order issue at item definition.
    In one sale order,User has forgot to add serial number to one of the item at Ship confirm stage.
    He has entered serial number correctly to other item.
    Now the both Sale order lines are in Shipped status if we view them through Shipping>transactions.
    I am technical guy and new to OM.Could you please let me know the process to enter the serial number for the item to which user has missed it
    Thanks,
    Satya

    Hi Satya,
    Since the item is already shipped, you cannot enter serial number for this line.
    you have to enter serial numbers after pick confirm only.
    check this note
    How to Enter Serial Numbers in the Shipping Transactions Form [ID 1235403.1]
    As a workaround for the previous lines do RMA and try to receive the goods back to your subinventory.
    For all new transactions follow the above notes.
    Thanks
    -Arif.

  • How to upload sales order line items?

    SAPGurus,
    For years my customer service department has been asking for a way to upload sales order line items into the VA01 sales order-entry screen.
    Many of our customers submit PO's with huge amount of line items, up to 1,000 lines. Our CS reps need to key in the data line by line (or copy/paste
    approx 17 lines at once from Excel into the VA01 screen), and we are looking for a way to make this process leaner. One idea we have is that user creates the order header, and then has a way to upload the material numbers and quantities in a separate (newly created Z-transaction) screen in one go.
    Obviously rules then need to be built that deal with the various pop-up messages related to e.g. ATP, material status, etc.
    Does anyone have any experience or thoughts on how we could achieve this? A way to make the sales order-entry process a bit less time-consuming? Any feedback would be greatly appreciated !
    Thank you,
    RVS

    Take the inputs from this Blog created by  SUNIL PILLAI                   
    Sales Documents upload  using Standard Direct Input Program in LSMW
    G. Lakshmipathi

  • How to Find Out The Production Order Number For The Sales Order Line Items

    Hi All,
    I want to know the number of production orders for each sales order line item. I know the sales order number .Can anyone tell me how the tables can be linked to get all the production order numbers for each sales order line item.

    I think it depends on your configuration. But check fields KDAUF and KDPOS in table AUFK.  or in table AFPO.
    Regards,
    Rich HEilman

  • Items are not getting displayed in Sales Order Lines 'Ordered Item' field

    Hi All,
    Ordered Item field in Sales Order lines is not getting values When trying to create a Manual Sales Order.
    When clicked on Ordered Item LOV, no values are getting displayed.
    Thanks,
    Chandra.

    879035 wrote:
    Hi,
    I was unable to select any item (nothing is getting displayed in Ordered Item field when the LOV is clicked) in Sales Order Lines.
    The Sales Order header information i was able to enter & generate the Order Number.
    R12.1.3 is the version i am using.
    Thanks,
    Chandra.Have you done all the required setup in OM??
    Like system parameters...Imp one would be Item Validation Organization
    Make sure item is also available in the price list which you are using in order
    Mahendra

  • How to get Characteristic Values assigned to the line item of Sales Order?

    Hi,
    I want to get the Characteristic Values( Variant Configuration )assigned to First Line Item of Sales Order.
    I was using the Fn. Mod.: VC_I_GET_CONFIGURATION_IBASE,
    this fn. mod. giving all the Characters but not the assigned characteristic values.
    Is there any other way to find characteristic values of sales order.
    Thanks,
    vinayak.
    Message was edited by: vinayaga sundaram

    For example, please see this example program.
    It lists the characteristic names, the values, and the description of the values which are tied to a sales document.
    report zrich_0001.
    * Internal Table for Characteristic Data
    data: begin of i_char occurs 0.
            include structure comw.
    data: end of i_char.
    data: xcabn type cabn.
    data: begin of xcawn,
          atwtb type cawnt-atwtb,
          end of xcawn.
    data: xvbap type vbap.
    parameters: p_vbeln type vbap-vbeln,
                p_posnr type vbap-posnr.
    start-of-selection.
      select single * from vbap into xvbap
                 where vbeln = p_vbeln
                   and posnr = p_posnr.
      clear i_char.  refresh i_char.
    * Retrieve Characteristics.
      call function 'CUD0_GET_VAL_FROM_INSTANCE'
           exporting
                instance           = xvbap-cuobj
           tables
                attributes         = i_char
           exceptions
                instance_not_found = 1.
      loop at i_char.
        clear xcabn.
        select single * from cabn into xcabn
                 where atinn = i_char-atinn.
        clear xcawn.
        select single cawnt~atwtb into xcawn
                   from cawn
                     inner join cawnt
                       on cawn~atinn = cawnt~atinn
                      and cawn~atzhl = cawnt~atzhl
                          where cawn~atinn = i_char-atinn
                            and cawn~atwrt = i_char-atwrt.
        write:/ xcabn-atnam, i_char-atwrt, xcawn-atwtb.
      endloop.
    Regards,
    RIch Heilman

  • My customer is looking for a comp. open (unbilled) sales order line report

    Hello:
    My customer wants a listing of open (unbilled) sales order lines.  List of everything they have ordered and do not have a bill for yet.  That seems to be spread between 'Open' Sales Orders - see VA05 (no outbound delivery created yet) AND outbound deliveries that have not yet been billed - see VL06O with Billing Status not completely processed.
    How can both of these be merged into one? 
    Is there something else that can show this TOTAL picture?
    Thanks.

    Hi,
    To show all picture you can go for z report
    Take data from table VBAK,VBAP,LIKP,LIPS,VBRK,VBRP,VBFA
    Kapil

Maybe you are looking for