Customer Exit Logic

Dear All,
First, Let me say Thanks to the SDN Community which always helping me in improving my competency and solving issues.
Here, I have a report which takes Calendar month as input, Based on the given month report has to calculate whether the given month is in the 1st half of the year or 2nd half of the year. If the month falls into 1st half, then the report has to display the entire year's data. if the month falls into the 2nd half, then the report has to show 2nd half of the entered year and the 1st half of the next year.
I tried it by creating 2 variables 1 is on calmonth with options user entry/Default value, mandatory, Single value and the second one is on calyear with options Customer exit,Mandatory,interval. in the exit I used
I-step =2. but the report is displaying values for the entered month only.
Can you guys please throw a light on how to achieve this?
Thanks and Regards
Jagadeesh Ambati

Hi.
You need to use an exit variable that is an interval on 0calmonth, not 0calyear, because with 0calyear, you can't define "last half of this year and first half of next year".
So you exit logic should be something like the below (cant remember if 'concatenate' works like that...).
Also, since you are restricting on 0calmonth to let the user make a choice, you will need to put the 0calmonth infoobject somewhere in your query. Since you need a column for your "dynamic" interval, you will need to put the single month restriction on 0calmonth in it's own restricted key figure and then hide it.
regards
jacob
data:
Month(2) type n,
lv_year type 0calyear,
lv_from type 0calmonth,
lv_to type 0calmonth.
when 'ZMONTHINT'.
if i_step = '2'.
Loop at I_T_VAR_RANGE INTO LOC_VAR_RANGE where VNAM = 'ZUSICALM'.
clear l_s_range.
lv_year = loc_var_range-low+0(4).
Month = loc_var_range-low+4(2).
if Month <= 06.
concatenate lv_year '01' into lv_from.
concatenate lv_year '12' into lv_to.
l_s_range-low = lv_from.
l_s_range-high = lv_to.
l_s_range-sign = 'I'.
l_s_range-opt = 'BT'.
APPEND l_s_range TO e_t_range.
else.
concatenate lv_year '07' into lv_from.
lv_year = lv_year + 1.
concatenate lv_year '06' into lv_to.
l_s_range-low = lv_from.
l_s_range-high = lv_to.
l_s_range-sign = 'I'.
l_s_range-opt = 'BT'.
APPEND l_s_range TO e_t_range.
endif.
endloop.
endif.
endwhen.

