ABAP error in virtual characteristics & key-figures BADI

Hi experts,
I created a BADI for feeding a virtual characteristicand when I launch the query, this message appears:
Subroutine call failed: The index specified had the value 6.288, which was either too large or too small
An exception with the type CX_SY_DYN_CALL_ILLEGAL_FORM occurred, but was neither handled locally, nor declared in a RAISING
Program error in class SAPMSSY1 method : UNCAUGHT_EXCEPTION
I have already read all the threads on the subject: I checked the OSS note 1248583. We already are on BI7, support package 20. I checked the OSS note and all the changes listed already exist on my system.
Did any of you face this situation ?
Thanks in advance.
Etienne
Here is the code of the BADI compute:
method IF_EX_RSR_OLAP_BADI~COMPUTE.
Fields-symbols
  field-symbols:  type ANY.
Variables
DATA: w_ZPL15 TYPE /BIC/OIZPLCASH.
DATA: w_ZCPTCASH TYPE /BIC/OIZCPTCASH.
E
    assign component P_CHA_0G_CWWKOS of structure C_S_DATA
      to .
GNC
    assign component P_CHA_TESTACONT__ZGNC of structure C_S_DATA
      to .
EPL
    assign component P_CHA_ZPL of structure C_S_DATA
      to .
CL3
    assign component P_CHA_ZCUSLV_03 of structure C_S_DATA
      to .
CC
    assign component P_CHA_ZCPTCASH of structure C_S_DATA
      to .
On récupère le compte Cashsolve
*w_ZPL15 =  = w_ZCPTCASH.
ENDMETHOD.

Hi gentlemen,
My problem still remains.
Here is the definition of the different objects:
In attributes
P_CHA_ZCPTCASH Instance Attribute Private Type I
In source code
field-symbols: <l_ZCPTCASH> type ANY.
    assign component P_CHA_ZCPTCASH of structure C_S_DATA
      to <l_ZCPTCASH>.
DATA:l_local TYPE I.
l_local = '999999'.
<l_ZCPTCASH> = l_local.
D.sanders, I don't exacxtly understand what you suggest. Could me help me please ?
Thanks
Jacques

