FMS Query to Validate Unit Price on PO Screen

Hello Experts,
I am hoping someone has come across a query like this.
On the Purchase Order I want to validate the unit price field by running a FMS query against it.
What I would like to be able to do is :
(Qty Field) X (UDF field which would be weight) X the list price of the item on the line
So Qty 10 X the UDF field which is 1 X the List Unit Price of the item which then goes into the Unit Price field after the FMS query has run.
Is this possible?
At the moment I can run it against the unit price in the field but obviously this does not check the unit price from the Pricelist
SELECT $[$38.14.number] * $[POR1.Quantity.number] * $[POR1.U_U_Weight]
Although this works the first time you run it - it calculates correctly but if you run the fms again it keep mulitplying the figure - is there a way to stop this
Any suggestions would be appreciated
thanks

Hi Rahul,
The code in the first message got messed up -
However here it is -
SELECT $[$38.14.number] * $[POR1.Quantity.number] * $[POR1.U_U_Weight]
I also tried your code and get the same result - the first time you run it it calculates the amount ok.
But it does not stop at that point - if you click on the FMS link again it takes what is in the unit price field and calculates it again - so it will keep going which is not ideal.
More importantly though
Is there a way I can get the query to check the list price for the item first and then multiply it X Qty and then by the Udf Field which is weight

