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

Similar Messages

  • Text Variable using Customer Exit .

    Hello Friends. I have a requirement to create Text Variable using Customer Exit . So I created the Text Variable as "ZVRBMS" and assigned that with YTD &ZVRBMS& in the Structure of Query Desigener . so that Out put will YTD AUTO
    OR YTD RETAIL
    Now this Auto And Retail comes from Version that user choose via variable ZFIBMSVER IN User Promt. if ZFIBMSVER = 10
    then ZVRBMS = auto . and if ZFIBMSVER = 20
    then ZVRBMS = RETAIL
    Please correct my ABAP code in customer exit and let me know to make this work
    when 'ZVRBMS'.
        if I_STEP = 2.
          clear LOC_VAR_RANGE.
          loop at I_T_VAR_RANGE into LOC_VAR_RANGE.
            if LOC_VAR_RANGE-VNAM = 'ZFIBMSVER'.
          if SY-SUBRC = 0 OR LOC_VAR_RANGE-LOW = '10'.
            L_S_RANGE-LOW = 'AUTO'.
          elseif LOC_VAR_RANGE-LOW = '20'.
            L_S_RANGE-LOW = 'RETAIL'.
          L_S_RANGE-SIGN ='I'.
          L_S_RANGE-OPT  = 'EQ'.
          append L_S_RANGE to E_T_RANGE.
      endif.
      endif.
      exit.
          endloop.
    endif.
    Thanks
    Soniya

    The code should be:
    when 'ZVRBMS'.
    if I_STEP = 2.
    clear LOC_VAR_RANGE.
    loop at I_T_VAR_RANGE into LOC_VAR_RANGE.
    if LOC_VAR_RANGE-VNAM = 'ZFIBMSVER'.
    if LOC_VAR_RANGE-LOW = '10'.
    L_S_RANGE-LOW = 'AUTO'.
    elseif LOC_VAR_RANGE-LOW = '20'.
    L_S_RANGE-LOW = 'RETAIL'.
    endif.
    L_S_RANGE-SIGN ='I'.
    L_S_RANGE-OPT = 'EQ'.
    append L_S_RANGE to E_T_RANGE.
    endif.
    exit.
    endloop.
    endif.

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

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

  • Text Variable With Customer Exit 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
    My requirment is to get the MMM.YYYY based on Sy Date as a title of the column
    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

    Amrit I think u72720 wanted to know how to get MMYYYY in the column headings.
    this can be achieved using text variable easily.
    steps
    1. Right click and go to properties and click the button next to description box.
    2. Add any existing text var from the list
    3. now right click on this var in the desription box and select 'new variable'
    4. give var name description
       processing type ->replacement path
       replace with char-> fiscal period (or calmonth if that is what restricted in your column)
       select value as 'Key'
    finish creation and use this var in all the selection column headings (remove M-1, M-2 etc)
    you will get mmyyyy decriptions for every column depending on month of that column

  • Variables with customer exit

    Please search the forums before posting
    i want an example for variables using customer exit with steps
    Edited by: Arun Varadarajan on Mar 15, 2009 7:25 PM

    Hi,
    You can define 'Formula' variables in your customer exit..for example..
    you need to calculate no of machine running hours per month, in order to
    caculate the machine total utilization time..in this context.. you need to know
    how may hours are there in an month by month..
    you can define a variable and write the code in the customer exit for deriving the total no. of hours available for that month and get that value into a variable for further calution like deducting the down time and set up time so on..in your
    calculated KF..
    Hope this helps..
    Assign points if useful..
    Cheers,
    Pattan.

  • Text Variable through Customer Exit  using FM MONTH_NAMES_GET

    Hi Friends,
    I have a query which runs through a variable Key date(ZPDATE). (Key date may also be changed by the user).
    I have another customer exit variable(ZVNDATE1) where it reads  from the Keydate variable and it represents one month less than the key date and it holds two dates first day of month and last day of month.
    Let say: Key date(ZPDATE) = 12.03.2008
                 ZVNDATE1 = 01.02.2008 and 28.02.2008
    I have created  RKF Overdues-1 ristricted with ZVNDATE1.
    My requirement is I wan to represent this RKF Overdues-1 as Feb 2008 . In order to do that I want to create a Text variable(ZTEXT1) using customer exit .
    As I am not very good in ABAP please can anybody provide me the code for text variable:
    I am writing in the below.. but I dont know how to represent FM..etc..
    WHEN 'ZTEXT1'.
            READ TABLE i_t_var_range INTO w_var_range WITH KEY vnam = 'ZVNDATE1'.
            IF SY-SUBRC = 0.
              CLEAR l_s_range.
              l_date = w_var_range-low.
                       CALL FUNCTION MONTH_NAMES_GET'
    Please can you provide me the remaing code..
    Thanks
    Sudhakar..

    Hi Sudhakar,
    Instead what you can do is, add few more lines of code instead of calling fm.
    case 'month'.
    If month = '1'.
      desc = 'jan'.
    elseif month = '2'.
      desC = 'feb'.
    endcase.
    concatenate desc year into w_v_range-low.
    Hope that helps.
    Thanks

  • Crystal Reports with BEx Query using Custom Exit Variable

    Hi,
    We have BW BEx Query using Customer User Exit variable to derive  the Fiscal Week for Last Year (called it VAR2) based on another user input variable Current Fiscal Week (called it VAR1).
    VAR2 is derived from VAR1 in CMOD via some codings and thus it DOES NOT have the "Variable is Ready for Input" flag ticked in the BEx. VAR1 is user input variable, so it has "Variable is Ready for Input" flag ticked in the BEx.
    When we create a Crystal Reports with the BEx Query using variable VAR2, and when we run it we got an error message saying "Failed to execute query; '[]<java.lang.UnsupportedOperationException: No Selection State Support!ZP_MI_LYPUBWEEK>'. Redesign your query or contact the data source maintainer to solve the problem".  (note: ZP_MI_LYPUBWEEK is VAR2 in this case).
    Could anyone please assist? Surely, CR supports BEx customer user exit variables like the above, right?. I also refer to the forum below as it seems to have a similar issue (except mine with an error message), but it does not provide a solution in it.
    Crystal Reports with BEx Query using Custom Exit Variable
    Thanks,
    Andy

    Hi Vibhav,
    We have the SAP Crystal Reports for Enterprise XI4.0 Version 14.0.0. Not sure if SP0 or other SP, got to check with Basis Team later.
    We tried that "mandatory" option and did not work either.
    Anyway, SAP has now come back again saying it is something they will fix it in next release/version. We got a phone call from them and a reply below to our OSS.
    23.08.2011 - 08:20:49 CET - Info for Customer by SAP  
    I have raised this issue on the Idea#s Place as an enhancement request
    on the below link:
    https://cw.sdn.sap.com/cw/ideas/5586
    This ER contains the information of including the customer exit
    variables in the report without checking the #input for ready# option.
    This ER can be considered for being implemented in the future
    versions. You can refer to SAP Note: 1515837 - How To: Enhancement
    Request Process - "Idea Place" for more information regarding the Idea
    Place.
    Cheers,
    Andy

  • BW reporting authorisation using customer exit

    Hi,
    We are planning to implement BW reporting authorisations using customer exit, so that authorisations can be filled at the run time, this is to avoid maintaining huge number of authorisations.
    If any one has implemented this before, Please send me  some documentation for the same. We have BW 3.50 environmnet.
    Regd,

    Hi Anil,
    What kind of authorization do you need for your BPS layout? Please explain this requirement further and I will try to help.
    Your second question is quite good, where do I find the values to fill the user exit too do authorization correctly for each user, right?
    I think this depends heavily on your source system, but a good approach (if possible) is to compare the master data available in the BW system to the logged on user in the system. If not, you will have to maintain data, i.e. in an ODS (like you suggest) in order to have something to work with in the CMOD exit.
    For instance, consider this simple scenario (we can discuss it further if you give more details on your scenario and requirements):
    User ABC belongs to plant 10. User DEF belongs to plant 20. You have an ODS with mapping between usernames and plants.
    <pseudo code>
    In CMOD:
    data: lv_user(8) type c.
    data: lv_plant(10) type i.
    lv_user = sy-uname. "this will give you user's login id
    select single plant into lv_plant from <your ODS>
    where ods_userid eq lv_user.
    L_S_RANGE-LOW = lv_plant.
    L_S_RANGE-SIGN = 'I'.
    L_S_RANGE-OPT = 'EQ'.
    APPEND L_S_RANGE TO E_T_RANGE.
    User ABC will see plant 10 and user DEF will see plant 20.
    Do you have any master data (i.e. 0username) available to map between username and an user number (such as business partner)?
    Hope this helps,
    Petter

  • 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

  • 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 get data for current week and previous week using customer exit in Bex.

    Hi everyone,
    I have a scenario in which I need to display data for current week and previous week (based on "sy_datum" the program has to calculate current week and previous week) in Bex using  Customer exit. I have created one variable in Bex Query Designer and I have written code for the variable in CMOD. But it is not working fine, (I know that we can do the same by using offset value in Bex). Can some one guide me how to achieve my requirement using customer exit.
    Thanks in Advance,
    G S Ramanjaneyulu.

    Hi krishna,
    Thanks for your quick reply, can you have a look at my code,
    case i_vnam.
    WHEN 'ZPWK_CWK'.
    ranges : pre_week for sy-datum.
    data : start_date type DATS,
           end_date TYPE dats .
    ************FM TO GET FIRST DATE OF CURRENT WEEK ************************
    CALL FUNCTION 'BWSO_DATE_GET_FIRST_WEEKDAY'
      EXPORTING
        DATE_IN  = sy-datum
      IMPORTING
        DATE_OUT = start_date.   " WEEK FIRST DATE
    end_date = START_DATE + 6.   " WEEK LAST DATE
    END_DATE   = START_DATE - 1.   " PREVIOUS WEEK END DATE
    START_DATE = START_DATE - 7.   " PREVIOUS WEEK START  DATE
    **********PREVIOUS WEEK DATES IN PRE_WEEK******************
    pre_week-SIGN   = 'I'.
    pre_week-option = 'BT'.
    pre_week-LOW    = START_DATE.
    pre_week-HIGH   = END_DATE.
    APPEND  pre_week.
    CLEAR : START_DATE,END_DATE.
    endcase.
    Regards,
    G S Ramanjaneyulu.

  • Formula Variable with customer Exit (ABAP Code)

    Hi Experts,
    Please advise me wether i am going in the right way to achieve my requirment else please advise me any alternate approach and update me with the abap code for my customer exit as i am not familiar with ABAP.
    My Requirment:
    Data :
    Emp_ID----Start_Date(DATS)---End_Date(DATS)
    I had a user entry (intreval) VARIABLE created on Start_Date
    User will enter the date intreval he want to analyze...
    Ex: 01.01.2008 to 01.02.2008
    Now i want to use the No of Days between user entered date intreval in my calculaction of a keyfigure
    In the above example it is 31 days
    So i created a Formula Variable of Customer Exit now i need a code that will
    pass the user entered dates to
    FM: FIMA_DAYS_AND_MONTHS_AND_YEARSImport parameters Value
    I_DATE_FROM 01.01.2008
    I_DATE_TO 01.02.2008
    I_FLG_SEPARATE ' '
    Export parameters Value
    E_DAYS 31
    E_MONTHS 1
    E_YEARS 1
    and need to pass the E_DAYS (31) to the result of formula
    User Entry Variable (Intreval) : ZST_VAR
    Formula Variable (Customer Exit) : ZND_EXIT
    Code
    WHEN 'ZND_EXIT'.
        DATA: low_date2 TYPE d,
        high_date2 TYPE d,
        num_days TYPE N,
        new_low_date2 TYPE d.
        IF i_step = 2.
          LOOP AT i_t_var_range INTO ls_varrange WHERE vnam = 'ZST_VAR'.
            CLEAR l_s_range.
            l_s_range-sign = 'I'.
            l_s_range-opt = 'EQ'.
            ls_varrange-low = low_date2.
            ls_varrange-high = high_date2.
    CALL FUNCTION 'FIMA_DAYS_AND_MONTHS_AND_YEARS'
      EXPORTING
        I_DATE_FROM          = low_date2
        I_DATE_TO            = high_date2
        I_FLG_SEPARATE       = ' '
      IMPORTING
        E_DAYS               = NUM_DAYS
      l_s_range = NUM_DAYS.
      APPEND l_s_range TO e_t_range.
      EXIT.
      ENDLOOP.
      endif.

    Hello,
    Before the WHEN statement it shoud have a CASE statement. In the user exit coding place your WHEN statement anywhere between CASE...ENDCASE statement.
    your code should look like
    DATA: low_date2 TYPE d,
    high_date2 TYPE d,
    num_days TYPE N,
    new_low_date2 TYPE d.
    Case i_vnam.
    WHEN 'ZND_EXIT'.
    IF i_step = 2.
    LOOP AT i_t_var_range INTO ls_varrange WHERE vnam = 'ZST_VAR'.
    CLEAR l_s_range.
    l_s_range-sign = 'I'.
    l_s_range-opt = 'BT'.
    low_date2 = ls_varrange-low.
    high_date2 = ls_varrange-high.
    CALL FUNCTION 'FIMA_DAYS_AND_MONTHS_AND_YEARS'
    EXPORTING
    I_DATE_FROM = low_date2
    I_DATE_TO = high_date2
    I_FLG_SEPARATE = ' '
    IMPORTING
    E_DAYS = NUM_DAYS
    l_s_range-low = NUM_DAYS.
    APPEND l_s_range TO e_t_range.
    EXIT.
    ENDLOOP.
    endcase.
    Thanks
    Chandran

  • Formula Variable with customer exit

    Hi,
    can we use Formula variables with customer exit based  on characteristics(ex Bill date)? if yes, can you guys help me on this.
    Thanks
    kri

    Yes , you can use a formula variable with customer exit based on characteristics .
    Depends on the requirement what you want to show in the formula variable ,
    Eg : if you want to show the max fiscal year period , in that case :
    create a new formula in the keyfigure section of your query , go to edit , you can see formula variable below the keyfigures ,
    right click on the same and create new formula variable :
    Write the code for the formula varible in the backend as we do for normal customer exit varaible :
    for this e.g the code will be :
    FORM get_variable_value
          tables E_T_RANGE      type RSR_T_RANGESID
          using I_VNAM          type RSZGLOBV-VNAM
                I_VARTYP        type RSZGLOBV-VARTYP
                I_IOBJNM        type RSZGLOBV-IOBJNM
                I_S_COB_PRO     type RSD_S_COB_PRO
                I_S_RKB1D       type RSR_S_RKB1D
                I_PERIV         type RRO01_S_RKB1F-PERIV
                I_T_VAR_RANGE   type RRS0_T_VAR_RANGE
                I_STEP          type I.
      DATA L_S_RANGE LIKE LINE OF E_T_RANGE.
      DATA loc_var_range LIKE rrrangeexit.
    Data  : l_inPer TYPE string.
    IF i_step = 1.
    Select min( distinct FISCPER )
            from /BIC/A(DSO name)
            into l_minper  .
        l_s_range-sign = 'I'.
        l_s_range-opt = 'EQ'.
        l_s_range-low = l_minper  .
        APPEND l_s_range TO e_t_range.
    endif.
    drag the formula variable in the new formula created and exexcute the query , you will be able to see the output .
    This is just an example , your code will differ as per your requirement .

  • Bex Formula using customer Exit

    Dear Friends,
    I am trying to resolve the below problem. Require your help.
    In one of the bex reports, the requirement is to provide a variable on Bill date. From the given bill date, the report should display data for 7 consecutive days.
    But the condition is that the from date should always be a saturday?
    What i have done is : In ROWS, i selected the required key figure columns
    and then, created a structure in which i created Seven New Selections and used offsets.
    so, if the user enters a specific date, the report displays seven days of the data from the given date. However, how do i restrict the user's choice to only saturdays.
    I suppose the solution lies in using customer Exit.. but could some one help me with the ABAP coding.
    I am also available on [email protected]
    Thanks for the anticipated support.

    Hi,
    You can get the Day from the current system date and put a case statement to substract 1 for sunday to get saturday
    2 for monday
    3 for tuesday
    etc
    Fuction Module : DATE_TO_DAY
    Can check this link : FM: DATE_TO_DAY

Maybe you are looking for

  • How to make Web module produce different-sized JPEGs for different pictures?

    Hi -- Googled this question, searched the "help" on Lightroom, searched Adobe, downloaded the latest version of Lightroom, searched this forum, no help, so I'm asking: I'm using the Web module in Lightroom (which I've already used to create five othe

  • Enhance FITV_FPM :Change pop up window text

    HI All, I need to add text in a popup based on expense type entered by the user while creating expense. WDC:FITV_FPM is already enhanced to show the existing text in a popup. I need to add some more text on this pop up based on expense type. Already

  • A/V output setup for MacBook question

    Bought the A/V cable and have used it to hook my MacBook to my stereo system while my guitar is hooked up to the MacBook. Tried it on my iPod to TV to stereo system, wanted to see my vids on tv and hear through stereo. Figuered out in "video setup" o

  • Avoid Duplicate Tasks when Expanding Groups for Custom Task Process

    Is there a way to: Avoid Duplicate Tasks when Expanding Groups for Custom Task Process? I've got a people metadata column that I am planning on putting groups into.  I want the groups to expand and send a task for all users in the groups.  I also wan

  • What is the t-code for DMS?

    Please help. Thanks!