Similar Messages

  • Dynamic Logic without using Virtual Characteristics/Key Figures

    Hi,
    I am new to Bex so please do let me know if this can be done without using virtual keys or characteristics.
    Logic should start processing from condition 1 to 4 sequencially.. If condition 2 is true, conditions 3 and 4 should not be processed.
    <u>Conditions</u>
    1. Column A if  Sales value is between  10 - 20
    2. Column B if  Sales value is between  15 - 25
    3. Column C if  Sales value is between  20 - 30
    4. Column D if  Sales value is between  25 - 35
    Scenerio 1 :
    Sales value = 16
    Based on this scenerio, the sales value should be displayed in column A only.

    Guys,
    I agree that this is a solvable problem if there are no overlapping conditions but my requirements do have them. I might have over simplify the problem or maybe there is a better way to do this. Here is the real scenario.
    YTD = Year to Date Sales is the total dollar amount of sales from January 1, XXXX through the last day of the previous month.
    LYTD = Last Year to Date Sales is the total dollar amount of sales from January 1, (XXXX – 1 year) through the last day of the previous month one year prior.
    The order by which the logic will check each customer sites classification is as follows:
    1. New Account
    2. No Purchase
    "A customer site is considered a <b>New Account:</b>
    IF LYTD had zero sales activity
    "A customer site is considered a <b> No Purchase</b>:
    IF a customer site had zero sales activity in the previous 3 months
    <b>AND</b> a customer site had sales activity within the report period (i.e YTD)
    Jan 2007 >>>>>> $100
    Feb 2007 >>>>>> $0
    March 2007 >>>> $0
    April 2007 >>>>> $0
    Jan 2006 >>>>>> $0
    Feb 2006 >>>>>> $0
    March 2006 >>>> $0
    April 2006 >>>>> $0
    <u>Scenerio 1</u>
    I run a report on the 15th of May 2007.
    The first column has the <b>New Account</b> logic. Based on the 2006 sales data,  LYTD is $0 since there is no sales activity from Jan - April 2006. So the sales data will fall under the first column since the new account logic is true.
    The second column has the the <b>No Purchase</b> logic. Based on the 2007 sales data, YTD is $100 since there was sales activity from Jan - April 2007. At the same time the previous 3 months (Feb - April 2007 ) has $0 sales. Based on this logic the sales data will fall under the second column since the no purchase logic is also true.
    Now both the columns have data. This is the overlapping scenario I was referring to.
    That is why I need to process the column logic sequentially. Once a condition is true , I need to break and move on to a new row.
    Thanks
    Message was edited by:
            Nigel K

  • Assigning variable values in the virtual key figures Badi

    Hi,
    I'm currently using the virtual chars and key figures RSR_OLAP_BADI to calculate days late as 0NETDUEDATE - sy-datum. This works fine, but the query actually uses variable 0P_KEYDT to determine the key date (set in restricted key figures so not directly).
    I want to use this key date variable value rather than the system date to calculate Days Late in the CALCULATE method of the Badi. In the old user exits I could have retrieved the value from internal table i_t_var_range in the variables user exit ZXRSRU01 and stored it globally.
    Does anyone know how to get a query variable value within the RSR_OLAP_BADI Badi? I've tried using BAPI_REPPROV_GETVARIABLES but don't know how to pick up the session id to make it work. Is there a BADI equivalent of EXIT_SAPLRRS0_001?
    I'm sure one of you out there has the answer!
    Thanks,
    Stuart

    Hi József
    Yes I have, I think using SAP's white paper on virtual characteristics and key figures.
    My only outstanding question would be: is there a replacement BADI for the variables user exit and if not why not, since BADIs are supposed to be the preferred way now?

  • Help needed for Virtual Key Figure BADI

    I am trying to implement Virtual Key Figures via BADI.
    Here is what I have done
    Define Method
    method IF_EX_RSR_OLAP_BADI~DEFINE.
    DATA: l_s_chanm TYPE rrke_s_chanm,
    l_kyfnm TYPE rsd_kyfnm.
    FIELD-SYMBOLS:
    <l_s_chanm> TYPE rrke_s_chanm.
    Insert Code
    CASE i_s_rkb1d-infocube.
    WHEN 'ZMCOPA_02'.
      l_s_chanm-chanm = '0CUSTOMER'.
      l_s_chanm-mode = rrke_c_mode-read.
      APPEND l_s_chanm TO c_t_chanm.
      APPEND 'ZCPRC_FLG' TO c_t_kyfnm.
      APPEND 'ZRTNS_PRC' TO c_t_kyfnm.
    ENDCASE.
    ENDMETHOD. "if_ex_rsr_olap_badi~define
    Compute Method
    method IF_EX_RSR_OLAP_BADI~COMPUTE.
    FIELD-SYMBOLS <fs_ZRTNS_PRC> TYPE ANY.
    FIELD-SYMBOLS <fs_ZCPRC_FLG> TYPE ANY.
    FIELD-SYMBOLS <fs_0customer> TYPE ANY.
    DATA: l_zv_20dv TYPE curr09.
    ASSIGN COMPONENT p_kyf_ZRTNS_PRC OF STRUCTURE c_s_data
    TO <fs_ZCPRC_FLG>.
    ASSIGN COMPONENT p_kyf_ZCPRC_FLG OF STRUCTURE c_s_data
    TO <fs_ZCPRC_FLG>.
    ASSIGN COMPONENT p_cha_0customer OF STRUCTURE c_s_data
    TO <fs_0customer>.
      DATA: l_zrtns_prc TYPE /bic/pzcust_prc-/BIC/ZRTNS_PRC.
      DATA: lt_zcust_prc TYPE TABLE OF /bic/pzcust_prc.
      DATA: ls_zcust_prc TYPE /bic/pzcust_prc.
      IF NOT p_cha_0customer IS INITIAL.
      <fs_0customer> =
      ENDIF.
    SELECT SINGLE *
      INTO ls_zcust_prc
      FROM /bic/pzcust_prc
      WHERE /bic/zcust_prc = <fs_0customer>.
    IF sy-subrc = 0.
      <fs_ZCPRC_FLG> = 1.
      <fs_ZRTNS_PRC> = ls_zcust_prc-/BIC/ZRTNS_PRC.
    ELSE.
      <fs_ZCPRC_FLG> = 0.
      <fs_ZRTNS_PRC> = 0.
    ENDIF.
    endmethod.
    I have commented out line in the Compute method because I was getting an error on my SELECT statement.  I think the error is due to the fact that <fs_0customer> is not being populated.
    In debug mode, p_kyf_ZRTNS_PRC, p_kyf_ZCPRC_FLG and p_cha_0customer all return 0.  Shouldn't they have a different value.  I have to admit that I don't really understand how ASSIGN COMPONENT works.
    I have defined p_kyf_ZRTNS_PRC, p_kyf_ZCPRC_FLG and p_cha_0customer in the Attribute tab.
    Any help would be appreciated.  I have spent several hours trying to figure out how this works.
    Thanks.
    Ryan

    Check this if it helps:
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/e051fda8-71a9-2a10-ac9e-8d17414a8c8c

  • Virtual key figure BADI - does not change value

    I wrote a badi for virtual key figure according to guidelines from an SDN doc on how to create virtual chars and kf's.
    However, the value of the key figure is not changed at all. Below is my code. Please see what I'm doing wrong
    method IF_EX_RSR_OLAP_BADI~DEFINE.
       APPEND 'ZRANKS' TO c_t_kyfnm.
    endmethod.
    method IF_EX_RSR_OLAP_BADI~COMPUTE.
      if P_KYF_ZRANKS > 0.
        assign component p_kyf_zranks of structure c_s_data
        to <fs_ranks>.
        <fs_ranks> = '1.0'.
      endif.
    endmethod.

    There is something you need to do which I have not seen described in any of the documention here.
    You need to copy the source code for the INITIALIZE method directly from the code given in the example class CL_EXM_IM_RSR_OLAP_BAPI. That is where the P_KYF<object> and P_CHA<object> attributes are assigned their values. If you do not copy this code into your own implementation, these attributes have no value in the COMPUTE method and your code will probably not work.
    Bryan

  • ABAP Code for summation of key figure

    Hi Guys,
    I am new to ABAP and my requirement is as follows-
    I have an infocube containing data like
    Location Item      Amount Month
    India       TV        10        Jan
    India       DVD     10        Jan
    India       XBOX   10       Jan
    US          TV        10       Jan
    US          XBOX   15       Jan
    US          DVD     20        Jan
    UK          XBOX   30       Jan
    UK          TV        20       Jan
    UK          DVD     15       Jan
    India       TV      20         Feb
    US          DVD   20         Feb
    UK          XBOX 10        Feb
    India       TV      20        Mar
    Now by using open hub, I want to extract a file which would display report as -
    Output file
    15-Oct-2010
    Location  Item   Amount
    India        TV     50
    India        DVD   10
    India        XBOX 10
    US           TV      10
    US           DVD   40
    US           XBOX 15
    UK          TV       20
    UK          DVD    15
    UK         XBOX  40
    which means it should sum based on combination of location and item and create one single row.
    I need some ABAP code which could be written in expert routine so as to to calculate single rows of amount for all data packets of infocube.
    Kindly suggest on how to proceed on it.
    Thanks in advance
    Moderator Message: Even if you are new-to-ABAP, it does not imply that you can expect others to do your work. If you are a BI consultant, take the help of an ABAP consultant or self-learn the basic concepts of ABAP. If you are an ABAPer, go back to the training center.
    Edited by: kishan P on Oct 15, 2010 10:34 AM

    Follow this white paper .... called, "How to .... Calculate with Attributes":
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/72f4a790-0201-0010-5b89-a42a32223ffc
    Brian

  • Error when creating Restricted key figure

    Hi there,
    I created Restricted keyfig with Time diff and ABC as the  details of the selection
    If time diff is less than X  then it should display the values of a keyfigure(ABC),same time if the time diff is greater than x it should display the value of ABC(keyfig)
    Note :Here Time diff is of type CHAR.
    I've created a charecteristic variable on Time diff,I've mention the Value range as LESS THAN on the varible,and I dragged it to coloumns, however when I check the query its throwing an error as below
    Incorrect FRANGE row in FORM/DIM/FAC for info object Time diff.
    Kinly help.

    Good day,
    Please check if SAP Note 1085429 helps.
    Try opening the query in Query Designer and then re-saving it.
    Hope this helps!
    Regards,
    Karen

  • Vitual Characteristics & Key figures

    Hi gurus,
    I have a strange issue..
    I am trying to create a virtual characteristic and when i have written the code. When i have kept the break point (hard coded) in the code it is not also going into the debug mode..
    But to suprise when i am trying to change the query and save it it is going into the debug mode....
    i have kept the break points in define method and compute method... and the debugger is stopping at the define method only when i change the query and trying to save it.
    i have used RSR_OLAP_BADI and created a implementation.
    Please suggest me where i am going wrong...
    Thanks in Advance
    Seshu

    Hi Rao,
    It does stop at the break-point.
    Please check the step by step guide shown below.
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/90b2babc-15ad-2d10-c4b2-bd3af67d86b1
    Thanks,
    Krishnan

  • Error in total of Key figure in query designing

    Dear Friends,
    I am new at query designing & am stuck in a problem.
    I have a CKF named Load in the column.
    When I select District & Complaint No.in rows the result is some 100 rows and upon exporting the result in excel & summing up load the total comes out to be right..............................
    BUT in web browser when i choose only District in the row and the result is a single row the sum of load displayed is incorrect.............wht cn b the possible reason of this??
    Thnx in advance.

    Hi Dear, i asume every districwise total also calculated. pls check onemoretime.
    Regards
    Amulu

  • RSR_OLAP_BADI for virtual characteristics not getting triggered!!!

    I am facing a strange problem and am a little pressed for time to solve the same. Any help/guidance related to this will be highly appreciated.
    I am working on BI 7.0. I have two implementations of the BADI RSR_OLAP_BADI for virtual characteristics,
    (1) say A, that we implemented as a proof of concept with filter as multiprovider M1
    (2) say B, that in implemented with filter as multiprovider M2
    Both were working fine and I was able to put breakpoints inside the code and debug whenever required. I had used it till last week and everything was fine.
    Today, I had to change implementation B due to a new requirement. So a new characteristic was added to M2 and the code in B was extended at appropriate places to fill this new virtual characteristic also. However, even though the change was successfully activated and the BADI looked fine, it was not triggered when the query was executed. I checked with another query on M2 which was the query for which the implementation was initially made. For that also the BADI is not getting triggered. I put break points in the define, initialize and compute methods but none are hit during the query execution!
    I further ran the queries on M1, which shud have called the implementation A. Then also the BADI is not getting triggered. Please note that implementation A, multiprovider M1 or the queries on it were not changed at all.
    I really need to fix this issue at the earliest. What am I missing? Why are the BADIs not getting triggered eventhough the implementations are active, the BADIs are error free and the filters are correctly defined?
    Are there any global settings that can turn off all BADIs?
    Please help.
    Thanks,
    Sarath

    Further, when I created a fresh BADI implementation in a different system (a sandbox system), the BADI is working fine.
    But in the Development system the BADIs are still not getting triggered. I made the exact same implementation as the one which worked in the different system.
    Another point - when I see the Technical Information tab of queries from RSRT, or RSRT2  they have Virtual Characteristics/Key Figures "NO" in the development system.
    For the queries in the prototype system in which the BADI is working this field in "Y".
    Any idea how this is decided and how it can be changed to Y from NO?
    One more strange thing is that there are other active implementation of this BADI used by other teams here and none of them are getting triggered. They are all active and were all working fine till the last few days!
    Any help will be highly appreciated.
    Thanks,
    Sarath

  • BW : Virtual key figures

    Hii  experts  ,
    What are virtual key figures .
    Plz explain .
    Thanks & regards ,
    Madhavi S Bichakal

    Dear Madhavi,
    Virtual Key figure
    virtual key figures are key figures within an InfoProvider that are not filled with data. Instead the key figure value is determined at runtime of the query using custom ABAP coding .
    this keyfigure is not populated with the data by using update rules. but this virtual keyfigures will detemine the value only at the runtime of the query.
    nomally when we store the key figure value in the cube as we do it for a normnal keyfigure it gives us the fact(Fixed truth ) information but by using virtual keyfigures we can show the present truth in the report.
    for example :- let say we have a transaction on 01/01/2007 for material M100 @ price of 100 and on 02/01/2007 the price of material M100 has changed to 200.
    when we store price as a normal keyfigure in the cube it will give fact i.e, 100
    but if we design the price as a virtual keyfigure it will give out present truth as 200.
    Virtual characteristics and Key figures are useful if you want to dynamically pouplate data from the fact table to the field which doesn't have any data in the fact table and also used to build an internal security model before the data gets passed to DATA_PROVIDER.
    You can get more information if you review the documentation for enhancement RSR00002.Go to SMOD type in RSR00002 and select the documentation radiobutton..
    Some ABAB coding samples:
    Virtual Characterstics & Key Figures
    Virtual Characteristic problem
    how to read characteristic variable value into virtual characteristic
    How to implement Virtual Characteristics or Virtual key figures
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/59069d90-0201-0010-fd81-d5e11994d8b5#search=%22SAP%20Customer%20Exit%20virtual%20key%20figure%22
    For more info
    You can go through the following links.
    Virtual Key Figures
    sampel code for virtual key figures
    Virtual Key Figure - ZXRSRU02
    Virtual Keyfigures and Characterisitics
    How to implement Virtual Characteristics or Virtual key figures
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/biw/g-i/how%20to%20use%20variable%20time%20references%20in%20currency%20conversion
    Search for the keyword virtual keyfigure in the following link :
    https://www.sdn.sap.com/sdn/developerareas/bi.sdn?page=BW_How_To.htm
    Creating Virtual keyfigures
    you create virtual keyfigure just like create normal keyfigure (RSD2),
    populate not via transformation/transfer/update rules, but when query execution via user exit, take a look
    Virtual Characteristic problem
    virtual key figure
    http://www.bwexpertonline.com/downloads/Nissen.doc
    Also
    How to implement Virtual Characteristics or Virtual key figures
    Check post by Sree Rama Tata 
    Hope it helps
    Regards
    Bala

  • Error when launching Key figure monitor iview in portal

    Hi all,
    I get an error when launching a key figure monitor iview in portal ; the error is RABAX-STATE
    In r/3 under transaction ST22 i got following :
    "UNCAUGHT_EXCEPTION" "CX_WDR_RT_EXCEPTION"
    "CL_WDR_INTERNAL_WINDOW========CP" or "CL_WDR_INTERNAL_WINDOW========CM00B"
    "IF_WD_WINDOW~SUBSCRIBE_TO_BUTTON_EVENT"
    Anybody knows how to resolve the problem?
    Regards
    Gwen

    Hey was your problem resolved ???
    I am facing the same problem..
    please help!!!
    reply asap.
    ~Veena.

  • Maximum  number of characteristics and  Key figures used in a Query

    Hi Experts,
                Any Thought on the maximum number of Characterstics and key figures that can used in a Query. I know  it impacts performance query and runs for very long time.
    Thanks,
    Kumar.

    Hi Kumar,
    Welcome to SDN.
    I really did not think about it till now, sharing my thoughts on this -
    1. You can use all the characteristics & Key Figure ( & more)in Query what you have in you Cube.
    2. Query is suppose to serve a purpose, to deliver you analytics based on some KPI etc & it will have maximum no of char / key figures which human mind could make some sense of.
    3. Performance of query actually is divided into three areas -
    a. database time
    b. OLAP time
    c. Front End time
    and if you query on not performing well first look at which area is taking maximum time & the optimize that first & there are various ways to optimize each area.
    Hope it helps.
    VC

  • Getting Runtime Error while Activating Characteristics in BW sandbox system

    Hi, i m getting  runtime error while activating Characteristics. Error as All InfoObjects Already Saved(locked)
    Short Text
    SQL error 1691 occurred when accessing program "GP4H8Z73D1WOGH7XBIZ54N5GXEG "
       Runtime Errors         DBIF_REPO_SQL_ERROR
    even if creating a new Characteristics same error is comming.
    Key Figures are getting created successfully but problems is comming only with Characteristics. Please Help...
    Edited by: kush kumar on Mar 23, 2010 11:56 AM

    Hi,
    Follow bellow steps:
    a) Once check the Lock entries by useing SM13.
    Goto SM13--> Select your object lock entries --> Select delete.
    b). Acitvate the Infoobject.
    Regards.

  • Key Figure in Queries migrated to BI 7.0 front-end

    Hello Experts.  We are currently migrating queries from 3.5 front-end to 7,0 front-end.  Some queries that used to work in 3.5 withoug key figures no longer work after migrating to 7.0.  Can someone tell me if there is a way to resolve this?  Changing the query is out of the question.  Can someone point me to any forum document or Blog if there is any?  Thank you for your help.

    Hi Sree,
    I did encounter an error -  the error said that a key figure needs to be specifiied.  The other thing is, the query does have a formula which means it does have a key figure.  It migrates in spite of the error but does not execute and displays the same error message about a key figure needs to be added.
    We are on Pacth Level  13.
    On a side note, there is a way to restore the query from 7.0 back to 3.5   Abap program 'Component_Restroe' will do it.
    Thanks for your help.

