Get a Sales order based on delivery

Hi,
Is this the way to get a Sales order based on a delivery ?
if(Delivery.GetByKey(DeliveryDocEntry))
    Delivery.Lines.SetCurrentLine(1);
    if (SalesOrder.GetByKey(Delivery.Lines.BaseEntry))
        //TODO: Do your job here !

If you want to see how the multiple so's connected to one DN works,  go into test and create 2 sales orders for the same customer.  Then go into Delivery notes, key in that customer code & hit copy from, then select sales order.  Both those orders will pop up in a matrix & you can select them both at once.  After that the line items from both orders will be in your dn.  If you select a line from the first order & hit the source document icon on the tool bar (even in add mode) it will take you to that order and selecting a line item from the second order & clicking the source button will take you to it's based-on document.
If you're lucky, your organization never does that, (but "never say never", right?

Similar Messages

  • How to get master sales order number from delivery number

    Hi All,
    I need logic for getting master sales order number from available Delivery number.
    Note: There can be many SO's in diffrent levels.
    Finally i need to pick up master sales order no.
    Thanks in advance.
    Thanks,
    Deep.

    Hi,
    I have a outbound delivery[VL03N] 'X' in my system .
    Then for getting sales order no i am writing below code:
      SELECT single vbelv vbeln
             from vbfa
             INTO (vbelv, vbeln)
             where vbeln   EQ p_vbeln AND
                   vbtyp_n EQ 'J'.
    Then vbelv i need to pick up master sales order no.
        SELECT vbelv vbeln
               from vbfa
               INTO TABLE i_so
               where vbeln   EQ l_vbelv AND
                     vbtyp_n EQ 'C'.
    If i write code as above it is giving four sales orders which one of them is master sales order no!
    Thanks,
    Deep.

  • How to List Sales Orders based on Creation Date and Delivery Priority

    Dear all,
    How can we list Sales Orders based on creation date and delivery priority.
    I tried using vl10a transaction code, but there we can see sales order based on delivery date.
    we need to list all sales order based on delivery priority and sales order creation date.
    can any one of you tell me which standard report gives such kind of report. Your suggestions will be highly appreciated.
    Thank you
    Raghu Ram

    Hi Raghu,
    There is no st report available as per your req.
    Using SQVI, you develope one report that is list of sales orders based on your req.
    SQVI is used to convert a Quick View into a query.
    Quick Viewer:
    The Quick Viewer allows you to define reports without having to program yourself. The Quick
    Viewer is especially useful for new users and occasional use.
    Quick Viewer is a tool for generating reports. SAP Query offers the user a whole range of options for defining reports. SAP Query also supports different kinds of reports such as basic lists, statistics, and ranked lists. Quick Viewer, on the other hand, is a tool that allows even relatively inexperienced users to create basic lists.
    Quick View definitions are user-dependent. You can transfer a Quick View into SAP Query in order to make reports, for example, accessible to additional users, or to use the other functions available in SAP Query.
    The following is a comparison of Quick Views and queries:
    Quick Views possess the same functional attributes as queries. However, only basic lists may be defined with Quick Views.
    In contrast to queries, no user group assignment is necessary with Quick Views. Each user has his/her own personal list of Quick Views. Quick Views cannot be exchanged between users. Quick Views may, however, be converted to queries and then be made available to other users in a specific user group.
    Info Sets are not required for Quick View definition. Whenever you define a Quick View, you can specify its data source explicitly. Tables, database views, table joins, logical databases, and even Info Sets, can all serve as data sources for a Quick View. You can only use additional tables and additional fields if you use an Info Set as a data source.
    The Quick Viewer uses various controls. Certain hardware and software requirements must also be fulfilled before you can use the Quick Viewer.
    To define a Quick View, you select certain fields according to your data source that determine the structure of your report. The report can be executed in basis mode with standard layout or may be edited using drag and drop and the other toolbox functions available in WYSIWYG mode.
    Reports created using the Quick Viewer may also be passed to external programs (Excel, for example).
    Call the Quick Viewer using System -> Services -> Quick Viewer (or transaction SQVI).
    Enter the name of the Quick View. Quick View names can contain a maximum of 14 characters.
    Choose Create.
    Enter a title for the Quick View and remarks, if you think they are relevant.
    If you do not want to base your list on a table, use the possible entries pushbutton in the Data source field to select another data source. You can choose logical databases or Info Sets. In addition, you may also create table joins. For further information, see Selecting a Data Source.
    Choose Basis mode if you want to create the list directly with no list design. Choose Layout mode if you want to define the layout of your list yourself.
    SQVI Table Quick viewer – Used to created quick client dependent reports
    Probably the easiest and most flexible way to do this is thru one of the ABAP query transactions.
    Transaction SQVI can do this and it has a very good help function that explains how it works... the drawback is that it is only for one user.
    You can play around with it and see if it meets your needs...
    The query results will come back in an ALV Grid or Excel... you can select what fields are returned, and have a selection screen to enter the search criteria.
    You can get the report by joining the tables VBAK and VBAP.
    If you have any queries, i will forward screen shots to your id.
    Reward points pls.
    Regards,
    Govind.

  • Which table I can get sales order no from delivery numbar.

    Hi,
    I want sales order no from delivery no. right now I am using table VBFA where I am passing VBELN and POSNN and geting sales order no. but performance of select query is very poor bcouse I am not passing first two key fields in the select query.
    Is there any other tablefrom where we can get sales order no. from delivery no. so that performance of report can be improved.
    Thanks,

    hi,
    sales doc header ( table VBAK ) copy to Delivery header table( LIKP)
    sales doc item table ( VBAP) copy to Delivery item table( LIPS)
    you can see this in copy control VTLA ,
    now u want slaes doc no. from dilv doc. no.
    so go to t-code se11.....
    fill table LIKP u will get VBELN field for deliv doc no, & TERNR field for sales doc. no.
    so if u want to call sales doc no from dilv doc no.. u can use table LIKP in ur report.
    i hope it will help u.

  • FM in CRM to get sales orders based on a date range(created_at)...

    Hello Experts,
    Is there a function module to get the sales orders from CRM based on a given date range which
    is for the field created_at? Also, is the field OBJECTID in table CRMD_ORDERADM_H can
    be compared against VBAK-VBELN? Thank you guys and take care!

    Hi,
    You can create your own function module for this. You can fetch sales order from table crmd_orderadm_h, put input data as date, and two conditions for sales order should be object type = 'BUS2000115' and PROCESS TYPE = 'TA' if you are looking for standard order.
    You have to fetch object id from this table to get your order number.
    Thanks,
    Shweta
    Message was edited by:
            Shweta Verma

  • Get the sales order number based on customer number

    HI all,
    how can i get the sales order numbers based on the customer number?
    plz tell me the table names.
    thanks,
    Srini

    hiiiii..
    go to database table VBAK
    where you can find customer id and sales order
    use a select statement in your report program
    and key as kunnr ...
    i hope it does ...the job

  • I am not able to get in sales order and delivery  24 hours

    Hi Frinds,
    i am not able to get in sales order and delivery  24 hours even i have defined pick pack time wrkdays 24hrs in
    CONFIG PATH:-Implementation Guide for R/3 Customizing (IMG) -> Logistics ->Execution->basic shipping Functions-> scheduling-> Delivery Scheduling and transporting Scheduling -> Define Scheduling by Shipping Point Or Transaction code:-OVLZ.
    Expected  Results:-Create sales order and delivery and check that the delivery The order has 24 hours after the transfer order is confirmed to allow time to pack order
    *can you help any body  to get in sales order and delivery  24 hours .
    Regards
    Madhu

    Dear Madhu
    Apart from OVLZ, you can also check in VOV8 where for your sale document type, check whether any value is maintained in the field "Lead time in days" at the bottom screen.
    thanks
    G. Lakshmipathi

  • Report for viewing Sales order no against delivery date & actual GI date

    Hi Experts,
    Is there any report for viewing Sales order no against delivery date & *actual GI date*
    Because in VL06F , i can only able to get planned GI.
    Please guide regarding the same where i can get 'ACTUAL GI DATE ' against above combination .
    Regards,
    Sujit S.

    dear Hrishi,
    i followed your suggestion, but couldn't get desired results,
    here i can get planned GI date, where i wanted to get Actual GI date for complted deliveries,
    thanks for your valuable reply.
    @ G. Lakshmipathi ;-
    i think i will need to develop z-report for fetching the data from the tables
    VBAK (to get sale order reference) and
    LIKP (to get delivery and actual GI date)
    thanks for your reply,
    Regards,
    Sujit

  • Goods issue to customer without sales order or Outbound delivery

    Dear all gurus,
    I have a case like that: Supposing we don't have neither Sales Order nor Outbound Delivery (because not implement SD, for eg).
    Then, we stil want goods issue to customer. So can u advise me how to do: which Tcode, which movement type,...
    Thanks,

    Hi,
    Create a cost center for customer and issue the goods with respect to this cost center in MB1A transaction using movement type 201.
    Then all the issues will be tracked based on this cost center.
    Regards,
    Bharat

  • Creating sales order based on store numbers in IS retail

    Hi ,
         I want create a sales order based on the PO received from the customer in the IS Retail system. The purchase order will be sent in a EDI file.
    a single line item in the PO will have multiple store locations where we need to ship materials. for example.
    Let us take an example
    PO will have an item "Shampoo"  quantity  - 1000, this 1000 has to be shipped to diffrenet stores like 0001 - 100, 0002 - 100 , 003 - 200 etc. Based on this PO we need to create a sales order.
    Is there any way we can handle in SAP IS retail to create sales order & save the customer store number in the sales order for that item
    With Regards
    K.Varadharajan

    Hi Varadarajan,
    For one Sales Order only one Sold to Party and one Ship to Party are possible as they are header data.
    You can have individual Sales Order for each outlet and one delivery can be made for several Sales Order for single Ship to Party.
    Hope this clarifies you.
    Regards,
    ManiKumaar

  • Dynamic sales order no. in Delivery item output Subject line

    Hi Friends
    I  need to send delivery output LQCA item level, by mail and E mail subject should contain sales order no and product description.
    The method is to write:
    & XXXX-YYYY& / &LIPS-ARKTX&  (XXXX is the table name containing sales order and YYYYis the field name of sales order)
    in cover page text in output communication tab.
    But I am not getting the sales order no. in any of the delievry table. It is there in LIPS table but not filled.
    How can I pull sales order no. dynamically.
    Regards,
    Neeraj Srivastava

    Hello Sales Document Number will be available in LIPS in VGBEL 9Reference) Field.
    If not avaialbel there then you will have to go to Table VBFA & enter the Delivery number in Follow-on Document No. to get Preceeding Document number which is Sales Order number.
    Hope this helps,
    Thanks,
    Jignesh Mehta

  • Plant Info is blank in Sales Order Due for Delivery (VL10A)

    Hi experts,
      In VL10A sales Order Due for Delivery, i have fields like Name, GI date, plant and shipping point. 
    There is data on shipping point.  However, the plant field is blank.  I like to get data for the plant.
    Can you pls point me to what user-exit or how  I can modify the program to bring data for plant ?
    I am aware that VL10A list orders at the header level.
    Thank you.
    Joyce

    closed.

  • Minimum Quantity in Sale Order based on Ship To Party city

    Dear Experts
    It is possine in Std SAP to get information or error message based on Minimum Quantity in Sale Order based on Ship To Party city??
    Thanks
    Krishna

    No it is not possible.  You have to go for sale order User exits in the program MV45AFZZ - USEREXIT_SAVE_DOCUMENT_PREPARE
    thanks
    G. Lakshmipathi

  • SALES ORDER BASED  STOCK TRANSFER ISSUE

    Sales order based planning
                                                 A
                                B                              C
               D                        E
    In this A (header material) is sales order item and B is sub assembly. D, E, and C are raw materials.
    I am having four company codes 1000 , 2000, 3000, 4000 with plants one in each as 1010, 2010, 3010, and 4010 respectively.
    Always sub assembly B will be manufactured by 4010 plant. The sales orders for material A will be received by 1010, 2010 and 3010 independently.
    When i run MRP in 1010, 2010, 3010 for there respective sales order for the material A
    The material B will be always planned in 4010 basing on the special procurement key as stock transfer for the material B maintained in the respective sales order plant.
    My requirement is that for manufacturing B  i require material D and E .these raw materials  always has to be supplied from the parent sales order plant.
    Example :
    If material B is manufactured for 1010 plant the raw materials D and E have to be planned in 1010.
      If material B is manufactured for 2010 plant the raw materials D and E have to be planned in 2010.
      If material B is manufactured for 3010 plant the raw materials D and E have to be planned in 3010
    For this I have different special procurement key 45 as stock transfer from plant to MRP AREA ( in stand SAP). This will work if I am using in the same company code.
    Can I use this as inter company code also?
    REGARDS
    MADAN MOHAN

    Hi,
    i think BOM did not get copied correctly.
    the bom is like this
       A header material  and B and C are components for A . B is sub assembly with D abd E as child raw materials
    regards
    madan

  • SD consolidating multiple sales orders onto a delivery

    Dear SD gurus,  I have a situation where I am trying to consolidaqte multiple sales orders onto a delivery.  I have read the documentation and have created sales orders with the same: ship to party, incoterms ect.  I have also selected the 'combine orders' check box in the customer master record.  I am generating the deliveries using VL10A - but I am still getting one delivery for each order.  Is there anything else I need to do?

    Hi Jacqueline,
    Basically, all fields which are copied to the header of the delivery (tableLIKP) via the routines of the copy control lead to a delivery split. Furthermore, some fields are copied to the header by all means and are relevant for the split there.
    Split fields that cannot be changed are:
    VSTEL Shipping point
    KUNNR Goods recipient
    ROUTE Route
    The following split-relevant fields can be affected via the copy control,however, they should not be filled differently from the defaults since they are necessary for the control of the shipping process:
    VKORG Sales organization
    AUTLF Full delivery indicator
    VSBED Shipping condition
    FKARV Billing type (customer billing document)
    LIFSK Delivery block
    STAFO Update group for statistics
    STWAE Statistics currency
    KKBER Credit control area
    KNKLI Account number of the customer with the credit limit default
    GRUPP Customer credit group
    SBGRP Processor group for credit management
    CTLPC Credit management: Risk category
    CMWAE Currency key of the credit control area
    WAERK Currency of the sales document
    INCO1 Incoterms 1
    INCO2 Incoterms 2
    KZAZU Indicator order combination
    KDGRP Customer group
    PERFK Invoicing dates (calendar identification)
    Hope this helps
    thanks

