Unit Price Calculation on Smartform

Hi Friends,
   I am in a need to calculate and print unit price in Smartform, I am not supposed to make any changes in Driver Program. Here, the fields FKIMG(total quantity) and NETWR(Total amount) are selected from table VBRP and stored in an internal table itab. now this itab is passed to smartform tables interface. So my itab only have 2 fields FKIMG and NETWR.  I need to calculate Unit Price = NETWR / FKIMG.
The out put required is like this,
  Total Qty       Unit Price      Amount
  20                 100                2000
  05                  300               1500
  08                  200               1600
How to do this in smartform--- please help me.
Regards,
Ajoy

Hi Ajoy..
In case of SMARTFORMS we can add the Logic using PROGRAM LINES Node.
Steps:
1. Create a <b>variable</b> in the Global data Tab in Global Definitions of Smartform.
    Eg:  V_UNITPR TYPE VBRP-NETWR
2. Create a <b>Program lines</b> node above the Text node where the Unit price has to be displayed.
    Input Parameters: VBRP-NETWR  and   VBRP-FKIMG
    Output Parameters: V_UNITPR.
    Code:
                 V_UNITPR = VBRP-NETWR  /   VBRP-FKIMG.
3. Check the Program lines node and Display the Field V_UNITPR.
<b>Reward if Helpful.</b>

