Need Query to find Pending Quantity for Receipts

Hi all,
Can any one please help me in finding the pending quantity for a particular Receipt.
ex. If a receipt has
transaction_type Quantity
Receive 15
Accept 5
Deliver 5
then my accepted quantity should be (Receive-Deliver) = 10
I have written a query
SELECT RSH.RECEIPT_NUM RECEIPT_NUM, RSH.CREATION_DATE CREATION_DATE, RT.TRANSACTION_TYPE TRANSACTION_TYPE, NVL(RT.QUANTITY, 0) QUANTITY,rt.destination_type_code destination_type_code,
               RT.UNIT_OF_MEASURE UNIT_OF_MEASURE, RSL.ITEM_DESCRIPTION ITEM_DESCRIPTION, NVL(RT.PO_UNIT_PRICE, 0) PO_UNIT_PRICE,
               RT.CURRENCY_CODE CURRENCY_CODE, NVL(RT.CURRENCY_CONVERSION_RATE,0) RATE, RSL.SHIPMENT_LINE_ID SHIPMENT_LINE_ID,
               NVL(RT.QUANTITY * RT.PO_UNIT_PRICE * RT.CURRENCY_CONVERSION_RATE ,0) VALUE               
     FROM RCV_TRANSACTIONS RT, RCV_SHIPMENT_HEADERS RSH, RCV_SHIPMENT_LINES RSL, PO_VENDORS POV, PO_VENDOR_SITES POVS,
          ORG_ORGANIZATION_DEFINITIONS ORG, HR_LOCATIONS_ALL_TL HRL, PO_LOOKUP_CODES PLC,
          RCV_SUPPLY RS
     WHERE RSH.SHIPMENT_HEADER_ID = RT.SHIPMENT_HEADER_ID
          AND RSH.SHIPMENT_HEADER_ID = RSL.SHIPMENT_HEADER_ID
          AND RSH.RECEIPT_NUM IS NOT NULL
          AND POV.VENDOR_ID (+) = RSH.VENDOR_ID
          AND POVS.VENDOR_SITE_ID (+) = RSH.VENDOR_SITE_ID
          AND HRL.LOCATION_ID (+) = RSH.SHIP_TO_LOCATION_ID AND HRL.LANGUAGE(+) = USERENV('LANG')
          AND ORG.ORGANIZATION_ID (+) = RSH.ORGANIZATION_ID AND RSH.RECEIPT_SOURCE_CODE = PLC.LOOKUP_CODE
          AND PLC.LOOKUP_TYPE = 'SHIPMENT SOURCE TYPE'
          AND RS.RCV_TRANSACTION_ID = RT.TRANSACTION_ID
          AND RT.SHIPMENT_LINE_ID = RSL.SHIPMENT_LINE_ID
          AND RT.TRANSACTION_TYPE IN ('RECEIVE','TRANSFER')
     ORDER BY 1
I want want the pending quantity...
Please help

