Hierarchy authorization with variables of type exit

Hi all,
I am trying to implement hierarchy based authorizations with variables. After collecting information from the SAP documentation and this forum, I think I know more or less how to do it, but it's not working and it has me very confused.
These are the steps I have followed:
- From RSSM, I have created a hierarchy authorization object including my characteristic and 0TCTAUTHH
- From RSSM again, I have created a hierarchy authorization pointing to the node $ZG_V_008
- From the Query designer, I have created a hierarchy node variable of processing type customer exit ZG_V_008 (are any special settings needed here?)
- From the Query designer, I have created <b>another</b> hierarchy node variable of processing type authorization, and I have used this variable to restrict the hierarchy for my characteristic
- I have edited the EXIT_SAPLRRS0_001 to watch for I_STEP = 0 and give values to ZG_V_008 (we'll get to my code later in case we solve this issue first
It is my understanding that with this setup, the user exit will be called to process the value of ZG_V_008 in I_STEP = 0, however, when debugging, I don't see any calls for the function with I_STEP = 0.
What have I done wrong?
Thanks a lot in advance.
Guillermo

Thanks, Jimmy, but that does not help much: my problem is that my user exit is not evaluated with I_STEP=0, but there are no error messages or anything like that.
I have created a test user <b>without</b> a developer role to see if that could have any impact, but it's still not working.
Any ideas?

Similar Messages

  • Hierarchy Authorization using Variable via Customer Exit

    Hi experts,
    I am wondering if I can do Hierarchy Authorization using Variable via Customer Exit? I know it can be done on normal value authorization by putting $+(the variable name). So can we do the same for Hierarchy authorization?
    For my case I have a 0ORGUNIT and I would allow the role to access anything below its node. So do I put $VARORGUNIT in Technical Node Name and Hierarchy name as ORGEH, Type of authorization = 1 and Area of Validity = 3.
    Points will be given!
    Thanx!

    Hello Chee Jason,
    Are you working with version 3.5 or 7.0
    How do you specify Hierarchy variable?
    Any advise you can share is very much appreciated.
    Thanks,
    Patrick

  • How To ... BPS Variables of type exit

    Dear All,
    I am reading the How To ... BPS Variables of type exit sap document.
    On chapter 3.3.1 step 10 to 12 it's explain how to populated variable, and check user exit action to display one value in fonction of an other one.
    Unfortunately on step 11, when I click on F4 I got nothing. I can't enter value.
    Would you please let me know if the system should be configured in a particular way ?
    Thanks

    Hi Luminy,
    If you have followed Step 2 with 2002 then you would have got that at f4
    regards
    Happy Tony
    <b>Points == Thanks</b>

  • BPS Variables of Type Exit (How To Document)

    Hello,
    I'm trying to restrict entries for (say) variable #2, based on the selection of variable #1. 
    I've just realised characteristic relationships cannot be used and need to use a user exit.  I've gone through the "How To" on BPS Variables of Type Exit and have gotten the function modules to working properly. 
    However when the function module attempts to pass the data to BPS Variable #2, BPS gives an ERROR saying that in order to write new values into variable #2, the variable must have a replacement path "USER DEFINED VALUES".
    However this is not possible as the replacement path must be set to "USER EXIT" so the function module can be activated.
    The only way around this is to tell the function module which BPS Variable it should choose to write the data to, if so does anyone the ABAP to store values into a BPS Variable.
    Right now would appreciate any comment on this.
    Kind regards,
    Marinos

    Hi Marc,
    Yes, the How To paper answers my problem, and when I run the program via se37 the correct variable selections are being populated in table ETO_CHARSEL.  However when values are passed to the BPS Variable, the first information message read "The Conditions were Adapted"  but no values are passed to the variable.  Then a second error message "Entry not possible, var does not have replacement type user-spec vals."  This seems to be a conundrum as the variable needs to be set as user-exit.
    Any thoughts?
    Marinos
    My Z_SIMPLE_RELATION code is
    FUNCTION Z_SIMPLE_RELATION.
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(I_AREA) TYPE  UPC_Y_AREA
    *"     VALUE(I_VARIABLE) TYPE  UPC_Y_VARIABLE
    *"     VALUE(I_CHANM) TYPE  UPC_Y_CHANM
    *"     VALUE(ITO_CHANM) TYPE  UPC_YTO_CHA
    *"  EXPORTING
    *"     VALUE(ETO_CHARSEL) TYPE  UPC_YTO_CHARSEL
    Change constant according to your needs
    TABLES: /BIC/MTASSTCAT.
    CONSTANTS:
    l_source_var TYPE upc_y_variable VALUE 'TCAPASST',
    l_source_area TYPE upc_y_area VALUE 'TCAP001P',
    l_use_restricted_values TYPE boole-boole VALUE 'X',
    l_buffer_call TYPE boole-boole VALUE 'X'.
    DATA:
    l_subrc LIKE sy-subrc,
    ls_return LIKE bapiret2,
    l_type LIKE upc_var-vartype,
    lto_varsel_all TYPE upc_yto_charsel,
    lto_varsel TYPE upc_yto_charsel,
    lto_var TYPE upc_yto_charsel,
    lt_chavl TYPE /bic/PTASSTCAT occurs 0,
    ls_chavl like line of lt_chavl,
    lto_chanm type upc_yto_cha.
    read source value
    CALL FUNCTION 'Z_VARIABLE_GET_DETAIL'
    EXPORTING
    i_area = l_source_area
    i_variable = l_source_var
    i_buffer = l_buffer_call
    IMPORTING
    e_subrc = l_subrc
    es_return = ls_return
    e_type = l_type
    eto_varsel_all = lto_varsel_all
    eto_varsel = lto_varsel
    eto_chanm = lto_chanm.
    IF l_subrc <> 0.
    MESSAGE i136(upc_fw) WITH l_source_var.
    Values of variable &1 cannot be determined
    EXIT.
    ENDIF.
    now, you are free to determine the logic on how to
    derive the values based on the source values.
    Example 1: determine the next year
    Assumptions:
    - we have only a single year in the selection
    - the variable is of type characteristic
    DATA: ls_varsel TYPE upc_ys_charsel,
    l_next_year(4) TYPE n,
    l_entries TYPE i.
    We have a single value for the year and only one characteristic
    => our value is stored in the first line
    IF l_use_restricted_values IS INITIAL.
    lto_var = lto_varsel_all.
    ELSE.
    lto_var = lto_varsel.
    ENDIF.
    READ TABLE lto_var INTO ls_varsel INDEX 1.
    check prerequisites:
    - record found?
    IF sy-subrc <> 0.
    MESSAGE i147(upc_fw) WITH l_source_var.
    Variable &1 does not contain any values
    EXIT.
    ENDIF.
    - exactly one record and characteristic?
    DESCRIBE TABLE lto_var LINES l_entries.
    IF l_entries <> 1.
    MESSAGE i534(upc) WITH l_source_var.
    Variable &1 must be restricted to a value
    EXIT.
    ENDIF.
    SELECT * FROM /BIC/PTASSTCAT INTO TABLE lt_chavl
      WHERE asset_clas = ls_varsel-low.
      if sy-subrc <> 0.
        MESSAGE e026(upc) WITH ls_varsel-low '0ASSET_CLAS'.
    Attribute value not found
      exit.
    endif.
    ls_varsel-seqno = '0000'.
    ls_varsel-chanm = '/BIC/TASSTCAT'.
    LOOP AT lt_chavl INTO ls_chavl.
    ls_varsel-seqno = ls_varsel-seqno + 1.
    ls_varsel-low = ls_chavl-/BIC/TASSTCAT.
    APPEND ls_varsel TO eto_charsel.
    ENDLOOP.
    ENDFUNCTION.

  • Double Role for Analysis Authorization using Variable via Customer Exit

    Hi Guys I have been implementing AA using variable via customer exit and I have run into this problem, I wonder anyone have encountered this.
    Example I have a User having 2 sets of authorization Roles
    Role 1
    Personnel Area = A, B
    Personnel Sub Area = 1,
    Role 2
    Personnel Area = A
    Personnel Sub Area = 1, 2
    And what we can derive this that is the user is able to see A-1 B-1 and A-2 BUT NOT B-2 when we run all.
    But instate when we run the report it is drawing B-2 as well as because we are entering
    Personnel Area = A,B
    Personnel Sub area = 1,2
    Any idea how to solve this?
    <removed by moderator>
    Edited by: Siegfried Szameitat on Dec 3, 2008 2:41 PM

    Hello Chee Jason,
    Are you working with version 3.5 or 7.0
    How do you specify Hierarchy variable?
    Any advise you can share is very much appreciated.
    Thanks,
    Patrick

  • Issue with Variables using Customer Exit.

    Dear All,
    I have the following scenario,
    I the Variable Screen I have 4 variables, lets say for eg: Plant, Material, Material Group, Calendar Day.
    Then I have 4 Customer Exit Variables in the report, 2 of type Char Value Variables and 2 of type Text Variables.
    I have written the customer exit code and all the 4 customer exit variables derive their values from the Calendar Day Variable from Variable Screen.
    In the Variable screen if i give the values only for the variable calendar the report executes fine.
    But along with Calendar Day If I enter values for any other variable the report gives the following error message - "No value could be determined for variable VAR_CALDAY_CEXIT_1." VAR_CALDAY_CEXIT_1 is the name of my one of the Customer Exit Variables.
    Please let me know how to solve this problem.
    Cheers,
    Neel.

    IF i_step = 2.
      CASE i_vnam.
           WHEN 'VAR_CALDAY_CEXIT_1'.
           LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE WHERE VNAM = 'VAR_CALDAY_MULSIN_MAN'.
             CLEAR L_S_RANGE.
             IF SY-TABIX = 1.
             L_S_RANGE-LOW = LOC_VAR_RANGE-LOW.
             L_S_RANGE-SIGN = 'I'.
             L_S_RANGE-OPT = 'EQ'.
           APPEND L_S_RANGE TO E_T_RANGE.
           ENDIF.
           ENDLOOP.
           WHEN 'VAR_CALDAY_TEXT_CEXIT_1'.
           LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE WHERE VNAM = 'VAR_CALDAY_MULSIN_MAN'.
             CLEAR L_S_RANGE.
             IF SY-TABIX = 1.
             L_S_RANGE-LOW = LOC_VAR_RANGE-LOW.
             L_S_RANGE-SIGN = 'I'.
             L_S_RANGE-OPT = 'EQ'.
           APPEND L_S_RANGE TO E_T_RANGE.
           ENDIF.
           ENDLOOP.
            WHEN 'VAR_CALDAY_CEXIT_2'.
            LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE WHERE VNAM = 'VAR_CALDAY_MULSIN_MAN'.
             CLEAR L_S_RANGE.
             IF SY-TABIX = 2.
             L_S_RANGE-LOW = LOC_VAR_RANGE-LOW.
             L_S_RANGE-SIGN = 'I'.
             L_S_RANGE-OPT = 'EQ'.
           APPEND L_S_RANGE TO E_T_RANGE.
           ENDIF.
           ENDLOOP.
           WHEN 'VAR_CALDAY_TEXT_CEXIT_2'.
           LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE WHERE VNAM = 'VAR_CALDAY_MULSIN_MAN'.
             CLEAR L_S_RANGE.
             IF SY-TABIX = 2.
             L_S_RANGE-LOW = LOC_VAR_RANGE-LOW.
             L_S_RANGE-SIGN = 'I'.
             L_S_RANGE-OPT = 'EQ'.
           APPEND L_S_RANGE TO E_T_RANGE.
           ENDIF.
           ENDLOOP.
      ENDCASE.
    ENDIF.
    'VAR_CALDAY_MULSIN_MAN' is the Calenday Day Variable from the Variable Screen.
    It is of type multiple single values.
    The User enters two dates and then the code is utilized to pass these 2 dates to 2 Char Value Variables and 2 Text Variables.
    Once again, if i do not enter the values for any other variable then the report executes fine.
    Cheers,
    Neel.

  • Set a value for a variable of type exit

    Hello,
    I am filling some variables with multiple values in user exit.
    Now, i would like to place some of these characteritics in Header area. It's of course impossible because there is multiple values but ...
    I will put dropdown box in the web application for these chars. The problem is that by default, any value is assigned to the dropdwom ( any variable value is set).
    Do you know how i can set a value for theses variable after filling all values by the user exit. SO that only one value is selected for the header and all others values available in the dropdown ?
    Regards,
    Jarod

    Hi,
    Off late, this seems to be a usual requirement.
    Just create a Z program to call the FM API_SEMBPS_VARIABLE_SET and then call the FM API_SEMBPS_POST.
    you should be preparing the content/set value to pass to the FMs. check the whereused list to see how this FMs can be used/called.
    finally, run this program for your variable, after the loading/filling the exit variable. Please note that to set 'exit' variables, the sourcing variable's content need to be read/set first before setting the exit varible.
    HTH,
    Regards,
    Nataraj.

  • BPS Variables of type Exit  Problem !

    During processing using the default settings,
    if i change values of a variable internally it do
    not change the set of variable values that are displayed after the initial execution of a WEB planning
    application.
    Refresh is KO after a new choice of variable.
    I append a record to table upc_dark2 with param=
    WEB_REFRESH_ON_CHANGE and value=X. : refresh always KO
    I have tested  with l_buffer_call = 'X' and with l_buffer_call = ' ' ---> always KO
    Is-it a problem of buffer ?
    Is-it dependent of leading ?

    Hi Dieu,
    Thanks for your reply, but the main purpose is to limit the number of options available to the user. If I start at level 3 all options will be available to the user.
    Regards,
    -Jacob

  • SEM-BPS: Variables of type hierarchy node user exit

    Hi,
    I read the "How to.." document "Variables of Type Exit".
    This document has example for variable type caracteristic.
    I need to use this kind of solution for global variables:
    I have the same variables in several planning areas. I have defined one ‘leading’ area containing the variable that should automatically set/adjust the corresponding variables in the other planning areas.
    I've created a SEM variable of type hierarchy node and with the replacement type user exit. There is a standard function module API_SEMBPS_VARIABLE_GETDETAIL which has to provide the selected hierarchy node in leading area to other areas.
    The function works ideally in test mode, but it doesn't work as the SEM user exit.
    Does anyone have experience in this problem?
    Thanks

    Your function module shall follow the expected interface (required for exit type). Function API_SEMBPS_VARIABLE_GETDETAIL is not for such usage.
    To see an example FM that is fit for a 'user exit' processing for hierarchy node, have a look at FM UPF_VARIABLE_USER_EXIT_HIER. There is inline documentation in the source code that shall help you create your own FM if required.
    cheers,

  • Variable type exit with two source variables

    I have a case where I should determine a variable (A) value according to two other variables (B) and (C). That is, e.g.
    - IF (B)=x AND (C)=y THEN (A)=z
    - IF (B)=i AND (C)=j THEN (A)=k
    It seems like I cannot call the user exit with more than one exported variable, the standard call below:
    call function m_user_exit
      exporting
        i_area      = m_area
        i_variable  = m_variable
        i_chanm     = l_chanm
        ito_chanm   = mto_chanm
      importing
        eto_charsel = rto_value
    Any suggestions?
    Regards, Aki

    Thanks to everyone especially to Natarajan,
    Both source variables are type exit, so I did the following:
    A-variable was the “standard source”
    B-variable was determined by function call (source below)
    C-variable then determined by combination of A and B
    I added this simple code in the beginning of “your own logic”  and I had source_var_B as a “B-variable”.
    DATA: source_var_B TYPE upc_yto_charsel.
    call function 'ZDETERMINE_B'
      exporting
        i_area      = 'AREA'
        i_variable  = 'VAR_B'
        i_chanm     = 'CHAR_B'
        ito_chanm   = ito_chanm
      importing
        eto_charsel = source_var_B.
    Do you see any risks or inconsistencies or whatever I should take into account?
    Aki

  • Authorization check without using variable of type u0093Authorizationu0094

    In WEB-reporting we want to authorize on a navigational attribute without using the variable of type
    “ Authorization”. Why would we do this?
    1. In a lot of queries we have to replace the existing variable of type “User entry” to a variable of type “Authorization”. We would like to avoid this work.
    2. When the variable is not ready for input the Report will always include all the characteristic values for which the user is authorized. We don’s want this.
    3. When the variable is ready for input on the selection screen all the authorized values are displayed and the user is able to select / deselect the values he/she wants to report. In case of a lot of authorized characteristic values the screen does not appear user-friendly.
    What we want is a behavior like some parts of R/3. For example: Controlling Area X consists of the Costcenters C1000, C2000, C3000, C4000, C5000 and C6000. A particular user has authorization for Cost centers C1000, C3000 and C5000. When running a ABAP-report with Cosctcenters the user is able to select certain Costcenters. Three possibilities:
    1. The user selects Costcenter C1000, C3000 and / or C5000: the ABAP reports the selected Costcenters.
    2. The user selects Costcenter C2000, C4000 and / or C6000: the ABAP gives an error-message: “no authorization”.
    3. The user does not select any Costcenters: the ABAP reads all the Costcenters and reports – on the basis of the users authorization – only Costcenters C1000, C3000 and C5000.
    In term of BW: we would like to introduce authorizations for a specific InfoObject which is used as an navigational of an other InfoObject. In the queries a variable is used of the type “User entry”. The user can select one or more values on the selection screen; an authorization check is fulfilled. He may – however – choose to leave the selection field empty; in this case the OLAP processor should report only the authorized values (in our case the last situation results directly in an error-message “no authorization”).
    Anyone has a suggestion?
    Thx in advance,
    Henk

    If you change the variable to type exit, and user input enabled, you can then build your logic in the user exit.
    If users have entered unauthorised values, it will be checked (by the system??). If this assumption is correct then all you need to do in your exit is to continue with the values entered by the user; and in case user has entered no values, populate the variable with values valid for the user (by reading the user authorization and corresponding charactertistics values and moving these to the variable).
    --> Adding further
    Since the authorization will not be checked by the system (I missed that these are not of authorization type variables), user exit will need to do this check. The logic for doing authorization checks / error messages / restricting based on authorizations - will have to be done in the user-exit.
    cheers,
    Message was edited by: Ajay Das

  • Data Slice With Variables- not working

    Dear All,
    We are in BI 7.0.
    We have tried the data slice with variables approach and it is not working for us.
    We need to lock the plan data for the past periods. For  this, We have created a data slice (selection) with variable of type customer exit for fiscalyear/period.  How to populate this variable with the past month's data?. For Bex variables, this can be done in the cmod exits. Can we use the same cmod exits for populating data slice variable too?. If yes, then how this works?.( In case of Bex variable, the variable will be used in the characterics restriction (like fiscper) and hence this is getting filled up by the exit. How this works for the data slice variable?.
    Thanks for any suggestions/help.
    Regds
    velu

    Thanks for your response. Let me clarify one more thing related to this. I have 10 characterstics with a kf 0amount at my Aggregation level and i want to create a data slice to restrict the user not to change the data for the older periods. So, do i have to use all characterstics like my agg level or do i have to use only the fiscal year period?
    and the other thing is that it won't let me use a variable when i select the exit function for the fiscal year period when i created my data slice? where i can specify the variable name? is that at the settings tab or some where else?
    Thanks,
    Srini

  • BW-BPS Variables of type hierarchy node - user exit

    Hello,
    I created a variable SEM of type hierarchy node and with the replacement type "user exit". So I created a function to fill this variable and I don't find the right type for import and export parameters of my function. I have a dump : CALL_FUNCTION_CONFLICT_TYPE in the method GET_HIE_NODES
    Thank you for your help.
    Catherine Bellec

    Hello,
    For your information :
    the input parameter has the type UPC_YS_HIE_KEY and
    the export parameter the type UPC_YT_HIESEL
    Catherine Bellec

  • Calculating with formula variables of type user exit

    I created the following query:
    Rows: Characteristic = Employee
    Column: KYF = Status
    Filter: Year, Month
    The KYF ist a formula containing a formula variable. This variable of type user exit should return a value recording to the value of employee and has to be read in a customizing (data-) table by the user exit.
    Is it possible to read the values of employee row by row from the internal table which contains the amount of data before processing to output screen and fill the 'Status'-KYF or should I create a virtual keyfigure for this case.
    Thanks for all your feedback,
    Angelika

    Hi,
    It seems like Status is master data of Employee.
    As per your process, if you do either formula variable or virtual keyfigure you will face query performance problem. More over you cant simply access record by record characteristic value in formula variable. It will be another complex process like you have to call the characteristic value via replacement path.
    You have the following choices:
    You mentioned master data is availabe in custom table. Try to pull the custom table master data into employee info object. Maintain  status as one of the attribute of the master data. Then you can display Status value simply in the report. This will be global access like you use this Status value n number of info providers which is having Employee as one of the info object in the info provider.
    If the previous way is not possible, include the Status in the info provider level and write a simple update routine to populate the values. This will be info provider level.
    I am not sure whether you are in development environment or productive. If developement, then you can choose simply any one of the above ways.
    Regards,
    Vivek

  • Hierarchy authorization pbm in BI7.0 with Front end of BW3.5

    Hello All,
    We have a problem regarding authorizations for the hierarchies in BW7.0
    We have migrated from BW3.1 to BW7.0. Authorization are OK in our BW3.1 server, the authorization on hierrachy work well.
    Current Issue (in BI7.0) :
    An authorization object for XCOMPROD for a hierarchy 'ZMAT_HIER'.
    There are 2 queries which have variables of XCOMPROD & ZCOMPROD in selection criteria, ZCOMPROD has variable of type 'Hierarchy node'
    I've a test_user which has authorization on Product Group 5 (one of the nodes in the hierarchy-ZMAT_HIER).
    When i run the queries independently with this test_user, the user has access to Group 5 only, which is correct. 
    When i run a web template report with any one query (from the 2 queries), the user has access to Group 5 (as in first case) - correct.
    However when i run a web template report having above 2 queries together, the authorization fails, as user gets access to root node (instead of only Group 5).
    FYI, we're using BW3.5 front end (no PORTALS)  with the OLD authorization concept (of BW3.1).  Not 'Analysis Authorization' as in BI7.0.
    Looking forward to an explanation/solution to the above.
    Regards,
    Nagendra.

    Hi,
    Check out the customization of SPRO to select the authorization concept. I suspect that it's set on the new authorization concept.
    Tomer.

Maybe you are looking for

  • File-XI-JDBC error

    Hello XI Gurus,      Thanks for all the help so far. Right now I am in the process of doing file to jdbc scenario. I am following this link: /people/sap.user72/blog/2005/06/01/file-to-jdbc-adapter-using-sap-xi-30 <b>I am getting the follwoing error i

  • How to fetch PO Line Item in CFL

    Dear All,          In my screen i have two fields in header of the screen that is PO NO and Po line item          i fetch the PO No using CFL and its object type          But am not getting PO line item using CFL but i need to select one of the line

  • After creating a table, how do I type outside of it?   I can't get a cursor to come up.

    After creating a table, how do I type outside of it?   I can't get a cursor to come up.

  • Problems reading from a file

    Hey, I have this file that I need to read so i can handle the contents. It was created in MSDOS and as I have very little experience in that topic, I wondered if anyone can point me in the right direction. I tried reading it as a ascii and binary fil

  • ABAP Proxy to File - questions

    Hi, i have tried the following blog: /people/ravikumar.allampallam/blog/2005/03/14/abap-proxies-in-xiclient-proxy and found out that´s not possible to send the message through proxy from the IS(same client as the proxy). right ? What settings have to