Issue with Virtual Key Figures Using BADI

Hi,
We are populating values for a few virtual key figures in a query over a multiprovider through a BADI implementation(RSR_OLAP_BADI). On execution the VKF fields appear blank in the report.
We tried debugging the methods of BADI by adding Break-Points in specific points. On doing so, we found that the values are properly updated in the 'Field-Symbols' used in the Compute method, but the same values do not appear in the report result and the fields are blank.
Kindly provide any pointers or suggestions.
Thanks.

First check in <b>Technical Information</b> in <b>RSRT</b> , whether the
<b>Virtual Char/Key</b> Fig is<b> Y</b> or <b>N</b>.

Similar Messages

  • Access on aggregated levels with virtual key figures

    Hi all,
    I need access to the aggregated view of a BEx report within user-exit RSR00002 for processing virtual key figures. Currently I only get access to the lowest non-aggregated level.
    My requirements in detail:
    I get certain key-figures (250 historical values)on the lowest aggregation level - so-called folders. Then I have to aggregate this vector of values at the next hierarchy level up to the top-level, say along-side a company's business department structure. Drill-down, slice&dice should be possible. So far so good - this is done easily with standard BEx features.
    Then, on each aggregation level, i.e. hierarchy node, I need to get the third lowest of the 250 aggregated values to assign this to my vkf. This is not an issue of the algorithm but of the internal data representation or access to the OLAP processor because I don't get this vector on the same aggregated level such as I could see it in my BEx report but on the lowest non-aggregated folder level.
    The question is now:
    a. Is data access on aggregated levels and drill-downs because of the internal representation generally not possible within this user-exit and would I have to supply the aggragation logic myself or
    b. do I have overlooked something critical - did I miss the trick?
    Every idea or hint is deeply welcome!!
    Thanks a lot,
    Michael
    Message was edited by: Michael Kronenberger

    First check in <b>Technical Information</b> in <b>RSRT</b> , whether the
    <b>Virtual Char/Key</b> Fig is<b> Y</b> or <b>N</b>.

  • Problem with virtual Key Figure in a query

    Hi Experts,
    I would like to share my problem with the virtual key figure in a query:
    I have a query with a virtual key figure and when I eject the query by analyzer, the result sometimes is displayed and sometimes is not displayed (is equal to 0), with the same initials values. And when I eject the query by RSRT always display the result for the virtual key figure.
    Why don't always display the result?
    Thanks a lot

    Hi,
    I think that the problem is the level of support package. We have BI AddOn 7.X (based on 7.20) support package 0.
    What do you think?
    Regards

  • Virtual Key Figures using RSR_OLAP_BADI

    Hi gurus,
    We have been using the RSR_OLAP_BADI to generate some virtual key figures for our queries, now we have a problem creating a virtual key figure...
    We have got 4 key figures in the query, 1 is a normal KF and the last 3 are virtuals, one of the virtuals uses the normal KF and splits it between the total of the same KF. The point here is that the calculations are not coming ok because the COMPUTE method does not bring the information summarized as the KF is defined, because in the same structure of the query ther are some formulas that have the same KF restricted to another level of information.
    If we remove from the query this formulas, the virtual KF works perfect because the normal KF is delivering the information summarized.
    The question is... is it normal that this happened or there may be something wrong in our definition?
    Thanks and best regards to all!!!

    Hi,
    You can get number of threads in SDN search.
    Check in the following blog
    IF_EX_RSR_OLAP_BADI~DEFINE
    https://forums.sdn.sap.com/click.jspa?searchID=23657256&messageID=6776739
    https://forums.sdn.sap.com/click.jspa?searchID=23657256&messageID=6788064
    http://sapbikk.blogspot.com/2008/05/writing-virtual-characteristics-or-key.html
    Thanks
    Reddy
    Edited by: Surendra Reddy on Mar 18, 2009 4:29 AM

  • Problem with restricted key-figure using off-set variable

    Hello Gurus,
    I have created a query in Bex Query Designer with a key figure restricted. This key figure shows me the 0amount value for the last month. When I select 003.2009, the key figure brings the 002.2009 values. I used an off-set variable to do this
    It works!
    But when I show this key-figure in Webi, no value shows up on the table.
    Any suggestions?
    tks
    Edited by: Allisson Valverde on Jul 23, 2010 12:12 AM

    Which variable are you using in BEx and in WEBI to restrict the month/year?

  • Subject : Problem with Virtual key figures for one scenario.

    Hi Gurus,
    I have implemented Virtual Keyfigures for my Bex report and it is working perfectly bUt for one scenario.
    If i give PLANT and MATERIALS in the selection  , The report calaculates the Virtual
    keyfigure value correctly But if i give Only PLANT
    and NO Materials ( A single plant can have 700 materials also!!), The report executes and after sometime
    gives me a messsage " Disconnecting from Server"
    I executed the report in RSRT . It gives me this error "exception with the type CX_SY_ARITHMETIC_OVERFLOW occurred"
    Since the Virtual keyfigure doesnot use Cache memory. Is it restricted by the Physical memory?.  How to overcome this
    problem?
    Please let know if anyone faced this issue and resolved It. Any help or guidance is really appreciated.

    Hi Oscar,
    Thanks for reply,
    How can i know the overflow and how can i use the catch for avoiding the short dump?
    thanks in advance.

  • Virtual Key Figure ( Currency Problem)

    Hi All,
    I am facing one problem in virtual key figure using BADI. Need your help...
    Scenario: I have a DSO with all many fields. Requirement is to add one more VKF in DSO to get specific period balance of a GL from 0FIGL_O10 DSO and then display it as a column in Bex report. Added VKF is of type amount and unit/currency 0CURRENCY.
    Required Report Format:
    Material --- Col1 u2013 Col2 u2013 Col3(VKF)
    M1--$4, 00-$140, 00u2014<Balance form 0FIGL_O10 for a period>
    Work done so far:
    I have added a virtual key figure ZVKF_BAL in my ZSD_O06 of type amount unit/currency as 0CURRENCY. In RSR_OLAP_BADI I have added a new implementation ZVAR_IMPL.
    In class ZCL_IM_VAR_IMPL there are total three attributes.
    P_KYF_ZVKF_GL u2013 Virtual key figure
    P_CHA_0FISCPER u2013 Period is from ZSD_O06 for which we have to get the balance of a fixed GL account from 0FIGL_O10.
    Given is the code added in define method:
    DATA: l_s_chanm TYPE rrke_s_chanm,
            l_kyfnm TYPE rsd_kyfnm.
      FIELD-SYMBOLS:
            <l_s_chanm> TYPE rrke_s_chanm.
      CASE i_s_rkb1d-infocube.
      WHEN 'ZSD_O06'.
        l_s_chanm-chanm = '0FISCPER'.
        l_s_chanm-mode = rrke_c_mode-read.
        APPEND l_s_chanm TO c_t_chanm.
        APPEND 'ZVKF_GL' TO c_t_kyfnm.
      ENDCASE.
    No code added in initialize method
    Given is the code added in compute method:
    FIELD-SYMBOLS <fs_ZVKF_GL> TYPE ANY.
    FIELD-SYMBOLS <fs_0FISCPER> TYPE ANY.
    DATA :LV_FS_ZVKF_GL TYPE /BI0/OIBALANCE,  
    p_cha_0FISCPER = 8.  "ASSINGING POSITIONS TO THE FIELD AS THEY ARE NOT GETTING IT
    p_kyf_ZVKF_GL = 16.
    ASSIGN COMPONENT p_kyf_ZVKF_GL OF STRUCTURE c_s_data
                TO <fs_ZVKF_GL> .
    ASSIGN COMPONENT p_cha_0FISCPER OF STRUCTURE c_s_data
                TO <fs_0FISCPER>.
    Customized function module which will calculate the GL Balance.
      CALL FUNCTION 'ZGLBALANCE'
        EXPORTING
         FISCPER_I    = <fs_0FISCPER>
         GL_ACCOUNT_I = '0000476000'
        IMPORTING
          BALANCE_O    = LV_FS_ZVKF_GL.
    <fs_ZVKF_GL> = LV_FS_ZVKF_GL.
    Code of ZGLBALANCE:
    DATA: lv0_fiscal type /BI0/OIFISCPER.
    DATA :  X TYPE I VALUE 0,
    types: BEGIN OF ty_/BI0/AFIGL_O1000,
           FISCPER type /BI0/OIFISCPER,
           GL_ACCOUNT type /BI0/OIGL_ACCOUNT,
           BALANCE type /BI0/OIBALANCE,
           CURRENCY TYPE /BI0/OICURRENCY,
            END OF ty_/BI0/AFIGL_O1000.
    data: it_/BI0/AFIGL_O1000 type TABLE OF ty_/BI0/AFIGL_O1000, " Internal table
          wa_/BI0/AFIGL_O1000 type ty_/BI0/AFIGL_O1000.          " Work area
    select single FISCPER GL_ACCOUNT BALANCE CURRENCY from /BI0/AFIGL_O1000 into CORRESPONDING FIELDS OF TABLE it_/BI0/AFIGL_O1000 where GL_ACCOUNT eq GL_ACCOUNT_I and FISCPER eq FISCPER_I and CURRENCY = 'USD'.
    BALANCE_O = X .
    Problem:
    We are getting the balance values but it is coming with numeral with postfix ERROR.
    M1--$4, 00-$140, 00u201412,00 ERROR
    M2--$24, 00-$130, 00u201414,00 ERROR
    Is it something to do with currency? Please let us know what is worng in code?
    If yes please let me know how to get the currency along with the numeric values there in the report.
    Thanks & Regards,
    Mayank

    Hello mayankmishra135,
    Were you able to find a solution for this? I am facing the same issue (with the ERROR in the currency field), wuold appreciate your help.
    Best regards,
    Aleksander Dyl

  • 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 on Multicube (RSR_OLAP_BADI)

    I've created a virtual key figure (using RSR_OLAP_BADI) for number of days in month [zdays_month].  Everything works perfectly when it's used in a query on a cube cube.  BUT, when I try to use it in  aquery on a multi-cube, it doesn't.  The multi-cube query returns a number = the number of days in the month * the number transactions in that month. 
    Anyone know how I can force the VKF to execute after the data is returned?  I would prefer to not mess with exception aggregation, or key figure properties.  I need to keep this VERY SIMPLE for my query developers.
    Your assistance is greatly appreciated,
    Kenneth

    hi,
    first try to check whether the query access virtual kf or not, use transaction rsrt, type in the query name, and click technical info or properties, there will some line 'virtual char/kf'.
    i think the query may never access the code in BadI because in the code it's set with condition infoprovider technical name, it will cover only the infoprovider, when we access query from multiprovider, which join from one of the infoprovider, it's not automatically have the virtual kf/char, we have to specified the multiprovider name in the BadI, you may change the code as following :
    hope this helps.
    CASE i_s_rkb1d-infocube.
        WHEN '[your infocube name]'.
    ENDCASE.
    to
    IF i_s_rkb1d-infocube = [your infocube name] or
       i_s_rkb1d-infocube = [your multiprovider name].
    ENDIF.
    for other infoproviders
    CASE i_s_rkb1d-infocube.
        WHEN '[other cube name]'
    ENDCASE.

  • Type conflict with ASSIGN in BADI for Virtual Key Figures

    We get the below error dump in ST22 when executing BEx queries that contain virtual key figures.
    error message - 'Type conflict with ASSIGN in
    program "ZCL_IM_THR_RSR_OLAP_BADI======CP".'
    We have a BADI implementation that calculates few virtual key figures included in some infocubes & multiproviders. The error would arise if we execute two queries (containing common Virtual Key figures) one after the other without closing the first query.
    We found a note "Note 1237689 - Virtual chars. and key figures in input-ready querys" that could be relevant to our issue and wanted to apply this note but unfortunately the note is only applicable to SAPKW70016 to SAPKW70018 and we are support pack 15.
    Can you please advise what the problem could be/suggest corrections for the same.

    Hi Kulmohan,
    Did you fix your issue? We are facing the same issue. Could you please let me know if you have any solution for this issue,
    Thank you,
    Mike

  • Problems with creating badi implementation for virtual key figures

    Hi,
    I'm running BI 7.0 (unicode).
    I have been trying to follow this blog to calculate the virtual keyfigure in my infoset - Using Virtual Key Figure and Characteris in an InfoSet
    My infoset includes 1 infocube, and 3 master data infoobjects. I have created everything the blog was referring to, and activated fine. However, it seems that when the field symbols are assigned from the c_s_data structure, they do not get referenced correctly, so that no correct memory area is assigned and instead the whole c_s_data structure is assigned to the field symbol, which prevents me from referencing the right mem area correctly.
    For example, in this statement
    ASSIGN COMPONENT P_CHA_ZMYINFOSET___F120 OF STRUCTURE c_s_data
                                                                           TO  <fs_ZMYINFOSET___F120>.
    the component p_cha_zmyinfoset___F120 of c_s_data supposed to be assigned to the field symbol (point to the correct place in structure c_s_data). In other words when this statement is executed, the program looks at structure c_s_data, finds the component zmyinfoset___F120 in it, and assignes the position of that component in the structure to the field symbol, so that it could be referenced in the code. However, the correct assignment does not happen.
    When I debug the code and view the structure c_s_data, I can never find any component with any of the names I can find in my BEX query like ZMYINFOSET___F120. All I see are the components that are named like these: Z____5179 (C_S_DATA-Z____5179), C_S_DATA-S____5150, etc. I see the correct values, but components all have weired names like that. I thought in Infosets the components are named in the following fashion: INFOSETNAME___FXXX which you can see from your BEX query designer. Why is this happening? Why don't I see the correct names in the c_s_data structure? If instead I try to assign those components with their weired names directly, I still get incorrect assignment.
    what am I doing wrong?
    I was reading abap help on this statement:  assign COMPONENT comp OF STRUCTURE struc
    and the following I found:
    With this expression for mem_area, the memory area of a component comp of a structure struc is assigned to the field symbol. While the structure struc is specified directly, a data object must be specified for comp. The evaluation depends on the data type of comp:
    If the field comp has a non-text, elementary type, the content is converted to the type i and interpreted as a position of the component in the structure. if the value for comp is 0, the storage area of the entire structure is assigned to the field symbol.
    From what it says above, my value for comp is always 0, so that the entire structure is always assigned to my field symbol instead of a specific position in that structure.
    please let me know what is wrong here.
    thanks.
    Edited by: AG on Oct 11, 2008 10:41 AM
    Edited by: AG on Oct 11, 2008 10:42 AM

    Hi,
    I am facing the similar issue. Can you please tell me how you solved this problem in more details?
    which sample code and how u can find that in SE24 and where to copy that code.
    Thanks in advance..
    vamsi.

  • Problems using virtual key figures

    Hi experts,
    I have got 2 questions regarding virtual key figures, by using the OLAP BADI
    1. Is there a chance to get the variable values out of the variable selection screen in the BADI implemtentation? If so, how?.
    2. In the compute method the assign does not work because the Attributes (p_kyf_ZIMCREDAY, p_cha_0material,p_cha_0calday)  are 0 all the time.
        How does the attribute get a correct assignment to a component name? See my coding of the define and compute method below.
    Thanks and Regards, Mario
    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.
    CASE i_s_rkb1d-infocube.
    WHEN 'ZD_IMC001'.
    l_s_chanm-chanm = '0MATERIAL'.
    l_s_chanm-mode = rrke_c_mode-read.
    APPEND l_s_chanm TO c_t_chanm.
    l_s_chanm-chanm = '0CALDAY'.
    l_s_chanm-mode = rrke_c_mode-read.
    APPEND l_s_chanm TO c_t_chanm.
    APPEND 'ZIMCREDAY' TO c_t_kyfnm.
    ENDCASE.
    IF_EX_RSR_OLAP_BADI~COMPUTE
    FIELD-SYMBOLS <fs_ZIMCREDAY> TYPE ANY.
    FIELD-SYMBOLS <fs_material> TYPE ANY.
    FIELD-SYMBOLS : <fs_calday> TYPE ANY.
    ASSIGN COMPONENT p_kyf_ZIMCREDAY OF STRUCTURE c_s_data
    TO <fs_ZIMCREDAY>.
    ASSIGN COMPONENT p_cha_0material OF STRUCTURE c_s_data "p_cha_0material
    TO <fs_material>.
    ASSIGN COMPONENT p_cha_0calday OF STRUCTURE c_s_data "p_cha_0calday
    TO <fs_calday>.

    Regarding 1.
    I checked in debugging the variable I_TH_SFC in the initialize method, but there is no information regarding the selections in the variable popup.
    Can you please explain in detail how to access the variable values.
    Regarding 2.
    I changed l_s_chanm-mode to rrke_c_mode-no_selection according to your recommendation.
    Unfortunately it´s still the same. The attributes still does have the value 0. Therefore the assign does not work correct.
    The attributes are defined with type i. But the component names are like 'K____132'. Is this the cause of the problem?
    Thanks, Mario

  • Using Virtual Key Figures/ Characteristics is possible to use in InfoSets

    Hi All,
    Is it possible Using Virtual Key Figures/ Characteristics is possible to use in InfoSets?
    I have tried all the possibilities using the BADI implementation RSR_OLAP_BADI without success.
    The VKF / Characteristics works fine when it is being used with a query based on the ODS however it is not populated when i am using the infoset. Moreover i have used the code for InfoSet as well it is not working.
    I would appreciate any help in this regard.
    Regards
    Noor

    Hi PV,
    r u sure about that, as i have tried all sort of permutation and combinations for using the same in RSR_OLAP_BADI without any luck.
    I have the got felling about the same however if you look into the following SAP note it puts me into doubt.
    Note 657690 - Virtual characteristics and key figures in InfoSets
    Note 618738 - Virtual characteristics or key figures and InfoSets.
    It describe about using the RSR00002.
    Many thanks for the information.
    Kind Regards
    Noor

  • Create Badi for Virtual Key Figure

    Hi experts,
    i have to create badi for virtual key figure in BIW for dat i m creating Badi in BI development but its asking for Access Key.
    Badi name is RSR_OLAP_BADI
    i want to know while creating classic Badi with Implementation Name do developer need access key or thr any othr way to develop Badi for Virtual Key Figure.
    Tell me for creating virtual key figure in biw we use Badi and for dat we have to create the Badi in BIW Dev. or in R/3 Dev.
    it first time dat i m creating BAdi.
    Ankit
    Edited by: ankit375 on Feb 3, 2011 11:14 AM
    Edited by: ankit375 on Feb 3, 2011 11:14 AM

    To see how to create this BADI see here:
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/90b2babc-15ad-2d10-c4b2-bd3af67d86b1
    You you need to be registered as developer (you have to have dev.key) to do the coding.

  • BADI for populating virtual Key Figure : Exception Occurs

    Hello,
    I am using BADI for populating virtual Key Figure.
    Since my info provider in a Cube , query is built on it with addition to Virtual Key figure.
    I have used select statement for retrieving data from cube as input for the variables in BADI.
    But after debugging it , it stop or exception occurs at the select statement.
    Need help for the same.
    My code :  Cube name : ZGMR_C01
    DEFINE ******
    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 'ZGMR_C01'.
          l_s_chanm-chanm = 'ZEC_PLOAD'.
          l_s_chanm-mode = rrke_c_mode-read.
          APPEND l_s_chanm TO c_t_chanm.
          l_s_chanm-chanm = 'ZCOM_BLM'.
          l_s_chanm-mode = rrke_c_mode-read.
          APPEND l_s_chanm TO c_t_chanm.
          APPEND 'ZVKF_TTBL' TO c_t_kyfnm.
      ENDCASE.
    endmethod.
    DEFINE ******
    COMPUTE *****
    method IF_EX_RSR_OLAP_BADI~COMPUTE.
    FIELD-SYMBOLS <fs_ZVKF_TTBL> TYPE ANY.   -
    Virtual Key Figure
    FIELD-SYMBOLS <fs_ZEC_PLOAD> TYPE ANY.  -
    Variable 1
    FIELD-SYMBOLS <fs_ZCOM_BLM> TYPE ANY.   -
    Variable 2
    DATA: l_ZVKF_TTBL TYPE /BIC/OIZVKF_TTBL.
    TYPES : BEGIN OF TY_ITAB,
    PLOAD TYPE /BIC/OIZEC_PLOAD,
    BLMONTH TYPE /BIC/OIZCOM_BLM,
    TOTBL TYPE /BIC/OIZKF_TOTBL,
    END OF TY_ITAB.
    data: IT_ITAB TYPE STANDARD TABLE OF TY_ITAB,
          WA_ITAB type TY_ITAB.
    data: IT_ITAB1 TYPE STANDARD TABLE OF TY_ITAB,
          WA_ITAB1 type TY_ITAB.
    ASSIGN COMPONENT P_KYF_ZVIR_TOT OF STRUCTURE c_s_data
    TO <fs_ZVKF_TTBL>.
    ASSIGN COMPONENT P_CHA_ZVIR_POL OF STRUCTURE c_s_data
    TO <fs_ZEC_PLOAD>.
    ASSIGN COMPONENT P_CHA_ZVIR_MON OF STRUCTURE c_s_data
    TO <fs_ZCOM_BLM>.
    break-point id z_routines.
    SELECT  /BIC/DZGMR_C011SID_ZEC_PLOAD  /BIC/DZGMR_C01TSID_0CALMONTH /BIC/VZGMR_C01F~/BIC/ZKF_TOTBL
    FROM /BIC/VZGMR_C01F
    INNER JOIN /BIC/DZGMR_C011 ON /BIC/VZGMR_C01FKEY_ZGMR_C011 = /BIC/DZGMR_C011DIMID
    INNER JOIN /BIC/DZGMR_C01T ON /BIC/VZGMR_C01FKEY_ZGMR_C01T = /BIC/DZGMR_C01TDIMID
    INTO TABLE IT_ITAB
    WHERE /BIC/DZGMR_C011~SID_ZEC_PLOAD = <fs_ZEC_PLOAD>
    AND /BIC/DZGMR_C01T~SID_0CALMONTH = <fs_ZCOM_BLM>.
    break-point id z_routines.
    LOOP AT IT_ITAB INTO WA_ITAB.
    WA_ITAB1-PLOAD = WA_ITAB-PLOAD.
    WA_ITAB1-BLMONTH = WA_ITAB-BLMONTH.
    WA_ITAB1-TOTBL = WA_ITAB-TOTBL.
    COLLECT WA_ITAB1 INTO IT_ITAB1.
    CLEAR : WA_ITAB1 , WA_ITAB.
    ENDLOOP.
    break-point id z_routines.
    IF sy-subrc EQ 0.
    <fs_ZVKF_TTBL> = WA_ITAB1-TOTBL.
    endif.
    endmethod.
    COMPUTE *****

    Exception :
    Exception CX_SY_NO_HANDLER triggered
    An exception with the type CX_SY_OPEN_SQL_DB occured, but was not handled
    This comes when i debug the BADI.

Maybe you are looking for