You can get the quantities in po line locations, then you can find the balance quantity to be received.
you can get the following from po line locations.
quantity
quantity_received
quantiy_accepted
quantity_rejected
quantity_billed
quantity_cancelled
--Prasanth                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Similar Messages

  • Pending Quantity for Receipts

    Hi all,
    I am trying to create a report in Receivables which tracks the Receipts having Pending Quantity i.e, Quantity_Received - Quantity_Accepted = Quantity_not_Inspected.
    Can anyone tell me weather any standard oracle report is there for reference.
    Thanks in advance.

    Hi Ketter,
    Can u please send me the Query.
    I have used this Query....
    SELECT A.RECEIPT_NUM, A.ITEM_DESCRIPTION, A.CREATION_DATE, A.TRANSACTION_TYPE, NVL(A.QUANTITY,0) QTY_RECD,
    NVL(B.TRANSACTION_TYPE,'IN RECEIVING') TRANSACTION_TYPE,
         NVL(B.QUANTITY,0) QTY_ACPTED, ABS(NVL(A.QUANTITY,0)-NVL(B.QUANTITY,0)) QTY_NOT_INSP, A.UNIT_OF_MEASURE, NVL(A.PO_UNIT_PRICE,0) PO_UNIT_PRICE,
         A.CURRENCY_CODE, NVL(A.RATE,0) RATE, NVL(A.VALUE,0) VALUE
    FROM
         (SELECT RSH.RECEIPT_NUM RECEIPT_NUM, RSL.ITEM_DESCRIPTION ITEM_DESCRIPTION, RT.SHIPMENT_LINE_ID SHIPMENT_LINE_ID,
    RSH.CREATION_DATE CREATION_DATE,
         NVL(RSL.QUANTITY_RECEIVED, 0) QUANTITY, RT.UNIT_OF_MEASURE UNIT_OF_MEASURE, NVL(RT.PO_UNIT_PRICE, 0) PO_UNIT_PRICE,
    RT.CURRENCY_CODE CURRENCY_CODE,
         NVL(RT.CURRENCY_CONVERSION_RATE,0) RATE, NVL(RSL.QUANTITY_RECEIVED * RT.PO_UNIT_PRICE * RT.CURRENCY_CONVERSION_RATE ,0) VALUE,
         RT.TRANSACTION_TYPE TRANSACTION_TYPE
         FROM RCV_TRANSACTIONS RT, RCV_SHIPMENT_HEADERS RSH , RCV_SHIPMENT_LINES RSL, RCV_SUPPLY RS
         WHERE RSH.SHIPMENT_HEADER_ID = RT.SHIPMENT_HEADER_ID
              AND RSH.RECEIPT_NUM IS NOT NULL
              AND RSL.SHIPMENT_LINE_ID = RT.SHIPMENT_LINE_ID
    AND RS.RCV_TRANSACTION_ID = RT.TRANSACTION_ID
    --          AND RSH.RECEIPT_NUM BETWEEN :P_FROM_RECEIPT_NUM AND :P_TO_RECEIPT_NUM
    --          AND RSH.CREATION_DATE BETWEEN :P_FROM_DATE AND :P_TO_DATE
    &LP_DATE
    &LP_RECEIPT_NUM
    -- &LP_ORG_ID
              AND RT.ORGANIZATION_ID LIKE DECODE( :P_ORG_ID, NULL, '%', :P_ORG_ID)
              AND RT.TRANSACTION_TYPE NOT IN ('ACCEPT', 'DELIVER','REJECT' )     
         ORDER BY 1) A,
         (SELECT RSH.RECEIPT_NUM RECEIPT_NUM, RSL.ITEM_DESCRIPTION ITEM_DESCRIPTION, RT.SHIPMENT_LINE_ID SHIPMENT_LINE_ID,
    RSH.CREATION_DATE CREATION_DATE, NVL(RSL.QUANTITY_RECEIVED, 0) QUANTITY,
                   RT.UNIT_OF_MEASURE UNIT_OF_MEASURE, NVL(RT.PO_UNIT_PRICE, 0) PO_UNIT_PRICE, RT.CURRENCY_CODE CURRENCY_CODE,
                   NVL(RT.CURRENCY_CONVERSION_RATE,0) RATE, NVL(RSL.QUANTITY_RECEIVED * RT.PO_UNIT_PRICE * RT.CURRENCY_CONVERSION_RATE ,0) VALUE,
                   RT.TRANSACTION_TYPE TRANSACTION_TYPE
         FROM RCV_TRANSACTIONS RT, RCV_SHIPMENT_HEADERS RSH , RCV_SHIPMENT_LINES RSL, RCV_SUPPLY RS
         WHERE RSH.SHIPMENT_HEADER_ID = RT.SHIPMENT_HEADER_ID
              AND RSH.RECEIPT_NUM IS NOT NULL
              AND RSL.SHIPMENT_LINE_ID = RT.SHIPMENT_LINE_ID
    AND RS.RCV_TRANSACTION_ID = RT.TRANSACTION_ID
    --          AND RSH.RECEIPT_NUM BETWEEN :P_FROM_RECEIPT_NUM AND :P_TO_RECEIPT_NUM
    --          AND RSH.CREATION_DATE BETWEEN :P_FROM_DATE AND :P_TO_DATE
    &LP_DATE
    &LP_RECEIPT_NUM
    -- &LP_ORG_ID
              AND RT.ORGANIZATION_ID LIKE DECODE( :P_ORG_ID, NULL, '%', :P_ORG_ID)
              AND RT.TRANSACTION_TYPE NOT IN ('ACCEPT', 'RECEIVE','REJECT','TRANSFER')
         ORDER BY 1) B
    WHERE A.SHIPMENT_LINE_ID = B.SHIPMENT_LINE_ID(+)
    AND ABS(NVL(A.QUANTITY,0)-NVL(B.QUANTITY,0))>0
    ORDER BY 1
    Regards,
    NRK

  • In which table,i could find order quantity for sales order..??

    In which table, i could find order quantity for sales order..??
    and also in which table i could find delivery for sales order..
    need help..??
    Moderator message: please search.
    Edited by: Thomas Zloch on Feb 23, 2012

    Check the table AUFM.
    Give the order number in AUFNR.
    For movement type 261 (GI) & 101 (GR), you can get the material document number (MBLNR), Material (MATNR), Qty (MENGE) & UoM (MEINS).

  • Sql query to find the balances for a customer account wise.

    Hi,
    Could someone help me with the sql query to find the balances for each customer account wise. This is need to generate the report.
    presently we are using this query, but the output doesnot return the expected result.
    SELECT sum(nvl(ps.acctd_amount_due_remaining,0)) "Balance"
    FROM      ra_cust_trx_line_gl_dist_all gld,
              gl_code_combinations c,
              ar_payment_schedules_all ps,
              RA_CUSTOMER_TRX_ALL rat,
              ra_customers rc
    WHERE      c.CHART_OF_ACCOUNTS_ID = 101
    and gld.code_combination_id = c.code_combination_id
         and rat.CUSTOMER_TRX_ID=gld.CUSTOMER_TRX_ID
         and rat.CUSTOMER_TRX_ID=ps.CUSTOMER_TRX_ID
    and ps.customer_id=rc.customer_id
         and ps.status='OP'
         and ps.gl_date <= :PDATE
         and ps.org_id=:PORGID
         and ps.class in ('GUAR','INV','DM','DEP')
    and c.SEGMENT4=:Account_id
    and ps.customer_id=:Customer_id
    Thanks in advance.
    Kalyan.

    Can someone help us with this.

  • Need query to find rows

    hi
    i need query to find out for one perticular row from parent table ,,which references how many rows in how many child tables , and child to child tables. in herirachy fashion.
    if anybody know please help me

    I guess it would be difficult to come up with a generic script to get answer that can help in all situations...you have to see the table definitions in your schema and try...like in case of emp and dept table,
    select * from dept where deptno in
    (select deptno,count(*) from emp group by deptno having count(*)>1)
    (this gives rows from dept table where , for corresponding deptno there are more than one rows in emp table).
    Thanks
    Nirav

  • Correlated query to find cheapest manufacturer for a product

    Hi,
    I have a SQL Query that returns me:
    - the "product code" i must purchase,
    - the "quantity" to purchase for this product
    - and if it's in "promotion or not".
    Based on this result, i must to look at "manufacturer" table and find the cheapest "price" for each product to purchase and the quantity available at the manufacturer.
    If "quantity to order" (e.g. 20) is higher than "quantity available" (e.g. 12) at "cheapest manufacturer", i must order the missing quantity (8) to the next cheapest manufacturer.
    How can i do that ?
    thx

    ​Hi
    >>correlated query to find cheapest manufacturer for a product
    I have created two table [ProdTable] , [Product Code] to get the cheapeast manufacturer  for a product  which you can refer to .
    [Product Table]
    [Prod Table]
    select [ProdTable].[S_Prod_Code],Min([ProdTable].[Prod_Cost]) as MiniCost
    from [ProdTable] inner join [Product Table] on [ProdTable].[S_Prod_Code]=[Product Table].[Product Code]
    Where [Product Table].[Promotion]<>"YES"
    group by [ProdTable].[S_Prod_Code]
    Using the above query ,you can get the cheapest  cheapeast manufacturer  for a product , which the promotion is not YES
    >>for promotional products, i must firstly check if the cheapest manufacturer has enough prod in stock. If not, i order all the prod in stock the manufacturer has, and i must order to missing ones to the next cheapest manufacturer
    Are you looking for a select query or an update to the table or form design ?Can you separate your business rules with the technolege ?  So more people could understand your issues well to give you more help.
    Thanks for your understanding
    Best Regards
    Lan
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Sql query to find all contacts for an account

    I wonder if someone wrote an sql query to find all contacts for an account number in Oracle customer master. We are on EBS 11.5.10.
    I am also looking for sql query to find all ship to addresses for an account number.
    Thanks.

    Can you also post the query for people who read this post and are also looking for an answer?
    Regards,
    Johan Louwers.

  • Query to find pending concurrent requests

    Hi All,
    Please provide query to find pending concurrent requests?
    Thanks & Regards
    Tharun

    Hi,
    Check this
    select COUNT (distinct cwr.request_id) Peding_Requests FROM apps.fnd_concurrent_worker_requests cwr, apps.fnd_concurrent_queues_tl cq, apps.fnd_user fu WHERE (cwr.phase_code = 'P' OR cwr.phase_code = 'R') AND cwr.hold_flag != 'Y' AND cwr.requested_start_date <= SYSDATE AND cwr.concurrent_queue_id = cq.concurrent_queue_id AND cwr.queue_application_id = cq.application_id and cq.LANGUAGE='US'
    AND cwr.requested_by = fu.user_id and cq.user_concurrent_queue_name
    in ( select unique user_concurrent_queue_name from apps.fnd_concurrent_queues_tl);
    http://4uappsdba.wordpress.com/2011/11/19/sql-to-find-pending-concurrent-requests/
    Regards
    Sri

  • Need query to find out whether exactly 2 columns are used in any index ?

    Suppose i have two columns ID and Status (or any number of columns ) belongs to table customer...
    Now I want to create below index
    Ex. create index test1 on customer (ID , Status )
    But before creating this index i want to check that whether there is already index on these 2 columns ? May be by other name ?
    Need query for this.
    Plz help.

    Hi Shubhangi,
    Your requirement is very difficult to fulfill , i have made an attempt to replicate your reqrmnt & write a query wherein you need to compromise on few things , let us see if it works for you
    Supply table_name/owner & Number of column on which you want to find indexes
    e.g.
    select distinct INDEX_NAME,column_name
    from dba_ind_columns
    where index_name in (select distinct index_name
    from dba_ind_columns
    where table_name='&table_name'
    and table_owner='&owner'
    having count(column_name)=&column_count group by index_name);
    Enter value for table_name: ADDRESS
    Enter value for owner: ASAP
    Enter value for column_count: 2
    INDEX_NAME COLUMN_NAME
    FKIDX_AD__SF_ST_FO SF_STRUC_FORMAT_NM
    FKIDX_AD__SF_ST_FO SF_TYPE_NM
    SQL> /
    Enter value for table_name: ADDRESS
    Enter value for owner: ASAP
    Enter value for column_count: 3
    INDEX_NAME COLUMN_NAME
    FKIDX_AD__SF_ST_FO_1 POSTAL_CD
    FKIDX_AD__SF_ST_FO_1 SF_STRUC_FORMAT_NM
    FKIDX_AD__SF_ST_FO_1 SF_TYPE_NM
    Thanks,
    Ajay More
    http://moreajays.blogspot.com

  • Query to find supervisor_id hierarchy for a person

    Hi,
    I have a requirement, where i have to find the supervisor id hierarchy (bottom up) for a person. I am using below query to get it.
    SELECT LEVEL ,LPAD ( ' ', 7 (LEVEL-1)) || paaf.person_id AS person_id*
    FROM   per_all_assignments_f paaf
    WHERE sysdate between paaf.effective_start_date and paaf.effective_end_date
    START WITH paaf.person_id=2338
    CONNECT BY PRIOR paaf.supervisor_id  =  paaf.person_id
    Above query is returning the follwing results as i expected.
    1 2338
    2 2212
    3 2105
    Here, for 2338 supervisors is------> 2212 supervisor is -----------> 2105
    Now, my requirement is, for each person i have to find the direct reporteee list in separate column.
    for 2338, need to find direct reportees--------> for 2212, find direct reportees--------> for 2105, find direct reportees in separte column
    Note: I am developing a reporting to display the results like above.
    Any help is appreciated.
    Thanks in advance.

    Please use the below query it may help you get the employee & supervisor
    SELECT ROWNUM
    , pax.supervisor_id
    , pax.person_id
    , ppx.employee_number
    , mgx.employee_number supervisor_staff_number
    , REPLACE (ppx.full_name, '''', ' ') full_name
    , REPLACE (mgx.full_name, '''', ' ') supervisor_full_name
    , pj.NAME job_name
    , LEVEL
    FROM per_assignments_x pax
    , per_people_x ppx
    , per_people_x mgx
    , per_jobs pj
    WHERE ppx.person_id = pax.person_id
    AND ppx.current_employee_flag = 'Y'
    AND mgx.person_id = pax.supervisor_id
    AND pj.job_id = pax.job_id
    START WITH ppx.employee_number = :p_emp_num
    CONNECT BY NOCYCLE PRIOR mgx.employee_number = ppx.employee_number
    --ORDER BY   1 ASC;
    Sandeep Yaparla

  • Need help in finding a font for a logo

    I was looking for help in finding a font for my logo. I'm not a designer at all, so I'm calling on all the fine designers and folks on the Adobe site to help me out. All replies are, of course, appreciated and any suggestions/comments/ideas will be welcome.
    I'm designing a logo for my film company. I wanted to keep it simple but not boring either. I put together the first draft of the logo using Photoshop CS3 and used Trajan Pro for the film company words (Panthera Films) and used Futura for the slogan ("Inspiration through Imagination"). While I don't mind the fonts, it's simple but, alas, too boring. I love the panther image but need a dynamic font for "Panthera Films" and a complimenting font for the slogan. 
    Can anyone recommend a good combination of fonts to replace the Trajan Pro and Futura? As well, I want to give the logo a nice presence without it being too loud, bold or jumping off the page. As well, should the font for "Films" be the same as "Panthera" or can they be different?
    The image I attached is something I was thinking to use as a banner on a website.
    Any help would be appreciated too with this
    TIA,
    Dale

    Dale,
    As I said, I like it too.
    You may consider making it a bit heavier, maybe bold, for readability at small sizes.
    It is hard to recommend a specific font because it should represent your company and what it stands for. Have you tried typing the name in a word processing application (Worst or something better) and then running through all the font you have? If not, that might give you a few new thoughts about the overall kind of font you feel is the right one. And then it is much easier to recommend something.

  • Need query to find out the sum till a period

    Hi,
    I need to write one query to find out the cumulative sum of raw_cost of table pa_budget_lines till the specified period, I tried to do this by analytical function, but that is not working in Report 10g. Can anybody help me in this.
    Thanks

    not familiar with report but could you do something like this
    with t as
      select 1 grp, 10 * level the_cost, add_months (sysdate,  level) effective_dt from dual connect by  level < 11 union all
      select 2 grp, 5 * level the_cost, add_months (sysdate,  level) effective_dt from dual connect by  level < 11
    input as
      ( select null grp, null the_cost, null running_total,  v_eff_dt effective_dt   from dual)
    select * from(
    select t.grp, t.the_cost, sum(t.the_cost) over (partition by t.grp order by t.effective_dt) running_total, t.effective_dt,
           lead(t.effective_dt) over (partition by t.grp order by t.effective_dt) next_effective_dt,
           input.effective_dt  inp_eff_dt
    from t, input
    where inp_eff_dt between effective_dt and next_effective_dtv_eff_dt would be the input date you are interested in

  • How to find delivery quantity for archived deliveries?

    Hi
    We can find delivery quantity in table LIPS for existing deliveries.
    But for archived deliveries, how to find?
    Thanks in Advance.
    Regards
    Uma

    Hi,
    Try if you have a Sales Order for the Archived Delivery.
    VA02- Here give the Order Number and then click on Document Flow,there you can find the Delivery Number from that you can get your requirement.
    Hope this Clarifies your Doubt and Please Reward If Really Helpful,
    Thanks and Regards,
    Sateesh.Kandula

  • Query to find Org ID for a respnsibility

    Hi,
    I do not have access to Application.
    Can any one suggest me, how to find the org_id for a particular responsibility?
    Thanks,
    Santhosh

    Hi Satyaki_De,
    Thanks for the response.
    I'm talking about Oracle Apps 11i (Application), for which I do not have access as of now. (do not have login ID/pwd)
    How can I find the org_id for the responsibility, 'Inventory organization' (Inv ADM Support, responsibility name)
    I could get the responsibility ID from the table, FND_RESPONSIBILITY_TL
    How do I match this with profile table to get Org_id?
    Thanks,
    Santhosh

  • How to query a item stock quantity for a given date

    Hi there,
    I need to query the stock quantity of an item for a given date. For example, i want to know how many pieces of A i have on stock at the 20th of march 2009.
    I know there is a report, but i need the value for a subquery.
    Regards Steffen

    Sorry Gordon,
    Your query is not wrong, far from me to insult your work. It does indeed make full sense if the business process allows the item description to change.
    If not, we can avoid a "inner join"  = smaller, cleaner and (theoritically) faster query
    Here is your code with the little review:
    SELECT T0.ItemCode, T0.Dscription, sum(T0.InQty - T0.OutQty) as 'On Hand'
    FROM DBO.OINM T0
    WHERE T0.DocDate <= '[%0]' and T0.ItemCode = '[%1]'
    GROUP BY T0.ItemCode, T0.Dscription
    Cheers
    tested on 2007 SP00 PL46

Maybe you are looking for

  • Error in Installing OBIEE 11.1.1.5 on AIX 64 Bit,

    Hi, Ive tried a simple as well as enterprise install of OBIEE 11.1.1.5 on AIX 64 Bit Operating system, midway through the installation I get the following error: error in invoking target 'Client_sharedlib svr_tool' of makefile. If i proceed with the

  • Apple ID's

    Here's a means to deal with the 2 Apple ID problem. It's not necessarily a solution; it's a message to Apple. Background: The old MobileMe, iTunes, and iCloud accounts do not get along. This is because iTunes used one Apple ID for purchases, and Mobi

  • Send IDOC from SAP system to IX but can't see any message in SXI_MONITOR

    Hi all, I have built up an XI system and configured an IDOC to IDOC scenario between two SAP Systems. After completed all configuration necessary: 1. Configuration on Source Side (SAP System that send IDOC) and on Target Side (SAP System that receive

  • Dreamweaver support for Sharepoint templates

    I'm trying to edit an existing Sharepoint (bootstrap) template in Dreamweaver. while editing the sharepoint template I don't get to see the result in the website, because Dreamweaver seems to make a .temp file of the original template, which doesn't

  • Corrupt iPod touch music library

    I've got the following problem: i've added songs to my iTunes library, then i have synced it to my iPod touch. Some songs just disappeared on the iPod, other have lost their album artwork. I removed these songs and synced again. After some reboots of