Similar Messages

  • Text Variable With Customer Exit Logic/ABAP Code

    Hi Experts,
    Could you please help me with the Logic/Code that i need to use in Calculacting The TEXT Variable Using CUSTOMER EXIT
    I had a rolling report in which there are 14 Calculacted Keyfigures  (Not Restricted KF),Which are
    M-1,M-2,M-3,M-4,M-5........M-14
    In MAY2009
    M-1 represents (Current Month -1)  APR2009
    M-2 represents (Current Month -2)  MAR2009
    M-3 represents (Current Month -3)  FEB2009
    M-4 represents (Current Month -4)  JAN2009
    M-5 represents (Current Month -5)  DEC2008
    M-6 represents (Current Month -6)  NOV2008
    M-7 represents (Current Month -7)  OCT2008
    M-13 represents (Current Month -13)  APR2008
    M-14 represents (Current Month -14)  MAR2008
    In JUNE2009
    M-1 represents (Current Month -1)  MAY2009
    M-2 represents (Current Month -2)  APR2009
    M-3 represents (Current Month -3)  MAR2009
    M-4 represents (Current Month -4)  FEB2009
    M-5 represents (Current Month -5)  JAN2009
    M-6 represents (Current Month -6)  DEC2008
    M-7 represents (Current Month -7)  NOV2008
    M-13 represents (Current Month -13)  MAY2008
    M-14 represents (Current Month -14)  APR2008
    Currently the Description of CKF is named as M-1,M-2..M-14.My requirment is to develop Text Variables that displays the description as MMMYYYY

    Sample code, NO syntax check...!!
    CASE i_vnam.  " Variablenname
      WHEN 'M-1'. "For Variable <M-1>
       Data: l_peri type E_BUPER, "Declare variable for Period
                l_year type E_GJAHR "Declare variable for year
        IF i_step = 2.
          DATA l_s_range LIKE LINE OF e_t_range.
          CLEAR l_s_range.
          CALL FUNCTION 'DATE_TO_PERIOD_CONVERT' " By providing Date this FM gives period and year
           EXPORTING
             I_DATE           = SY-DATUM "System Date
             I_PERIV         = V3 "Fiscal Variant
          IMPORTING
             E_BUPER       = l_peri "for period is date is today period = 005
             E_GJAHR       = l_year. "for Year = 2009
          l_peri = l_peri - 1. "To reduce 1 from period (005 - 1 = 004)
          IF l_peri = '004'       "Check value of period.
          Concatenate 'APR' l_year into l_s_range-low. "concatenate 'APR' & Year into Low.
          l_s_range-sign   = 'I'.
          l_s_range-opt    = 'EQ'.
                APPEND l_s_range TO e_t_range.
        ENDIF.
    For M-2 subtract 2 and repeate same.

  • Logic of the  Customer Exit Variable

    Hi Experts,
    Could you please explain me the logic (Functionality) of the below  Customer Exit Variable .....
    WHEN 'AKFR05'. "M-5 monthly forecast version
            CALL FUNCTION 'END_TIME_DETERMINE'
              EXPORTING
                duration         = -5
                unit             = 'MON'
                factory_calendar = l_LACID
              IMPORTING
                end_date         = l_fn_dte
              CHANGING
                start_date       = sy-datum
                start_time       = sy-uzeit.
            CHECK sy-subrc = 0.
            CLEAR l_s_range.
            l_s_range-low(4) = 'LGMN'.
            l_s_range-low+4(6) = l_fn_dte(6).
            l_s_range-sign = k_sign_inclusive.
            l_s_range-opt = k_option_equals.
            APPEND l_s_range TO e_t_range.
    Thanks in Advance

    Thanks for the update...
    The First Part
            CALL FUNCTION 'END_TIME_DETERMINE'
              EXPORTING
                duration         = -5
                unit             = 'MON'
                factory_calendar = l_fcalid
              IMPORTING
                end_date         = l_fn_date
              CHANGING
                start_date       = sy-datum
                start_time       = sy-uzeit.
    For Example:
        Current Date : 27.04.2009
    By using the FM END_TIME_DETERMINE the END_DATE (27.11.2008) is exported to l_fn_date
    Could you please explain me the logic after exporting the end date
    l_s_range-low(4) = 'LGMN'.
            l_s_range-low+4(6) = l_fn_date(6).
            l_s_range-sign = k_sign_inclusive.
            l_s_range-opt = k_option_equals.
            APPEND l_s_range TO e_t_range.
    Thanks in Advance

  • Need logic to find Year to Date for customer exit variable

    Hi to all,
    I am creating customer exit variable for query .
    query should display data according to current system year from jan till current system date.
    here senario is like that user never enter year and query will automatically will fetch the data according to current year starting from jan to current system date.
    example.
    current year 2010 and today is system date is sep 29 2010, so query will display data from jan 2010 to current data sep 29 2010.
    please can any one provide me logic for that.
    any code .
    regards
    pavneet rana

    Hi,
    You need to create the characteristic customer exit variable of type select-options. Restrict your keyfigure based on this variable.
    In the logic in CMOD,
    write as below
    i_step =2.
    case i_vnam.
    When 'exit variable'.
    temp = sy-datum+0(4).
    concatenate temp '0101' into temp1.
    l_s_range-low= temp1.
    l_s_range-sign = 'I'.
    l_s_range-opt = 'BT'.
    l_s_range-high= sy-datum.
    append APPEND l_s_range TO e_t_range.
    endcase.
    For any further help on customer exit based variable, please refer below article.
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/20f119d9-922d-2c10-88af-8c016638bd90?quicklink=index&overridelayout=true
    Edited by: Rahul K Rai on Sep 29, 2010 3:09 PM

  • Explain Customer Exit (ABAP) Logic

    Hi Experts
    Could any one explain me what is this Customer Exit doing
    CASE I_VNAM.
    WHEN 'ZXPDATE'.
    IF I_STEP = 2.
    CLEAR L_S_RANGE.
    L_S_RANGE-LOW = SY-DATUM.
    L_S_RANGE-SIGN = 'I'.
    L_S_RANGE-OPT = 'GE'.
    APPEND L_S_RANGE TO E_T_RANGE.
    ENDIF.
    ENDCASE.

    Hi Santosh,
    Thanks for the Update
    'In your code it is calculating the system data which is greate than or equal to and that value will be restricted to that user exit variable and it will bring the output based on that system data '
    The Variable ZXPDATE (Processing Type-Customer Exit) is Created on Policy Expiry Date.
    My requirment is to show all the Policys whose expiry date is Greater than or equal to Current Cal Day/Sys date
    Is that the code doing
    If not please correct the code accordingly
    Thanks

  • Diff b/w "Customer exits" and "User-exit"

    Hi,
    What is the difference b/w customer exits and user-exit and also please explain me what are the various types of customer and user-exits.
    Thanks in advance.
    Ramana

    Hi,
    Types of Exits
    There are several different types of customer exits. Each of these exits acts as hooks where you can attach or "hang" your own add-ons.
    Menu Exits
    Menu exits add items to the pulldown menus in standard SAP applications. You can use these menu items to call up your own screens or to trigger entire add-on applications.
    SAP creates menu exits by defining special menu items in the Menu Painter. These special entries have function codes that begin with "+" (a plus sign). You specify the menu item’s text when activating the item in an add-on project.
    Screen Exits
    Screen exits add fields to screens in R/3 applications. SAP creates screen exits by placing special subscreen areas on a standard R/3 screen and calling a customer subscreen from the standard screen’s flow logic.
    Function Module Exits
    Function module exits add functions to R/3 applications. Function module exits play a role in both menu and screen exits. When you add a new menu item to a standard pulldown menu, you use a function module exit to define the actions that should take place once your menu is activated. Function module exits also control the data flow between standard programs and screen exit fields.
    SAP application developers create function module exits by writing calls to customer functions into the source code of standard R/3 programs. These calls have the following syntax: CALL CUSTOMER-FUNCTION ‘001’.
    <b>User exits:</b>
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/abap/abap-code-samples/userexits%20in%20a%20transaction.doc
    In order to find out the user exits for any tcode,
    1. get the developement class of the tcode from SE93.
    2. Now goto transaction SMOD and press F4,
    3. give in the Deve class in the dev class and Press ENTER
    this will show u the exits for any tcode.
    or execute this report
    http://www.erpgenie.com/sap/abap/code/abap26.htm
    which gives the list of exits for a tcode
    http://help.sap.com/saphelp_nw04/helpdata/en/bf/ec079f5db911d295ae0000e82de14a/frameset.htm
    For information on Exits, check these links
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sapgenie.com/abap/code/abap26.htm
    http://www.sap-img.com/abap/what-is-user-exits.htm
    http://wiki.ittoolbox.com/index.php/HOWTO:Implement_a_screen_exit_to_a_standard_SAP_transaction
    http://www.easymarketplace.de/userexit.php
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sappoint.com/abap/userexit.pdfUser-Exit
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.ficoexpertonline.com/downloads/User%20ExitsWPedit.doc
    http://www.easymarketplace.de/userexit.php
    http://help.sap.com/saphelp_nw04/helpdata/en/c8/1975cc43b111d1896f0000e8322d00/content.htm
    Check out these links too...
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sapgenie.com/abap/code/abap26.htm
    http://www.sap-img.com/abap/what-is-user-exits.htm
    http://wiki.ittoolbox.com/index.php/HOWTO:Implement_a_screen_exit_to_a_standard_SAP_transaction
    http://www.easymarketplace.de/userexit.php
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sappoint.com/abap/userexit.pdfUser-Exit
    http://www.planetsap.com/userexit_main_page.htm
    http://wiki.ittoolbox.com/index.php/HOWTO:Implement_a_screen_exit_to_a_standard_SAP_transaction
    USER EXITS
    https://forums.sdn.sap.com/click.jspa?searchID=672084&messageID=312792
    https://forums.sdn.sap.com/click.jspa?searchID=672084&messageID=1320078
    https://forums.sdn.sap.com/click.jspa?searchID=672084&messageID=2669896
    ****Reward points if helpful.
    All the best

  • Displaying Customer Exit Variable with derived value from another ODS

    Hi All,
    Sorry if this question has been answered before.  I searched the forums and could not find anything specific to my problem.
    I am new to BEx Query.  Customer is requesting a variable(s) be created which will be displayed as a column along with other CKF and RKF.  This query is a payroll query for US/Canada.  This new variable will be based on the user input date for the query.  We are to take this date and go look up the actual pay date for the pay period to which the user input date belongs.  The pay date is stored in another ODS.
    So far, as far as the changes to the Customer Exit ZXRSRU01 are concerned, I would perform the logic when I_STEP = 2.  Do a basic selection off the second ODS, derive the pay date, and store in range table E_T_Range.
    The data displayed off the user input date is displayed in rows.  This is done six times, going back seven days for each row (first row is data for period user entered date to user entered date - 7 days; second row is data for period user entered date - 7 days to user entered date - 14 days; etc ...).  For this to happen  correctly, I am assuming the variable(s) are to to have characteristic types 'Not ready for input', 'Mandatory', 'Customer Exit', and 'Single Value'.
    My question is ... How do I display the six variables in columns (how are they to be defined in the query) and the characteristics I list above, are they correct? Does this need to be a replacement path variable?
    Thanks.
    Edited by: Amir Hasan on Jun 11, 2009 6:24 PM
    Edited by: Amir Hasan on Jun 11, 2009 6:25 PM

    Hi Amir,
    What i can understand from u r requirement is you want to few columns that will show something like below,
    User entered date = x
    Period of X to Period of (X-7)       Period of X to Period of (X-14).....
    This can be done by CMOD for variable only.
    Logic steps :
    1) Take the user input.
    2) Find out the period by using T009B table and store in temp variable.
    3) Do day -7 and find out period for the same
    4) Assing period of X to ls_range-high range and X-7 to ls_range-low.
    Let me know if you have any doubt
    Regards,
    Viren

  • Customer Exit for Number of Days from 1 st Apr to last date of Month Enter

    Hello BI Experts,
    I have a requirement to count the number of days from 1 st April of current year to the last date of month entered.
    For example : The use will enter say July 2010 or 003.2010  (as Fiscal Year Variant is V3 ).
    Today is 14 July ...So we have to first find out the end date of the July month ie 31 st July
    Then go to 1 st April 2010.
    Now calculate the Number of days between 1 st April to 31 st July 2010.
    I consider I have to create two Customer Exit variable
    as below
    1 st customer exit Bex variable  say  ZLY_MTH  ( Last day of Month Entered)
      and i_step = 1
    2 nd Customer Exit BEx Formula variable say ZF_NUMDAYS ( Number of days between two dates)
    i_step =1 .
    Please provide me the logic for the above two.
    Thanks in Advance.
    Regards,
    Amol Kulkarni

    PSUDEO CODE:
    1. Initially LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE WHERE VNAM = 'ZMONTH'.
    2. Get the Month input using VAR_MONTH2 = LOC_VAR_RANGE-LOW+4(2)
    3. Now calculate Month+1: VAR_MONTH2 = VAR_MONTH2 + 1 (Refer **)
    4. Now calculate the Current Year: VAR_YEAR = LOC_VAR_RANGE-LOW+0(4).
    5. Get the 1st Day of the Month (VAR_MONTH2):  CONCATENATE '01' '/' VAR_MONTH2 '/' VAR_YEAR INTO L_S_RANGE-LOW.
    6. SUBRACT 1 (0DATE) from this DATE (This will give the logic for last day of the current month)
    Insert this code also for using the date conversions
            CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
              EXPORTING
                INPUT  = VAR_MONTH2
              IMPORTING
                OUTPUT = VAR_MONTH2.
    Pls. check out this logic. Guess it would solve your need.
    Thanks,
    Arun Bala

  • Customer exit variable - internal table in BEX

    Hi,
    i am running a report and using variables in it.
    The report runs over a info cube. There are few challenges in it.
    One of the variable is posting date, and when user enters posting date i need to negate it with current system date.
    If the negated value is greater than 28 then i need to exclude documnet type 'YG' and display the query, else i need to include the dcumnet type 'YG' and document type '  '.  The above logic can be well implemented via a customer exit variable(for posting date) using an internal table. We have internal tables like C_T_DATA which is used in data source enhancement, which help us to implement our own desired logic.
    Do we have such kind of internal tables, based on which the report output (result set) is derived?
    i know that we have l_t_range and e_t_range, but dont know their usage, some one can explain in detail about them?
    Thanks in advance.

    Hi Selva & Lakshmin,
    The code given by Selva is almost correct . If my understanding is clear , you also wanted to include  document type ' ' when the negated value is less than 28 .
    Modification in Selvas Code :
    Variable 'V_DOCTYP' must be of type Multiple Single Values.
    DATA : V_DATE LIKE SY-DATUM.
    DATA : V_DAYS TYPE I.
    if i_step = 2.
    when 'V_DOCTYP'.
    READ TABLE i_t_var_range INTO loc_var_range WITH KEY vnam = 'ZV_PDATE''.
    IF SY-SUBRC = 0.
    V_DATE = loc_var_range-low.
    ENDIF.
    V_DAYS = SY-DATUM - V_DATE.
    IF V_DAYS > 28.
    l_s_range-low = 'YG'
    l_s_range-sign = 'E'.
    l_s_range-opt = 'EQ'.
    APPEND l_s_range TO e_t_range.
    ELSE.
    l_s_range-low = 'YG'
    l_s_range-sign = 'I'.
    l_s_range-opt = 'EQ'.
    APPEND l_s_range TO e_t_range.
    clear l_s_range.
    l_s_range-low = ' '.
    l_s_range-sign = 'I'.
    l_s_range-opt = 'EQ'.
    APPEND l_s_range TO e_t_range.
    ENDIF.
    ENDIF.
    Hope the above reply was helpful.
    Kind Regards,
    Ashutosh Singh

  • Customer exit variable in Planning filter - IP

    Hi,
    I am new to business planning. I am trying to use a customer exit variable in filter, while performing check system generates message "RFC failue error". the logic is written to get the current year. But I am not able to use this variable?  Can you please answer me this question... Can I use Customer exit variables in planning modeler filters or planning functions ?

    Hi there,
    Yes you can, and it is used very often in both.
    Probably your variable is wrongly defined.
    What you can do is create a query over that aggregation level, and insert the planning filter in there. Put some key figure on the query and put a breakpoint on your variable customer exit code. Execute the query and debug the variable code to check the error.
    Hope this helps,
    Regards,
    Diogo.

  • Custom Exit to count No: of Employee based on User Input Date

    Hi There,
    I have a requirement to Count the no: of Employees for each Position Id. This count value changes with time (Time-dependent).
    So, when the user Keys-in a date at the Query Execution-Prompt, it should take the date value and then count the no: of employees for each Position Id.
    Next, it should display text  like If Count = 1    "Single"
                                                      If Count =2     "Double"
                                                      If Count >=3   "Triple"
    I was informed that we should create a Calculated Key Figure and then introduce a variable in it with Replacement path as Customer Exit.
    My Question is: Could any one provide me the logic to implement the Customer Exit for above requirement. I kow that I need to implement this is BI ABAP editor as Include file.
    Further, I referred following Forums links. However, I need more information.
    counting the number of rows.
    Customer Exit Variable Code
    Any Suggestions!
    - Anil

    Hi,
    As I understood, first thing you may not have text for a key figure (will not be able to display "Single", "Doüble" etc..)
    Are you doing reporting on master data or cube?.
    If it is a master data the it will be better to include count at staging level. You just need to include one key figure count as an attribute and assign 1 over there. You may usee this key figure directly in report.
    If it is one cube/DSO then just create one CKF assign value as 1 in report in that. Use Exception aggrigation for this CKF reffering Position id in report. Dipslay this key figure.
    I hope it will help.
    Thanks,
    S

  • Customer exit for Batch management

    Hi experts,
    I'm using customer exit for batch management for internal number assignment.
    I need the Batch number as i mentioned below 
    DDMMYYB01
    DD-Date
    MM-Month
    YY-Year
    B-Block
    01-Number
    For this i need to give logic. How to give i'm not getting. This batch number creation will come at the time of GR.
    Anybody help me?
    Naren

    Hi
    Please use the user exit SAPLV01Z as I mentioned in your other thread, please go to SMOD to read its documentstion.
    In SMOD, select the 'Documentation' and click 'Display', this will show the overview documentation.
    Select the 'Componnet', then ciick the 'Display'. select each component and click 'Documentation Ctrl+F4) this will show the detailed documentation of them.
    Best Regards.
    Leon.

  • Number of working days in customer exit?

    Hi, this is actually an extension to the following thread.
    How to calculate number of working days
    I have very similar requirement. Determine the number of working days (excluding weekends and holidays) from 2 given dates. But the <b>difference here</b> is that, one of the date in the calculation is the<b> current date.</b>
    1: Creation Date - this is present as infoobject in the ODS.
    2: Current Date - this is 'today''s date.
    And, No. of Working days(Zworkdays)  = Current Date - Creation Date.
    So, as mentioned in the thread 305257 speaks about including the logic in the update rules, I can use system variable sy-datum to get the current date in update routine. But if the load is not scheduled for every day (say,once in 2 days), then when i report this infoobject Zworkdays on Day2, then it will hold Day1 calc rite?
    PLease correct me if I am wrong.
    Could you please help me with other approachs I can follow. One I can think is Customer Exit in Bex for the same.... but I am not sure how to do the same (i am new to Bex and Customer exit). Could any one of you please guide me how to achieve the same. I Have 0CalDate in the ODS also. 
    Any other ideas/inputs is greatly appreciated.
    Thanks in advance
    Ramya

    Hi,
    search for virtual key figures.
    Rgds.
    Juergen
    P.S. Thanks for assigning points
    Message was edited by:
            Jürgen Hemelt

  • How to get the offset value in the Bex customer exit?

    Hello Friends,
    I have defined an offset on a variable in the query definition.
    I wish to capture this offset value  in the Bex variable customer exit .
    Does anyone how to get this??
    Thanks,
    Gautam

    I dont think you can capture the offset applied value in a exit as the value is dependent on the variable itself and nothing to capture the result after the offset has been applied.
    why dont you capture the variable value itself and apply the logic to do an offset in the customer exit?

  • 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.

