Authorizations by use of customer-exit: in  i_step = 3,   i_vnam is empty

Hello all,
I have checked multiple scenarios and they do not work:
Current situation/setup:
1. <b>Creation of several variables and adding each of them to different queries</b> :
Variable   Type   Processing      Infoobject                     Selection  ready for input
COB     1     6     ZCCOSTCTR__ZCCOB     S     
CB2     1     6     ZCCOB                                     S     
CBV     1     3     ZCCOB                                     S     
2. <b>Adding values in a role</b> (currently 3.0 is used and we want to check the exit and if it works before upgrading to 7.0) and assign it to the user:
Old active Object:ZCKS_COB:
1KYFNM    *                                                                            
9ZCCOB    $C-B2, $C-OB , $C-BV    
added new object without 1KYFNM:                                                                               
ZCCOB      $C-B2, $C-OB, , $C-BV             
3. <b>Marked the used object auth. relevant</b> for the cube of the query
4. Enhanced ZXRSRU01 via CMOD with coding and activated also the project:
  WHEN 'COB' or 'RESPNO'.
   IF I_STEP = 0.
    IF I_STEP = 1.
   IF I_STEP = 3.
      CALL FUNCTION 'Z_VARIABLE_BY_AUTH'
        EXPORTING
          I_VNAM           = I_VNAM
        TABLES
          E_T_RANGE        = E_T_RANGE
        EXCEPTIONS
          NO_AUTH          = 1
          NOT_VALID        = 2
          MISSING_OPERATOR = 3
          OTHERS           = 4.
      IF SY-SUBRC = 1.
        MESSAGE W007(EYE).
      ENDIF.
      IF SY-SUBRC = 2.
        MESSAGE W707(BRAIN).
      ENDIF.
      IF SY-SUBRC = 3.
        MESSAGE W999(BRAIN).
      ENDIF.
      IF SY-SUBRC = 4.
        MESSAGE W649(BRAIN) with I_VNAM ''.
      ENDIF.
    endif.
The function 'Z_VARIABLE_BY_AUTH' was tested separately and fills in E_T_RANGE as expected.
I also changed the variable names each time to all the other existing variables while debugging.
If I use a variable of <b>type customer-exit</b> and process it with <b>i_step =1</b> the value selection and query result is OK.
But this <b>scenario works without roles</b> and authorization values triggered by a variable $<VARIABLE> and is not the intended and documented way proposed by SAP. The documentation says to create a variable of type authorizations and to process it in I_Step = 3. But in this step I_VNAM is empty and so there is no processing ot the function module.
Has anyone a solution? I could not find the issue during several debugging sessions. One strange thing is the protocol of rssm: the authorization buffer is not reflecting the enhanced role but only the value $C-B2 for object ZCKS_COB.
Thanks in advance to have a look on this tricky issue.
Bye,
Petra

Try this:
IF i_s_rkb1d-compid = 'Query Name'
Validation of data for the value entered in your Variable
    READ TABLE i_t_var_range INTO yourworkarea
                WITH KEY vnam = yourvariable
    IF sy-subrc = 0.
      IF w_s_var_range-low(4) <>  w_s_var_range-high(4).  " Your condition or Logic
        l_msgv1     = c_qtr_com1.  " Your message
        i_handle = 9998.
        CALL FUNCTION 'RRMS_HANDLE_MESSAGE_INIT'
          EXPORTING
            i_handle         = i_handle
            i_msg_handler_id = sy-uzeit.
        CALL FUNCTION 'RRMS_MESSAGE_HANDLING'
          EXPORTING
            i_class  = 'RSBBS'
            i_type   = 'I'
            i_number = '000'
            i_msgv1  = l_msgv1
        RAISE again.
      ENDIF.
    ENDIF.
  ENDIF.

