Formula Variable to find Standard Price on Different Plant

Hello Experts,
I'm attempting to write a query against our Inventory cube.  I need to show:
Inventory        Value of     Standard     Value of       Stock 
Qty               Stock @      Price @      Stock @     Value
@ Plant X      Plant X        Plant Y       Plant Y       Difference
Value of Stock @ Plant Y = Inventory Qty at Plant X * Standard Plant at Plant Y
Stock Value Difference = Value of Stock @ Plant X - Value of Stock @ Plant Y
Plants X & Y need to be input by the user.
My issue is determining the Standard Price at Plant Y.  0PLANT in the cube is tied to the inventory transaction.  Not all materials have inventory in both plants.  I've tried using a combination of Replacement Formula Variable (for standard price) and Restricted Key Figures but this only shows the standard price for those materials who have inventory at Plant Y.  Ideally if I could have a Replacement Path Formula Variable that allows restriction by a Plant (again user input).. that might work.  I don't see how to do this.  If that isn't possible would a Customer Exit Formula Variable work?  Is it possible to write ABAP code to query 0MAT_PLANT for the standard price & standard unit via customer exit?  I'm  not real strong in ABAP so example code would be GREATLY appreciated!!!
Thank you in advance for your assistance,
Teri

I just noticed the spacing got messed up on my original post and it looks really confusing.  I need to show the following columns
Inventory Qty @ Plant X
Value of Stock @ Plant X
Standard Price @ Plant Y
Value of Stock @ Plant Y
Stock Value Difference

