Purchase order query ??

Hi All,
We have a requirement wherein, we have to check whether the goods delivered needs to be invoiced or not, based on the condition that if Production order is of some custom type denoting intercompany pricing & the accounting assignment category of the material is defined to be some x denoting a free item, then that material should not be invoiced i,e. the Inv. receipt check box in the invoice tab of the item details should be unchecked if such a item is ordered.
Please let me know if any of you is aware of how this can be done i,e .. is there any user exit or BAdI, which can be used to achieve this functionality
Thanks in advance,
Sharat.

i think u can do it thru Config itself , So please have a word with ur Functional consultant.
fo BADIs check in se80->appl.Hirarchy-.BADI.
for User Check at Billing level better to check in SPRO/SMOD.
Regards
Prabhu

Similar Messages

  • Import Purchase order Query

    Hi all,
    I have one query.In most of the forum, i had read that it is suggested to have GR Based IV not ticked. Why is it so?  what are the consequence if i keep it ticked?
    Regards,
    S Anand

    Hi Anand,
    Your query is correct. I myself have worked on the same in my test system and verified. My observations are:
    You create a Purchase order, enter duty values manually after receiving the BoE. When you refer to std. sap procedure i.e Duty MIRO first, then GR and lastly Supplier MIRO, you will find the impact in the excise duty capturing and Posting.
    If you check the Excise Tab at the MIGO level you will find the exact amounts those are cenvatable (if you have done duty MIRO first).
    Now if you make GR first, you will see the difference in amounts in the excise invoice tab. Also when you do MIRO (first for Planned delivery cost i.e duty and second for foreign Currency) you will find the difference ther as well. The diffrence here is you will get only duties those are to be loaded on the material i.e Basic Customs, Cess on BCD and SECess on BCD. These values are not the same as they are entered in the PO. While the cenvatable conditions are not there as they are already captured at the GR level.
    If your GR based IV is active in 1st case, system throws an error and does not allow to post the MIRO, while in second case it allows.
    Usually in our case, we import @ 200+ items in one BoE. It creates trouble in posting a/c entry as a/c document can not carry more than 999 items if GR based IV is active. Please check in your case.
    Too long answer, but hope you got the point.
    Regards,
    Rahul.

  • Combined Purchase Order and Sales Order Query. (Including Stand Alone Docs)

    Hi,
    I need some help please!
    I am looking for a query that will show all the Purchase Orders with all their base document Sales Orders. However I also need to show those stand alone Purchase orders and Sales Orders.
    What I have is two queries, one for the PO fields en one for The SO fields. I would like a way to combine these two so I have one query with the relevant PO and SO info next to each other.
    The final query will have a top heading structure like this:
    Status,Purchase No.,Supplier No.,Supplier Name,Week,Month,Del Method,Country,Method,Rep.|Status,Rep.,Sales No.,Customer No.,Customer Name,Customer Order no.,Cust. Del date,Doc total,Del Method
    +(The first part is for the purchase order section, the second part starting at the second 'Status' is the sales order section)
    +Purchase Order Query:
    SELECT
      T0.DocStatus 'Status',
      T0.DocNum'Purchase Order No.',
      T0.CardCode 'Supplier No.',
      T0.CardName'Supplier Name',
      DATEPART(ww,T0.DocDuedate)'Week',
      DATEPART(mm,T0.DocDuedate) 'Month',
      T1.TrnspName 'Delivery Method',
      T2.Country 'Country',
      T0.JrnlMemo 'Method',
      T3.SlpName 'Rep.'
    FROM OPOR T0 
    INNER JOIN OSHP T1 ON T0.TrnspCode = T1.TrnspCode
    INNER JOIN OCRD T2 ON T0.CardCode = T2.CardCode
    INNER JOIN OSLP T3 ON T0.SlpCode = T3.SlpCode
    Sales Order Query:
    SELECT
      T0.DocStatus 'Status',
      T2.SlpName 'Rep.',
      T0.DocNum 'Sales Order No.',
      T0.CardCode 'Customer No.',
      T0.CardName 'Customer Name',
      T0.NumAtCard 'Customer Order no.',
      T0.DocDueDate 'Cust. Delivery date',
      T0.DocTotal ' Doc total',
      T1.TrnspName ' Delivery Method'
    FROM ORDR T0 
    INNER JOIN OSHP T1 ON T0.TrnspCode = T1.TrnspCode
    INNER JOIN OSLP T2 ON T0.SlpCode = T2.SlpCode
    The problem I am having is that if I combine these queries it excludes all those records with blank/empty data fields.
    I do not mind having to go to crystal reports to get what I want.
    Any suggestions?
    Thanks!

    Hi thanks GordonDu,
    I have tried a union before, and yours works great. However my problem is to display the  PO en SO columns next to each other and not underneath each other.
    Something like this:
    Po No          Supplier          SO No           Customer
    1234           Sup 1             9876              Cust 1
    1235           Sup 2             no SO             Cust 2
    1236           Sup 3             9877              Cust 3
    1237           Sup 4             9878              Cust 4
    1238           Sup 5             no SO             Cust 4
    I have this query, but with this it drops all those Purchase Orders made Stand Alone and without a SO number.
    SELECT
      T2.DocNum AS 'Purchase Order No.',
      T0.DocNum AS 'Sales Order No.',
      T2.CardCode AS 'Supplier No.',
      T2.CardName AS 'Supplier Name'
    FROM ORDR T0 
       INNER JOIN RDR1 T1 ON T0.DocEntry = T1.DocEntry
       INNER JOIN OPOR T2 ON T2.DocEntry = T1.PoTrgEntry
    Though using your Union gives me all the information I want and the ability to expand on that, my problem is the "Display" part. I am sure I am doing something stupid somwhere 
    Edited by: Desmond Moll on Mar 7, 2012 8:03 AM

  • Purchase Order with Goods Receipts Query

    Hi Guys,
    Am still getting to grips with JOINS, I am trying to get a query completed that will show all Purchase Orders that have outstanding items on them, but I would like to also show any corresponding Goods Reciept Notes for that Purchase Order, showing the individual lines with outstanding balances. Here is what I have so far:
    SELECT DISTINCT T0.[CardCode] as [BP Code], T0.[CardName] as [BP Name], T0.[DocNum] as [PO Number], T0.[DocDate]as [PO Date], T1.[ItemCode] as [Stock Item], T1.[Quantity], T1.[OpenQty], T2.[DocNum] as [Goods Receipt No], T2.[DocDate]as [GR Date], T3.[ItemCode] as {Stock Item], T3.[Quantity], T3.[OpenQty] as [Left to Deliver]
    FROM OPOR T0  INNER JOIN POR1 T1 ON T0.DocEntry = T1.DocEntry, OPDN T2 INNER JOIN PDN1 T3 ON T2.DocEntry = T3.DocEntry
    WHERE T0.[DocDate]  >=[%0] AND  T0.[DocDate] <=[%1] AND  T0.[CardName] =[%2]
    I do only want to show the BP once for a given PO (hence my attempt at the DISTINCT command). Could someone be so kind as to point me in the right direction as I will want to turn this into a Crystal Report as well.
    Many thanks in advance
    Sean Martin

    I have double checked your query logic. It can not hold true. Here is the right logic:
    SELECT T0.[CardCode] as [BP Code], T0.[CardName] as [BP Name],
    T0.[DocNum] as [PO Number], T1.[ItemCode] as [Stock Item],
    T1.[Quantity], T1.[OpenQty],
    SUM(isnull(T3.[Quantity],0)) as 'Received Qty',
    T1.[Quantity]-SUM(isnull(T3.[Quantity],0)) as [Left to Deliver]
    FROM dbo.OPOR T0 
    INNER JOIN dbo.POR1 T1 ON T0.DocEntry = T1.DocEntry
    LEFT JOIN dbo.PDN1 T3 ON T3.BaseEntry = T0.DocEntry AND T3.BaseLine = T1.Linenum
    LEFT JOIN dbo.OPDN T2 ON T2.DocEntry = T3.DocEntry
    WHERE T0.[DocDate]  >=[%0] AND T0.[DocDate] <=[%1] AND T0.[CardName] =[%2]
    GROUP BY T0.[CardCode], T0.[CardName], T0.[DocNum], T1.[ItemCode],
    T1.[Quantity], T1.[OpenQty]
    The column 'Left to Deliver' should be identical to 'Remaining Open Qty'
    Thanks,
    Gordon

  • Purchase Order form in Query only mode for some users

    Hi All,
    I want to make the Purchase Orders form as query only for a single user. I tried by giving 'Query_only=Yes' in the parameters section. I am getting 'FRM-04151: You cannot query records here' message more than 10 time. I know we get this message and this is applicable to all the users. But this message is comming more than 10 times.
    Is there anyway that I can restrict the Query only mode to a single user and please suggest about the message also.
    Thanks in Advance,
    Naresh

    Naresh,
    Since you want to achieve this for one user only, I would suggest you create a new function/menu/responsibility and assign this responsibility to the user.
    Note: 400380.1 - How To Create a QUERY-ONLY FORM
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=400380.1
    For the FRM error, please review the following document.
    Note: 116074.1 - ACCESS LEVEL - REVIEW ONLY - PO
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=116074.1
    Regards,
    Hussein

  • Purchase Orders form in Query Only mode for a single user

    Hi All,
    I want to make the Purchase Orders form as query only for a single user. I tried by giving 'Query_only=Yes' in the parameters section. I am getting 'FRM-04151: You cannot query records here' message more than 10 time. I know we get this message and this is applicable to all the users. But this message is comming more than 10 times.
    Is there anyway that I can restrict the Query only mode to a single user and please suggest about the message also.
    Thanks in Advance,
    Naresh

    Please post this question here: OA Framework
    There are so many special conditions and restrictions for E-Biz Suite that this forum is not the right place to ask these questions. The Apps forum at this location is the right place.

  • Creating a Query for Purchase Order Approval

    I need to develop a query to check if any of the line totals in a new purchase order exceeds $500. I have to attach this query to the approval procedure (under 'Terms' in 'Define Approval templates'). When the 'Add' button on the purchase order is clicked, the values on the form are still not available in the database. This means, my query has to pick the data from the new purchase order form. Is there any way to build such a query? Thanks.

    Satish, Alerts just notify the appropriate parties. They do not stop a document from being posted. This means, it is not capable to recognize the situation unless it's already stored in the DB.
    Alexey. what about creating a Development Request about this topic?
    Regards,
    Felipe

  • Purchase Order History Query

    Hello,
    Can I get a query where in against a Purchase Order, what are the different GRPO's made and against that GRPO the A/P invoice which were created?
    Selection criteria will be PO Doc Number.
    Kalli

    Hi Kalli........
    Please try this........
    SELECT     
              T0.[DocNum] as 'PO NO', T0.[DocDate] as 'PO DATE',
              P1.[GRPODocNum] as 'GRPO NO',
              P1.[GRPODocDate] as 'GRPO DATE',
              P1.[INVOICENO] as 'INVOICE NO',
              P1.[INVOICEDATE] as 'INVOICE DATE',                    
              T0.[CardCode] as 'Party Code',
              T0.[CardName] as 'Name Of Party',T0.[DocStatus] as 'PO Status', T0.[VatSum],
              T0.[DocTotal] as 'Total Amount' , T0.[Comments] as 'Remarks',
    IsNull(
    Select  Sum(IsNull(VatSum,0))
    From OPDN
    Where DocEntry In (
    Select Distinct DocEntry
    from PDN1
    Where BaseEntry=T0.DocEntry 
    And BaseType=T0.ObjType
    ),0) +
    IsNull(
    Select Sum(IsNull(VatSum,0))
    From OPCH T3
    Where DocEntry In (
    Select Distinct DocEntry
    from PCH1
    Where BaseEntry=T0.DocEntry And BaseType=T0.ObjType
    ),0) 'GR/INV TaxAmt',
    IsNull(
    Select  Sum(IsNull(DocTotal,0))
    From OPDN
    Where DocEntry In (
    Select Distinct DocEntry
    from PDN1
    Where BaseEntry=T0.DocEntry  And BaseType=T0.ObjType
    ),0) +
    IsNull(
    Select Sum(IsNull(T3.DocTotal,0))
    From OPCH T3
    Where DocEntry In (
    Select Distinct DocEntry
    from PCH1
    Where BaseEntry=T0.DocEntry And BaseType=T0.ObjType
    ),0) 'GR/INV Amt'  ,
    (select DocTotal from OPCH where DOCENTRY= INVENTRY) 'INV Amt'
    FROM OPOR T0
    inner join (SELECT DISTINCT
                   T2.DOCENTRY PODocEntry,
                   T3.DOCENTRY INVEntry,
                   (select DocNum from OPCH where DocEntry = T3.DOCENTRY) INVOICENO,
                   (select DocDate from OPCH where DocEntry = T3.DOCENTRY) INVOICEDATE,
                   T1.DocEntry GRPOEntry,
                   T0.DocNum GRPODocNum,
                   T0.DocDate GRPODocDate
                   FROM OPDN T0 
                   INNER JOIN PDN1 T1 ON T0.DocEntry = T1.DocEntry
                   INNER JOIN POR1 T2 ON (T2.DOCENTRY = T1.BASEENTRY AND T2.LINENUM = T1.BASELINE)
                   INNER JOIN PCH1 T3 ON (T1.DOCENTRY = T3.BASEENTRY AND T1.LINENUM = T3.BASELINE)
                   ) P1 on T0.docentry = P1.PODocEntry
    WHERE (T0.[Series] ='10')
    and (T0.[DocDate]>='[%0]' AND T0.[DocDate]<='[%1]')
    order by T0.[DocNum]
    Regards
    Kamlesh

  • 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

  • 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]'

  • Terms user query Changes in unit price in purchase order and a/p invoice

    Dear sir
         please give me a term user query for , if any changes in unit price in purchase order and a/p invoice

    Hi,
    Try this:
    SELECT  Distinct ' true'
    FROM adoc T2
    JOIN ado1 T0 ON T2.docentry = T0.docentry AND T2.Objtype = '22'
    JOIN por1 T1 ON T1.docentry = T0.docentry AND T1.Linenum=T0.Linenum
    WHERE  $[$38.14.number] != T0.Price
    Thanks & Regards,
    Nagarajan

  • How to query purchase orders in archive system

    Our purchase orders are archived. Now I want to query the purchase orders. I use transaction code alo1, but no data. How can I query purchase orders via other ways? Thanks.

    1.You can use ME82 to query the Purchase Orders.
    2.sara-->Archiving Object : MM_EKKO-->Information System-->Archive Explorer-->Archive Infostructure:SAP_DRB_MM_EKKO -->and click execute-->input your query condition-->click execute.

  • FMS Query for Purchase Order

    Hi,
    I want to FMS Query for Purchase Order.
    I want to display the weight * price in one user define field.
    Please suggest me

    Hi Tushar.......
    Try this.......
    declare @var1_wt as varchar(255)
    declare @var2_Pr as varchar(255)
    declare @var3 as float
    declare @var4 as float
    set @var1_wt=$[$38.58.0]
    set @var2_Pr=$[$38.14.0]
    set @var3=cast( substring(replace(@var1_wt,',',''),0,len(replace(@var1_wt,',',''))-1) as float)
    set @var4=cast(substring(replace(@var2_Pr,',',''),0,len(replace(@var2_Pr,',',''))-3) as float)
    select @var3 * @var4
    Regards,
    Rahul

  • Query to get Salesorder Delivery Address in Purchase Order (ODLN Address2)

    This case looks a bit like a dropshipment situation:
    Our customer orders some products (salesorder = ORDR / RDR1).
    At the order-moment the salesdepartment cannot decide yet which businesspartner is going to deliver.
    At the purchase- and delivery-moment we create a purchase-order for the goods (OPOR / POR1).
    At that moment we want to lookup the customer's delivery address (name, street, zipcode,city and country) and put it as ONE field in the OPOR-Address2-field.
    We think it is at best when we can select this address2 field from the open orders ORDR.
    Who can help us to create the proper Query ? Thanks in advance !
    Jos Dielemans - www.dielemans.biz
    Edited by: J. Dielemans on May 25, 2009 3:26 PM
    I have already found this Query:
    SELECT DISTINCT T0.DocNum,T0.DocDate, T0.CardName, T0.Address2 FROM ORDR T0 INNER JOIN RDR1 T1 ON T0.DocEntry = T1.DocEntry WHERE T1.LineStatus ='o' or T1.Quantity > T1.OpenQty and T0.DocStatus ='o' ORDER BY T0.DocNum
    Now I want to select the ORDR-Address2-Field and copy it together with the customer's name to the OPOR-Address2 Field.
    I realize that we can at best use this Query as a Formatted Search on the OPOR-Address2-Field
    Jos Dielemans
    Edited by: J. Dielemans on May 25, 2009 3:26 PM

    We do not link Purchase Order to Sales Order.
    We want to copy the shipaddress from the Customer to the Purchase Order so that the Supplier can ship the goods directly to the right address.
    I thought it would be appropriate to select the right Customer from the Open Orders and then copy his CardName and Shipment Address to the Purchase Order.
    Can you help me with that Query ?
    Otherwise we should select the customer's Cardname and Shipment Address from the Business Partner's Masterdata.
    Jos Dielemans

  • Cannot query AR invoices based on the purchase order number in R 12 1.3

    Hi,
    We need to query invoices based on the purchase order number, However when we try to Ct+F11 get the message *"Please fill in selective criteria in at least one of the following fields for performance reasons: GL Date, NUmber,Bill to etc."*
    Is this a new feature or a bug?
    Thanks and Regards,
    MPH

    Hi All,
    I found the solution in the following note.
    *How to prevent Blind Query or Query on Non Indexed Column in Transaction, Receipts, Collections forms? [ID 753222.1]*
    Thanks and Regards,
    MPH

Maybe you are looking for