Bex Formula for calcualting Value from Quantity & Price

Hello,
In my query I need to calculate the value by multiplying Quantity available in my cube and net price in my material master attribute.
How can I do this?
I tried creating a formula variable for net price and multipied it with Qty but it still says the formula is incorrect.
Any suggestions please??

I created a formula variable using replacement path as processing type, selected the reference characteristics as 0Material.
Under replacement rule selected replace variable with "infoobject", replace with "Attribute Value" and selected my attribute infoobject "0Net_Price"
In my calculated key figure I try to use this formula variable and multiply it with Qty,but it still gives a warning element not defined properly.
Can you let me know if I have missed out any step in the formula variable creation??
How is the final unit of the Calculated key figure determined? Does it take the unit of net price ??

Similar Messages

  • How to Load Historical values from Material Prices

    Hi
    I have to load historical values from Material Prices.
    I'm using extractors 0CO_PC_ACT_02 and 0CO_PC_ACT_05.
    Do you know how I can do this in a easy way?
    Help is appreciated.
    thanks in advance.
    best regards

    Hi Joao,
    This extractor0CO_PC_ACT_05 takes the data from table MBEW. ( data for the current period, previous period and last period of the previous year )
    If material ledger is active, then it takes the information from table ckmlhd for those materials.
    It does not look like fetching from MBEWH.
    Please validate my above comments with sample extraction for a material and plant.
    If that is the case, I would suggest you have to create a custom extractor based on MBEWH to get the historic price data and with 0CO_PC_ACT_05 you can get the prices for the previous period as they get completed .
    0CO_PC_ACT_02 gets you the inventory value and not the price in the same way.
    You might have to think about 0CO_PC_ACT_06 and 0CO_PC_ACT_07, if you have project stock and sales order stock in your business scenario.
    Please let me know, how this goes.
    Thanks,
    Krishnan.

  • Copa there is a option for reset value field / quantity value filed

    Hi
    As per the sap standard in copa there is a option for reset value field / quantity value filed. We
    use this function to reset a quantity or value field depending on the
    billing type (For eg L2 (Debit Memo) G2(Credit Memo). This means that
    the condition value set in the field is replaced by value 0. Due to
    this quantity value filed in copa reflects nil. My client requirement is when profit center document is generated System should display the quantity as nil.
    i have tried some enhancement but these enhancement is only used in  case of PGI . But in the case of debit and credit memo their is no PGI. first we create debit not request (va01) then billing(vf01) then document is generated .
    Can we do the same thing in profit center Accounting? When PCA document
    is generated System should display the quantity as nil.
    Please let me know some user exit or substitution or Bte  we can use ?
    Anjali

    hi Jerry,
    Very appreciated the link you sent.  In this article of this link,  it gives an example of a conversion from an external to an internal format:
    1. '1234 ' -> '00001234'
    2. 'ABCD ' -> 'ABCD '
    Just wonder why the external format '1234 '  has to be converted to '00001234', what's the purpose of doing this converstion?
    Thanks!

  • Modify MVGR4 in formula for condition value

    Hello everyone,
    I want to modify komp-mvgr4 in a formula for condition value. Changes in komp structure are not saved, any idea which field I have to modify?
    Many thanks!
    Andreas

    Sure. I have a new formula for a condition value which checks a lot of things to calculate the condition value. The result can also be zero. In all other cases than zero, I want to set an additional flag on the position to show that the condition is used. For this I choosed the material group 4. Now I have to modify the materialgroup 4 MVGR4 in the formula, if I change komp-mvgr4 is does not save the changes...
    Andreas

  • Routine does not get its value from: quantity* net price

    Dear all,
    I have a problem with routine. Could you suggest me any solution for it.
    If quantity =1 there is no problem. But if quantity different than 1 routine still calculates as quantity 1.
    What migh be problem here?
    I have routine as:xkwert = xworkk - xworki.
    I assigned it YODI condition.
    To give an example: xkwert = xworkk - xworki.
    NETW                                              200,00
    OWST                         16,00
         Sub Total                               216,00 = XWORKK
    YOFI                         100,00 =XWORKI
    YODI                                                   8,00 =XKWERT*Here routine calculates as XWORKK=108 and XWORKI= 100.
    How can  I fix it?
    Kind Regards,
    Edited by: Fsmehmet on May 13, 2011 7:02 AM

    Dear Amit,
    My routine: xkwert = xworkk - xworki. And it works when quantity is 1.
    But when quantity is different then one, calclation is wrong.
    For example;
    Quantity=2 Net Price=100 And NETW=2100=200*
    OWST 16,00
    Sub Total 216,00 = XWORKK
    YOFI 100,00 =XWORKI
    YODI 8,00 =XKWERT*Here routine calculates as XWORKK=108 and XWORKI= 100.
    Regards,

  • Variable used in FOx formula should get value from user

    Hi Gurus,
    In my fox formula I want to multiply a keyfigure (say quantity) with a factor. For example if the factor is 10 then all records should get multiplied by 10.
    But the requirement is user shpuld be able to give the factor that should be multiplied. That is the l_factor used in the fox function should be a variable which gets value from user. I know we can give variables in filter and planning functions in IP. But can we give values in Fox formula.
    I would really appreciate the time and effort.
    Thanking you,
    Jerry Jerome

    Hello,
    May be you can try this solution.
    I think you have create a dummy character info-object(Z_Number) of same data type interget number.Create variable for Z_Number and restrict in filter(ZV_NUM).
    DATA Z_MAT TYPE 0Material.
    DATA Z_NUM TYPE Z_NUMBER.
    DATA Z_NUM_READ TYPE I.(Declate same as data type for Z_Number)
    Z_NUM = VARV(ZV_NUM).
    FORACH Z_MAT.
    Z_NUM_READ = Z_NUM.
    {Z_KF1,Z_MAT} = Z_NUM_READ * {Z_KF1,Z_MAT}.
    ENDFOR.

  • Setting in BEx formula for calculation of YTD and MAT

    Hi,
    I have to implement 2 formulae in BEx.
    As I am trying to avoide ABAP coding, can anyone please suggest SETTINGS in BEx FORMULA to achieve these below mentioned 2 formulae -
    1 ) Calculate YTD - Average of the sum of the reported quarter values from the start of the year until and including the selected quarter. But, if we enter Quarter 3 and there is no data for quarter 2 then the average should be equal to sum of data for Q1 and Q2 divided by 2 instead of 3 even though user entered Q3.
    2) Calculate MAT - Average of the sum of the reported quarter values for the last 4 quarters. We need to check last 4 quarters. If data is present only for 3 quarters in the last four quarters then the MAT will be data for 3 quarters divided by 3.
    Please suggest BEx formulae settings, if any for the above calculations.
    Thanks a lot.
    Regards,
    Prerna

    Hi
    I am not sure requirement related YTD is possible without customer exits variable
    But regarding your 2nd requirement
    Calculate MAT
    Create four restricted key figures by using offset (0, -1, -2, -3) and restriction characteristic will be quarter.
    Create a calculated key figure "Count of Quaerter". This will consist of "Number of rows" key figure with exception aggr on the Quarter characteristic and aggr will be "Count for all not eq to 0".
    Create a calculated key figure which will be sum of four restricted key figures divided by Count of Quarter.
    Kindly let me know incase further details required
    Best Regards
    Rohit

  • BADI implementation for importing values from excel

    Hi All,
    This is my first ever post in this forum and I am a newbie in ABAP. I have this doubt rather I would say I am stuck while implementing a BADI for importing Excel values.
    We have a BADI for 'Upload flow rate' button which is built on PLM frame work on webdynpro.
    The requirement is that after clicking the ' 'Upload flow rate'  button it should prompt for selecting the excel file and after selecting that file, the values should get loaded to the internal table.
    what I have tried till now is that
    CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
       EXPORTING
        I_FIELD_SEPERATOR    =
         I_LINE_HEADER        = 'X'
         I_TAB_RAW_DATA       = IT_RAW       " WORK TABLE
         I_FILENAME           = 'C:\abcdl\book1.xlsx'
       TABLES
         I_TAB_CONVERTED_DATA = lt_result
       EXCEPTIONS
         CONVERSION_FAILED    = 1
         OTHERS               = 2.
    IF SY-SUBRC <> 0.
       MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
               WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    endmethod.   
    I tried hard coding the xls file but it gives error as 'CNTL_error' which I guess is a known issue when we use this function module in webdynpro.
    So how can I get the values from excel without using datasource and just by hard coding the file name?
    Regards,
    Anand
    Anand

    There is no solution to this - SAP have said they will re-introduce this functionality, but they havent said when (as far as I am aware).
    However, we have developed a workaround (for Web reports anyway), let me know if you are interested.
    Patrick

  • Logic for inserting values from Pl/sql table

    Hi I'm using Forms 6i and db 10.2.0.1.0
    I am reading an xml file using text_io, and extracting the contents to Pl/sql table.
    Suppose, the xml
    <?xml version="1.0" encoding="UTF-8" ?>
      <XML>
      <File name="S2_240463.201002170044.Z">
      <BookingEnvelope>
      <SenderID>KNPROD</SenderID>
      <ReceiverID>NVOCC</ReceiverID>
      <Password>TradingPartners</Password>
      </BookingEnvelope>
    </File>
    </XML>From this xml, i'm extracting contents to a table of records, say bk_arr, which look like
    Tag                             Val
    File name                     S2_240463.201002170044.Z
    SenderID                     KNPROD
    ReceiverID                   NVOCC
    Password                     TradingPartnersAnd now from this i've to insert into table, say bk_det .
    The tag may come in different order, sometimes some additional tags may also come in between,
    So i cannot access it sequentially and insert like
    Insert into bk_det(file,sndr,rcvr,pswd) values(bk_arr(1).val,bk_arr(2).val....)
    The tag name is constant ir for sender id, it will always be SenderID , not something like sndrid or sndid etc..
    So if i've to insert to senderid column, then i've to match the tag = SenderID, and take the value at that index in the array.
    How best i can do this?
    Thanks

    I am referring to how you are parsing the XML - as you can extract values from the XML by element name. And as the name is known, it's associated value can be inserted easily.
    Basic example:
    SQL> with XML_DATA as(
      2          select
      3                  xmltype(
      4  '<?xml version="1.0" encoding="UTF-8" ?>
      5  <XML>
      6          <File name="S2_240463.201002170044.Z">
      7                  <BookingEnvelope>
      8                          <SenderID>KNPROD</SenderID>
      9                          <ReceiverID>NVOCC</ReceiverID>
    10                          <Password>TradingPartners</Password>
    11                  </BookingEnvelope>
    12          </File>
    13  </XML>'         )       as XML_DOM
    14          from    dual
    15  )
    16  select
    17          extractValue( xml_dom, '/XML/File/@name' )                      as FILENAME,
    18          extractValue( xml_dom, '/XML/File/BookingEnvelope/SenderID' )   as SENDER_ID,
    19          extractValue( xml_dom, '/XML/File/BookingEnvelope/ReceiverID' ) as RECEIVER_ID,
    20          extractValue( xml_dom, '/XML/File/BookingEnvelope/Password' )   as PASSWORD
    21  from       xml_data
    22  /
    FILENAME                  SENDER_ID  RECEIVER_I PASSWORD
    S2_240463.201002170044.Z  KNPROD     NVOCC      TradingPartners
    SQL> Now this approach can be used as follows:
      create or replace procedure AddFile( xml varchar2 ) is
    begin
            insert into foo_files(
                    filename,
                    sender_id,
                    receiver_id,
                    password
            with XML_DATA as(
                    select
                            xmltype( xml ) as XML_DOM
                    from    dual
            select
                    extractValue( xml_dom, '/XML/File/@name' ),
                    extractValue( xml_dom, '/XML/File/BookingEnvelope/SenderID' ),
                    extractValue( xml_dom, '/XML/File/BookingEnvelope/ReceiverID' ),
                    extractValue( xml_dom, '/XML/File/BookingEnvelope/Password' )
            from    xml_data;
    end;
    /No need for a fantasy called PL/SQL "+tables+".

  • Retrieving values from a price sheet.

    HI All, I am new to Numbers and I am trying to create a sheet that will calculate pricing for screen printing.
    Basically, I need to be able to input two variables and have Numbers find the corresponding value in a separate table.
    There are two major variables that determine the price; the total quantity of prints and the amount of colors.
    Each possibility is plotted on in this table:
    What I need the sheet to do is recognize the input of the two variables, find the specific price from the table, and then multiply that number by the quantity.
    For example, if the customer needs a 1 color print on 72 items then the unit price will be $1.10. The extended cost would be $79.2 ($1.10 X 72).
    There are a few other functions that need to be added, but this element is the only one I am unable to work through.
    I most recently tried using an =IF formula but can only seem to get one instance to work at a time and it's shaky at best, probably a dead end.
    Here is a screen grab:
    If anyone can point me in the right direction I would be grateful.
    Let me know if I need to clarify.
    Thanks
    -Squidliver

    Hello
    In addition to what SGIII said... VLOOKUP() would be your friend. It is designed for this.
    E.g.,
    Table 1 (excerpt)
    A1  Quantity
    A2  12
    A3  15
    A4  432
    B1  Colours
    B2  1
    B3  5
    B4  3
    C1  Unit Price
    C2  =VLOOKUP(A2,LUT::$A:$G,B2+1,1)
    C3  =VLOOKUP(A3,LUT::$A:$G,B3+1,1)
    C4  =VLOOKUP(A4,LUT::$A:$G,B4+1,1)
    D1  Subtotal
    D2  =A2*C2
    D3  =A3*C3
    D4  =A4*C4
    Table is built in Numbers v2.
    Good luck,
    H

  • Bex Formula Rounding Up Values!

    Hi Guys,
    I am doing a calculation in BEx where I divide items by days (items%Adays) but the result value is 4.77 on a calculator but Bex rounds up to 4.0!  All my results differ by the fraction so I need to the 4.77 to come up else all columns will be 4.0!
    In properties I increased the decimal places to 2 d.p for the results formula field but it didnt work!
    Anyone have any ideas?
    Thanks
    DV

    Depesh,
    This is the same as posted by AVR but contains the procedure also...
    Check the following ,
    have you defined the decimal places in the KF properties . Right click on KF and select properties , the decimal places will be a dropdown.
    Set the same to the first value in the dropdown and then execute your query , come back with the results.
    Arun
    Assign points is helpful...
    Message was edited by: Arun Varadarajan

  • XSl formula for pulling values based on parameters or query strings

    Hello,
    I have a custom list in SharePoint
    List Column/Fields (any time a new item is created these are the fields that need values)
    Machine = ID2
    SpecLabel = text string value
    SpecValue = text string value
    Using DataFormWebPart
    I Filter values by Machine by creating a parameter with a query string as its source.
    And pull the values
    <xsl:value-of select="@SpecLabel" />
    <xsl:value-of select="@SpecValue" />
    On the browser I add the parameter to the URL sting to filter each machine ID.
    ?=Machine=1
    Back in the XSL i use the same parameter to pull the value of the string as my header title.
    <xsl:value-of select="$paramMachine"/>
    Problem
    I need a formula that will pull just the the SpecValue data for a specific item.
    Example: I have thee items below and I need to just pull the “SpecValue” for the Built Year which is 2014.
    Machine = 1
    SpecLabel = Speed
    SpecValue = 10
    Machine = 1
    SpecLabel = Color
    SpecValue = Red
    Machine = 1
    SpecLabel = Built YearSpecValue = 2014
    Any Suggestion? 

    Hi,
    According to your post, my understanding is that you wanted to the formula to filter a list item.
    You can create the formula similar like below.
    <xsl:variable name="Rows" select="/dsQueryResponse/Rows/Row[@City = 'Abington']"/>
    More reference:
    http://sympmarc.com/2011/08/15/compound-filtering-in-data-view-web-parts-dvwps-with-sharepoint-designer/
    http://blog.jussipalo.com/2012/01/sharepoint-filter-data-form-web-part.html
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • How to adjust x axis of line chart for dynamic values from universe

    Dear All,
    I am new to SAP Dashboard. I got one requirment that, user will pass single value to universe using prompt in Dashboard. Based on that prompt value / input parameter, universe will deliver data to plot line chart in my canvas. But, on every request i will get different count from universe. Like for request A = 30 records, request B = 56 records, request C = 2 records and so on.
    Based on the count, i want to display line chart in my canvas which will auto fit the screen. (Auto adjustment of X axis e.g For A, last record on x axis should be 30, for B = 56 and for C =2). Please let me know, how can i achive this task?.
    Note : i know, how to plot simple line chat with fix count.

    This is based on the output you get for the selection, get in touch with the functional team and get an idea about maximum no of result set will appear on various selection options. Say example if the functional guy says around 100 then go ahead and map 100 cells for the series.
    Then as arijit said you can use the ignore blank cell option to eliminate the blank rows in the selection.
    Note: Eliminating blank cells will always work at the end of the rows, not in the middle of the rows.

  • Invalid object name for Next value from sequence  using sqlserver 2012

    Select SequenceName.nextVal into lint from dual ;
    Invalid object name error message is coming when using sqlserver 2012
    Please help

    Hello,
    Create the sequence and a stored procedure which returns the sequence as follows:
    CREATE SEQUENCE mySequence_tinyint AS tinyint
    GO
    CREATE PROCEDURE Central_CreateSequence
       @NextID BIGINT OUTPUT
    AS
    BEGIN
       SET NOCOUNT ON;
       SELECT @NextID = NEXT VALUE FOR mySequence_tinyint;
    END
    GO
    In PowerBuilder, run this script:
    long ll = -10
    DECLARE proc PROCEDURE FOR Central_CreateSequence @NextID = :ll OUTPUT;      
    EXECUTE proc;
    FETCH proc INTO :ll;
    CLOSE proc;
    IF SQLCA.SQLcode <> 0 THEN
    MessageBox("error", SQLCA.sqlerrtext)
    END IF
    MessageBox("", ll)
    I know there can be other ways to return the next value of the sequence...
    HTH
    Jacob

  • Java - best practice for getting values from complex dialogs

    Hi,
    Java is a language I use quite a bit, but much of my work hasn't required GUIs. Now, I'm developing an app which will contain a number of custom-made dialogs (which will obviously extend JDialog). Take a typical Options dialog which typically stores many parameters for a given application.
    Simple dialogs that ship with Java allow to 'get' a given value. As they assume that the dialog only consists of obtaining a single piece of data, think JFileChooser.
    So, what is the best way to cope with a dialog that could potentially hold hundreds of parameters? It's surely unfeasible to implement getters for each field. I was thinking either creating a hashmap object to hold key-value pairs, and 'get' that from the dialog. Or, I could encapsulate that a little more by creating a new class that manages these values, ProgramOptions or such like. That can be passed around between the dialog and the main app.
    I hope this makes sense
    TIA

    sudman1 wrote:
    I doubt it's the most efficient method, but the way I've delt with things like this in the past is to set up the fields in either an Array or ArrayList, then use a for loop that gets the data and drops it into an Array/ArrayList which is then returned.
    class MyDialog extends JDialog {
    // Global variable
    private ArrayList dialogFieldsArray= new ArrayList();
    private void initGUI() {
    for (int i=0 ; i <numRequiredFields ; i++) {
    dialogFieldsArray.add(new JTextField(10));
    private ArrayList getDialogData() {
    ArrayList rval = new ArrayList();
    for (int i=0 ; i < dialogFieldsArray.size() ; i++) {
    String tempString = ((JTextField) dialogFieldsArray.get(i)).getText();
    rval.add(tempString);
    return rval;
    The only thing to remember with the above method is the castings involved, but you could implement your own subclasses of ArrayList that deal only with JTextFields and Strings seperately to get around that.
    I personally wouldn't go for this exact style, instead I'd opt for a Map collection instead. This because you need to know which field is at which exact index. Imagine you make a form that has the fields: forename, surname, date of birth. And so you know that forename is .get(0) of your ArrayList, etc.
    But then, you decide to put a new field, saluation (Mr, Miss, etc) at the beginning. This now shifts all your olds fields along by one, and so you need to edit that code. Sure, no biggie with a handful of fields, but large dialogs could cause headaches.

Maybe you are looking for

  • Gmail performance is very slow in Firefox 4.

    Gmail performance is very slow in Firefox 4 and much slower when compared to performance in Firefox 3.6.x After clicking a button within the Gmail interface (e.g. refresh, opening an email, sending an email etc.) there is a noticeable wait time in Fi

  • Can't get alternating rows style to work

    I have a spreadsheet in Numbers for iPad that I'm trying to style with alternating row colors. I don't even really care if its just gray and white, but I would like any form of alternating shades since I have a ton of data in one spreadsheet. It seem

  • Ipod nano 6g doesn't turn on, screen turns white

    My ipod Nano (6th generation) doesn't work anymore. When I try to turn it on, nothing happens. Sometimes when I hold the sleep/wake button for several seconds, the screen lights up white. After a few seconds it turns off again. I have also tried this

  • Issue with battery in settings (not reading correctly)

    I am very disappointed in battery life but I am getting NO help from the interal battery meter on the.  Any solution from Samsung or Google on this?  Check out the screen capture to see what I mean...  Says Discharging and is showing wrong info...

  • Passing values for a prepared statement encounters problem

    I have a query which runs fine when executed from sqlplus SELECT SYSDATE + (INTERVAL '10' MINUTE) FROM dual; The same query when run using a java statement also works well. when I use a Prepared statement like String sql = SELECT SYSDATE + (INTERVAL