Maybe you are looking for

  • SQL and External table question

    Hello averyone, I have a file to be read as an external table part of it is below: ISO-10303-21; HEADER; FILE_DESCRIPTION((''),'2;1'); FILE_NAME('BRACKET','2005-07-08T',('broilo'),(''), 'PRO/ENGINEER BY PARAMETRIC TECHNOLOGY CORPORATION, 2004400', 'P

  • Big problems with slideshows

    Hi, I've a big problem with iPhoto (and Aperture too, but I'll say later). Two days ago I was creating a small slideshow (18 pictures) and everything was fine. Suddenly, while I was looking for a theme, switching between 3 of them, iPhoto stopped to

  • Switching between 2 apple id accounts

    I share a account with my wife which works great except i cant backup my contacts and photos. I want to switch between her account and mine but want to make sure nothing bad will happen, as in losing stuff. When i delete her account of my device what

  • Invoice in EM

    hI, Can we capture any events related to invoice and payments in event management. Secondly how to track customer order i.e work order from CRM to event management. Is it possible

  • SRM 7.0 Approval Flow in Graphical view

    Hi experts, I'm upgrading from SAP SRM 4.0 to 7.0. In SRM 4.0 I was able to view, in a shopping cart, for example, the approval structure in graphical view and in a table view. In SRM 7.0 I can only see the approval flow in a table view. How can I se