Query of Module Purchase Order, Good Receipt PO,  Good Return

Hi,
Like to ask assistance regarding Module Purchase Order, Good Receipt PO,  Good Return under Purchasing A/P.
I have a hard time to linking the tables above:
PO Module have table : OPOR and OPOR1
GRPO have table : OPDN and PDN1
Good Return have table : ORPD and RPD1
Its very mind bubling linking this 6 tables can anyone please can assist regarding the situation, a query that shows that they are connected to each other.
Thank very much!
Clint

Clint,
Like Suda said, this query assumes your have normal business practise.
One more thing to mention, the lower part of union all needs some other change.  Here is the complete query:
SELECT     DISTINCT 'GRPO' AS TYPE, T1.DOCNUM "GRPO/RET#", T3.DOCNUM PO#,T1.CARDCODE, T1.CARDNAME , T1.DOCDATE, T0.ITEMCODE, T0.QUANTITY, T0.PRICE, T0.LINETOTAL, T0.TOTALFRGN, T0.RATE
FROM         PDN1 T0
INNER JOIN OPDN T1 ON T1.DOCENTRY = T0.DOCENTRY
LEFT JOIN POR1 T2 ON T0.BASEENTRY = T2.DOCENTRY
INNER JOIN OPOR T3 ON T2.DOCENTRY = T3.DOCENTRY
WHERE    T1.DOCNUM LIKE '[%0]'
UNION ALL
SELECT     DISTINCT 'RETR', T1.DOCNUM,T3.DOCNUM, T1.CARDCODE, T1.CARDNAME , T1.DOCDATE, T0.ITEMCODE, T0.QUANTITY, T0.PRICE, T0.LINETOTAL, T0.TOTALFRGN, T0.RATE
FROM         PDN1 T0
INNER JOIN OPDN T1 ON T1.DOCENTRY = T0.DOCENTRY
LEFT JOIN RPD1 T2 ON T0.TRGETENTRY = T2.DOCENTRY
INNER JOIN ORPD T3 ON T2.DOCENTRY = T3.DOCENTRY
WHERE    T1.DOCNUM LIKE '[%0]'