Similar Messages

  • Use of Customer Exit - IP Wad Input ready Query

    Hi All,
    Can anyone confirm if we can use a customer exit variable(populates a SEQ number) be used in a input layout on IP>>WAD application.
    In my case it displays the seq number in the header area,but displays the "No rows or cols displayed because the axis not input readyu".
    We applied the note  SAP Note 1337901 - Query not ready for input if there is an empty results set;
    But had little luck;
    When I remove the exit variable it works fine as long it is drill-down in the rows;
    Any help would be apreciated.
    Thanks
    Rao

    My Exit variable works fine,and generates the sequence in WAD/BEX..
    The problem I have is when I include teh exit var on the query/filter of the agg lvl;
    The Wad screen displays the generated seq number in the header area, but turns the input grid  OFF.
    Thanks
    Rao

  • Customer-Exit for analysis Authorizations: i_step = 3, i_vnam is empty

    Hello all,
    I have checked multiple scenarios and I cannot figure out the mistake I've done:
    Current situation/setup:
    1. Creation of several variables and adding each of them to different queries :
    Variable Type Processing Infoobject Selection ready for input
    COB 1 6 ZCCOSTCTR__ZCCOB S
    CB2 1 6 ZCCOB S
    CBV 1 3 ZCCOB S
    2. Adding values in a role (currently 3.0 is used and we want to check the exit and if it works before upgrading to 7.0) and assign it to the user:
    Old active Object:ZCKS_COB:
    1KYFNM *
    9ZCCOB $C-B2, $C-OB , $C-BV
    added new object without 1KYFNM:
    ZCCOB $C-B2, $C-OB, , $C-BV
    3. Marked the used object auth. relevant for the cube of the query
    4. Enhanced ZXRSRU01 via CMOD with coding and activated also the project:
    WHEN 'COB' or 'RESPNO'.
    IF I_STEP = 0.
    IF I_STEP = 1.
    IF I_STEP = 3.
    CALL FUNCTION 'Z_VARIABLE_BY_AUTH'
    EXPORTING
    I_VNAM = I_VNAM
    TABLES
    E_T_RANGE = E_T_RANGE
    EXCEPTIONS
    NO_AUTH = 1
    NOT_VALID = 2
    MISSING_OPERATOR = 3
    OTHERS = 4.
    ENDIF.
    The function 'Z_VARIABLE_BY_AUTH' was tested separately and fills in E_T_RANGE as expected.
    I also changed the variable names each time to all the other existing variables while debugging.
    If I use a variable of type customer-exit and process it with i_step =1 the value selection and query result is OK.
    But this scenario works without roles and authorization values triggered by a variable $<VARIABLE> and is not the intended and documented way proposed by SAP. The documentation says to create a variable of type authorizations and to process it in I_Step = 3. But in this step I_VNAM is empty and so there is no processing ot the function module.
    Has anyone a solution? I could not find the issue during several debugging sessions. One strange thing is the protocol of rssm: the authorization buffer is not reflecting the enhanced role but only the value $C-B2 for object ZCKS_COB.
    Thanks in advance to have a look on this tricky issue.
    Bye,
    Petra

    Hi Petra,
    You are correct.  I_VANM is not stored at I_STEP 3.  However, to access that value at I_STEP3, use the following code.
    IF I_STEP = '3'.
         READ TABLE I_T_VAR_RANGE INTO L_RANGE WITH KEY VNAM = '...variable name.....'
         IF SY-SUBRC = 0.
           ...code here to alter values...
          .....for example:  L_RANGE-LOW = 'S'
         ENDIF.
    ENDIF.
    Kind Regards,
    Larry

  • Using variable values form parametrized URL in Customer Exit in i_step = 1

    Hello BW experts,
    I call a parametrized URL to a Web Template that has a Query with the variable VAR1:
    http://XXX?...&CMD=LDOC&template_id=TEMP1&VAR_NAME_1=VAR1&VAR_VALUE_EXT_1=2006
    Then I try to access the value of VAR1 in i_step = 1 in the Customer Exit for BEx variables in order to determine the value for a customer exit variable VAR2:
    WHEN 'VAR2'.
        IF i_step = 1.
          READ TABLE i_t_var_range INTO var_range
            WITH KEY vnam = 'VAR1'.
          fl_var_range-sign = 'I'.
          fl_var_range-opt = 'EQ'.
          fl_var_range-low = *some operation with var_range
          APPEND fl_var_range TO e_t_range.
        ENDIF.
    The problem is that VAR1 contains either the default values (if the variable is set to have default variables) or is empty (if there are no default variables defined). It does not retrieve the value in the URL in the Customer Exit, but displays it correctly in the variable screen.
    Is there any way I can acces the URL parameter in the Customer Exit?
    Thanks for any answers in advance.
    Michael

    Gili,
    thanks for your answer. The problem was, though, that the first value determines the behavior of the variable screen by setting the value of a customer exit variable.
    My goal was to have two variable screens. In the first a date is chosen and in the second a node of a time-dependant hierarchy is chosen. If one enters the date in the same screen as the hierarchy, the valid hierarchy for the date is not displayed.
    I solved the problem now in following way:
    <b>1. Saving the value in SAP Memory as a parameter.</b> The parameter has to be defined in SE80. A Dummy Web Template with a query on the same Infoprovider with just the two InfoObjects (Year/Month) displays a variable screen for Month/Year. In addition there is a Dummy Customer Exit variable that is needed in order to pass the variable values (month/year) into SAP Memory. Using JavaScript in the Dummy WebTemplate the second Web Template with the actual query is called without displaying anything else than the variable screen.
    WHEN 'DUMMY_CUSTOMEREXIT_VAR'.
        data: w_date like sy-datum
        IF i_step = 2.
          READ TABLE i_t_var_range INTO var_range
            WITH KEY vnam = 'VAR1'.
        do your peration
        i.e.  w_date(4)+2 = var_range-low.
                 w_date(6)+2 = var_range-high.
          SET PARAMETER ID 'ZBW_PARA1' FIELD w_date.
        ENDIF.
    <b>2. Retrieving the value from SAP Memory</b> Before displaying the variable screen, the chosen date is retrieved from SAP Memory and used to set the date for a customer exit variable for the hierarchy validity date.
    WHEN 'VAR2'.
        IF i_step = 1.
          GET PARAMETER ID 'ZBW_PARA1' FIELD w_date.
        do some operation with     
          APPEND fl_var_range TO e_t_range.
        ENDIF.
    It is quite a comlex construct, but it works....

  • Report to check authorization object used in customized programs

    Hi Guys,
    An auditor came and he raised a question to us, he asked whether all of our customized transactions and programs are maintained with authorization checks? The question is how can we check what authorization objects are used for our customized programs and transaction codes? The developer did not maintain the objects used for that program in SU24 table. Is there a program or a report to show us all the authorization object used for a customised program or transaction? Example : T-code MIGO we can check in SU24 table for all the authorization object used. How do we check for customized tcodes? Please advise. Thanks!
    Edited by: Jarod Tan on Nov 25, 2010 9:42 AM

    Note that some programs are built in such a way that no (visible) auth check is necessary, or even desired at all.
    To determine the necessity of an auth check, you should check that starting it has an entry point (tcode, rfc, service) which is appropriately restricted. The rest (whether and where and how a further check is evaluated) is entirely dependent to what the program actually does.
    Well designed applications generally have centralized functions and methods, and the checks are in there or a "base check" they use.
    Others again use the same in UI programming to determine the visibility of functions, to make the application more intuitive for the user. This on it's own is however not a sufficient auth check to rely on.
    Code review is an art form!
    Cheers,
    Julius

  • How to use a customer exit in WebI

    Hi expert,
    I read from official SAP document that customer exit variable are supported within WebI query.
    I created an universe based on a query bex. In this query I use a variable exit for 0calmonth2.
    Within the WebI universe I don't see any variable.
    How can I use/build a customer exit variable in my WebI query?
    System feature: BO 3.1
    Many Thanks.
    Claudia

    Hi,
    I havethe same issue, even though I place the user exit variable in Filter section, its not working as expected in WEBI/crystal.
    the variable that i have created will assign default value as sysdate.its working fine BW.
    Are there any extra settings at BEX/BW level which have to be set before using user/sap exit variables in webi/crystal?
    How should the user/customer exit variables be defined in order to get them carried properly to webi or crystal, I mean what should be the properties set for these variables?

  • To Supress variable screen in WAD - variable used in customer exit

    Hi All,
    We have a requirement to supress variable screen with WAD 7.0, but the report on which we have built the WAD contains a variable which is used to calculate quaterly utilization in customer exit and ready for input.
    So as there is a variable in CMOD and used in report level, eventhough we supress variable screen in WAD, not getting supressed.
    Can you provide some pointers.
    Thanks,
    Sri Arun Prian

    Hi Arun.
    Can you please tell me, is the variable entry mandatory? If yes please make the variable entry is optional.
    Regards,
    Lokanatha.

  • Bapi enhancement using user/customer exits

    It is necessary to have access to all calls and purchase orders to be able to maintain the control of the ERS procedure centrally in the TBB system for the functionality u201CBestellselektionu201D [purchase order selection],. Without delay, all necessary purchase order and call data is provided for the table 'ERS'  u201Crealtimeu201D via the interface from SRM. It must be ensured that this table is always filled for SRM scopes synchronous with the SAP standard tables (EKKO, purchase order header data, EKPO purchase order item data, EKAN vendor address, EKPA partner roles etc.). For this purpose, efforts are made to load this table during each creation or change of a purchase order. On the ERP side, the u201EBAPI_PO_CREATE1u201C, which is called by SRM via RFC in the ERP, serves the purpose of creating purchase orders. The BAPI_PO_CHANGE is used for changes in the purchase orders. These BAPIs can be enhanced by the Customer exits EXIT_SAPL2012_003 respective EXIT_SAPL2012_004. With the help of the exits, a function module is called, which then provides the customer-specific fields of the table 'ERS'
    i want to enhance bapi using customer /user exit
    so how shall i proceed with this requirement ??
    how sahll i code the include for this req???
    i m using the functions ::
    1] EXIT_SAPL2012_003
    2] EXIT_SAPL2012_004
    so how can i enhance the bapi using user exits..
    I want to transfer the data from SRM system to TBB system with the customizzed table filled with this data at ERP ie TBB side .. so plz reply how shall i proceed ???

    Thanks Naresh, it helped...
    Can you please help on the below:
    1. For outbound Sales order IDoc- CRMXIF_ORDER_SAVE_M01,need BADIs for modification of the IDoc before it gets generated.
    2. Need program to generate output as outbound IDoc- CRMXIF_ORDER_SAVE_M01  for sales order conformation/acknowledgement.
    3. Need a BADI after the EDI Sales order is saved.
    Thanks in advance
    Vijay

  • 0PROG_POS_TEXT uses ATTR customer exit!

    This is a strange one!
    I created an enhancement for 0PROG_POS_TEXT in CMOD, customer exit EXIT_SAPLRSAP_003 (which is the customer exit for texts?), but when I debug 0PROG_POS_TEXT in RSA3 it calls up EXIT_SAPLRSAP_002 (which is for attributes)!
    An idea why and how to fix it?

    hi Rudolph,
    as of bw 2.0b, attributes and texts use exit_saplrsap_002
    hope this helps.
    Note 413539 - TextDataSource enhancement with exit_saprsap_002 as of BW20B
    Solution
    You can use the SAP enhancement RSAP0001 to enhance the DataSources of the SAP Business Information Warehouse. This enhancement includes the following components for transferring data into a BW with a release level as of 2.0B:
    Transaction data:       exit_saplrsap_001
    Attributes, texts:      exit_saplrsap_002
    Hierarchies:            exit_saplrsap_004.
    For transferring data into a BW 1.2B, you still use the following enhancement components for InfoSources:
    Transaction data:  exit_saplrsap_001
    Attributes:        exit_saplrsap_002
    Texts:             exit_saplrsap_003
    Hierarchies:       exit_saplrsap_004.

  • WAD Variable screen not displaying when using a customer exit variable

    Hello,
    I have a query which has 3 variables, one of which is of type customer exit and gets populated with a default value.
    When I run this query on the web from within BEX it works fine, however when I run it within any BI7 web template the variable screen does not pop up. Of course if I remove or change the offending customer exit variable the variable screen pops up.
    I have switched the display variable check-box to on, and it still doesn't work.
    Is this a 'feature' of BI7?
    Many thanks
    Sarah

    Fixed it myself by tweaking the URL....
    Added &VARIABLE_SCREEN=X to the end of the url and the variable screen now pops up. Its not an ideal solution but it works.
    Anyone have any better ideas?

  • Trying to use the customer exit to retrieve prior year dates HELP

    i have the code below where i want to return a to & from date of the prior period.  the "TO" date is always the 1st of the month of the day they entered - 1 to get prior year.  when i debug they are populated but I get an error when i run the query sayin gthe enhancement has errors. 
    CASE I_VNAM.
      WHEN 'ZD_TOFROMDATEPRIOR'.
        IF i_step = 2.
          loop at  I_T_VAR_RANGE INTO Loc_Var_Range
          where vnam = 'ZD_DATEENTERED'.
            Clear L_S_Range.
            L_S_Range-low0(4) = Loc_Var_Range-low0(4) - 1.
            CONCATENATE L_S_Range-low0(4) loc_var_range-low4(2) '01' INTO L_S_RANGE-low.
       CONCATENATE L_S_Range-low0(4) loc_var_range-low4(2) loc_var_range-low+6(2) INTO l_s_range-high.
         l_s_range-high = loc_var_range-low+4(4).
            L_S_RANGE-sign = 'I'.
            L_S_RANGE-opt = 'BT'.
            APPEND L_S_Range TO E_T_RANGE.
          endloop.
        ENDIF.
    ENDCASE.

    In case you haven't considered it, there is an easier way to accomplish this.
    Since you are ignoring the day anyway, change your query to prompt for Calendar Month/Year or Fiscal Year/Period instead of prompting for a date range, then use variable offset of "-12" on first entry ("From") to get prior year's data.
    Alternatively, you could use the current date range variable with an offset of "-365", but it doesn't sound like that would be good enough in your case.
    Hope this helps...
    Bob

  • Variables used as Customer Exits

    Hello Gurus,
    Calender date in selection screen is defauled to
    Current date. but If a user enters calender date, this calender date is not passed during the query execution.
    Reason: The BADI used is as follows:
    method ZIF_EX_BXB_VARIABLES_BADI~MODIFY_VARIABLE.
    DATA: l_s_range TYPE rrrangesid.
      IF imp_step = 1 or imp_step = 2.   " Process after input of all variables
        CLEAR l_s_range.
        l_s_range-sign = 'I'.
        l_s_range-opt  = 'EQ'.
        l_s_range-low  = sy-datum.
        if imp_step = 2.
         concatenate l_s_range-low4(2) '/' l_s_range-low6(2)  '/'
                     l_s_range-low+0(4) into l_s_range-low.
        endif.
        APPEND l_s_range TO e_t_range.
      ENDIF.
    endmethod.
    For Eg: Calender Date: 06/20/2008 (date1)
    But user enters: 07/17/2007 (date2)
    The date2 should go to step 2 using the imp_step = 2 statement.
    How do I make sure this is happening?
    I tried to debug using RSRT, but couldl not figure out.
    Thanks,
    Kitu

    Make the following change in your code
    method ZIF_EX_BXB_VARIABLES_BADI~MODIFY_VARIABLE.
    DATA: l_s_range TYPE rrrangesid.
    IF imp_step = 1 or imp_step = 2. " Process after input of all variables
    CLEAR l_s_range.
    l_s_range-sign = 'I'.
    l_s_range-opt = 'EQ'.
    l_s_range-low = <Name of Input Variable for Date>.
    if imp_step = 2.
    concatenate l_s_range-low4(2) '/' l_s_range-low6(2) '/'
    l_s_range-low+0(4) into l_s_range-low.
    endif.
    APPEND l_s_range TO e_t_range.
    ENDIF.
    endmethod.
    Regards,
    Swati

  • Authorisation variable using customer exit

    Hi,
    how to populate a authorisation object at runtime? is it possible to have a variable etc that can be populated a runtime?
    I have a object zsales_off which has different values for different users. i need to create separate roles just to have different values for sales office for different users. i would like to avoid this by having a single role with the zsales_off getting populated at runtime.
    please give details steps with code if possible? 
    i have created the authorisation variable and am using it in the query. if i manually assign values for sales office in the role, it is working fine.
    i want to assign values at run time. i am confused with the process as such.
    few specific doubts like:
    1> the variable should be of "authorisation" processing type or "customer exit" processing type.
    2>what to use I_step=0 or I_step =1? how to use? where to use?
    3>to write a abap code or use a func module, which one? how to use.
    4> what(value) to assign for the zsales_off object in the authorisation profile?
    thank u in advance..

    Hi torsten,
    thank you. but i am afraid it doesn't give me an idea as to how to move ahead?
    i have variable with processing type "authorisation" used in many queries.
    can i use the customer exit rsr0001 for this variable? what value should be assigned in the authorisatio profile for this object?
    please give the detail process and a abap code if possible.
    thank u

  • Behavior of customer exit variables (used as prompt) in a workbook

    Hi All,
    We are on NW2004s. I am using a customer exit variable in the prompt for my query then saved the query as a workbook.
    1. When I run the query the customer exit routine/program is called and the selection screen variable is populated with the correct value.
    Ex. Calendar year variable is a prompt variable defined as customer exit variable that gets the current year.
    when you run the query the prompt for calendar year shows "2007" as default value. this is correct.
    2. when I run the workbook using this same query, it looks like it is not executing the customer exit program. The value in the calendar year prompt is whatever the last value used when the workbook was last ran.
    I also placed a breakpoint in the customer exit program (EXIT_SAPLRRS0_001) to check if it is being called and it looks like it isn't.
    Is there a configuration/property that I should enable/check to make sure that customer exit variables used as prompts works in workbooks? Is this a bug? Anybody else have issues with using customer exit variables as prompts in their workbooks?
    Thanks in advance,
    Malou

    Hello Marilou,
    See the abswer I got from the 1st response on my question
    Save and reuse variable option in 7.0
    It may be a good help.
    Variables seem to be an understated item in the documents.
    Kind regards
    Message was edited by:
            BI developer

  • Restricting Charecterstic using customer Exit variable

    Hi Experts,
    Please adivise how can I restrict values of a charectersitc  Infoobject using a customer exit variable.
    I have a InfoProvider which has a authorisation values from which I have to retrieve the authorisation values.
    Regards,
    Koka.

    Thanks for the reply Bhawani, I have a function module to fill the Customer exit variable with the values retrieved from DSO.
    Can you please explain me the second step mentioned or can I direclty call my FM in the Include ZXRSRU01..
    WHEN 'XXXX '. ( customer Exit varaiable)
          CALL FUNCTION 'ZBI_LOAD_AUTH'
            EXPORTING
              I_AUTHVALTYPE = 'auth value'
            TABLES
              E_T_RANGE     = E_T_RANGE.
    Regards,
    Koka.

