SQL Query to pull RMA number and corresponding sales order number info

Hi,
I do not have good idea on the data model. I was asked to pull Sales order info & corresponding Return order (RMA) information. Appreciate if someone can provide me the query.
thanks.

I believe you have to use the link_to_line_id column in oe_order_lines_all.
For a return line, that column points to the original (i.e shipment) sales order line id.
Hope this helps,
Sandeep Gandhi

Similar Messages

  • Table containeing both the purchase order number and the sales order number

    hi all!!!
    what is table that contains both the purchase order number and sales order number corresponding to that purchase order number.
    Moderator message: please search before posting.
    Edited by: Thomas Zloch on Jan 31, 2012

    Hi Sunny,
    Yes they are same. You will be creating a purchase order in ME21n. After creating purchase order you will shown a number for that order.
    Reward points if useful.
    Thanks,
    Swamy Kunche

  • "In FBL5N unable to view purchase order number and the sales order number"

    Hi,
    Below mentioned is the problem we are facing,
    In the Customer Line Item Display (FBL5N) it is vital for us to be able to view the customer's purchase order number as well as the sales order number for each billing document listed by customer.
    We need to be able to extract this information for each customer and import to an excel spread sheet for analysis, specifically for our larger customers that have over 500 plus lines.
    Kindly advise how to go about the same.
    Regards
    Harish

    Dear,
    Please also check note 152335. There, you will find a more detailed            
    explanation of the issue.                                                                               
    The only way to see some information regarding related PO-es in a Vendor       
    line items is a workaround. For example, it is possible to create              
    a substitution in order to fill in one of not currently used fields            
    like Reference, Text, etc.    
    I hope this helps You.
    mauri

  • Report for Asset number and its Purahcse order number

    Hello Friends,
    Please give me details of report for Asset number and its Purchase order number .
    Regards
    Nilesh Vakil

    hi,
    GO to ME2N...
    use SHIFT + F4..
    there check for the acc. assign cata. field and input the asset  and execute..
    Regards
    Priyanka.P

  • How to get the ammendment sales order number and original sales order no?

    Hello sir's,
    Please tell me the table for ammendment(revised) sales order number and original sales order no.
    Thanks in advance,
    vikram

    Solved

  • Find production order using quote and/or sales order number

    How can I find the related production order if I only have the quote/sales order number and line item?  I know that I can go through AFPO and/or AFKO but is there another way?
    Regards,
    Davis

    In the Table AFPO, the Field KDAUF contains the Sales Document Number and KDPOS the Line Item Number.   If you are looking for a Transaction to Enter the Sales Document Number at, use TCode CO26.

  • How to show Invoice number same as Sales Order Number..?

    HI,
    I need to show Sales Order Number same as Invoice Number how i can setup this..? can any one help me on this..?
    Ex: I raised a Sales Order: 00001, this has booked and shpieed now i ran the WF back ground process and run the autocreate master program to generate the invoice, here i need to show the invoice number as 00001 i..e same as the Sales Order Number.
    How i can achieve this..?
    Please advice..
    Regards,
    KV.

    KV,
    I suspect you'll need to customize the Autocreate routine to ignore the sequence nextval call and instead look at your sales order number.
    You would also need to be very careful that your OM setups supported this. I've seen this as a 'business requirement' before but almost invariably it doesn't make a lot of sense when you have the originating sales order number, line and shipment to quote as a reference on the invoice. Have you considered all of the following:
    <li> If you ever need to short ship or to ship on different dates, you will need more than one invoice for the same order. How would you manage that given that those invoices would need unique numbers?
    <li> Different order types - by adopting a 'synchronized' invoice sequence, you will need to ensure that you don't create a conflict with order type sequences - i.e. OM allows you to have an order 100001 of Order Type A and an order 100001 of Order Type B if you give different sequence assignments but this would cause problems with your invoice sequence.
    Regards,
    Jon

  • Quotation number instead of sales order number in MD04

    Dear all
    When I create sales order with reference to quotation and when I run mrp through MD50 then instead of customer order the MRP element is showing the quotation number.I want the system to show the sales order number.
    Please give inputs
    Thanks
    ravi

    Hi ravi
    After creating Sales order immediately come to Md04 and see before running the MRP. All the sales order will be display irrespective of your planning strategy.
    Check it
    In material master MRP 3 view Availability checking group should be 02 individual. Then all the sales order will be displyed in MD 04
    Regards
    J . Saravan

  • SQL Query to reduce Commission amount on a Sales Order

    I hope that this is the right forum to post this and hope that someone may be able to help?
    I have a customer who wants to manipulate the amount of commission given on a sales order for some specific items.
    I have set up a UDF on the item master record called U_Commission_exempt. I have given this valid answer of 'Y' = Yes and 'N' = No
    When I load a sales order, the commission amount is derived from the Sales Employee logged against the BP on the BP Master Data.
    When you enter the Item No. onto the Sales order, I have set up a formatted search that goes and looks at the Item Master Record, and if the U_Commission_Exempt is set to 'Y' the commission amount on the sales order is supposed to be reduced to zero.
    My problem is, I can not get the SQL to do exactly as I want - at the moment it is reducing the amount to zero every time.
    Can anyone offer any thoughts on how the SQL should look?
    Thanks

    Thanks for all the Abhishek - I really do appreciate all the help on this as it's been really furstrating trying to get over this.
    Would you be able to finalise the SQL for me as I still dont quite understand what you are saying - If you look at Gordon's attempts from earlier, the brackets etc all look different to your version.
    If the OITM record returns 'N', the commission needs to come from OSLP 'Commission' which is stored on the sales order as RDR1 'Commission'

  • Sales order number corresponding to MTS production order

    Dear Experts,
    Kindly suggest a way to get or track the sales order number corresponding to MTS production order,
    In case of MTO we can get the corresponding sale order number for production order, since we have link.
    But in case of MTS production order , please suggest any standard report , table or any other way to get the
    information of sales order.
    Thanks in advance for your inputs and help in the matter...
    Best regards
    Nitishj

    Dear Nitishj,
    If the strategy is MTS then in my understanding you cannot get any sales order order number with reference to
    production made
    Reason is in MTS production will be made collectively without reference to sales order
    where as in MTO it does with reference to sales order
    Regards
    Madhu

  • How sales order number generated in the SAP R/3  is transferred to SAP APO

    Dear Experts,
    During the creation of the Sales order in SAP  R/3 an Purchase requisition is created in SAP APO and assigned with temporary sales order and when we save the sales order in R/3 the corresponding sales order number is attached with the purchase requisition in SAP APO. Is there any exits or BADI available while this Sales order detail transferred to APO or during this sales order details attached to Purchase requisition  in APO side.
    Many thanks in advance,
    Senthil

    Senthil,
    During the creation of the Sales order in SAP R/3 a Purchase requisition is created in SAP APO
    ?? I guess you are talking about one of the planning procedures that executes 'Start product heuristic immediately', yes?
    and assigned with temporary sales order
    I guess you are talking about [Temporary Quantity Assignments|http://help.sap.com/saphelp_glossary/en/74/b171467944d3119b440060b0671acc/content.htm], yes?
    Is there any exits or BADI available while this Sales order detail transferred to APO
    Standard enhancements are
    Sales order CIF enhancement on the ECC side
    CIFSLS03  (outbound from ECC)
    Sales order CIF enhancement on the APO side
    APOCF010 (Inbound from ECC)
    Best Regards,
    DB49

  • Sales order number in accounting document

    Hi All,
    I am doing service sales scenario u2026u2026.and wanted to reflect Sales order number in to accounting documentu2026
    I have seen that in accounting document there is field called sales order but that field is not getting updated after billing document savedu2026u2026..
    my query is how to get this sales order number in to accounting document?
    Thanks
    Raj

    my query is how to get this sales order number in to accounting document?
    Check in your Copy controls VTFA - Order To billing
    Header section - Assign Reference number as "B"- Sales order number .
    then in accounting document reference field will get updated with sales document number.

  • Invoice number / sales order number

    Hi,
    Given an invoice number, which tables can I query / join et cetera to obtain the sales order number, basically how are SO and invoice numbers related.
    Thanks

    Hi,
    You can get it from the document flow table VBFA,
    Give the invoice number in the VBELN field. Order number will be in the VBELV field with VBTYP_V = I.
    Regards,
    Usha

  • Sales Order Number is not picked in the shipping trasaction.

    Hi,
    After creating a sales order,then navigating to shipping trasaction and giving sales order number and then
    when i am clicking find button,the following error is coming in OM R12.1.1
    APP-WSH-231210:An unexpected Error Occured for line 388298.The Error is:ORA-04062:signature of package "APPS.WSH_DELIVERY_DETAILS_INV" has been changed.
    why i am getting this error?
    Thanks in advance.
    Regards,
    Bharathi.S

    Hi,
    The package WSH_DELIVERY_DETAILS_INV is invalid in your instance as you are getting "Signature of package apps.WSH_DELIVERY_DETAILS_INV has
    changed" error message...
    Recompile the Invalid objects and hope this will solve your Shipping transaction issue...
    Regards,
    S.P DASH
    Edited by: spdash12 on Sep 15, 2009 5:33 AM

  • Can I put a SQL query into a bind variable and then use it to output report

    Hi,
    Can I put a SQL query into a bind variable and then use it to output report?
    I want to create a report and an item "text area" (say P1_TEXT) which can let user to input a SQL query(they are all technical users and knows SQL very well). Then, I use a bind variable (that text area) to store the SQL statement. Then, I add a submit button and I want to use the following to output the report:
    select * from (:P1_TEXT);
    Do you think it is possible to do that? Any known limitations for APEX in this area?
    Thanks a lot,
    Angela

    You can, but make sure it's what you really want to do. Make sure you are VERY familiar with SQL Injection. Most people who know what it is, go out of their way to prevent SQL Injection. You're going out of your way to allow it.
    You can try using &P1_TEXT. instead of bind variable syntax. Bind variables are one of the best ways to prevent SQL Injection, which is why it's not working for you.
    Once again, I strongly urge you to consider the implications of your app, but this suggestion should get it working.
    Tyler

Maybe you are looking for

  • Yosemite install a complete fail, how can I get my computer to work again?

    i Tried to install Yosemite  and the computer (Mac mini) failed on the install.  Tried to restart and then unplugged.  Turns out some of the OS installed and can no longer get my computer to reach the home screen.  After starting the status bar gets

  • Excel from PC to iPad3 Numbers via iTunes not working

    I'm trying to add a couple excel spreadsheets to Numbers on an iPad3 from an XP machine via iTunes. The iTunes interface shows the files to be added to Numbers, but after I sync the device the files are not shown in iOS Numbers. I synced a pdf to Goo

  • Burning .mov - bad quality

    Hi everyone, I have to put a flash animation (up to 13 mins) on a DVD. I make a .mov out of Flash (tried both animation and H.264 best quality encoding multipass), then I import it in iMovie and "share" it with iDVD, set the iDVD preferences to PAL -

  • HT204384 My SD card wont read in FInder but will show in disk utility, any advice?

    Hi, my card reader started to become inconsistant over the last week and it has now stopped reading cards all together. It will show up in Disk utility so i can format it etc but it just wont show in the Finder section. When i remove the card without

  • Purpose of bsscftp.txt files in WebHelp Publish result

    Could someone tell me the purpose of Purpose of bsscftp.txt files in WebHelp Publish result? Are they needed for anything but identifying which files to update? I presume I do not need to include them on the website if I am just collecting changed fi