Purchase documents query

Dear all
I have a query from a user who wants to extract LPOs against GRNs and INVOICES
I have tried using the query generator to produce the list but to no avail, I get memory loss errors. Is there anybody out there who has had a similar query? .
Thanks

Hi David,
Try this,
SELECT  T0.DocNum as 'PO. No.',
T0.DocDate as 'PO. Date',
T2.DocNum AS 'GRN.Doc.No.',
T2.DocDate AS 'GRN Date',
M.DocNum as 'A/P Invoice No.',
M.DocDate as 'Inv. Date',
M.CardName as 'Vendor Name',
M.NumAtCard as 'Bill No. & Date',
ISNULL(L.ItemCode,'Service Item') as 'Item Code',
L.Dscription,
L.Quantity,
M.DocTotal as 'Total (Rs.)'
FROM OPOR T0 INNER JOIN POR1 T1 ON T0.DocEntry = T1.DocEntry
INNER JOIN OPDN T2 ON T2.DocEntry = T1.TrgetEntry
INNER JOIN PDN1 T3 on T3.DocEntry = T2.Docentry
INNER JOIN OPCH M ON M.DocEntry = T3.TrgetEntry
LEFT OUTER JOIN PCH1 L on L.DocEntry=M.DocEntry
WHERE M.DocDate >= '[%0]' AND M.DocDate <= '[%1]'
GROUP BY
T0.DocNum,T0.DocDate,T2.DocNum,T2.DocDate,M.DocNum,M.DocDate,M.CardName,
M.NumAtCard,L.ItemCode,L.Dscription,L.Quantity,
M.DocEntry,M.[DiscSum],M.DocTotal
ORDER BY
T0.DocNum,T0.DocDate,T2.DocNum,T2.DocDate,M.DocNum,M.DocDate,M.CardName,
M.NumAtCard,L.ItemCode,L.Dscription,L.Quantity,M.DocEntry,M.[DiscSum],M.DocTotal
IF you want more details. Check the below thread, you will be get some idea or solution.
Re: Sales Order Status
Regards,
Madhan.