Similar Messages

  • Problem of Query of Module Purchase Order, Good Receipt PO, Good Return

    Hi,
    I would like to seek for assistance regarding double entries of documents,  I have used the query and found out lately the it has a problem, Please refer to thread "Query of Module Purchase Order, Good Receipt PO, Good Return" for details.
    You help is very much appreciated.
    Regards,
    Clint

    Hi Clint,
    Try this one:
    SELECT DISTINCT 'GRPO' AS TYPE, T1.DOCNUM
    'GRPO/RET#', T3.DOCNUM 'PO#',T1.CARDCODE,
    T1.CARDNAME , T1.DOCDATE, T0.ITEMCODE, T0.QUANTITY,
    T0.PRICE, T0.LINETOTAL
    FROM DBO.PDN1 T0
    INNER JOIN DBO.OPDN T1 ON T1.DOCENTRY = T0.DOCENTRY
    LEFT JOIN DBO.POR1 T2 ON T0.BASEENTRY = T2.DOCENTRY
    INNER JOIN DBO.OPOR T3 ON T2.DOCENTRY = T3.DOCENTRY
    WHERE T1.DOCNUM = '[%0]' AND T0.ITEMCODE IS NOT NULL
    UNION ALL
    SELECT DISTINCT 'RETR', T1.DOCNUM,T3.DOCNUM,
    T1.CARDCODE, T1.CARDNAME , T1.DOCDATE, T0.ITEMCODE,
    T0.QUANTITY, T0.PRICE, T0.LINETOTAL
    FROM PDN1 T0
    INNER JOIN OPDN T1 ON T1.DOCENTRY = T0.DOCENTRY
    LEFT JOIN RPD1 T2 ON T0.TRGETENTRY = T2.DOCENTRY
    INNER JOIN ORPD T3 ON T2.DOCENTRY = T3.DOCENTRY
    WHERE T1.DOCNUM = '[%0]' AND T0.ITEMCODE IS NOT NULL
    If you still have duplicates, let me know any differences in those lines.
    Thanks,
    Gordon

  • Purchase Order Module  - Goods Receipt PO - Goods Return - AP Invoice

    Hi all expert,
    I have a senario is :-
    Open Purchase Order Module  -> Goods Receipt PO -> Goods Return -> AP Invoice
    Puchase Product A by "Purchase Order" with Qty 6,000 After "Good Receipt PO", found out 3,500 pcs is out of spec then "Goods Returns" 3,500 pcs. Then continue do "AP Invoice" with Qty 2,500 pcs.
    Question is 1 week later, the supplier replacement back 3,500 pcs, so how am i going to start to steps? since PO have been close.
    When i at  "Goods Receipt PO" wanna to copy from "Goods Return", it is show nothing.
    Your advise is highly appreciated.
    Thanks.
    Regards,
    Danny

    Hi Danny
    i think you have to create a new PO then GRN then PI...since you copied the PO to GRN it will show as closed as there is a target doc. linked to the PO. A PO can be changed only if there is no target doc linked to it .
    Hope this helps.
    Bongani

  • How to change Purchase Order currency after Good receipt and Good issue?

    Hi,
    I've a PO created last year. The PO currency has been entered wrongly.
    My store colleague has been performed good received and consumed it.
    Now, I am not able to change PO currency to correct one, due to this message:-
    Currency can no longer be changed
    Message no. 06489
    Diagnosis
    As a basic rule, the currency cannot be changed if there has already been a goods receipt against a document.
    If the document contains external service and/or limit items, or if an invoicing plan has been assigned to an item, the currency cannot be changed following the receipt of an invoice either.
    If external service items exist, the currency also cannot be changed if services that have actually been performed have already been recorded or if the item in question has been assigned to a preventive maintenance (servicing) plan.
    Is there anyway to change PO currency after Good receipt and Good issue? Thanks !

    Diagnosis
    As a basic rule, the currency cannot be changed if there has already
    been a goods receipt against a document.
    If the document contains external service and/or limit items,
    or if an invoicing plan has been assigned to an item,
    the currency cannot be changed following the receipt of an invoice either.
    If external service items exist, the currency also cannot be changed if
    services that have actually been performed have already been recorded or
    if the item in question has been assigned to a preventive maintenance (servicing) plan.
    Answer in question itself,need to cancel all documents of wrong currency in order of LIFO,
    Create a new purchase order.

  • Purchase orders created have automatically good receipt

    hello,
    I wish that Purchase orders created have automatically good receipt. What is the manipulation to be made? Thanks for your help.

    Hi
    U have to do setting movement wise in SPRO
    Path SPRO-Material Management -Inventory Management and Physical Inventory - Good Receipts- Automatic Purchase Order Creation
    But if you want to do automatic GR receipt u have to write customised program for creation of GR ( May be check BADI - Craeation for MIGO is useful) nand run batch job for the same
    Edited by: Sanjay  Shah on Feb 8, 2010 3:28 PM

  • Purchase Requisitions, Purchase Orders and Receipts

    Hello all,
    The following is the sequence for Purchasing
    Purchase Requision -> Purchase Orders -> Receipts
    However I have a requirement to bring in the related Purchase requisions,purchase orders and receipts from 11i into R12 instance.I can do that using the open interfaces.However How do i link these 3 objects together?
    I intend to import the purchase orders first and then import its related purchase requistions and the receipts...In doing so how do i link them together.How do i know that this purchase order was created from this Purchase requistion or this receipt is meant for this purchase order? What is the joiing columns in the base/open interface tables?
    Thanks
    AJM

    Hi Venkat
    1. To perform ATP do we need all the issues(Sales Orders, Deliveries) and receipts(Purchase Requisitions, Planned Orders) in APO?
    Yes you need all the mentioned elements above in APO to do ATP check. Again, you can also extend the scope of the check to further more receipts and issues. All  depends on your configuration of scope of check.
    3. I guess in Apo the planned order and process order is a single elment. Is that Correct?
    Yes, technically a planned order can be a planned process order or a planned production order.
    regards
    Mohan Chunchu

  • Change in PO Price after goods receipts and goods issue

    Dear All,
    Happy Holidays!! Wishing you a happy and fun-filled holiday season.
    I would appreciate your input of the issue at hand. I support MM users in and Oil & Gas downstream company.
    Issue
    Purchase Orders are created using price estimates. The price of oil products fluctuates and we usually cannot get the exact price at the point of creation of the PO.
    We use Moving Average Price (MAP) for stock valuation and so the price & quantity in the PO affects the moving average price.
    We use price estimates to create the PO but when we receive the final price for the oil products from the Supplier, most times there is a significant difference between the estimated price and the final price. Usually, at this point, we have completed all goods receipts and goods issues against the PO and are unable to make changes.
    We have an issue posting the invoice because the invoice value is significantly higher than the PO value. We also have an issue with the moving average price because it is understated as a result of this.
    To reiterate, this is a summary of the issue:
    At the point if PO creation ; Quantity = 10, 000 MT Price = $650
    Later when final price is available; Quantity = 10, 000 MT Price = $715
    Any advise on how to treat this issue, please? Your assistance will be truly appreciated.
    Thanks

    Hi All
    For my client I have to map the similar requirement for material price which is subject to more than 15% fluctuation. The actual invoice price is having quite a huge difference.
    Below are my limitations within which need to give a solution.
    PO is subject to release strategy and Material is delivered over a longer duration of time. Hence there is problem to de-Release the PO everytime price is changed.
    Since differnce is so huge, the same can not be settled during the MIRO.
    Down Payments has to be posted hence PO has to be created with estimated base price.
    Please suggest me suitable alternative options which will require no changes in PO and the price change also can be accomodated during the MIRO for  Multiple goods receipts.

  • Goods receipts and Goods returns against PO

    Hello gurus
    Good day to you. please find my requirement below
    1. i am get ting GR against PO data from legacy system and i need to post Good receipts or Goods retruns documents (ie based on the quantity recieved, if it is +ve value for quantity then post goods receipt against PO and if it is -ve value for quantity then post goods returns against PO) in SAP by using PI as middleware.
    2. IDOC provided is MBGMCR03 and message type is MGBMCR.
    So now my question is based on the received quantity i have to change the movement type as 101 and 102 respectively in idoc mapping of PI but i want to know how can i do that. i am little  confused about the usage of the idoc type provided in mapping like how can create IDOC with goods receipt or goods return based on the received quantity.
    I request you to please let me know the process to follow. can i use only one idoc provided for mapping and can i do this task in only one interface, please clarify. if i can use the idoc provided and if i can do this task in one interface (ie legacy - PI - SAP), please let me know the steps which i need to follow to complete my scernario successfully.
    Thanks and Regards
    Raj

    Hi,
    >>>i am little confused about the usage of the idoc type provided in mapping like how can create IDOC with goods receipt or goods return based on the received quantity.
    you cna use function substring (from standard graphical message mapping)
    and use it to check the first char of the quantity
    if it's - then map 102 to the MOVE_TYPE field of the idoc
    if not then map 101...
    I never worked with 102 with MBGMCR but 101 against a PO works for 100%
    Regards,
    Michal Krawczyk

  • Goods Receipt and Goods Return entries shows as Zero in PO history.

    Dear All,
    The Goods Receipt and Goods Return entries are showing as "Zero" in Delivery Cost Quantity, Amt. in local currency fields in PO History (T.Code: ME23N)
    What could be the reason?   How to find out the error?
    Expectiing valuable guidelines from the forum.
    Thanks in Advance.
    GB

    Hi
    Not ticked.
    GB

  • User Exit for MIGO (goods receipt and goods issue)

    Hi all ,
    When i create a cross company goods receipt or goods issue through MIGO,I need to add another line item to the accounting documents posted with the sales tax calculated.For this i need to use a user exit which adds another line item.
    Can someone suggest me the user exit which i need to use ?
    any input would be of great help.
    Thanks,
    nsp.

    Hi
    Available exits for MIGO are
    Transaction Code - MIGO                     Goods Movement
    Exit Name           Description
    MBCF0002            Customer function exit: Segment text in material doc. item
    MBCF0005            Material document item for goods receipt/issue slip
    MBCF0006            Customer function for WBS element
    MBCF0007            Customer function exit: Updating a reservation
    MBCF0009            Filling the storage location field
    MBCF0010            Customer exit: Create reservation BAPI_RESERVATION_CREATE1
    MBCF0011            Read from RESB and RKPF for print list in  MB26
    MB_CF001            Customer Function Exit in the Case of Updating a Mat. Doc.
    No of Exits:          8
    You would hav to search through these.
    Hope this helps to solve ur problem....
    <b>do reward if useful....</b>
    regards
    dinesh

  • List of purchase orders is empty on Goods Receipt PO

    Hi,
    a user can't see the purchase order lists (empty result) when he clicks the "copy from" button on Good Receipt PO, although he just added several new purchase orders (hence they are still open). The weird thing is, another user with the same authorizations (I copied the authorizations) can see the results.
    Does anyone know why? Is there any setup or permission I should be aware of?
    Thanks!!
    Andre

    Hi,
    Did the user fill out the BP details? You will see the PO's only after choosing a supplier.
    Regards,
    Nat

  • Purchase Order not converting to Goods Receipt Purchase

    Since we've upgrade to SAP Business One 8.8 PL12, we are not able to "Copy" Purchase orders to Goods Receipt PO.  When we try to do this, we get the following error:
    [Microsoft] [SQL Native Client] [SQL Server] Update or insert of view or function u2018OSRIu2019 failed  because it contains a derived or constant field. (CINF)
    This is even for Non-Serialized Items.
    Is there any one with a solution for this?

    Check the following SAP Note:
    https://websmp230.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/smb_searchnotes/display.htm?note_langu=E&note_numm=0001468209

  • Last goods receipt, last goods issue and last purchase order

    Hi Experts!!
    is there any table/info structure where I have the last goods receipt material document number, last goods issue material document number and last purchase order number? I want to extract this information to Business Warehouse.
    Best regards

    Are you looking for a report similar to MB51?
    If you put little more detail, i might be able to help. I don't know much about info structures but i can tell you the SAP tables.
    All Movement Details are in the below tables.
    MKPF- Material Document Header,
    MSEG - Material Document Detail -( you can put your material, plant for selection)
    Last PO  - you can get it from Info-record (EINE- EBELN, EINE-EBELP).
    Thanks,
    Shekhar Ramineni

  • Incoming purchase order  vs out bound goods receipt processing

    Hi
    any body know how to develop an interface for below requrement
    creating an interface for incoming purchase order creation and out bound goods receipt processing
    please let me know anybody knows this
    Thanks in advance,
    Best regards
    Alleiah

    I done Purchase order inbound ...
    you have to set up partner profile at we20 like message type,idoc type,port..
    Message type : orders
    idoc type : orders05,once you done it creates the purchase order,for testing you can use we19 ,enter data manually and you can see the status at we02 or we05 transaction
    Reward Points if it is helpful
    Thanks
    Seshu

  • IDOC Types for Purchase Orders, Vendor Master and Goods Receipt

    Hello All,
    Can any have idea about the IDOC Types that can be used for triggering when the actions creation/change/deletion on Purchase Orders or Vendor Master or Goods Receipt is performed?
    Please let me know the names of IDOC Type, Process Codes, message type... and all the other required information...
    Thanks in Advance,
    Kumar.

    Hello Ferry,
    Thanks again for the IDOC Types. I have another question. Can we use those IDOC types for creating/changing/deletion of Purchase orders or Vendor Master or Goods Receipt happens? I mean can we configure in such a way that when ever there is a change or deletion of PO or VM or GR happens?
    I have got to know about the IDOC PORDCH01 which can be used for Purchase Order. Can u suggest me which can be used for PO's?
    Regards,
    Phani.
    Message was edited by:
            Sivapuram Phani Kumar