Similar Messages

  • Formula variable to find week name for a date

    hi,
    i want to get the week name for a date value and i want to do this in query designer.can anybody tell me whther ican create any formula variable for this and if yes how can i do it???

    y dont use text varaible processing by customer exit

  • Standard cost with different dimentions

    Hi,
    We have a scenario where one material can be sold at different length.
    Ex:  Mat A is wire
    1 mr std price $2
    2 Mr std price $5
    3 mr std price $6
    etc., till 10 mtr
    user wants to have same material number but to handle the all the prices in standard price at different lengths.
    I recommended that this is not possible with SAP so go with different materialnumbers with different lengths.
    Is that correct or am i missing something from functionality, can any one help.

    Hi,
    The product is not manufactured its procured from vendor.
    If the customer places an order for 5 mt then the the same will bought from vendor and sell to customer.
    No inhouse manufacturing or assembling
    we recommended to use the different material code for different length.
    Just want to confir if thats correct or we can we use one material code for all lenghts.
    if we use Variant pricing that will help Sales order process but standard cost in material cannot be updated using variant pricing.

  • How to find if the  PO is Standard Price or Account Assigned or Variable

    Hi ,
    How to find wether the PO is Standard Price or Account Assigned or Variable .
    In EKKO, EKPO  or any table ,are there any fields on which i can  differentiate these PO's.
    Kindly help.
    Regards,
    Chetan Sakunde

    Hi,
    In material master accounting view we can find whether the material of that PO is standard price or moving average price.
    To find whether the PO is account assigned or not you can check in EKKN table.If the po is account assigned there will be entries in EKKN  table for that PO.
    If the PO is not account assigned there will not be any entries in EKKN  table.

  • Finding no. of days in a month in formula variable

    Hi all
    I wanted to find out no. of days in a month in formula variable customer exit at bex. I did the following code, which returning X value. Can anybody helps here.
    WHEN 'ZFV_NO_DAYS_MONTH'.
         IF I_STEP = 2.
           CLEAR L_S_RANGE.
           READ TABLE I_T_VAR_RANGE INTO XTAB WITH KEY VNAM = 'zdate1'.
           V_DATE = XTAB-LOW.
           P_DATE = V_DATE+6(2).
           CALL FUNCTION 'HR_E_NUM_OF_DAYS_OF_MONTH'
             EXPORTING
               P_FECHA        = V_DATE
             IMPORTING
               NUMBER_OF_DAYS = V_DATE1.
           V_RES = V_DATE1 - P_DATE.
           L_S_RANGE-LOW = V_RES.
           APPEND L_S_RANGE TO E_T_RANGE.
         ENDIF.
    Regrds
    swetha

    Hi Swetha
    in your code itself just change something as mentioned below
    VDATE1 type as integer.
    WHEN 'ZFV_NO_DAYS_MONTH'.
         IF I_STEP = 2.
           CLEAR L_S_RANGE.
           READ TABLE I_T_VAR_RANGE INTO XTAB WITH KEY VNAM = 'zdate1'.
           V_DATE = XTAB-LOW.
        *Hide No need***   P_DATE = V_DATE+6(2).
           CALL FUNCTION 'HR_E_NUM_OF_DAYS_OF_MONTH'
             EXPORTING
               P_FECHA        = V_DATE
             IMPORTING
               NUMBER_OF_DAYS = V_DATE1.
       *hide**    V_RES = V_DATE1 - P_DATE.
       *hide**     L_S_RANGE-LOW = V_RES.
    *Add the below new line
    L_S_RANGE-LOW = V_DATE1.
           APPEND L_S_RANGE TO E_T_RANGE.
         ENDIF.
    Regards
    Sureshkumar C

  • Formula  variable  replacemnt path    price  as the dimension

    formula  variable  replacemnt path    price  as the dimension  then  what  are the changes in my report

    Try to be clearer in your question, and I guess you'll have some help.

  • Where to find costing history- standard price or moving avg price.

    Dear All:
    We are updating standard price with costing module.
    i want to know standard price monthwise history.
    if some 1 know table for same or any other way please help.
    Vijay

    Here are th some of th tables relevant for CO.
    TKA01 Controlling areas
    TKA02 Controlling area assignment
    KEKO Product-costing header
    KEPH Cost components for cost of goods manuf.
    KALO Costing objects
    KANZ Sales order items - costing objects
    Cost center master data
    CSKS Cost Center Master Data
    CSKT Cost center texts
    CRCO Assignment of Work Center to Cost Center
    Cost center accounting
    COSP CO Object: Cost Totals for External Postings
    COEP CO Object: Line Items (by Period)
    . COBK CO Object: Document header
    COST CO Object: Price Totals

  • Formula variable / Replacement path issue

    Hi Experts,
    I have a Field which has different status description.
    I want to bring the count of only one preferred description.
    Model Status
    A1     New
    A2     Open
    A3     New
    B1     Closed
    B2      Pending
    B3     New
    I want to view only the closed count of models
    Model Count of Closed
    A1     0
    A2     0
    A3     0
    B1     1
    B2      0
    B3     0
    I tried doing this using the formula variable and Replacement path with Status Field.
    But I'm unsuccessful in selection the desired status.
    Please help me to over come this.
    Thanks

    Hi Dear Prasad,
    I can't restrict the characterstic to Closed. If I do so the output will be only for Closed.
    But here I want to bring every model with value as 0 and 1 for model with closed status.
    Hi Dear Raju,
    The requirement what I have here is more complex. like, the result will be for 6 month displaying every single cal/day.
    and also I have to find out percentage of closed for every cal/day based on number of model we got.
    i have only asked a small portion of it, with this input i will manage to build the percentage etc....
    I  cannot bring counter inside. My report is already too wide to be displayed.
    I have tried similar kind of thing, using CKF, Formula Variable and Replacement path with the Char - InfoObj.
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/009819ab-c96e-2910-bbb2-c85f7bdec04a&overridelayout=true
    But I'm not very sure how do I get only count of the my desired status.
    Please help.
    Thanks

  • Using Formula variable in a key figure formula

    Hi Expert,
    Can anyone tell me how to use a formula variable to pass the fiscal year variable value (with offset values define in different columns) to the be used in the formula (if statements)?
    Currently, I create a formula variable using replacement path from the fiscal year reference object and key but it's not pull the correct value. I'm not sure what's the difference between the different objects i.e. key, external char key value, attribute value etc.
    Please give me some lights.
    Thanks!

    Hi Janice,
    From Standard SAP Help
    http://help.sap.com/saphelp_nw70/helpdata/EN/43/565cd22fc95f6ce10000000a1553f6/content.htm
    Don't want to sound rude, but please search the Forum and SAP Hel before posting a thread, it helps everyone.
    Thanks
    CK

  • Formula Variable in Bex , Urgent

    Hi Experts,
                        I have created a formula variable on 0Material with replacement path as processing type. I am using this formula variable in a formula that i have created. The formula works fine.
    However , when i create another formula variable on 0Prod_hier ( which has a navigational technical name 0MATERIAL__0PROD_HIER ) with replacement path as processing type, The formula which i have created doesnt work.
    Ex:
    1) ('MAT_FORM' == 100010001)'NET_SALES'10  , This works fine
    2) ('HIER_FORM' == 10000010000001)'NET_SALES'10    . This fails.
    Iam using the same formula process but with different formula variables , i cant understand why the formula is failing
    I have checked the data, in the cube and the infoprovider (0Material has 0PROD_HIER data) , but i am stuck as to why the system is not recognizing the prod hier values,
    Kindly help me on this,

    Hi,
    Please read the following:
    BEx Query Designer: Creating formula variables
    You have loaded data into your InfoProvider. To be able to use sign reversal in reporting, you have to define a formula variable in the query definition:
           1.      You are in the Query Designer. Under Key Figures, use the context menu to choose New Formula. The Formula Builder opens.
           2.      Under Formula Variables, choose New Variable from the context menu. The variables wizard appears.
           3.      Enter a name and a short text for the variable. Choose Replacement Path as the processing type.
           4.      Choose your hierarchy basic characteristic.
           5.      Choose Hierarchy Attribute as the replacement. The attribute Sign Reversal is automatically displayed.
           6.      Save your formula variable. When defining the formula variable, you get the factor 1 or –1, with which you can multiply the required key figure.
    Regards,
    Subha
    If you find it useful, pleae grant me points

  • Standard Price of a material

    Hi All,
    Is there any FM or BAPI to find the standard price of a material from the invoice receipt? Thanks in Advance..
    Regards,
    Nirmal.

    Hi,
    Do you want to know the report where in which materials are assigned standard or variable price. Else you would like to know whether what give a material standard or variable pice status ...
    Regards,
    Ajay Gupte

  • Formula variable for dates

    Hi gurus,
    I am trying to fill a formula variable of type date via manual entry, but I cannot find which is the correct way to do it. I can introduce any other type of data (amount, prices...) via manual entry but I can´t do the same with dates. Any help about this??
    Thanx.

    Hi Ortiz,
    You can do it like this:
    1. Create one variable based on any date field.
    2. In you query In column create 1 selection, restrict any key figure with this variable (created above). In display property set Hide.
    3. Create 1 formula variable with processing type customer exit and choose dimension as date.
    4. Now in CMOD, write the below code for your formula variable:
    Suppose the source variable name is ZDATE1,
    Forumla var name is ZFinal_date
    Code it like this:
    when 'ZFinal_date'.
    READ TABLE i_t_var_range INTO wa_value WITH KEY vnam = 'ZDATE1'.
            wa_range-low    = wa_value-low.
            wa_range-opt    = 'EQ'.
            wa_range-sign   = 'I'.
            APPEND wa_range TO e_t_range.
    Now u will get the date inputed value in your formula cariable.
    5. Create 1 CKF and do the subtraction in there:
    if ur key figure name is KF1 then type forumal as:
    KF1 - ZFinal_date.
    Hopefully u wil get the desired output.
    Thanks
    Dipika

  • Formula Variable and key date

    Hello!
    Maybe someone can help me with the following problem:
    We have an inventory cube and want to see our stock with alternative values. On 0Material exists a key figure ("price") as time-dependent attribute. This key figure displays the price of the material for different periodes (that's why attribute is time-dependent).
    In the query I created a formula variable (=> replacement path, replaced with the mentioned key figure "price") and in a formula I multiplicate stock and the formula variable. This works fine and value of key figure "price" is correctly selected according to key date of the query.
    But I need a second formula, where stock from previous year is multiplicated with "price" from previous year, so I need a possibility for a second key date relevant for a second formula variable.
    Anyone who had a similar problem? Any idea how to solve this problem - formula variables are not mandatory!
    Br
    Gunter

    Hi Kishore,
    Use the formula created by you (say Formula 1) in a new formula ( say Formula 2).
    Use If Else condition.
    Formula 2 = (Formula 1 < 0)0 + (Formula 1 >=0)Formula 1
    The above expression explained as:
    If Formula1 < 0 then
      Formula 2 = 0
    Else
      Formula 2 = Formula1.
    You can hide Formula 1 and Display only Formula 2 in your report.
    Hope this helps!

  • Customer Exit for Formula Variable

    Hi all, and thanks in advance for your help on this one.
    I'm trying to run a function module to convert the value of a characteristic in my ODS to a formula variable. To do this, I've created a replacement path variable to hold the value of the characteristic, and then I'm passing this value to another module to convert it to factory date.
    Here is my code ZTSTGIDT is the name of the replacement path variable that is set to equal the characteristic key value.
    DATA: CONVERTDATE  TYPE SYDATUM. " Date
    DATA: FAC_DATE     TYPE FACDATE. " Factory Date
    DATA: ZE_T_RANGE TYPE RSR_T_RANGESID WITH HEADER LINE.
        WHEN 'ZFACDY01'.
            CLEAR: ZE_T_RANGE, E_T_RANGE.
    *  Get the Goods Issue date from the formula variable.
        IF I_STEP = 2.
          READ TABLE I_T_VAR_RANGE
          WITH KEY VNAM = 'ZTSTGIDT'
          INTO CONVERTDATE.
          CALL FUNCTION 'DATE_CONVERT_TO_FACTORYDATE'
          EXPORTING
          CORRECT_OPTION = '+'
          DATE = CONVERTDATE
          FACTORY_CALENDAR_ID = 'ZB'
          IMPORTING
          FACTORYDATE = FAC_DATE
          EXCEPTIONS
          CALENDAR_BUFFER_NOT_LOADABLE = 1
          CORRECT_OPTION_INVALID = 2
          DATE_AFTER_RANGE = 3
          DATE_BEFORE_RANGE = 4
          DATE_INVALID = 5
          FACTORY_CALENDAR_NOT_FOUND = 6
          OTHERS = 7.
          IF SY-SUBRC = 0.
              ZE_T_RANGE-LOW = FAC_DATE.
              ZE_T_RANGE-SIGN = 'I'.
              ZE_T_RANGE-OPT = 'EQ'.
              APPEND ZE_T_RANGE to E_T_RANGE.
          ENDIF.
        ENDIF.
    The variable ZFACDY01 does not receive a value from this code, and it seems as if the variable CONVERTDATE never receives a value from the replacement path variable.
    1.) Is it even possible to read the characteristic value in this way?
    2.) Is there another way to read the characteristic value directly from my ODS at runtime for the record in question?
    The much easier solution is to create new key figures for each date that we need to convert to factory days and to do the conversion in the update rules, but doing so would require extensive reloads of many years worth of data. Even though performance will be impacted, we're trying to find a workaround (queries will be batch-run at night, anyway).
    Many thanks (and points!) for the person who can figure this out

    I tried using different I_STEP stages, but the replacement path variable still doesn't seem to be populated when it passes the value to the function module to convert to factory days.

  • How to get Moving Average Prince and Standard Price in BW (inventory cube).

    Hi All,
    Could anyone please suggest us how to get Moving Avg. Price and Standard Price for 0ic_c03 cube, i had gone through 0CO_PC_ACT_05 and 0CO_PC_ACT_02 datasource but it is not going to solve our purpose.
    In SDN i had gone through few links and understood that we have to work on 0MAT_PLANT info object but i hav't not found how to work on this, though i found few SAP notes which are related to MAP. (869892, 819464, 863644).
    Probably some one might worked on these MAP and Std. Price, if you could share your work which us that will be a greate help.
    Highly appreciated if you share the code and steps how to work on MAP and Std. Price.
    Thanks in Advance.
    Akash

    Hi,
    You need to enhance the Standard DS of Infoobject 0MAT_PLANT and Infoobject 0MAT_PLANT  to include these 2 fields.
    And you need to enahance the 0IC_C03 cube to include  0MAT_PLANT and need to complete the mapping in all 3 Update rules for this added Infoobject.
    <b>And you need to upload the attribute data of 0MAT_PLANT as full upload every day.</b>
    In the reports , you need to dependent on Formula varibles with replacement path with standard price an MAP price attributes of  0MAT_PLANT. So if you go with these formula variables with replacement path, you should take 0MAT_PLANT characterstic into rows as a prerequiste.
    If you want to  avoid this prerequisite, then take a look on How to calculate with attributes values.
    Other wise you need to do the calculations at 0MAT_PLANT level by a base query after every upload,and the result should be stored in TODS by APD .And then you can final report with out 0MAT_PLANT in rows upon this ODS.
    You can see my contact details in my business card.
    With rgds,
    Anil Kumar Sharma .P
    Message was edited by:
            Anil Kumar Sharma