Similar Messages

  • Query for Purchase Document

    Hello
    I am doing a Query. I need to add this field with the complete name of the person who did a Purchase document order.
    I found this field with this information througt transacction SU01.
    Full Name of Person
    ADDR3_DATA
    NAME_TEXT
    That field contains the information that I need. But the problem is, this table in not allowed to be used as a join table.
    I have been looking with the tables conected to this field but they do not load the data that I need.
    If someone know something about it,

    Irma, como estás?
                                  Probá con la tabla USER_ADDR o la USR03.
    Saludos

  • Purchase Document not appearing on GL Line item report

    Hi gurus: Please help me figure out why even though I have activated the purchase document field in the field status group I still cannot see it in the line item reports when I run FBL3n. Note the purchase document field is showing up as a field for selection but it comes thru blank.
    Please help me
    thanks
    Brian

    i wanted to get the same output, it doesnt work for some reason. I had to craete a query to achieve this

  • Building a multiprovider to join Requisition Number and Purchasing Document

    Hi,
    I've built a multiprovider that is made up of two ODS's.  ODS #1 has the Requisition Number and ODS #2 has the Purchasing Document Number along with other info objects that I need for my query.  When I execute my query, the Requistion Number field populates with "#" but all the other fields are fine.  I know requistion numbers exist for these PO's but they are not displaying.  Does anyone know what I'm doing wrong?
    Thank you for your help!

    Hi,
    Check whether the requistion number is filled in the ODS or not. Secondly, check the identification for this by going in the Cube and hitting the "IDENTIFICATION" pushbutton.
    Hope this helps..
    PB

  • FAGLB03 - cannot display asset no and purchasing document

    When I used FAGLB03 to view balance (G/L account group is "Assets accounts") and drill into details, then I go to change layout and choose asset, purchasing document fields.
    I find that the report cannot diaplay asset no and purchasing document value (all value is empty, but I can see asset no and purchasing at fi doc line item by T-Code FB03).
    Please advice any solution.
    Thanks!
    Edited by: Eric Yang on Jan 30, 2008 11:40 AM

    Hi,
    Thanks for your reply,
    But I can find asset no, purchase order no and Internal order no In T-Code FB03 display document line item for account type "ASSETS ACCOUNTS".
    Beside, I use se11 to query table bseg for fi document, if account type = 'A', I can find asset no in fields ANLN1, ANLN2 and purchasing no in fields EBELN, EBELP.

  • User exit MM06E005 - Customer fields in purchasing document

    Hi,
    I am using user exit MM06E005 - Customer fields in purchasing document to validate the line items in PO and display the value at header level.
    My requirement is when the user enters the line items and press enter the validated value should get populated at header level.I had included a tab (customer tab) in that the value should get displayed.
    likewise for each and every line items the value should keep on changing.
    And
    I the field that i had added at header shows the value during the save but once we come out and enter again,it is not displaying the same.
    Regards
    Manoj

    Hi,
    Indeed the exit which you have specified MM06E005 comprises the enhancement for customizing fields and screens associated with it. may be you might not have activated the screen associated with the exit. the screen might have been created but missed while activating.
    Regards,
    Jagath

  • MM06E005 - Customer fields in purchasing document

    Hi,
    I am using user exit MM06E005 - Customer fields in purchasing document to validate the line items in PO and display the value at header level.
    My requirement is when the user enters the line items and press enter the validated value should get populated at header level.I had included a  tab (customer tab) in that the value should get displayed.
    likewise for each and every line items the value should keep on changing.
    And
    I the field that i had added at header shows the value during the save but once we come out and enter again,it is not displaying the same.
    Regards
    Manoj

    got my solution...

  • Report for MRP controller and relevant purchasing document

    HI
    My requirement :We have MRP controller for different diciplines(mech, electrical, Instrumentation.......ect).
    I want to search for a report Where it display me the Purchasing document(PO) number by respective decipline.
    I tried all the report in MRP controller such as MC.E, MC.D, COOIS.........ect
    Thanks in advance
    Mujeeb

    Hi Mangalraj
    Thanks for your answer, but my question is not yet answered.
    As you told i did follow accordingly.
    When i enter the T.code: ME5A ( i can not find the scope of list ALV but did find the entried as below)
    A     3-line + n special
    B     2-line + n special
    B1     2-line + 2 MRP list
    B2     2-line + 2 stock/rq.
    B3     2-line + 2 purch.dt.
    C     1-line
    C1     1-line + stock/rqts.
    D     
    F     Collective release
    G     3-line loop
    H     2-line loop
    I     1-line loop
    If i select "C" from the list i'm getting 1 line display but as you told i did press the CTRL+F8 but unable to get the cost) it does not work at all like dat.
    I'm using the system version 4.6C. Can you please suggest something on the report.
    Thanks & regards,
    Mujeeb

  • Accounting Document number from Purchasing Document Number

    Hi Gurus,
    My Requirement is that i have a Purchasing Document number (EBELN) and i need Accounting Document Number( BELNR_D)  so that i can get the Amount in Document Currency (WRBTR) for that document .

    Hi,
    Check table EKBE.

  • No value in Purchasing Document field in FBL1N Transaction

    Hi All,
    While executing a report RFITEMAP (Transaction FBL1N), Purchasing Document field is blank while I can see the corresponding Purchasing Document in BSEG table. I have a requirement to show the same in the output. Do we have some settings or ABAP code changes to achieve it?
    Any kind of input would be helpful to me.
    Rgds,
    Khanshi

    Hi,
       Please read note 152335
    You can achieve it via OSS note 112312, but you need to program the BTE as per your business requirements, as stated in the note there is no standard functionality for this.
    You may refer to the following wiki page, it has an example, but in the example, another field was used, maybe it can be useful for you.
    http://wiki.sdn.sap.com/wiki/x/fg3cCw
    regards
    Waman

  • Error while creating purchasing documents

    Hi,
    Iam a new user to Material Management unable to create any Purchasing docments (PR,RFQ,P.o..etc).
    As Iam trying to procure a material for stock, selected the Accountassignment as Unknown.
    got following two errors
    1.Unknown account assignment not defined for use here
    2.Source not included in list despite sorce list requirement
    pls suggest me something to avoid these errors and create P.Os.
    Thanks

    Hi,
    I got some clue ,
    1. As I have specified it is a stock material, It should not ask for any account assignment.
    It is asking because I have not updated the material quantity,value updations in IMG settings for the material type
    2.The issue was I have checked the source list for plant in the sorce list configuration settings (SPRO> Materials management>Purchasing>Sourcelist>Define source list requirement at plant level)
    And I have not maintained the source list.
    If you check the above setting, you need to maintain source list for the material
    As you specified I have checked the configuration for combination item category-account assignment for item category that was used when creating purchasing document.
    for standard itemcategory,unknown account assignment type has been defined.
    Now I could able to create P.Os for stock material by updating qty,value updation in material type, and if I don't update this, and use account assingment as unknown I'm getting the saemerror as "unknown account assignment not defind for use here"
    pls let me know how to avoid this error, hep me what are the required settings for making a P.O for accountassignment categories
    Thanks

  • Error "Account assignment 00 for  purchase document does not exist " when u

    Hai,
    I am encountering the following problem when posting a PO based Invoice using BAPI_INCOMINGINVOICE_CREATE.
    The error says " account assignment 00 for purchasing document does not exist".
    The scenario is very simple.  I need to raise an Invoice against a PO. the PO has a single line item of quantity 10 net price 10.  Tax code is U2 ( 7% tax).
    I am passing the following at header level.
    Invoice_indicator ( as 'X'),company code,doc date , posting date, gross amount (107, currency USD, calc tax indicator as 'X'.
    At line item i am passing Invoice document item 000001, po number , po item number, tax code(U2) item amount (100),
    Does this error has got any thing to relate configuration matters?
    Regards,
    Upender

    Hi Upender,
    In some cases, depending on the type of PO / Posting,
    you might have to populate the accounting data itab and pass in the BAPI parameter.
    you can select the accounting data from EKKN for the PO.
    Again it depends on the PO category, wether you need to populate Qty & Unit in accounting data.
    Further, the accounting data should be exactly the same as there in EKKN ( all the fields except Qty & Unit ).
    Thanks,
    Ram

  • How to block one of the purchasing document types for certain period

    My client asked me to block the one of the purchase order documents for certain period.In what way i can do it? and also it shouldn't be displayed in the purchase documents list when we do me21n?
    Advanced thanks,
    Sateesh

    Hi Sateesh,
    Here u cann't block the Document type,
    U can do this,only the way to delete that document type for certain peroid.
    Thanks & Regards
    Suresh
    > My client asked me to block the one of the purchase
    > order documents for certain period.In what way i can
    > do it? and also it shouldn't be displayed in the
    > purchase documents list when we do me21n?
    >
    > Advanced thanks,
    > Sateesh

  • Purchase register query based on down payment invoice

    Hai All,
    I am creating an invoice based on purchase order.The vat  tax is being calculated in the downpayment. I want the vat to be displayed in the downpayment invoice as well as the a/p invoice but i m not getting it in the a/p invoice. Pls guide me with the linking of tables to get the query working. I have formatted the fields req but could not link the tables...Pls guide me with that...
    Thanks & Regards,
    Neela

    Hi Neela,
    Check the thread.
    Re: Purchase register query based on down payment invoice
    FROM PCH1 T0
    INNER JOIN OPCH T1 ON T0.DocEntry = T1.DocEntry
    INNER JOIN OSLP T2 ON T0.SlpCode = T2.SlpCode
    LEFT OUTER JOIN PCH12 T3 ON T1.DocEntry = T3.DocEntry
    LEFT JOIN ODPI T4 ON T1.CardCode = T4.CardCode
    INNER JOIN DPO1 T5 ON T0.ItemCode = T5.ItemCode
    Close the thread, if issue solved.
    Regards,
    Madhan.

  • PR Mandatory in creation of Purchasing Document

    Hi All,
    I need your help in order to create purchasing document is mandatory with PR reference . I have done in config "Define Function Authorizations for Buyers" for all Purchasing Document such as PO, Contract and RFQ then assign them in SU01 for parameter EFB, however, only PO works others do not affect. Is there any parameters besides EFB shold be set in parameter? Thanks.
    Best regards,
    Mahnansa

    Hi,
    GOTO Authorization Buyer... tcode OMET(Function Authorization)
    then New entry
    give any name say 11 & PO from PR only
    then at the top in General parameters,in that fiels selection choose----->
    NBF
    then in possible reference objects----> Choose Ref to PR
    save
    then
    T code SU3, or system-> user profile-> Own data
    click parameter
    in parameter ID, give EFb, then
    In parameter value give 11,just wat u save in OMET,
    save.
    Now me21n
    try to create manually, it will throw error, as not possible to create PO
    without reference doc (PR).
    Regards
    KK

Maybe you are looking for

  • Created a PDF form on a PC, need save as button to work on Mac

    I have created a lovely fillable PDF form for my boss as a client would like to be able to have a rather large interactive PDF document, and the deciding factor on if we get this work is whether i can get this to work so i'm hoping you lovely people

  • How to integrate a SSO based in cookie with ADF Security

    At work they asked me to integrate a existing SSO based in cookie with the new ADF + Jdeveloper 11g + WLS. After google for days and read a lot of blogs and official documentation I've made a custom LoginModule. I made it very simple, it's just an "i

  • Google search no longer working

    Google search stopped working this morning. Curios thing is, when select images, the images are returned, and then when you click back to search, the search results are displayed for that search. Tried safe mode and same behaviour resulted in no sear

  • Short cut key!!!help

    I have a menu like File --> Open, Exit. I want to set the Exit menuitem to have a short cut key like 'ctrl-x'. How can I do that?? I'm using JMenu as the menu bar. Thank you.

  • GRNI A/C

    Dear Friends, We are not able to cleared some of those documents in GRNI A/C. Pls help me. But we think that the 2 original exposed situations were not considered  in the response that you sent us In few words -The main issue is that the system is n