Similar Messages

  • 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

  • Need FMS For Unit price

    Dear Experts,
                       Please Find the Attachment and  mentioned two fields(Red) and I want Multiply from these Two fields. So please give FMS query for this problem.Kindly give solution ASAP.
    Thanks&Regards
    Vinoth Raj K

    Hi Raj,
    Why you need to multiply the Currency Rate to the Unit Price? If you do that option you just multiplying the bp currency and the foreign amount like USDXXX * USDXXX. Does it make sense?
    Regards,
    Lean

  • How to validate the line item values in OFR - quantity , unit price and UOM

    Hi All,
    Is there any possibility to validate the line items like quantity, unit price and UOM against the DB and stops those invoices at verifier (1 batch =10 invoices) level  if yes could you please let me know the process how to proceed further.
    due to this some the invoices are coming to OFR is with incorrect quantity, UOM and unit price different from PO lines information like quantity , UOM and unit price and those invoices are not validating from the DB and these are processed to EBS and it's effecting the GL and reporting.
    Regards,
    Anil

    Hi ,
    I did not get the exact requirement.Let me bit:
    In standard AP project lines validation will try to compare the quantity , unit price and UOM of line against the database for match which actually performed on export.
    So even if match fails batch will be exported.Now if you want to correct it before EBS,i think you can do it in the business process easily that you are consuming whether BPEL/BPM process.
    We have done this in several projects
    =========================
    But If you want that to be done from OFR side i think we need to code  UserExitPONumberValidate event to  compare the line items values against database.I need to test this also.

  • Sql query unit price

    Hello Together,
    how can i find the unit price for an item with an query.
    I used this query:
    SELECT $[$34.0.68] FROM [dbo].[OITM]
    WHERE
    OITM.ItemCode = '10000-0000'
    but with the result '0' as price but in the item i have 5 $ as unit price.
    Thank you and best regards
    Edited by: Serkan Er on Oct 22, 2009 1:59 PM

    OH ok,
    i just want possibilitty to select the actual unit Price from the item master data.
    In the item master data we put in the field Price_List:  pricelist_1.
    Concerning this field the system shows us the Unit-Price for this item which is in the pricelist_1.
    In SQL i can find a table named OPLN - the records are only the information pricelist1, pricelist2 , e.g.
    how can i find the details to this records - for example pricelist_1
    is there a related table ????????????????

  • Query base approval for PO Unit Price

    Dear All,
    I want a Query Base approval
    Scenario: If Purchase Order Unit Price Exceed form 10000/- INR then Purchase Order Goes to the  Approval
    Do any one have a Query base approval for above Scenario?

    In an approval query you can not access all the row level data. (Only the first line.)  So you can not connect your approval on row level conditions.
    I can suggest one (but a little uncomfortable and complicated) workaround for approval on line level:
    1. Create a header level UDF e.g. named ForApproval with possible values Y and N, with default value N.
    2. Write code in the SBO_SP_TransactionNotification stored procedure, that signals an error message u2018You should set ForApproval to Y!u2019  if U_ForApproval=u2019Nu2019 and there is any line with fulfilling your criteria.
    3. Set an approval procedure according to the header level ForApproval field.

  • Query for Difference in LPP of SO and Unit Price of PO

    Dear Experts,
    I  have the following query which gives me the link between SO and PO.
    I have the Last purchase price from SO also. Below is the query
    SELECT T0.[DocEntry],T0.[DocNum] as 'SONumber',T1.[GrossBuyPr] as 'Last Purchase Price',T1.[PoTrgNum] as 'PO Number',
    T2.[firstName] FROM ORDR T0  INNER JOIN RDR1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OHEM T2 ON T0.OwnerCode =
    T2.empID WHERE T0.[DocDate] >=[%0] AND T0.[DocDate] <=[%1]
    What I want is the Unit price of the PO to appear and also difference in  value of LPP of SO and Unit Price of PO should come in separate column.
    Is it possible to get Please let me know about it
    Thanks&Regards
    Darshan Desai

    Hi,
    Try this:
    SELECT T0.[DocEntry], T0.[DocNum], T1.[GrossBuyPr], T2.[DocNum], T3.[Price],T1.[GrossBuyPr] - T3.[Price] FROM ORDR T0  INNER JOIN RDR1 T1 ON T0.DocEntry = T1.DocEntry left join OPOR T2 on  T2.[DocNum]  =  T1.[PoTrgNum] INNER JOIN POR1 T3 ON T2.DocEntry = T3.DocEntry WHERE T1.[ItemCode]  =  T3.[ItemCode] and  T0.[DocDate] between [%0] and [%1]
    Thanks & Regards,
    Nagarajan

  • Make unit price as a mandatory field and using FMS

    I would like to use FMS for provide price as a mandatory filed in Purchase order .
    I created UDF and made it as a mandatory and I refered it's value to Unit price but during UDF definition system asks me default value so when I create purchase order the udf has a value and it makes problem.

    Hi
    It can be done by FMS .
    You need to put clause like ..where $[$userdefined field] =' '
    Please test this in your environment .If this didn't help ,then you have to go for Store procedure .
    Thank you
    Bishal

  • How to show unit price total to document level UDF

    Hi,
    In sales order document I have to show the total of unit price of all items in document level UDF.
    Is it possible by using FMS? How?
    FMS Query    Select SUM($[$38.14.Number])  is not worked for this issue.

    Hi Swapnil,
    This is the limitation that you cannot bring row level details on document level field.
    If you want so then you have to use SDK or you can use Type-->Subtotal option to check the row total.
    Regards,
    Rahul

  • Value based on the periodic unit price(only with pr.ctrl S) field in MatMas

    Dear all,
    There is this field in mateial master called "Value based on the periodic unit price (only with pr.ctrl S)" in accounting view 1,
    1 - May I know what is this field about (in between our company using material ledger).
    2 - May I know why the value of this field are different between our company period 6 and period 7 for this year? what contribute to it? and is it something wrong with different value between two different period or absolutely normal?
    Thanks.
    Tuff

    Hi Tuffy,
    For your 1st query:
    PUP field in Accounting 1 (if ML is active, Price Determination indicator=3) is the result of Actual Costing Run (CKMLCP) closing entry.
    For your 2nd query:
    In most of the cases the values will be different in Previous Period and Current Period. e.g.Period 6 values are the results of Actual Costing Run (CKMLCP) in 1st week of Period 6 for Previous Period (i.e. Period 5). Period 7 values are the results of Actual Costing Run (CKMLCP) in 1st week of Period 7 for Previous Period (i.e. Period 6).
    The reason for the different values: Price differences, Exchange rate differences, Price/Exchange rate differences from Low lower materials, etc.
    Thanks & Regards,
    ADI

  • Value based on the periodic unit price (only with pr.ctrl S) field in mat.

    Dear all,
    There is this field in mateial master called "Value based on the periodic unit price (only with pr.ctrl S)" in accounting view 1,
    1 - May I know what is this field about (in between our company using material ledger).
    2 - May I know why the value of this field are different between our company period 6 and period 7 for this year? what contribute to it? and is it something wrong with different value between two different period or absolutely normal?
    Thanks.
    Tuff

    Hi Tuffy,
    For your 1st query:
    PUP field in Accounting 1 (if ML is active, Price Determination indicator=3) is the result of Actual Costing Run (CKMLCP) closing entry.
    For your 2nd query:
    In most of the cases the values will be different in Previous Period and Current Period. e.g.Period 6 values are the results of Actual Costing Run (CKMLCP) in 1st week of Period 6 for Previous Period (i.e. Period 5). Period 7 values are the results of Actual Costing Run (CKMLCP) in 1st week of Period 7 for Previous Period (i.e. Period 6).
    The reason for the different values: Price differences, Exchange rate differences, Price/Exchange rate differences from Low lower materials, etc.
    Thanks & Regards,
    ADI

  • 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

  • UDF to multiple % by unit price

    I created a udf and now I need a little help with the query.  The query will multiply the unit price in the sales order rows by .9.  My query looks like this...
    SELET $[38.0]*.9
    It's not working though I am geting an "Internal Error -1003"

    Hi Robert ,
    This gona work
    SELECT $[$38.14.number]) *9/10
    If u want to multiply to fields , then it should be
    SELECT $[TABLENAME.FIELDNAME.NUMBER] * [TABLENAME.FIELDNAME1.NUMBER]/100
    Regards
    Ankur

  • Block item unit price from decrease in a A/R Invoice

    Dear experts !
    How can I prevent a sales user to decrease an item unit price in an A/R Invoice for a customer for which a special price (based on quantities) was defined. The user can increase the item unit price in the A/R Invoice for that customer.
    Thanks for your precious help.

    Hi yves,
    try below in transaction notification:
    if (@object_type = '13') and (@transaction_type IN ('A', 'U'))
    BEGIN
    IF exists (SELECT * FROM INV1 T0  INNER JOIN ITM1 T1 ON T0.ItemCode = T1.ItemCode and  T0.[PriceList]=*2*  WHERE isnull(T0.[Price],0) <> isnull(T1.[Price],0) and t0.DocEntry=@list_of_cols_val_tab_del)
              Begin
                   SET @error = 30
                   SET @error_message =N'Unit Price  can`t be different than price defined Price List'     
              end
    END
    Change price list number (bold ) in above query to price list number you want.
    you can check price list number using query
    Select * from OPLN
    - listnum column.
    Thanks,
    Neetu

  • AR Invoice Unit price/Discount change

    Hi Experts,
    I need your help regarding this....
    In Sales A/R process of SAP B1 8.82, we first do sales order then copy to AR Invoice to process the invoice.
    At some time users do the sales order and then copy to AR invoice and modify either unit price or discount as per the customer's requirement.
    I need a query to get all these type of invoices where there is a either unit price change or discount change.
    I found that any AR invoice update goes to ADOC and ADO1 table, but this table populates only when the AR invoice is saved once and then opened again and modify. but if the unit price or discount has been changed at first and saved then these table does not populate.
    So how can I get this changes log, from which table so that I can frame the query.
    Your assistance is highly appreciated.
    Rgds
    Suman

    Hi Gordon,
    I have got the solution through this query...
    SELECT T0.[DocNum],  T0.[CardCode], T0.[CardName], T1.[ItemCode],   T3.[PriceBefDi] ordrprice, T3.[DiscPrcnt] ordrdisc,T1.[PriceBefDi] invprice, T1.[DiscPrcnt] invdisc
    FROM [dbo].[OINV]  T0
    INNER JOIN [dbo].[INV1]  T1 ON T0.DocEntry = T1.DocEntry
    inner join ORDR T2 on t2.docnum=t1.baseref
    INNER JOIN RDR1 T3 ON T2.DocEntry = T3.DocEntry and 
    t1.itemcode=t3.itemcode
    WHERE T0.[DocDate] >=[%0]
    AND T1.BaseLine=T3.LineNum
    and  (T1.[Price] <> T3.[Price] or  T1.[DiscPrcnt] <> T3.[DiscPrcnt])
    Thanks to all

