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

Similar Messages

  • Sales Order : Unit Price U_MRP it should give Error Message

    Hi All,
    I am using SBO 2005 B PL 25.
    When the user add SO, and select the items and update the field of Unit Price and press Tab it should match Unit Price with one another UDF U_MRP. If Unit Price is > then U_MRP then it should give me error message and cursor should go back to Unit Price.
    Is it possible through using SBO_SP_TransactionNotification or any other way.
    Best Regards,
    Chintesh Soni

    Hi Istvan,
    I have selected the type of UDF is Units and Total -> Amount.
    Below is the full SP_TransactionNotification procedure..
    USE [TEST_DB_190808_MRP_Excise]
    GO
    /****** Object:  StoredProcedure [dbo].[SBO_SP_TransactionNotification]    Script Date: 08/21/2008 18:00:07 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    ALTER proc [dbo].[SBO_SP_TransactionNotification]
    @object_type nvarchar(25),                     -- SBO Object Type
    @transaction_type nchar(1),               -- [A]dd, <u>pdate, [D]elete, [C]ancel, C[L]ose
    @num_of_cols_in_key int,
    @list_of_key_cols_tab_del nvarchar(255),
    @list_of_cols_val_tab_del nvarchar(255)
    AS
    begin
    -- Return values
    declare @error  int                    -- Result (0 for no error)
    declare @error_message nvarchar (200)           -- Error string to be displayed
    --select @error = 0
    --select @error_message = N'Ok'
    --     ADD     YOUR     CODE     HERE
    IF @transaction_type = 'A' AND @object_type = '17'
    BEGIN
    If exists
    (Select t.Price From RDR1 t
       Where t.Price > t.U_mrp
         and t.DocEntry=@list_of_cols_val_tab_del)
    begin
    SET @error = 1 --10
    SET @error_message = N'Errorr text '
    end
    END
    -- Select the return values
    end
    With Warm Regards,
    Chintesh Soni

  • Total calculation based on unit price and UDF field values

    Hi All,
    This is for a construction related company. Please find attached screen shot for details.
    My scenario is when we are creating sales order my client wants to calculate the total amount based on unit price towards the UDF fields defined. For example user will give the unit price  per sqft in Unit price ie 2800 as per screen shot column and constructed area in Sqft in he will enter the area like cons area in sqft =1500. So this 1500 need to calculate with unit price and will display in total. So in Total field it should show like 2800*1500= result. Like wise other amount values in udf needs to be calculated and displayed in total field  .
    Is this possible in SAP B1. Please help me with your valuable suggestions.

    Hi,
    Try this:
    SELECT ($[$38.U_Price.number]* $[ORDR.U_CArea.number)+ $[ORDR.U_EBexp.number]+ $[ORDR.U_RO.number]+ $[ORDR.U_Maintenance.number]+ $[ORDR.U_CorpFund.number]
    Thanks & Regards,
    Nagarajan

  • 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

  • Add all unit price  in current document

    Dear all
    Am using SAP B1-PL 38
    I want sum of all unit price in document level UDF ,for example am putting purchase order say
    Vendor1
    Item1  11qty   Unitprice 10   Total 110
    Item1  10qty   Unitprice 10   Total 100
    now i want 20 in document level UDF

    You can find the help regarding the SP in the following link
    SP_Tranaction Notification Procedure Explanation
    [https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/e991e2b9-0901-0010-0395-ef5268b00aaf]
    You can also search this forum with keyword "Transaction Notification", which would list you lots of references.

  • Maintain Multiple Sale Unit of Measure

    Dear all,
    How can we maintain multiple sale unit of measure for a particular material in single sales area.  Meaning different sales orders can have different unit of measure for the same material in the same sales area.
    Regards and Thanks,

    Check (MM02) Material Master - Additional Data button in menu bar - Unit of Measurement Tab
    OR
    Scenario: - BP buys ItemA in Kg and sells in Gr. (Refer SAP Note 883504 - Different UoM for the same Item)
    1. Define ItemA with kg as the unit of measure in the Purchasing Data tab - and Gr as the sales unit of measure in Sales Data tab. Enter items per purchase unit as 1000 and the items per sales unit as 1.
    2. Generate an AP invoice with a quantity of 1, the items per purchase unit is 1000 so 1000 items enter the stock.
    3. Generate an AR invoice with a quantity of 1, the items per purchase unit is 1 so the stock of the item is reduced by a quantity of 1 gram.
    There is no way to indicate that the stock has been reduced by 1000kg which is equal to 1 gram.
    Workaround:
    1. Duplicate ItemA as Purchase Item (UoM=Kg) and Sales Item (UoM=Gr) - This means that you will have 2 items, ItemA1 and ItemA2
    OR
    2. Generate ItemA (both Sales and Purchase Item) by configuring UoM and Price according to the smallest UoM and perform every transaction by keeping this UoM
    NB: Do not forget to define UoM in Administration - System Initialization - General Settings - Display tab - Default Weight Unit
    Also check following links for understanding:
    Price by multiple unit of measure
    Re: Multiple UOM's
    Thanks & Regards
    JP

  • Unit price issues

    HI!
    In m my smartform Im getting the unit price for my invoice from the condition table directly instead of calculating it (Total / Quantity) which creates the rounding up issues. SO this works fine for us but the problem occurs when the condition pricing is like 300/ 1000 L or 4000/ 1000Kgs , what happens is that in the output the unit price and quantity when multiplied contradicts , though the net price per line item shows correctly but suppose qty is 3 L and the unit price is 300/1000L so total os .9 dollars which is correct but in  the form out put it shows  qty= 3 unit price 300  and total .9 dollrs, which si contracdictory, so what I did I used a calculation gaain and divided by condition price by condition pricing unit so when its 300/1000L it would show .3 /L which is now ok but another problem rose with metric ton, since the selling unit is MT and the unit price now after dividing by condition pricngi unit makes it per KG so output would show like qty =3 unit price  4 and total = 12000 dollars , so heer unit price is wrong as it should have been 4000/ Ton as the total os 12000 dollars.
    Is theer a way out to show the correct unit pricing as per the sales unit. I had used the code to just divide the total price of line item  divided by the Quantity but then the rounding up issues came up which was not required .
    read table is_bil_invoice-it_kond into gs_kond
    with key bil_number = gs_gen_del-bil_number
    itm_number = gs_gen_del-itm_number.
    if sy-subrc = 0.
      g_unit_price = gs_kond-kbetr / gs_kond-kpein.
    else.
    ** Loop around and get the price for it
      loop at is_bil_invoice-it_kond into gs_kond
      where bil_number = gs_gen_del-bil_number and
      itm_number = gs_gen_del-itm_number.
        if gs_gen_del-fkimg <> 0.
             g_unit_price = gs_kond-kbetr / gs_kond-kpein.
          endif.
    *  g_unit_price = g_item_tot / gs_gen_del-fkimg.
        endif.
      endloop.
    endif.
    * Get unit price and tot price.
    g_item_tot = gs_gen_del-netwr - gs_gen_del-kzwi3.
    *IF gs_gen_del-fkimg <> 0.
    *  g_unit_price = g_item_tot / gs_gen_del-fkimg.
    *ENDIF.
    thanks

    Well we would ike to grab the unit price directly from the condition mentioned in the billing documents , thats the reason this issue has errupted , We would like to pull it directly from teh document onto the invoice but as I said when its given per 1000 L or /1000 Kgs then the problem occurs as teh quantity may be in MT and the unit price in the condition on document maybe like 4000 dollars per 1000 KGS so it takes 4000 and multiplies bny quantity which is in MT which is 1000 times more than teh correct value. SO as per my piece of code its grabbing the unit price directly from teh condition in the billing document . If I just divide this unit price that I am gettimng from the condition table in Doc by the condition rate KPEIN then it works ok except in few cases like MT. The quantity will show 3 MT suppose and the unit price will be 4000/1000 = $4/ kgs so this will contradict the units but in case of per 1000L it would be ok as the resultant will be in litres only but in case of MT its converted to Kgs so basically a client will see 3 MT QTY for 4 / Kgs  and price will be 12000 dollars which dosent look alright though teh resultant is correct prioce.
    SO this becomes a special case when we dont need to divide by condition unit rate . My question is can be give such kind of exceptions in our code and proceed or will be wrong.
    Thanks

  • 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.

  • 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

  • Find out the Selling Price and Unit Price.

    Hi All,
    Am trying to get the Selling and Unit Price Before an Order Creation and Quote , from the API of " QP_PREQ_PUB.PRICE_REQUEST " ,. based on Item ID , Quantity and two Modifiesrs(Price List ID and Order Type ID).
    i can get Selling Price and Unit from Temp table " qp_preq_lines_tmp ". after execution of Above API .
    but I am getting Unit Price correctly and about Selling Price, its dispaly the Priec as same as Unit Price only .
    I Dont' know what step i missed .
    Have anyone developed similar API for getting the Selling Price and Unit Price for an Item ?.
    Any suggestions are appreciated.
    Regards,
    Shan

    Hi Shan,
    I saw your posting on Oracle forum that is why I am sending this email to you.
    I have been using QP_PREQ_PUB.PRICE_REQUEST to pass item to get item list price thru Oracle Price Engine. I get Item list price without any issues the only thing I am stuck is when that item has multiple modifiers then item price I get is without applying modifiers.
    My case: When Item KD653 3/3MAT has 'X' price list and price of that item is set to 600.00. I have a modifier defined and that includes/qualifies above item for 10% discount. So when I pass my pameters like inv_item_id, list_header_id etc I get 600.00 not 540.00. So I am passing two lines one for regular item list price (600.00) and second for modifier that I have created for this item.
    Result: I get 600.00 Item Price but I don't get modified (10%) price applied to unit price. Also it doesn't recognize my list_header_id that I am passing for my modifier.
    I may be missing something to trigger the modifier part. If you got case details then that will be great.
    Your help will be highly appreciated in this case.
    Regards,
    Prakash

  • Unit price change through SDK

    Hi,
    We have set limited rights to sales user (permission not given for user to "change row amounts") at sales order row level. Is there any way to change Unit Price or discount  in sales order through SDK?  We have to reset Unit price/discount for free Item.
    Can any one done this type of possibilites?
    Regards,
    Manish

    Hello Manish,
    what do you mean "free" items? Discoun of All items can freely changed or there are several items which discounts can be changed/cleared.
    Stored procedure is not a good idea, because updating by SQL a field is not allowed by SAP.
    >Is there any way to change Unit Price or discount in sales order through SDK? We have to reset Unit price/discount for free Item.
    If the user do not have a permission to change the "change row amounts", and cannot clear the Unit Price/Discount via GUI, DI API / Addon using single sign on the client will not change the unit price/discount, because it is running with the same rights as GUI.
    I am suggesting the following steps:
    1.  Grant the correct rights to the user to change the unit price/discount
    2.  Create a Formatted Search on the Discount field which clears the discount when an item is "free" item
    3. Block the changes of discount/Unit Price for  non free items via SP Transaction_Notification
    in point (2), (3) you the "free" items should be marked somehow (item property, UDF in Item master data, etc).
    Regards,
    J.

  • 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

  • GR amount is not matching with PO unit price

    Hi folks,
    I have created a Purchase Ordre in foreign currency euro with account assignment project. Say the unit price of the item is euro 500/pc. While doing GR for three pcs, it is showing in purchase order history only 9 euros and in local currency column 44.45 saudi riyal as per conversion mention in po.
    Why it is not showing 1500euros?
    Please reply urgently.
    Regards

    Hi,
    You need to check for following:
    1 ) PO HEADER level currency
    2 ) Exchange Rate in PO
    3 ) Also, check for VENDOR MASTER :: Purchasing Data view for Pricing Date control field
    Also for present date  check for exchange rate between currencies which is generally maintained by FI

  • Single concurrent program for multiple operating units

    HI
    I am working on XML/BI publisher to generate AR invoice reports.
    We have single rdf report using which rtf templates are generated.
    There are 10 operating units (10 ORG_ID's) and 10 rtf templates, one for each operating unit. There are 4 different responsibilities for each ORG_ID
    Eg: ORG_ID's = 11, 12, 13, 14..........etc
    Eg: Responsibility = xx, yy, zz...........etc
    I want to register a single concurrent program. When a user submits a request from "XX" responsibility, then the template associated with that org_id should be generated. Whichever responsibility the user is accessing from, that particular template must be shown as output.
    How can i register one concurrent program for multiple operating units.
    Thanks!
    Edited by: 994628 on Mar 18, 2013 4:39 PM
    Edited by: 994628 on Mar 18, 2013 4:42 PM

    >
    There are 10 operating units (10 ORG_ID's) and 10 rtf templates, one for each operating unit. There are 4 different responsibilities for each ORG_ID
    Eg: ORG_ID's = 11, 12, 13, 14..........etc
    Eg: Responsibility = xx, yy, zz...........etc
    I want to register a single concurrent program. When a user submits a request from "XX" responsibility, then the template associated with that org_id should be generated. Whichever responsibility the user is accessing from, that particular template must be shown as output.
    >
    interesting case for 10 OE set 10 template
    what is purpose? for each OE different requirements for layout?
    BTW
    if each Responsibility associated with one org_id then
    - you can get current org_id when you run concurrent program
    - create main template (will be #11) with condition like
    <?choose:?>
    <?when: ORG_ID=11?>
    <?import:xdo://FND.XX11_SUB.en.00/?>
    <?call:TEMPLATE11?>
    <?end when?>
    <?when: ORG_ID=12?>
    <?import:xdo://FND.XX12_SUB.en.00/?>
    <?call:TEMPLATE12?>
    <?end when?>
    <?otherwise:?>
    <?import:xdo://FND.XX21_SUB.en.00/?>
    <?call:TEMPLATE21?>
    <?end otherwise?>
    <?end choose?>so based on org_id will be import of needed subtemplate
    - re-register your "10 rtf templates" as subtemplates
    another way is substitution of template for concurrent then it running
    in before_report trigger set needed template
    l_conc_request_id := fnd_global.conc_request_id;
        if ORG_ID = 11 then
          UPDATE fnd_conc_pp_actions t
             SET t.argument2 = 'XX11'
           where t.concurrent_request_id = l_conc_request_id
             and t.action_type = 6;
      if ORG_ID = 21 then
          UPDATE fnd_conc_pp_actions t
             SET t.argument2 = 'XX21'
           where t.concurrent_request_id = l_conc_request_id
             and t.action_type = 6;

  • Single Transfer Order for Multiple Handling Units

    I have been researchig the ability to create a single transfer order for multiple handling units.  My assumptions are if it can be done that:
    1) A transfer order can have a single source, so if the source document for the handling unit (delivery) is different, that means different transfer order
    2) A TO can have multiple materials (line items) with different destination bins and quantities per bin
    I looked at the configuration for TO Split, but it's not clear that this will handle my requirement.
    I also saw this http://aq33.com/material-management/Articles-005798.html and it also says that my requirement can't be meant.  I'm just checking before I tell my customer this cannot be done.

    Yes you are right, if Source document is different, you need to go with different TO.
    But you can choose the Handling unit split, while creating a TO itself. i.e., You can quantify the goods for each handling unit.
    Edited by: Ganesh M on Feb 29, 2012 6:20 AM

Maybe you are looking for

  • Enable ADFContextualEvent in OBIEE 11.1.1.5

    Dear All, Regarding to Rittman presentation: http://odtugspconference.com/Slides/ADF-OBIEE%20Integration%20using%20the%20Action%20Framework.pdf slide 33 - I added following entry to the instanceconfig.xml file: <ActionLinks> <EnableADFContextualEvent

  • Using a 9205 to measure RPM

    I have not used labview in over 10 years but now have an application that requires but I am more then rusty. I am trying to measure RPM using a 9205 module and I am sure there is a way to do it. I have a pulsed voltage output from my measurement circ

  • Changing trace file name giving odd results - 10.2.0.2

    Hello, I'm trying to run a trace on a particular session. Using this: execute dbms_monitor.session_trace_enable(122, 58) It creates a tracefile in udump just fine. I turn tracing off: execute dbms_monitor.session_trace_disable(122, 58) Then the trace

  • Problem on BDC

    Dear All, In my program, transaction F-22 (create customer invoice) is called thru BDC: CALL TRANSACTION 'F-22' USING bdc_tab MODE 'E' UPDATE 'S'. The related customer has withholding tax info entered in the customer master. Hence when calling F-22 t

  • .xmp file CS4

    Is there any way to export the .XMP files that are associated with the MPEG2 DVD files without exporting the whole file... I have a project that I set the chapter points in Premiere but did not name them.  So I exported the file as a MPEG2 DVD file a