Similar Messages

  • Unit price calculation

    hi ,
    the system is calculating unit price from the summation of each
    condition values ,after that total sum multiplied by condition pricing unit and divided by sales quantity gives the value of the
    unit price.
    The problem is if  same material is sold in different sales order with different quantities the unit price varies in decimal places.
    how can the problem be rectified

    You may use rounding DIFF conditon for the same

  • Referencing annual prices for monthly units * price calculations

    Hello,
    We have a PLANNING application that has the following dimensions.
    Z_Account,Z_Time,Z_Company,Z_Version,Z_Driver,Z_DataSrc,Z_Driver,Z_Produ
    ct,Z_Customer. We have plan sales quantities by product and customer for
    every month in the year against an account called 'SalesUnits'
    (combination is Z_Account = SalesUnits, Z_Time = 2009.JAN to 2009.DEC,
    Z_Driver = None,Z_Customers = various customers, Z_Product = various
    products, Z_Version = Forecast, Z_DataSrc = Manual, Z_Company = various
    companies). However, sales prices are planned for and entered on an
    annual level.
    For this we store the sales prices for the combination
    Z_Account = "DriverAccount", Z_Time = 2009.INP, Z_Driver= "SalesPrice",
    Z_Customer = NoCustomer, Z_Product= various products,Z_Company = various
    companies,Z_Version = Forecast, Z_DataSrc= Manual. The requirement is to
    write script logic that multiplies sales quantities of each
    product/customer/ month by the price of the product/year and write the
    values to another account (SalesRevenue) for each product/customer/month
    combination.
    How would one go about writing the script logic for above?
    We tried the following ways. However, we get errors either during
    validation or during execution of the script.
    Try 1: In this case we created a property called 'Input_Year' in the
    time dimension and stored the value 2009.INP as property for all the
    months 2009.JAN to 2009.DEC
    *XDIM_MEMBERSET Z_Account = SalesUnits,DriverAccount,SalesRevenue
    *XDIM_MEMBERSET Z_Product = AllProducts
    *XDIM_MEMBERSET Z_Customer = AllCustomers
    *XDIM_MEMBERSET Z_DataSrc = Manual
    *XDIM_MEMBERSET Z_Drivers =ALL_ACT
    *XDIM_MEMBERSET Z_RptCurrency = LC
    *XDIM_MEMBERSET MEASURES = PERIODIC
    *function PRO(%DIMENSIONNAME%,%PROPERTYNAME%)
    %DIMENSIONNAME%.Properties("%PROPERTYNAME%")
    *endfunction
    #INPUTYEAR=PRO(Z_Time,INPUT_YEAR)
    *WHEN Z_ACCOUNT
    *IS "SalesUnits"
    *REC(Expression = %Value% *
    ([Z_Account].[DriverAccount],[Z_Drivers].[SalesPrice],[Z_Time].[#INPUTYE
    AR],[Z_Customer].[NoCustomer]),Z_Account = "SalesRevenue")
    *ENDWHEN
    *COMMIT
    The above code could not be validated. Is there any way to include a
    variable as dimension member in a tuple in a REC statement? NB: The code
    works if we hard code [Z_Time].[2009.INP] in the tuple. However, we want
    to avoid hard coding of years, months and dimension items that would
    change frequently.
    -->continued in reply due to characters limit

    Hi Halomoan,
    Thanks for pointing me in the right direction. I had to tweak the code to get the quantity * price to come out with the right numbers.
    One issue still remains in that I cannot get the input year populated as a variable. The following code works if the year 2009.INP is hardcoded in the statement
    *DIM Z_TIME                WHAT=2009.INP; WHERE=>>>; USING=BAS(%Z_TIME_SET%);
    , but does not work if I use a *SELECT statement to populate the variable %INPUT_YEAR%.
    I used the script logic tester in the BI system to test the following logic and specified 2009.TOTAL for Z_TIME and 1000 for Z_COMPANY.
    *SELECT(%INPUT_YEAR%, INPUT_PERIOD, Z_TIME, [ID] =%Z_TIME_SET%)
    *XDIM_ADDMEMBERSET Z_Time=%INPUT_YEAR%
    *RUNALLOCATION
    *FACTOR=USING
    *DIM Z_ACCOUNT     WHAT=DriverAccount ; WHERE=SalesRevenue; USING=SalesUnits;
    *DIM Z_DRIVERS        WHAT=SalesPrice; WHERE=>>>; USING=NONE;
    *DIM Z_CUSTOMER  WHAT=NoCustomer; WHERE=>>>; USING=BAS(AllCustomers);
    *DIM Z_PRODUCT    WHAT=BAS(AllProducts); WHERE=<<<; USING=<<<;
    *DIM Z_VERSION    WHAT=ACTUAL; WHERE=<<<; USING=<<<;
    *DIM Z_DATASRC    WHAT=HISTORY; WHERE =<<<; USING=<<<;
    *DIM Z_COMPANY    WHAT=%Z_COMPANY_SET%; WHERE =<<<; USING=<<<;
    *DIM Z_PLANT          WHAT=NoPlant; WHERE=<<<; USING=<<<;
    *DIM Z_PRODUCTGROUP          WHAT=NoProductGroup; WHERE=<<<; USING=<<<;
    *DIM Z_CHANNELPARTNER          WHAT=NoChannel; WHERE=<<<; USING=<<<;
    *DIM Z_TIME                WHAT=%INPUT_YEAR%; WHERE=>>>; USING=BAS(%Z_TIME_SET%);
    *ENDALLOCATION
    Any idea on how to get a variable populated from the property value of a member as defined by a %{Dimension member
    }_SET%?

  • Material Ledger-Periodic Unit price-Overhead cost calculation

    Dear Friends,
    My client using ML periodic unit pricing for reporting purpose.
    Costing analysis with Standard price,I can  be able to trace out how O/H would be calculated and derived into cost analysis.But with periodic unit price, the O/H figures are differnt from  cost analysis with standard price.Iam unable to trace out how O/H is getting calculating in case of Periodic unit pricing.My client would like to know why the O/H rates are differnt and from where we are derving in case of periodic unit price.
    Could some one tell where I can find out the configuration setting for O/H rates maintenence for periodic unit pricing. 
    Thanks & Regards.
    Ram

    HI  Ajay,
    Thanks for your reply.
    I can find the O/H rates as you said but none of the O/H rates are matching with periodic Unit price cost analysis.
    The main question was how O/H rates with periodic unit price are differnt from  O/H rates  with standard price ?.I greatly apprceciate for your answer.
    Thanks,
    Ram

  • 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 do column calculation in smartforms using table

    Hi,
    In Smartform Table..I created main area ( as TABLE) having  columns 
    POSNR(CELL7),   MATNR(CELL8),  FKIMG(CELL9),  VRKME(CELL10),  UPRICE(CELL11),  NETWR(CELL12)....
    Here UPRICE--- Calculate this field as Unit price = Amount / Billed Qty.
    For this....I created a Flow Logic at CELL11
    CELL11(Right click)
    CREATE---FLOW LOGIC -
    PROGRAM LINE
    Provided code:
    UPRICE = WA-NETWR / WA-FKIMG.
    Its showing the run time error
    Reference field WA-NETWR unknown in form
    what i have to do now for calculating UPRICE in this case...
    <offer removed by moderator>
    Thanks
    Lohit
    Edited by: Thomas Zloch on Jan 11, 2011 11:36 AM

    retreived the five column ( POSNR MATNR FKIMG VRKME NETWR )  values by providing code in GLOBAL SETTINGS -- INITIALISATION (TAB)
    SELECT POSNR MATNR FKIMG VRKME NETWR  INTO CORRESPONDING FIELDS OF TABLE
       ITAB FROM VBRP WHERE VBELN EQ PVBELN.
    And in  MAIN AREA-----Table -
    DATA (Tab) provided
    Loop
    Internal Table   ITAB  TO  WA.
    Created Text at each cell as
    WA-POSNR(for Cell 7),
    WA-MATNR (for Cell 8),
    WA-FKIMG(for CELL9),
    WA-VRKME(for Cell 10),
    UPRICE(for Cell 11),
    WA-NETWR(for Cell 12)

  • 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

  • Open PO LSMW Quantity conversion error in net price calculation

    Hi gurus,
    I encountered an error as I was tring to upload purchase orders - "Quantity conversion error in net price calculation". What does this mean and how do I fix this?
    Please help
    Thanks

    Hi Jürgen,
    Where in the Material Master can I find the conversion ratio between both units?
    Also, I am trying to upload POs for Spare Parts and that's when I get the error. But when I try to use other materials like FGs, everything is ok. I can proceed with the upload without any problem
    Please help

  • ME21N--Quantity conversion error in net price calculation

    Hi MM experts,
    Issue: while creating PO, when attempting to add the net price for line item. but system removes the cost and gives the follow error message says "Quantity conversion error in net price calculation".
    The system was not able to convert the order unit into the purchase order price unit. Possible reasons:
    i) the conversion results in a net price that is too high, or
    ii) the conversion factor for the units has not been properly maintained.
    iii) Check whether the units of measure and their conversion factor are correct.
    I have checked material master>unit of measure> 1 PL = 22 KG maintained.
    Can you please tell me how to resolve this issue?
    Appreciated early response.
    Thanks in advance.
    Suresh

    Hi Suresh,
    Please check on Material Master Data - Accounting 1 tab - Price Unit
    Moshe

  • Quantity Conversion Error in Net Price Calculation

    We are currently using SRM 5.0 ECS where we created a material PO and had a problem with the product not having the language E maintain in the material master. This caused the PO to have status of "error in process"  Once we fixed this issue and tried to reprocess the PO we're not getting the following error message in the Application Monitor:
    No Instance of Object type PurchaseOrder has been created. External Reference
    Puchase Order still contains faulty Items
    Quantity Conversion Error in Net Price Calculation
    Has anyone seen this or know what we can do to resolve this so that the PO gets replicated in R3?
    Thanks in advance.

    Hi Robert,
    Regarding this backend error E 212 06 Quantity conversion error in net
    price calculation.         
    This error is because in the PO Order price unit is empty. And          
    quantity is null. So, please enter the quantity and order price unit          
    for this PO and order the PO again. Or you can retransfer the      
    PO manually using the FM BBP_PD_PO_TRANSFER_EXEC. (for this fm you need       
    to input the PO header guid, which you will get it from tx.BBP_PD             
    by providing PO number and object type as BUS2201).
    This has worked for other customers.
    Hope this helps,
    Kind Regards,
    Matthew

  • Quantity conversion error in net price calculation in BAPI_PO_CREATE1

    I'm creating PO from BAPI_PO_CREATE1 .here i'm getting follwing error
    quantity conversion error in net price calculation.
    plz guide me to remove it.

    Are you using quantities directly entered by the user while calling the function to do the net price calculation? If that is the case, you should use FM CONVERSION_EXIT_ALPHA_INPUT to convert the quantity from the external format into the internal one!
    Another possibility is that some customizing is missing for converting quantities in different unit of measures (like the quantity in pieces is known, but the pricing calculation is being done on kilos.. but the convertion between these 2 unit of measures is missing).
    Good luck!

  • Error in net price calculation, item 000010 (Please correct)

    Hi
    Can you tell me error and correction for the same ? It occurs during creation of Std.PO. whom RM1000 prcing procedure is assigned.
    Error in net price calculation, item 000010 (Please correct)
         Message no. 06213
    Diagnosis
         Possible causes:
         o   The net price is negative.
             Check the prices and conditions entered.
         o   An error has occurred during currency translation.
             Check whether the foreign currency is defined in the system.
         o   The unit of measure of an item is not allowed.
             Check the units of measure entered.
         o   An internal error has occurred during the price determination
             process.
             A mandatory condition type is not defined in the system. Please
    In the analysis under item details condition tab I got message 301 as Acess 0002 12 is missing.
    Acess seq. 0002 is assigned to condition type PB00.

    I know this thread is very old but I had the same issue and found the solution.
    Enter the SubTotal in the pricing scheme for condition P101 (in my Case 9 - Copy values to KOMP-BRTWR (gross value)).
    Than it works for my case.
    Hope this helps.

  • Creating order form and need Java Script to calculate unit price and quantity in Acrobat Pro.

    Hi,
    I am creating order form in Acrobat Pro , and I have
    code
    Order Quantity
    Unit price $
    201
    500
    $ 0.52
    201
    1000
    $ 0.36
    202
    300
    $ 0.26
    202
    500
    $ 0.2
    How make Subtotal and Total price with Java script.
    I do not know how to write java script.
    Anyone can help me?
    Thanks,

    Thanks for your response. I have 2 quantities and 2 Unit price for each code, I know a simple sum in calculation it works for 1 unit price and quantity.  Can you please let me know how to do it? One of the expert sent m this:
    //change field names as needed
    var qt1 = this.getField("qt1").value;
    var up1 = this.getField("up1").value;
    var qt2 = this.getField("qt2").value;
    var up2 = this.getField("up2").value;
    event.value = (qt1 * up1) + (qt2 * up2);
    I put this in total text field (calculation tab , Custom script) , but it  did not worked.
    I appreciate it if anyone can help or give me  suggestion.

  • Cost Price Calculation

    Hello Gurus,
    How to calculate the cost price of an Article in Retail, how does the system calculate it?
    I did try looking for SAP note for help. However I couldnu2019t find one. Would appreciate your responses. 
    Thank you for your time in advance.
    Regards,
    Gareth.

    Hi Gareth,
    If by cost you mean the moving average price the system deos the calculation as mentioned below
    MAP = (Current stock value + Receipted stock value) / (Current stock quantity + Receipted stock quantity).
    For e.g. if you had 5 quantities of material X with unit price as $10 your current stock value is $50.
    now if you take a GR 10 quantities of the same material wih unit price $15 your receipted stock value will be $150.
    The MAP in this case will be: (50150) / (510) which is $13.33.
    Regards
    Kaizad

  • Actual Price Calculation (KSII)

    hi,
    I am not able to get the actual prices for my production order.
    I maintained certain settings for actual price calculation in OKEQ.
    Does it is mandatory to run the MFN1 (Revaluation of actual prices) before the KSII.
    Srinivas

    Hi Sateesh,
    Please find below the process for calculation of Actual Activity Prices:
    1. Define Splitting structure, rules (method). I am sure you would have done this
    2. Assign the splitting structure to Cost Centers. I hope you would be done this as well
    3. Actual values (Costs and quantitative details) will get collected to cost centers in the following way:
         - Quantities will get collected to Cost Centers once the confirmation of activities are done for the        production order.  Please make sure that "Record Quantity" check box is selected for the relevant secondary cost elements. 
         - Values will get collected from FI to the primary cost elements
    you may check whether the values have been properly collected to the cost center using the cost center reports
    4. Execute cost Split using - KSS2
    5. Then calculate Actual activity unit price - KSII
    6. Once the prices are successfully calculated, you can check the prices in KP26
    7. after this process is completed then you can revaluate you production orders using the actual activity prices
    I hope i made is clear.
    Let me know if you need further details in this regard
    Surya

Maybe you are looking for

  • Adobe Download Assistant Will Not Recognize My Adobe ID

    I've been an Adobe customer / forum user since before ID's were tied to email addresses.  My product registrations going back to 1996 through CS 5.5 apps are recorded under that ID.  Since I have to change my email address every couple years to escap

  • Vendor Balance Report ( field addition )

    Hi Gurus How i can add ( Name1 )   vendor name field in following report. Financial Accounting > Account Payable > Information System > Reports for account payable accounting > Vendor balances > S_ALR_87012082 - Vendor Balances in Local Currency than

  • CS6 on 5 laptops

    I need to purchase and install CS6 on 5 laptops.  What is the most cost effective way to do this?  Do I need to purchase it 5 times?

  • Error Message during order confirmation.

    Hi PP Gurus, In the mapping of MTO process scenario and it's simulation I am using 2 BoM components  as the NON-VALUATED (MATERIAL TYPE) for this I have made only 'Quantity Update' indicator ON in IMG settings. After MRP run and at the time of Produc

  • Printing text to an NT queue using 1.4 SDK.

    Does anyone have some code for printing text to an NT queue. I am particlarly interested in the MIME type and the print attribute sets used. The same exercise through JDK 1.2 generates a rastered image.. An example would be greatly appreciated.