Customer Exit in query on aggregation level

Hi,
I try to have variables filled with a customer exit.
The coding of the customer exit is correct, this have been tested in queries on multiproviders.
Unfortunately it is not working when these variables are used on level of aggregation levels.
What I would like to achieve:
We have some planning queries on aggregation levels. Different users can plan on the same query (and aggregation level), but not for the same set of data. Therefore the query should be restricted to the authorized values. Unfortunately we can not switch to the new authorization concept (analysis authorizations) yet, but we already need this functionality very soon.
The customer exits are the only possible option. Unfortunately it seems that the customer exits are not being executed when the variables are used in queries on aggregation levels.
The variables are not ready for input and should be filled in I_STEP = 2
Is this normal? If so, is there a work around?
Thanks in advance for quick replies!
Kind regards,
Bart

Hi,
You can debug your query by putting the break-point in your exit code and execute the query in RSRT. This way you will be able to find if your customer exit is actually being called or not. If it is being called then there can be some logical problem with your code due to which the variable values are not getting populated.
Regards,
Deepti

Similar Messages

  • Urgent - Related to generic customer exit for Query

    Hello Experts,
    We have a query whose selection screen has two user input variables, plant and fiscper. Let say user enters 001 plant adn fiscper 0012007. We have about 100 rows for this selection. Each row has three date fields D1, D2 and D3. we have requirement that out of these 100 records only those records which meet the condition that D1 falls between D2 and D3 should be displayed as query result, others should be ignored.
    Is there any generic customer exit (Like we have customer exit to manipulate virtual keyfigures) that gets called before query result is displayed where we can play around with the query result before it gets displayed? I am not talking about user exits for customer exit variables.
    Please throw some light on this.
    Thanks
    Sundar

    Hello Sundar,
    You can use conditions for the requirement mentioned.
    Create a Contition on date D1 with operator "Between" and instead of hardcoding the values for the condition use variable entries.There you can create a variable with Customer exit type - to get in the selected range of dates between D2 and D3.
    Thanks
    Sam

  • Customer exit for query variable to calculate amount since 1998

    Hi Experts,
    I am trying to fetch the expenses since 1998 till last fiscal year in Bex Query.
    I have created a variable ZFYRVAR1, processing type customer exit, Interval, Mandatory. I unchecked 'Variable is ready for input' box. There is no 0CALYEAR in the infocube. We have 0FISCYEAR and 0FISCPER in the InfoCube.
    We wrote following code to populate the variable. It is throwing a warning message.
    Value " is too long for variable ZFYRVAR1.
    The column remains empty and nothing is populated. Can somebody tell me whats wrong with the code. I also defined another variable instead of l_year. like
    zyear like /bi0/pfiscyear-fiscyear.  but same error.
    Any help is appreciated.
    data: l_s_range type rsr_s_rangesid.
    data: l_year(4)     type n.
    case i_vnam.
    l_year = sy-datum+0(4).
      l_s_range-high = l_year - 1.
       l_year = 1998.
      l_s_range-low = l_year.
      clear e_t_range.
      l_s_range-sign = 'I'.
      l_s_range-opt  = 'BT'.
      append l_s_range to e_t_range.
    endcase.

    Hi Sheo,
    Hope the sample code below helps you. You can debug it in RSRT to be sure.
    DATA: L_S_RANGE TYPE rsr_r_rrrangesid.
    DATA: l_yearh(4) type c,
          l_yearl(4) type c.
    IF I_STEP = '2'.
      if i_vnam = 'ZFYRVAR1'.
         *Please check your user profile to make sure l_year is in the format YYYYMMDD.
         l_yearh = sy-datum(4).
         l_yearh = l_yearh - 1.
         l_yearl = '1998'.
         l_s_range-high = l_yearh.
         l_s_range-low = l_yearl.
         l_s_range-sign = 'I'.
         l_s_range-opt = 'BT'.
        APPEND L_S_RANGE TO E_T_RANGE.
        exit.
      endif.
    ENDIF.

  • Every value of an InfoObject as input for a customer exit in Query

    Hi,
    I have a Query which shows a contract number in rows and an amount in columns. Now I want an additional key figure in columns which should be filled through a customer exit. This exit should read from another DSO an additional amount for every contract number (that means every contract number per row should be used as input for the where statement of the DSO select).
    Can anyone tell me if this is possible and which is the best way to realize this?
    Thanks and greetings,
    Sebastian

    you cannot have customer exit for such requirement
    then use virtual KF  concept
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/60e34f63-f44c-2c10-488e-c89b04e0ca7c?quicklink=index&overridelayout=true.

  • Customer exit in query

    HI Guys,
    I require support regarding the customer exit.
    My requirment is i am having a query which has following columns.
    calmonth salesvalue
    04.2006 1234444.00
    05.2006 2323233.00
    i wanted to include one more column additionallly as follows :
    calmonth salesvalue Prevyear_sales_value
    04.2006 1234444.00 4545545.00
    05.2006 2323233.00 8787788.00
    kindly provide me the codes in exit variable ....
    thank you.
    regards
    Giri

    Hi priya,
    i will explain step wise what i did.
    1. I created customer exit variable ( ZG_VAR3). for 0calmonth
    2. I created variable ZINPUT  as general variable.
    3. used CMOD
    4. selected the exit  - EXIT_SAPLRRS0_001  
    5. writtent  the following code.
    WHEN 'ZG_VAR3'.
    IF i_step = 2.
    DATA: L_S_RANGE TYPE RSR_S_RANGESID,
          LOC_VAR_RANGE LIKE RRRANGEEXIT,
          LV_CALDAY   TYPE SY-DATUM,
          LV_FISCYEAR like T009B-BDATJ,
          LV_CALMONTH TYPE /BI0/OICALMONTH,
          LV_YEAR(4)  TYPE C,
          LV_MON(2)   TYPE C.
    LOOP AT i_t_var_range INTO loc_var_range WHERE vnam = 'ZINPUT'. 
    LV_calmonth = LS_T_VAR_RANGE-high.
    LV_YEAR = LV_CALMONTH+0(4).
    LV_MON = lv_calmonth+4(2).
    LV_year = lv_year - 1.
    concatenate lv_year LV_mon into LV_calmonth.
    l_s_range-low  = LV_calmonth.
    l_s_range-opt  = 'EQ'.
    l_s_range-sign = 'I'.
    APPEND l_s_range TO e_t_range.
    ENDLOOP.
    ENDIF.
    kindly let me know what is wrong .....

  • Customer Exit in Query Designer

    Hi,
    I have to build a query in QD 7.0 which schould cotain the Countries (Hierarchy) in the Rowes and Revenue % in the Columns.
    I have to show the revenue% in three catagory: >30%, 10-30% and <10% with sum for each catagory, somehow like this:
    Greater than 30%
    usa 40%
    can 31%
    sum
    Between 10-30%
    IT 20%
    CA 21%
    sum
    Less than 10%
    DE 9%
    FR 8%
    sum
    Total sum
    I know that can be done with Customer Exit, but can any one tell me how to do it und how should the Customer Exit look like. I have not too much experience ABAP, or may be some one has another idea.
    Thanks for any help in advance

    Hi Martin,
    Why you want to go for customer exit ??
    I hope that revenue %ge is a calculated key figure. And you have to place Revenue depending on its value under proper column. Is this what u are luking for ?
    If so then u can create busckets for the 3 categories and place the revenuce of particular country under proper category without using customer exit.
    Create 3 different calculated key figure namely >30%, 10-30% and <10%.
    write below formula; for e.g in <10 %
    (revenue < 10) * revenue
    (Im taking into consideration that revenue is a calulated key figyure)
    Will help u in more better way once u clear your requriement.
    Thanks
    Dipika

  • Input-ready query and aggregation level or multiprovider

    Hi,
    is it true that input-ready querys can only be created based on an aggregation level and not a multiprovider?
    thanks.
    regards
    P.Rex

    Hi,
    Input Ready Queries can only be built on aggregation levels.
    If you want to create an input ready query on a multiprovider, first create an aggreagtion level on top of this multiprovider and build your query on this aggregation level.
    If you have any problems in getting the input readiness, you can always revert.
    Regards,
    Srinivas kamireddy.

  • Fields in Input Ready Query and Aggregation Level

    Hi All - New to IP. What if we dont include all the fields of Aggregation level in Input Ready Query.
    Supose there are 4 fields in Aggregation level and we are including only two in Input Ready Query.

    Hi Harry,
    For a Keyfigure to be input ready, all the characteristics of the Aggregation should be filled with some values at the time of input.
    The characteristics should be either in Static Filter, Dynamic Filter, Row, Column. New Selection.
    If a characteristic is not there in any of the above area then it is considered to be null and query will not be input ready.
    Regards,
    Gopi R

  • Copy Query between Aggregation Levels

    We wish to copy input-ready queries between Aggregation Levels using NW2004s, however the old BW transaction RSZC to copy queries only appears to work for queries on InfoCubes or MultiProviders.
    Does anyone know if it is possible to copy queries between aggregation levels or do we need to manually recreate them each time?
    Cheers,
    R

    Hi RM,
    I have also been looking for this when setting up integrated planning.
    As far as I know, you have to manually recreate them.
    Please assign points if this solved your problem,
    Best Regards,
    Filip

  • Customer Exit for query

    How can I find out in which queries that the variables that are defined in the customer exit ZXRSRU01 are used? Thanks

    you should be able to go into table rszglobv and type in the variable name and select the id for you variable using se12.
    Then use this id and go into table rxseltxref put this id in the field teltuid and laytp = var and objevers = A . The technical names of your queries will be displayed
    Then use table rszcompdir and give it this technical name to get the english name.
    Hope this helps.
    Richard

  • How and where to create SAP Exit or Customer Exit in query variable

    Hi,
    I have to create a date variable in BEx and it should always contain default value as SY-DATUM i.e. current date.
    I dont have 0CalDay in any of my data flow,also I am not supposed to add 0CALDAY.
    If so,where i can write that exit.
    Thanx in advance.

    Actually,what my requirement is...
    I will not filter any characteristic based on this sy-datum instead I will use that variable value in formulae.
    For ex: in my selection,i mention As of date = today's date..then inside the quer designer,a formula will calculate No.of days=As of date-Due date,where "As of Date" is nothing but the date which i have enterd in my selections.
    please let me know any solution

  • How to identify what customer exit variables are used in which query?

    Hi all,
    When i happened to check the CMOD transaction code i can find a list of customer exits are used. But i want to know what are those customer exist are used in which query? can anyone let me know the procedure of identifying it.
    Thanks a lot
    Pooja

    hii pooja
    check the foll links
    Very Urgent: Customer Exit Variable
    customer exit variable
    MIssing Authorisation for customer exit variable query
    Authorization variable or customer exit variables
    if it is helpful assign points
    thanks.

  • DP Disaggregation and Aggregation levels

    Hi all,
    I have a question regarding disaggregation and aggregation levels.
    KFu2019s and disaggregation setup:
    KF001:
    Calculation type: I (not relevant)
    Disag. Key Fig.: KF000 (not relevant)
    Time-Based Disaggregation: K (not relevant)
    Time-Based Disag. Key Figure: (not relevant)
    KF002:
    Calculation type: I
    Disag. Key Fig.: Keyfigure001
    Time-Based Disaggregation: P
    We are now interested on the KF002. KF002u2019s disaggregation is based on KF001. I am trying to copy KF001 values to KF002 with a macro that is attached to a background job. Macro doesnu2019t do anything else than copy values from KF001 to KF002.
    Background job setup:
    Selection:
    Sales organization: 2000AB
    Location: 1000EF
    Product: 1 to 2000 (consists 2000 products, including products that do not belong to above location)
    Excluded values:
    Customer group 1: 2500AB
    Aggregation level:
    Sales organization
    Location
    Product
    Customer group 1
    What I try to accomplish (through background job - mass processing):
    I am trying to copy values with above setup so that the most detailed level which is Customer group 2 would have values through disaggregation. I have successfully copied values to product level, location level, sales organization level but the customer group 2 level values are not as KF001u2019s. Values are right in the SUM level, but not disaggregated right to customer group 2 level.
    I get right results when I choose Customer group 2 to the aggregation level but this is not something we can do as it causes way too long runtimes. What I am also interested in is that how come the disaggregation does not work properly or does it? How can I get the disaggregation work so that I only have to select the aggregation levels which are defined in the selection and get proper results through disaggregation to customer group 2 level?
    Thanks in advance,
    Juha

    Hello Juha,
    You do not need another macro, just make the above change to your original one, and the macro should work.
    Your aggregation level in the job should also be OK.
    Since you mentioned that the values at detailed level are not the same as key figure 1, it sounds to me that the system did a pro rata disaggregation. Do you have the key figure 2 totally cleared out before copy? Since you're using disaggregation type 'I', it only disaggregates based on another key figure when the key figure value is initial.
    So my suggestion is, you can try to change the key figure's disaggregation tyep to 'P' and check if the macro works.
    Or if you have to use type 'I', you should add a step in the macro before the copy step, to initialize key figure 2 first.
    To initialize a key figure, just put the row in the step, and for the 'Change Mode', select 'Initialization'.
    Best Regards,
    Ada

  • Query Drilldown does not Invoke Customer Exit Variables

    We have a problem with performing a drilldown in a BEx Analyzer reprot, basically the client is a Trading company and they have inter company trading. We are using the Profit Centre as one of thre u201CFree Characteristicsu201D in the query and hence we are able to drilldown on a Characterictc by Profit Centre.
    We are using a couple of BEx query variables (Customer Exit variables) to determine the inter-area and extrenal area profit centres and these profit centres will be different based on the level of Hieracry node selected when the query is initially executed. For example if we assume a hierarchy with has one root node, 3 children under the root node and 2 grand-children under each of the 3 child nodes, now if we are at the root Node of the Hierarchy then every profit centre is internal and there are no external profit centres,  similarly if we are at the 2nd node (i.e. one of the child nodes) then everything under that node is internal and everything in the other 2 child nodes is external and so on.
    This is where the issue starts for us, since on the report if we select the the node we want to see the results for at the query rumtime (i.e. the Customer Exit Variables are invoked at I_STEP=2 and they select the other nodes of the hierarcy if any and group them into either external or internal)  then the results are correct. Now if we were to drilldown, i.e. We selected the root node and we drilldown on to see for example of the child nodes then the result are not correct, this becomes apparent when we drilldown further to the grand-child nodes.
    One logical explaination is that when we are doing the drilldowns the customer exit variables are not being invoked in the BEx analyzer report and hence they are not grouping the sums for the internal and external profit centres relevent to node selected in the Drill down.
    Does anyone have any suggestions regarding how to make this query work properly or show the correct results in BEx Analyzer (ideally), I have considered the Workbooks option but the client does not want Workbooks.
    Please let me know if there is a program etc we can customise to ensure that the Customer Exit variables logic is used when the user does a drilldown in the query or any other way to make it work.
    Many Thanks
    Jack

    Hi
    Just to aid anyone who is thinking what to do in a similar situation, I am aware that RRI or using workbooks are a couple of good alternatives (just that these are currently not being considered by the client, hence I am asking here).. Also, if someone has Business Objects WEBI then we can satisfy the requirement by creating a new Webi Report for each of the nodes and displaying it (similar to Workbooks but much nicer and faster) or we can get the Webi to execute the variables again during the drilldown... Unfortunately the client is not using Webi either... So the solution has to be in BEx Analyzer / Query designer based...
    If you have any thoughts on how I might be able to do what I want to do then please feel free, I am quite confident that I am not the 1st person to come accross this issue and someone somewhere has solved this issue. 
    Thanks

  • Error while trying to Execute the Query with Customer Exit

    Hi Experts,
           I am having a Query with Customer Exit, it is working fine for all the Employess, except for one. When i try to remove the Customer Exit it is working for her too. Below is the error i am getting.
    system error in program SAPLLRK0 and form RSRDR; CHECK_NAV_INIT_BACK
    Thanks,
    Kris.

    Hello Kris,
    Are you working with multiprovider? Please check if OSS notes 813454,840080 or 578948 are applicable in your case.
    Regards,
    Praveen

Maybe you are looking for