Maybe you are looking for

  • [OBSOLET]Automatically logging in different sessions in KDM via kdmctl

    I recently found comfort in KDE, so I try to use KDM on my mediacenter to manage both, a KDE session, as well as an XBMC session. What I want to do: Log in as $USER on two different sessions, one with XBMC and one with the KDE desktop automatically o

  • External Mouse Won't Work

    Whenever I plug in an external mouse via USB, it never works. I have tried Apple mouses and non-Apple mouses but none of them work. The only mouse I can get to work is my Apple wireless mouse via bluetooth. And I have tested the USB ports with USB dr

  • Broblem with display of macbook pro

    hi i have macbook pro 15" model mc723  early 2011 During working sometimes i have problem About display what's the problem and what's the Solution? tnx

  • Preferences item in app menu is missing

    Hi, I have problems setting up preferences in two apps (one dowenloaded in App Store (planbook), one on developers page (logisim)). There is no preferences menu item in the menu. Both developers explain how to find this preferences menu item same: Se

  • CANT GET IPHONE6 TO SYNC WITH ITUNE (ON WIN8)

    CANT GET IPHONE6 TO SYNC WITH ITUNE (ON WIN8) third attempt at asking, the problem is getting worse, tunes are disappearing from the phone. is it time to return the phone for a refund as Apple don't seem to be saying anything. and i've not received a