Conervting 0FISCPER to a keyfigure

Hi,
how to find out the max 0FISCPER of a Order in BEX by 
the right setting of a replacemant path variable ?
How to convert the charcteristic 0FISPER correctly to a keyfigure
( http://scn.sap.com/docs/DOC-27491 ) ?
For Example - in goes the ORDER TABLE with the follwong data:
ORDERNO        FISCPER     PRICE
M1                  001.2014     11,11
M1                  005.2014     22.22
M1                  012.2014     33.33
A1                  010.2015     11,11
A1                  005.2015     22.22
A1                  001.2015     33.33
Out should go the desired result of the BEX Query:
M1                  012.2014
A1                  010.2015
I need to convert the 0FISCPER ( 007.2014) to a keyfigure, than find the max of it.
Problem is -i guess - the formatting of the 0FISCPER which is in the mmm.yyyy notation.
What settings will fit for the necessary replacemant path variable ?
Pretty easy basically in SQL - but how in BEX :
SELECT ORDERNO, MAX( 0FSICPER) FROM ORDER_TABLE
GROUP BY ORDERNO.
ThanXs
Martin

Martin,You are correct to achieve your requirement first we need to convert the fiscper into Keyfigure with the help of replacement path.
As fiscal year period is compounded with fiscal year variant so we need to take care of it while converting.
Another thing is we do not have separate dimension for fiscper in formula variable so we have to make use of number only.
In replacement path tab of Formula variable choose---replace variable with--infoobject--replace with key.
offset start 2 offset length 7.
In currency/unit tab--Choose number under dimensions.
Now you will get the value of fiscper in form of number.
You can follow my blog which discuss the same scenario but the time characteristic which i used was date.
How to show First and Latest Record at BEx Level
Hope this helps.If any issues please let me know.
Regards,
AL

Similar Messages

  • To load a Keyfigure called '0FISCPER'

    Hi Experts,
          I am loading a flat file which contains a standard keyfigure called '0FISCPER'...
         The conversion routine used in the keyfigure is PERI7 with input length - 7 and output length - 8.
          The data I enterd in the flatfile for the keyfigure is in the format -> mm.yyyy. Ex: 10.2005.
           But while creating the datasource and previewing the data, it is displayed as 005.01.02 and in DTP the value is displayed as 000000000.
          Please help me to solve the problem. Its very urgent.
    With Regards,
    Yokesh.

    Hello,
    Try the value as 010/2007
    Regds,
    Shashank
    Edited by: Shashank Dighe on Feb 21, 2008 9:18 AM

  • Filter by keyfigure

    Hi,
    I have one report which need filter by keyfigure, for example amount =0. I tried the condition report, however when it doesn't looks good when navigation. For example, it looks ok for year /period, however if I took out the period, it doesn't give me any result. Any other idea?
    Thanks

    Hi Victor,
    You can achive this by activating the Virtual Time Hierarchy under the Reporting Relevant Settings
    SPRO->IMG->Business Information Warehouse->General Settings>Reporting Relevant Settings>General Reporting Settings>Set F4 Help and Hierarchies for Time Characteristics>Virtual Time Hierarchies-->Activate the required info object
    you will see
    1. Date
    2. Cal Year/Month
    3. Calendar Month
    4. Fiscal Year/Period
    Select one info object according to your need
    Eg : you have your report with 0FISCPER then Select Fiscal Year/Period and activate a hierarchy.
    Now go to your Report and make the Characteristic as of Hierarchy.
    This will give you report in Hierarchy Structre.Even if there is no data in Info Cube.
    Hope this will help you.Let me know the out come
    regards
    Happy Tony

  • A keyfigure is not getting displayed in the DSO and query

    hi friends,
    i have newly developed a DSO with 11 keyfigures and with some 10 characteristics. i created DTP , transformations etc., and i loaded data into it and activated it succesfully.
    now when i select  display data of this DSO one of my keygure is not getting displayed.
    even tht same keyfigure is not appearing in the query  too.
    but when  i check the active table of this dso in SE11 , tht keyfigure is displayed with values.
    could anyone help through this issue.

    Hi
    Even I faced such an issue earlier. I could resolve it simply by readjusting the DSO i.e. to delete the keyfigure and add it in the structure once again, before this you have to delete the data in the DSO. Also, if you have a multiprovider on the DSO make sure that the keyfigure concerned is identified.
    Let us know if this works for you. Thanks.

  • 0FISCPER text variable "External Characteristic Value Key" has changed

    Hello!
    Could somebody help and tell, why in BI7.0 version (but 3.x RRMX version) the format of the 0FISCPER text variable (also other time characteristics) has changed from 001.2007 (version 3.x) to 0/1  .0700 (version 7.0)?
    I cannot understand the logic of the new Exterternal characteristic calue key. What can I do about it?
    Thanks for your help, gurus!
    BR, Auli Peltola

    I figured out myself the reason for the problem: in the new version the fiscal year variant has to be defined in report so that the 0FISCPER would work.

  • Few keyfigures are not getting updated in the backup cube

    Hi,
    We run the daily backup process chain which extract data from planning
    area and store in the cube & ods.
    There are infopackages which update cube & ods, the datasource & info
    source is same for both ODS & backup cube.
    But a few keyfigures do not get updated in backup cube where as we see
    ODS getting updated for those keyfigures. Also there exist data in the
    planning area for these keyfigures.
    There is direct mapping between the keyfigures in cube & planning area.
    We tried to debug it and noticed that data gets updated in update routine table but not get updated in cube.
    There are total 25 keyfigures in the cube , out of this only 5 keyfigures are not getting updated.
    Need expert opinion on this.
    Regards,
    Chetana

    Hi Chetana,
    Check the backup step in your process chain. The Data Selection tab may have certain conditions on account of which certain keyfigures in your Backup Cube are not getting updated.
    Check if any ABAP routine or any selection conditions are maintained which are causing certain keyfigs to be excluded.
    ~Rishi

  • Adding keyfigures to a cube

    Hi friends,
    Can i add two keyfigures additonally to an infocube which already has a delta scheduled?please help me with the process also.
    Thanks in advance.
    venkat

    Hi Kiran,
    1.First make sure you have the new Key figures in the datasource.
    2.Now go the cube and add the two key figures.
    3.Now add the 2 ket figures to the communication structure.
    4. Replicate the datasource if it is from R/3.
    5. Assign the R/3 fields to the 2 info-objects in the Transfer rules and activate.
    6. Set the update rules as per your business logic for the 2 new KF.
    Loading steps:
    Re-init steps:
    1. Right click on the data target -> Delete data. - This would delete the contents of the data target.
    2. Go to the init infopackage -> initilization options for source system and delete the init request.
    3. Load the new init again.
    4. From there do your regular delta loads.
    Hope I have made things clear.
    Bye
    Dinesh
    (Do not forget to assign points!!)
    Message was edited by: Dinesh Lalchand

  • Is it possible to display keyfigures in italics format in report output

    Hi All,
    Is it possible to display keyfigures in italics and bold format in report output?
    Thanks,
    Sri Arun Prian

    you can edit the CSS - there is a CSS class assigned to the key figures.... this is for WAD....
    Edited by: Arun Varadarajan on Feb 5, 2009 2:43 PM

  • How to use previous year keyfigure data in current year for other keyfig

    Hi Expert,
    I have 1 requirement wherein I need to use previous year data for some keyfigure calculation.
    Details are as follows:
    I have designed query with CKFs Turnover & UVG (in rows) & Fiscal year period in columns.
    Suppose Keyfigure Turnover data is displayed from Apr2009 to Mar 2011. In UVG: for Apr 2010, i need Turover data of month Apr 2009, for May 2010 turnover data of May 2009 similarly for other months.
    As per my understanding, I need to use customer exit which will store kf turnover data in internal table & in turn it will be used for UVG.
    But I'm not able to put it into syntax.
    Kindly suggest your inputs in this scenario.
    Thanks,
    Shamkant

    Hi
    Note that the variable ZCALCCALMTH is exit type and variable ZCALMTHREF is ready for input.
    WHEN 'ZCALCCALMTH'.
    IF i_step = 2. "après le popup
    READ TABLE i_t_var_range INTO loc_var_range WITH KEY vnam = 'ZCALMTHREF'.
    IF sy-subrc = 0.
    CLEAR l_s_range.
    year1(4) = loc_var_range-low(4).
    year1(4) = zyear1(4) - 1.
    zmonth1(2) = loc_var_range-low+4(2).
    CONCATENATE zyear1(4) zmonth1(2) INTO loc_var_range-low(6).
    zyear2(4) = loc_var_range-high(4).
    zyear2(4) = zyear2(4) - 1.
    zmonth2(2) = loc_var_range-high+4(2).
    CONCATENATE zyear2(4) zmonth2(2) INTO loc_var_range-high(6).
    l_s_range-low = loc_var_range-low(6).
    l_s_range-high = loc_var_range-high(6).
    l_s_range-sign = 'I'.
    l_s_range-opt = 'BT'.
    APPEND l_s_range TO e_t_range.
    ENDIF.
    ENDIF.
    bye
    Boujema

  • How to give color to the display of keyfigure based on condition using exception.

    Dear Friends.
       I am trying to color "BAD3" in exception based on condition but my problem is in exception I can have only formula variable to compare the value, How to assign a value to formula variable in BEx Query designer.
    What I am trying to do is :
       in Query designer :
       I have PO Quantity and Delivered Quantity. 
      if PO Qnantity > Delivered Quantity
        then Delivered Quantity field should be colored as "BAD3" in exception.
    but here proble is in exception
      I have alert level , operator, and  value fields for Delivered Quantity keyfigure ( Under definition tab - Exception is defined on = Delivered Quantity ).
    but for value field I dont have PO Quantity for that I have to supply one formula variable,
    When I created a forumula  and did this way
    FV_PO_QUANTITY = PO_QUANTITY formula editor throws errors. I dont understand How to assign a value of key figure to formula variable and use it in EXceptions.
    Please help me How I can solve my problem
    I will greatly appreciate your any help.
    Thanking you
    Regards
    Naim

    Thank you so much for your replies,
      I did following way and it helped me to solve my issues.
      I created one formula and under formula I use boolean < funtion to compare the values.
    like following way.
    ( 'PO Quantity' > 'Delivered Quantity' ) * ( FV_PO_QNT + PO_QUANTITY')
    here fv_po_qnt is formula variable I supply that variable to exception and since I have the value in it.. it compares with Delievered Quantity value and colored the perticular cell.
    Thanks again for your replies
    Regards
    Naim

  • How to display attributes as keyfigures in a report?

    hi experts,
                   i have a master data like ID is ref.char., under the ID attributes are NET and GROSS, when i am generating the report or query these two attributes ( NET and GROSS) should display as keyfigure which means we can drag these two attributes in column box only not in rows box.is it possible, if yes pl give step by step procedure.
    thanks & regards
    venkat

    Please correct me I understood you wrongly.
    You haev master data object "ID" and under attrubutes tab you have two attributes as "Net" and "Gross". Now if you want to use this attribute seperately, in other temrs you have to make these attr to act as individual characteristic so that it can be drag and drop in rows/colm. Please check the navigation box under attr tab. This way these attr will be navigational attr.
    Regards
    Pankaj
    ******Assign pts if helpful

  • Keyfigure fixing at aggregate level

    HI,
    I am using APO V4,
    1. I  am planning to fix my keyfigure only at aggregate level,  My keyfigure is open at all levels like plant or material group or material, i can enter the data at any point manually. but when come to keyfigure fixing, i want to fix the keyfigure only at aggregate level, i mean if the keyfigure is at material level i need fix, any other level it should not allow me to fix.
    I was thinking for a drill down macro, but my keyfigure should open at all levels irrespective of keyfigure fixing, is it manageable any how that keyfigure can only be fixed at material level?
    2.  this is a different issue from above, i have fixed the keyfigure for a month, after that i had run a copy macro to the fixed key figure, but the fixed values are overwritten once the copy job is completed, and when i check in the planning book, it is visible as fixed agian. do i need to have any macro specific setting for this during the copy macro?
    Thanks in Advance
    ARUN R Y

    Hi Gurus,
    I am having some problems with Key Figure Fix.
    The business requirement:
    Some fields must be kept fixed and locked during the interactive planning performed in tc /SAPAPO/SDP94.
    What was done in order to do it:
    We created macros using standard features in order to fix and block some cells in accordance with the business requirements. The first macro disaggregates the planning to the last level available for collaboration. Another macro using FIX_CALC and ROW_INPUT functionalities fixes and locks some cells (3 levels). After these activities the planning view is aggregated and it will be ready for collaboration.
    These macros run automatically every time that the user open an specific planning view.
    The problem:
    After the aggregation when the disaggregated level is called again all cells have been showed fixed and locked. If we perform the fix and lock manually the system run correctly, i.e., only the cells fixed and locked are kept in this status after an aggregating and disaggregating processes.
    Step-by-step
    u2022 Set the macro in /SAPAPO/ADVM u2013 MacroBuilder. To use the macro FIX_CALC in aggregated level. The first attribute set with ROW ATRIBUTES, the second attribute set with VALUES. FIX_CALC (Cota de Vendas; Cota de Vendas). With this setting, the aggregated line will be fixed.
    u2022 Set the macro in /SAPAPO/ADVM u2013 MacroBuilder. To use the macro FIX_CALC in level 1. The first attribute set with ROW ATRIBUTES, the second attribute set with VALUES. FIX_CALC (Cota de Vendas; Cota de Vendas). With this setting, the level 1 line will be fixed.
    u2022 Set the macro in /SAPAPO/ADVM u2013 MacroBuilder. To use the macro ROW_INPUT in aggregated level. Cota de vendas = ROW_INPUT ( 0 ). With this setting, the aggregated line will be locked.
    u2022 Set the macro in /SAPAPO/ADVM u2013 MacroBuilder. To use the macro ROW_INPUT in level 1. Cota de vendas = ROW_INPUT ( 0 ). With this setting, the level 1 line will be locked.
    u2022 Now, go to in /SAPAPO/SDP94.
    u2022 Disaggregated the planning view.
    u2022 Run the FIX_CALC and ROW_INPUT macros.
    u2022 Aggregated the planning view.
    u2022 Disaggregated the planning view again. You can see the problem.
    Thanks,

  • How to set a default value as current month in already created variable of 0fiscper

    Hi Guys,
    In my report currently we are using a variable for 0fiscper which is mandatory and selection option.
    Now there is a requirement to set current month as default value in that variable.
    Please let me know how can I do that.
    Thanks.
    Dolly

    You need to change the processing type to customer exit of that variable.
    Now in i_step = 1 write the following code:
    Data:dt LIKE sy-datum,
          zper  TYPE /bi0/oifiscper,
          YR type /bi0/oicalyear,
          per LIKE t009b-poper.
    IF i_step = 1.
    WHEN 'X_FSCPRC' .---User input variable based on cmod.
          dt = sy-datum.
          CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'
            EXPORTING
              i_date         = dt
              i_periv        = 'M3'---Give the fiscal year variant                             according to your system
            IMPORTING
              e_buper        = per
              e_gjahr        = yr
            EXCEPTIONS
              input_false    = 1
              t009_notfound  = 2
              t009b_notfound = 3
              OTHERS         = 4.
          IF sy-subrc = 0.
    Concatenate YR Per into Zper.
            l_s_range-low = Zper.
            l_s_range-sign = 'I'.
            l_s_range-opt = 'EQ'.
            APPEND l_s_range TO e_t_range.
          ENDIF.
    endif.

  • Customer Exit Variable in formula to get values for multiple keyfigures

    Hi to all,
    I have query as defined in following scenario:
    CHAR_X     C_KF1 (based on KF1)     C_KF2 (based on KF2)     u2026     C_KFn (based on KFn)
    Value1                    
    Value2                    
    u2026                    
    Valuem                    
    C_KF = calculated key figure
    I need to create a customer exit variable that will search through selection e.g. CHAR_X/KF1 and give some result. I need this variable for every keyfigure (KF1-KFn). Using customer exit variable is the only solution.
    My question is: do I have to create formula variable (customer exit) representing every keyfigure separately (VAR1 u2013 VARn, like in below example)?
    CHAR_X     C_KF1 (using VAR1)     C_KF2 (using VAR2)     u2026     C_KFn (using VARn)
    Value1                    
    Value2                    
    u2026                    
    Valuem                    
    Or is it possible to create one general formula variable since the way to retrieve the value in variable is always the same (like in below example)? In this case, how do I pass the value of the respective keyfigure to this variable?
    CHAR_X     C_KF1 (using VAR_X)     C_KF2 (using VAR_X)     u2026     C_KFn (using VAR_X)
    Value1                    
    Value2                    
    u2026                    
    Valuem                    
    Thanks for your replies, points will be awarded!
    Cheers

    That is my concern, the value of variable is not the same.
    What variable should do is:
    take KF1 id, go through values for CHAR_X, get back one value
    This value would always be different, and also "KF" part in code of variable should be different, based on the column where the variable is being used (so, in column C_KF1 ,variable should "pick up" id of KF1, etc.).
    I hope it makes it more clear. For now, I do not have the code for variable yet, I am just interested in concept whether it is possible to pass the ID of keyfigure dynamically so I can make decision how to model this request.
    Thanks

  • Problem with keyfigure in Bex

    Hi all,
    i have two charactristics location and product in the rows and keyfigures,stock on hand ,inventory carrying costs in the rows.In the coulmns i have calweek.For stock on hand keyfigure i had applied the cumulative property so that it shows the net stock on hand for every week, the inventory carrying cost is a calculated keyfigure and it is calculted using stock on hand and a formula variable based on master data 0APO_LPROD(LOCATIONPRODUCT).
    In the report the inventory carrying cost is getting calculated after calculating the stock on hand for all the calweeks which shouldnt happen.The inventory carring cost should get calculated for every week separately. So can anyone of you suggest why this is happening and how to solve this.

    Hi,
    Are you getting correct output for Stock on hand  for every week. ???
    I hope ur reporting structure is as below:
    Loc Prod  Calweek
                   Sotck | Inv. CC
                Mon |                Ssun |                     Tue
              Stock | Inv CC     Stock | Inv CC          Stock | Inv CC
    A   B   10 | 20              15  | 5                       30 |  8
    Now ur Inv cc is having Stock value for every week as
    10 + 15 + 30. = 55
    Correct me if i am wrong.
    As per your query structure this thing should not happen.
    First of all please update about the stock value that ur getting for every week is correct or not ??
    Thanks
    dipika
    Edited by: Dipika Tyagi on Jun 30, 2008 9:08 AM

Maybe you are looking for

  • Apple Macbook wont open applications just closes down saying " application has closed unexpectedly"

    any ideas how to fix this , its doing it for safari , photo booth , msn ect, thankyou !

  • Stock reservation in rescheduling

    Is that possible running rescheduling without reserving stock? Because customer does not want to reserve as they deliver their goods based on the customer's decision. For example Customer order five hundred then when this is produced customer is info

  • Data sets and text encoding problem

    I have a problem when trying to import french text variables into my data sets (for automated generation of lower thirds). I can not get PS to display french special characters correct. all 'accented' As and Es etc. display as weird text strings, jus

  • Running FMS on Virtual Server

    Hi, I'm trying to run FMS 2.0.4 on Centos 4.3 on a VPS. It can install fine, contrary to many CentOS users I read about on the forum. However, when I start it, I seem to lose all connectivity whatsoever. Very weird. I have tried countless tcpdumps an

  • Generic datasource based on custom table and hierarchy table

    Hi Gurus, I have a doubt regarding generic datasource. my requirement: to create a datasource with 10 fields. (7 fields from custom table and 3 fields whose values can be derived from a hierarchy table). I have a custom table. In this table one field