Maybe you are looking for

  • CD/DVD Drive Not Recognized

    I have a Dell Laptop with Vista. After installing iTunes the CD/DVD drive is no longer recognized by the computor. I have to remove the upper filter for the CD/DVD drive using 'regedit', reboot the computor and the drive is recognized again. But, iTu

  • Can't get layers in After Effects

    http://www.youtube.com/watch?v=JbuXctVWKqg I posted a link to show my problem. Basically I had an EPS file from a designer that had the logo in it. I tried to import these into photoshop to touch up the layers but it always imported as a flat image.

  • Is there a way to change a 480 video to 720?

    I have  video footage of an old home movie at 640x480. Is there any way to convert that to 720 so it won't look so pixalated with the rest of my HD project? Thanks. Peter

  • Flipbook.h in Shake 4.1

    I am trying to customize the flipbook to open RV but unlike earlier versions shake 4.1 doesnt seem to have flipbook.h I was wondering if anybody could point me to the file with the code for flipbook on shake's ui. -James Oh, running CentOS5

  • Several photo applications won't work

    I upgraded from Leopard to 10.6.6 on my 2007 MacPro the other day, just after adding an ATI Radeon 5770 graphics card to feed an Apple 27" LED Cinema Display. Everything seemed to work fine until I tried running some photo and printing apps. Then I d