Maybe you are looking for

  • Query based on Oracle and MS Access connections

    I hope this is in the correct spot. I am using Oracle SQL Developer to extract data from some Read Only tables in Oracle. What I would like to do it have a list of numbers in a MS Access database to select the same number from Oracle tables, then exp

  • How we can view convert data after XSLT mapping & before Graphical mapp

    Hello Friends, Currently i am working on XI standard content. In this client need some customization. In interface mapping, XSLT mapping on 1st position & Graphical mapping on 2nd position. As per my understanding 1st XSLT mapping will be exected the

  • Select Query LQUA Table

    Hi Experts Can Any one tell me , Is there anything wrong in this select query, As per my knoledge everything is Fine, But Still i am getting SY-SUBRC = 4 for this Query, Its a Warehouse Management table LQUA i have Used. TABLES:mara,lqua. *Internal T

  • Need help for "Numeric field Overflow" error in excel 2003.

    Hello, a friend of mine have a problem exporting Business Objects 5.1.8 to excel 2003 (turning on windows 2000). Each time she want to export her reporting in excel format (.XLS), she obtain a "Numeric field Overflow (3349)" error. So, she export in

  • Workflow 6.2 problem

    I'm getting an error with my workflow server startup and can't for the life of me figure it out. The System Health Monitor shows this: Settings      Workflow Service Base URL: http://iriportal3.ldeo.columbia.edu:7087      Publisher URL: http://iripor