Maybe you are looking for

  • ITunes sees iPod...but songs do not show up in library

    Long story short...I gave my son my old iPod mini. When we couldn't connect both it and my new video iPod to our new computer, we took it to his grandmother's house to use. I've downloaded all of the iPod/iTunes updates, and when the iPod mini is con

  • How can I make an audiobook purchased from another source show up in iTunes as an audiobook and not as music?

    How can I make an audiobook purchased from another source show up in iTunes as an audiobook and not as music? They chapters are mp3 files. Changing the genre to "audiobook" or "audiobooks" does help. I am sure this question will come up a lot, since

  • External HD change back to windows format

    Hi Guys,      Recently I backed my macbook up with TC using an external HD which OSX said needed to be formatted for TC to work. But now I need to change the external HD format back so windows can read the HD. Any ideas? Cheers.

  • How can i make iMovie -- iDVD quality better??

    I have search about the idvd quality in this site but i can't solve my problem yet. I had a sony DV cam which is PC3, Pal. And I use the imovie..import...edit, then use "share" to idvd...then burn... So I play the finished DVD in a DVD player, i find

  • Help for weblogic timer

    Please help on timer. Thanks a lot. Xiao I got the following error when try to use weblogic timer: <NT Performance Pack> NATIVE: created IoCompletionPort successfully. IoPort=0x00 00024c Tue Aug 08 12:24:55 PDT 2000:<I> <WebLogicServer> WebLogic Serv