Maybe you are looking for

  • Javascript PopUp Page Passing Values

    Hi, I have a page which I am redirecting to from a report link column. The Column Link... URL is as follows: javascript:popupURL('f?p=&APP_ID.:8:&SESSION.::&DEBUG.::P8_SOURCE:#EXPRESSION#' ); My problem is that some values in #EXPRESSION# contain com

  • Photoshop panel scrollbars and size

    Hi, If you take a look at some of the included Photoshop panels, like the kuler panel, it has a minimum size you can scale the panel. When you do this with a panel you created in Flex, even with the samples that are included with the developer guide,

  • Need the V20 firmware for N97!!!

    Hey Nokia, you announced the latest firmware to be available in october, but we are in the late october now and still no V20 available for N97...I`m very dissapointed on this fact,because I spent a lot of money buying this phone!Maybe you forgot to m

  • TS1307 Why does send mail just stop working and how do you fix it?

    Using MacBook Pro bought last Chrismas and its mail client 5.2 In the last 2 weeks send mail has stopped working for both my wife and myself (we have different logins / accounts / email address providers) We have tried different wifi / isp providers

  • ERROR: DW041: INSTALLDIR Volume D:\ doesn't exist.

    I already changed the destination folder(SEVERAL TIME) but this keeps coming up, seriously whats the problem?