Maybe you are looking for

  • Installing SCVMM 2012 r2 in a VM on Hyper-V 2012 and windows failover cluseter

    Hi, I am planning to configure scvmm 2012 r2 that will be managing 30 hyper-v host servers, please guide me will it be ok if i install and configure both scvmm 2012 r2 and sql server 2012 on same VM running on Hyper-V Failover Cluster ? Regards, Afza

  • BOOTCAMP INSTALLATION?

    After partitioning and installation of Windows-XP, there are no Bootcamp utilities to go to the internet. I tried to update Bootcamp, but allways is the error that I should first install an older version of the program. Is there a solution for this p

  • Please help me  regarding SQl:Exception

    Hi all. I am not getting where i am going wrong java.sql.SQLException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'where User_ID=0.0' at line 1 (where 4 and 5

  • Backing file at Page level

    Hi, I am working on Weblogic portal 9.2. I have single Portal that hold one page and 3 portlet. Conditionally I wanted to visible and hide these portlet so I added backing file at Page level and after using setVisible() method of portlet I can hide o

  • FWTR056 Error assigning update type to flow type 1200, sign -

    Hi we have defined a monymarket product type 530 ("Repo")  with Transaction Type 200 (Liablity) and 100 (Asset). This works fine. Now, the current market situation requires negative interests for Transaction Type 200: Example: First Cashflow: +1M Fin