Exclude a hierarchy node by using exit variable (not in query designer)

Hi gurus!!
I have a hierarchy for the infoObject 0COSTELMNT. Depending on the user who executes the report, the node '0599ADJUSTMENTS' must be displayed or not.
I am trying to solve it by using an exit variable:
Varible Type: Hierarchy Node
Processing : Exit
On the exit, I have entered the following code:
      IF ( sy-subrc = 0 ).
          l_s_range-sign = 'E' .
          l_s_range-opt  = 'EQ' .
          l_s_range-low = 'AJUSTES'.
          APPEND l_s_range TO e_t_range.
     ENDIF.
But unfortunately does no work!!
Any ideas?
Thanks in advance
Regards.
Carmen Rodríguez

Hi,
Check the below link gives good knowledge on variables:
http://help.sap.com/saphelp_nw04s/helpdata/en/cf/579b3c494d8e15e10000000a114084/content.htm
Reg
Pra

Similar Messages

  • Problem with customer exit variable in BeX Query

    Hi All,
    We have created a customer exit variable in a query and populated with few patterns in customer exit.
    My query has to bring all the records where the address line is containg the patterns passed through customer exit. Here the query is not working as expected.
    It is bringing the values where the address line is exactly same as the pattern and not bringing the records where the pattern is part of the address line.
    For example: Pattern passed in customer exit = 'HOSPITAL'
    The record where address line = 'HOSPITAL' is shown in the rpeort, where the record with address line = 'HOSPITAL ROAD' is not shown in the report.
    I would appreciate your help on this.
    Regards,
    Rakesh

    Hi Diogo,
    Below is the code I am using in the customer exit.
    SELECT * FROM zae_tt_pbuild INTO TABLE gt_pbuild.
          IF sy-subrc = 0.
            LOOP AT gt_pbuild INTO gs_pbuild.
              CONCATENATE '*' gs_pbuild-pbuild '*' into lv_pattern.
              ls_range-low = lv_pattern.
              ls_range-sign = lc_sign_i.
              ls_range-opt = 'CP'.
              APPEND ls_range TO e_t_range.
              CLEAR: ls_range,
                     lv_pattern.
            ENDLOOP.
          ENDIF.
         ENDIF.
    I have tried using '%' instead of '*' aswell but the result is same.
    Thanks,
    Rakesh

  • Default value of BeX customer Exit variable not Displayed in WeBI??

    Hello Experts,
    We are stuck with a problem where WeBI report is created on top of BeX query and we are not able to see the default value of Bex Customer exit variable in WeBI run. Here is the complete scenario:
    1. One restricted KF is created in BeX, restricted with Customer exit variable on net Due date. And this variable is mandatory, ready for input, and Default value in calculated is user exit as current Week's Monday.
    2. So, by default KF data should be restricted to Monday of current week, if user does not change this value.
    3. Now, WeBI report is created on top of this Bex query, and all is working fine, i.e. we are getting variable as Prompt in WeBI, but Default value is not shown while Running the Webi Report.
    So, need your inputs on the same, if default values from BeX in WeBI is supported or not? If yes, why this is happening, and how to resolve it?
    Please notice, the restrcition is in KF only, it is not a separate restrcition on Net Due date in Filter area or in Defualt area of BeX
    and we are on SAP BW 7.1 and BOXI 3.1 SP4.
    Regards,
    Vipul
    Edited by: VIPUL GOYAL on Nov 23, 2011 9:44 PM

    Hi,
    See 1285993 - Support of Customer Exit Variables from BEx query into WebIntelligence via OLAP universe
    WebI will prompt when executed, but the default values calculated by the user exit  - do not appear.
    Note: If the BEx variable has property 'ready for input' set / enabled, then its WebI prompt shows ok, but no default value appears.
    Cause
    This behaviour expected 'by design' (in the context of the product's current limitations) as explained in the online guide below:
    Please refer to Chapter 7, page 44, document link here: http://help.sap.com/businessobject/product_guides/boexir3/en/xi3_sap_olap_universes_en.pdf
    Characteristic variable > processing type > Customer Exit  is "Supported, without user entry"                                                                               
    -->  This should be understood as meaning "User will not be shown a prompt"
    regards,
    H

  • Advantages of using Bex WAD over Bex Query Designer?

    Can anyone tell me the advantages of using Bex WAD over Bex Query Designer?

    Hi Shiva,
    WAD has many advantages when compared with Query Designer. few of those are
    You can include Radio Buttons, Push Buttons, Check Boxs.....
    You can include more than one report in one WAD Report
    Completely u can make fancy as much as requried ....
    Many graphs  and chars are can be included .....
    data from Views can be viewed
    Many..many....

  • Providing access to Variables in the Query Designer

    Greetings experts and fellow consultants,
    I have a simple question, did a search and did not come up with much of an answer.  Currently, we have a system with a role for BI Power Users in order for them to create ad-hoc queries.  An issue we found was that these power users were not able to view variables within the query designer:
    Under the "Characteristic Restrictions" pane, the variables show up as (Display Not Allowed) under their associated InfoObjects.  This is presenting an issue (understandably) and I would like to provide access for these power users to see the variables.
    My question is, are there any circumstances where I would want to restrict which variables are shown to the power user?  Right now, I plan to allow display access to all variables (via S_RS_COMP+S_RS_COMP1 for those informed on Security).  Just trying to brainstorm on whether there might be scenerios where I would want to hide certain variables.
    Many thanks to all opinions, as always!

    Suresh, in my above post I knew how to enable this.  I just wanted to know in regards to security whether there were any exposures.  Apparently, I could not find any and the changes went through without issue.  The way you enable display of variables in the Query Designer is the following:
    S_RS_COMP:
    RSINFOAREA '*'
    RSINFOCUBE '*'
    RSZCOMPTP 'VAR'
    ACTVT '03'
    S_RS_COMP1:
    RSZCOMPTP 'VAR'
    RSZCOMPID '*'
    RSZOWNER '*'
    ACTVT '03'
    Hope this helps.  Of course, adjust the field values are you see fit but the minimum requirement is that RSZCOMOPTP 'VAR' (Variables) and ACTVT '03' (Display).

  • Use Exit Variable - Reference Data?!?

    I am deriving currency from cost center using user exit.  My function module runs fine on the test cases.  Now, I am using the variable in a template.  It's a simple template with cost center in the header data, GL account in the lead column and amount key figure in the data column.  I am using the variable under the data column along with the key figure.  When the user opens the template, he needs to enter a cost center.  As soon as the cost center is entered, there is an error thrown with the message "Values do not agree with the reference data - Message:UPC523".  I do not know how to resolve this error message.  Could someone please post their inputs?  As always, I will reward helpful contributions.  Thanks.

    Hi Sameer,
    The message means that the value of cost center does not match with the reference master data available in the system.
    When the user enters the cost center value, the application would validate the same with the available values for that particular Infoobject, if the user is not allowed to enter "user defined values". If these values do not match with the master data values it will give you this message.
    You may not get this messages if the user has the option to enter "user defined values".
    To resolve the error Check the master data for cost center, activate master data.
    Hope it helps.
    Anurag

  • Current Workday SAP EXIT variable not aligned with correct work days

    Hello,
    I am trying to use the Current Workday variable within a report so that the data will only be refreshed when the calendar day is Monday - Friday. Users look at this report every day, but when they get the report on Monday we would like for the date to be restricted to the previous Friday, and then switch back to Monday's date when they view the report on Tuesday. In order to do this we have placed the Current Workday variable from the Calendar Date characteristic with an offset of negative 1, but it is showing Sunday's date when they look at the report on Monday.
    My questions are:
    -Does this variable use the factory calendar that can define the work days?
    -If so, which Factory calendar does it use? I have gone to the Tcode SCAL but I can see there are many different factory calendars and I have no idea which calendar this variable pertains to. I have also transferred the global settings for the factory calendar from the source system, and I see no change within the variable.
    -How can I see the program name behind this SAP Exit variable? My thinking is that I could at least look at the code to see if perhaps I can find out the factory calendar ID the variable refers to from there.
    Any help on this would be greatly appreciated! Until this is fixed I have to manually adjust this report every Monday and Tuesday morning!! Not ideal.

    Hi Kelly,
    I am not sure whether this can be done by an SAP Exit variable.
    But you may try this using a Customer exit variable by using the Function module DATE_COMPUTE_DAY.
    The function module "DATE_COMPUTE_DAY" will return the day by 1 to 7 when you input date.
    Monday : System will return value = 1
    Tuesday : System will return value = 2
    Wednesday : System will return value = 3
    Thursday : System will return value = 4
    Friday : System will return value = 5
    Saturday : System will return value = 6
    Sunday : System will return value = 7
    So input sy-datum to this FM and find the number of day. If it is Monday, the number will be 1.
    If output is 1, then offset date by -3 to that of Friday, else offset by -1 to previous day.
    Hope this helps,
    Regards,
    Hari

  • Customer Exit variable in BEX Query

    Hello Guys,
    I need to write a custmer exit variable in which the requirement is user is provided with input selection of Posting Period, and user wants the output as sum (cumulative) of 0 i.e start to the period provided by user input.
    Consider a scenario, if user puts 06 as posting period in selection screen then keyfigure should sum all the values from 00 to 06.
    Now, I need to write the customer exit for this.
    Can anyone suggest me the same?
    your inputs will be heavily appreciated.
    Thanks,
    Saurabh

    Hi ,
    Here V1 refers to the selection variables used for user input as posting period .
    You can use the following code in CMOD :
    read table i_t_var_range into loc_var_range with key vnam = 'V1'.
        if sy-subrc = 0.
          WA_PERIOD = LOC_VAR_RANGE-LOW - 6
    "    If WA_PERIOD <= 6  " Take this condition in to consideration while using the code
      "  Endif .
           l_s_range-low  = WA_PERIOD
          l_s_range-sign = 'I'.
          l_s_range-opt  = 'BT'.
        l_s_range-high =  LOC_VAR_RANGE-LOW
          append l_s_range TO e_t_range.
        else.
        endif.
    Hope it helps .
    Thanks
    Kamal Mehta

  • Using variables in the Query Designer

    Hi,
    I have 2 variables 'Z_COMP_CODE' and 'Z_BUS_AREA'. The type of 'Z_COMP_CODE' is single value ,customer exit and ready for input . The type of  'Z_BUS_AREA' is selection option,customer exit and not ready for input. I want the 2 variables to work like this: when 'Z_COMP_CODE' has the value '3000', 'Z_BUS_AREA' should have all the values excluding '2106'. Now in CMOD I have written the following codes for 'Z_BUS_AREA', But it does not work. 'Z_BUS_AREA' get no value while the query is running.Can somebody tell me how to correct it?thx.
    WHEN 'Z_BUS_AREA'.
    IF i_step = 2.
             READ TABLE i_t_var_range INTO l_s_range_v
                WITH KEY vnam = 'Z_COMP_CODE'.
             IF sy-subrc EQ 0.
               IF l_s_range_v-low = '3000'.
                 l_s_range-low = '2106'.
                 l_s_range-sign = 'E'.
                 l_s_range-opt = 'EQ'.
                 INSERT l_s_range INTO TABLE e_t_range.
               ENDIF.
             ENDIF.
           ENDIF.

    It should be Customer Exit only.
    Your code looks like ok to me. Have you tried to debug it? is l_s_range taking values?
    Also i don't know much abt insert statement...may be same as append...but just try with append statement also.
    Message was edited by:
            KJ (Kamaljeet)

  • Custome Exit Variable Not prepopulating Parameter of CRE Report

    Hi
    I am using a customer exit varibale to pre populate a parameter in a Bex query I have created.  When I run the bex query the customer exit variable populates the parameter just as it is supposed to.  However when I use the bex query in Crystal Reports for enterprise the customer exit variable does not pre populate the parameter.  Is there something I need to do to make sure that CRE recognises the customer exit variable or does CRE not recognises them?  If it doesn't recognise them is it possible to create CRE level Customer Exit Variable?
    Many Thanks in advance
    Neil

    Hi Alun
    Thanks but I'm in BW so Stored procedures are not really an option on this one.  I suppose my primary question is, is there a reason that Customer Exit Variable is not working as it is creating a lot of difficulties by not populating the parameters in the same way it does in the bex query I am using to develop my Crystal report.
    Thanks
    Neil

  • Query:  Customer Exit variable not getting populated

    Hello Experts,  I created a Customer Exit variable (ZPREV_MTH_OPS) in the query designer (7.0).  I also put the necessary code in the function module "Z_BWFI_QUERY_CELL_MANIPULTN", but the query variable is not getting populated when I run the query using RSRT.  The boxes for "Variable is ready for input" and "variable is without context" boxes when defining the variable.
    This is my code in the exit:
    case i_vnam.
        when 'ZPREV_MTH_OPS'.
         break-point.
          if i_step = 2.
            clear l_s_range.
            if sy-datum+4(2) = '01'.
              wa_prev_month = '12'.
              wa_prev_year = sy-datum+0(4).
              wa_prev_year = wa_prev_year - 1.
            else.
              wa_prev_month = sy-datum+4(2) - 1.
              wa_prev_year = sy-datum+0(4).
            endif.
            concatenate wa_prev_year wa_prev_month '01' into wa_datum.
            call function 'SLS_MISC_GET_LAST_DAY_OF_MONTH'
              exporting
                day_in            = wa_datum
              importing
                last_day_of_month = wa_datum2.
            concatenate wa_prev_year wa_prev_month '01' into wa_datum.
    *        l_s_range-low = wa_datum.
    *        l_s_range-sign = 'I'.
    *        l_s_range-opt = 'BT'.
    *        l_s_range-high = wa_datum2.
    *        l_s_range-sign = 'I'.
    *        append l_s_range to e_t_range.
            l_s_range-low = '20080901'.
            l_s_range-sign = 'I'.
            l_s_range-opt = 'BT'.
            l_s_range-high = '20080930'.
            l_s_range-sign = 'I'.
            append l_s_range to e_t_range.
          endif.
      endcase.
    I also put a break point the exit, but it's not coming to the breakpoint. 
    Any suggestions?
    Thanks.

    Josh,  the link you provided reminded me to include the code in the include ZXRSRU01 also, instead of just changing the function module.  Thanks for your help and all those who tried to help me.
    case i_vnam.
       when 'ZREL12MTH' or 'ZPREV_MTH_OPS'.
         call function 'Z_BWFI_QUERY_CELL_MANIPULTN'
           EXPORTING
             i_vnam        = i_vnam
             i_vartyp      = i_vartyp
             i_iobjnm      = i_iobjnm
             i_s_cob_pro   = i_s_cob_pro
             i_s_rkb1d     = i_s_rkb1d
             i_periv       = i_periv
             i_t_var_range = i_t_var_range
             i_step        = i_step
           IMPORTING
             e_t_range     = e_t_range
             e_meeht       = e_meeht
             e_mefac       = e_mefac
             e_waers       = e_waers
             e_whfac       = e_whfac
           CHANGING
             c_s_customer  = c_s_customer.
    endcase.

  • Customer Exit Variable not working in BO-Webi Report

    Hi All,
    I have created a universe based on Bex Query.
    Bex query consists of a customer exit variable on Calendar year/month where in it will populate current calendar year month by default while executing the query. It works fine while executing in SAP BI Bex Analyser.
    I have created a universe based on the query. For Calender year/Month i got L00, L01, LOV values in universe.
    Based on the universe I have created a Webi report. I did not specify calendar year/month as query filters. While directly executing the Webi report, I get the calendar year/month variable screen. But the value for it not populated based on customer Exit code written in BI.
    What has to be done to get the customer exit values in variable screen.
    Thanks for your understanding.
    -- Selva

    Since you have customer exit variable in your bex query, it will be like a global filter in your universe.
    Execute the webi report and check whether you are getting only current month data.
    --- Thanks

  • Exit variable not working in web URGENT

    Hello Gurus,
      I have a exit variable off fiscper.  If I execute the report containing this variable in rsrt, rsrt2 or excel it works fine.  When I click the execute in web from query designer it returns '#' every time.  I tried logging out and everything.  Any advice?
    Forgot to add.  I have a 2004s backend and 3.x front end.
    Message was edited by:
            MG

    Take a look at SAP Notes 1026143 and/or 1073652. These describe symptoms similar to yours.
    Hope this helps...
    Bob

  • How to create a variable in Bex Query Designer

    Hi guys,
    I am writing a query for a travel management report using the SAP Standard cube. I would like to restrict the query so it only shows me the last two months excluding the current month. I have checked BI content in RSA1, but I canu2019t find a relevant SAP standard variable that I can use.
    Can anyone please tell me if I can create my own? And if so, how I can do this.
    Many Thanks
    Forhad.

    lets say u want to display following picture:
    sept$-----august$
    City
    -chicago123$--
    44$
    so in Query designer go to Default values section.
    Bring in Calendar month
    right click calendar month
    and hit Restrict
    now select variable
    use standard sap variable Current Month.
    hit okey
    now select Variable and hit Red button
    Result u restricted current month.
    in columns bring in keyfigure $
    right click and hit edit
    bring in time field calendar month
    right click and hit restrict
    bring in Current month
    right click and select - SET OFFSET FOR VARIABLE
    select -1
    hit okey
    repeat the above process
    and this time select offset = -2
    this way u restricted current month
    but displayed last 2 months for keyfigure values.

  • Variable creation in query designer

    Hi Experts,
    In BW3.5 Query designer,when we create a new variable we have option "Processing By: Customer exit ".
    I have created variable with this option for hierarchy but where should I change it in customer exist and how do I know/test whether it's calling customer exit FM?
    I have read the documents but can anybody explain me in simple steps.

    Hi,
    Check the below link gives good knowledge on variables:
    http://help.sap.com/saphelp_nw04s/helpdata/en/cf/579b3c494d8e15e10000000a114084/content.htm
    Reg
    Pra

Maybe you are looking for

  • Preview Mode shows different page than design mode

    When I am editing my page in Design mode in Muse CC, the page is approximately 700px long. When I preview that same page within Muse, it adds about 300px to the bottom of the page. There are no text boxes or other content that is causing the shift? W

  • How to put the ratings filter back where it belongs?

    The 1.0 version suddenly moved the ratings filter away from the rest of the filters on the left-hand library column, and stuck it with the horizontal file browser at the bottom of the screen. I've tried and tried to drag the filter back into the vert

  • Standard and Premium partner only forums - available!

    As a Premium Partner I received no notification to this area? Maybe others are in same not notified status, here is your heads up. Seem (listed on the 14th may 2012 on BC page of adobe.com) http://www.businesscatalyst.com/_blog/BC_Blog/post/StandardP

  • Failed to install Flash Builder

    Hi, I am using Adobe Cloud and start with some instalations I need but Flash Builder failed. The error is: Exit Code: 6 Please see specific errors and warnings below for troubleshooting. For example,  ERROR: DW050 ... --------------------------------

  • Recommend a camcorder for me

    Hi I am looking for a simple camcorder to use with imovie 08 and a macbook alu. It's primarily to be used to make small video clips for our website so I don't need anything super flash or complicated. Any recommendations would be welcome (budget up t