Implenting BADI in place of customer exit in BEX reports in BW

Hi all,
I am new to implemrnting BADIS in to BW.
We have already used user exit  RSR00001.
We want to use BADI's in place of exit 'RSR00001' .
Can any one tell me how to migrate the existing exit to BADI using tcode SAPU.
OR any one can help me regarding implementing BADI's in place of 'RSR00001'  exit.
Thanks'
Dhananjay

I am afraid there is no such BADI template in the place of RSR00001

Similar Messages

  • Search instring value of Variable in customer exit of bex report

    Hello experts-
    I have a situation where I need to search the records based on value  of a variable input in selection screen of bex report and according to that i need to show the results in report.
    Ex- if we have a material characteristics on selection screen,or material number has 10 digits(eg 1234567809). so the user will only type 2-3 digit(i.e 12) on selection screen, In this case I want only those records to be displyed, for which material has these 2 digits in it .
    Eg would be:
    1234567809,
    3451267809,
    9807654312.
    Could you please suggest ABAP logic for the above. Properties of variable and how many variable we have to create.
    Regards,
    Yatendra

    Hello Vineet,
    we have tried putting  ' * ' i n place of '=' in drop down screen.
    we have also tried customer exit code, please check below.
       WHEN 'ZSEARCH'.
         data: lv_string type string.
         data: wa_test type ZTEST_TOOLING.
    if I_STEP = 2.
         LOOP AT i_t_var_range INTO loc_var_range
                   WHERE vnam = 'ZTSEARCH'.
              CONCATENATE '' loc_var_range-low '' INTO L_S_RANGE-LOW.
              L_S_RANGE-SIGN = 'I'.
              L_S_RANGE-OPT = 'CP'.
              APPEND L_S_RANGE TO E_T_RANGE.
         ENDLOOP.
      endif.
    In  this code we have created two variables 1st 'ZSEARCH' which is type of 'customer exit' , and the second one 'ZTSEARCH' type of "user entry/ default value" .
    As we need the value provided by user in  ZTSEARCH (user entry), we loop at  i_t_var_range where vnam = 'ZTSEARCH'.
    But i_t_var_range doesn't contain  ZTSEARCH variable.
    Can you please suggest in customer exit code as well as in selection option.
    Thanks
    yatendra

  • Customer exits in Bex

    Hello BW Experts,
    Could any one give me some pointers / web sites / materials / oss notes for Customer exits in Bex.
    Any help is highly appreciated.
    Thanks,

    Check Out service.sap.com/bw ... See under "SAP BW InfoIndex" there you find a section called "Exit".
    Let me warn you about Custome Exits usage in BEx ... be carefull about performances!
    Hope it helps
    GFV

  • Migrating Customer exit  for BEX variables to BADI's

    Hi All,
    I am new to ABAP In the context of BW.
    I am  using exit RSR00001 to populate variables in BEX reports.
    I want to migrate this customer exit RSR00001 to BADI.
    Can any one please tell me how to migrate the same and how it will fire in place of exit?
    Thanks In Advance
    Dhananjay

    Hi,
    Please have a look at:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f1a7e790-0201-0010-0a8d-f08a4662562d
    Krzys

  • Regarding Customer Exit in Bex

    Hello Expers.
    Here is my scenario: I have variable which accepts the key date from the user. The requirement is to get the calmonth from the date entered by the user. According to my point of view, Writing customer exit is a best option but i do not know is it possible for me to pass the date, entered by the user, to exit? If Yes than please let me know how?
    Help required Urgently

    use the parameter I_STEP which specifies when the enhancement is called.
    The following values are valid for I_STEP:
    ·        I_STEP = 1
    Call takes place directly before variable entry
    ·        I_STEP = 2
    Call takes place directly after variable entry. This step is only started up when the same variable is not input ready and could not be filled at I_STEP=1.
    ·        I_STEP = 3
    In this call, you can check the values of the variables. Triggering an exception (RAISE) causes the variable screen to appear once more. Afterwards, I_STEP=2 is also called again.
    ·        I_STEP = 0
    The enhancement is not called from the variable screen. The call can come from the authorization check or from the Monitor.
    sample code : user enter value of date in say variable ZDATE
    l_s_range TYPE rsr_s_rangesid,
    l_t_var_range TYPE rsr0_s_var_range.
    WHEN 'ZCALM' .
    if i_step=2.
    read table i_t_var_range into l_t_var_range with key vnam = 'ZDATE' .
    if sy-subrc = 0.
    l_s_range-low = l_t_var_range+0(6).
    l_s_range-high = l_t_var_range+0(6).
    l_s_range-opt = 'EQ'.
    l_s_range-sign = 'I'.
    append l_s_range to e_t_range.
    endif.
    endif.

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

  • Customer exit variable in Report designer

    Hello,
    I have created one Customer Exit variable ( variable ready for input) for one of the characteristics in a query. However, when i execute this query in Report designer, the selection variable is not appearing. It is just taking the variable value from Exit, eventhough the variable is ready for input.
    Is it  a standard behavior or am i missing anything ?
    Ravi

    Hello,
    First check your variable is included in the report desinger or not
    if it is included in Filters, use the T-code RSRT2 and execute. You should get a variable screen.
    Debug your query here.
    Hope it is useful.
    Thanks,
    Ashok

  • Customer exit in BEx Query

    Hi,
    I've created a BEx query and added a variable MCE9004 in field Ref.org.unit and this variable is mapped to a customer exit code via CMOD step 2 (post_popup).
    Basically how I want it to work is, I will select an org.unit value e.g. org.unit = A1 in tcode RSRT variable selection screen and this value will be passed in the customer exit code as shown below and retrieve the look up values and pass it to the field ref.org.unit via e_t_range.
    CASE i_vnam.
         WHEN 'MCE9004'.
    ****      IF i_step = 2.
           READ TABLE i_t_var_range INTO LS_T_VAR_RANGE
           WITH KEY IOBJNM = '0CALMONTH'.
           l_date = LS_T_VAR_RANGE-low.
           IF l_date IS NOT INITIAL.
             CALL FUNCTION 'SLS_MISC_GET_LAST_DAY_OF_MONTH'
               EXPORTING
                 day_in            = l_date
               IMPORTING
                 last_day_of_month = ld_last_day
               EXCEPTIONS
                 day_in_not_valid  = 1
                 OTHERS            = 2.
           ENDIF.
           READ TABLE i_t_var_range INTO LS_T_VAR_RANGE
           WITH KEY IOBJNM = '0ORGUNIT'.
           SELECT /BIC/ORGUNT_PR FROM /BIC/AMPA5AX0000 INTO lv_org "l_s_range
             WHERE ORGUNIT = LS_T_VAR_RANGE-low
             AND DATETO LE ld_last_day.
             l_s_range-SIGN = 'I'.
             l_s_range-OPT = 'EQ'.
             l_s_range-LOW = lv_org.
    *          l_s_range-HIGH =
             APPEND l_s_range TO e_t_range.
           ENDSELECT.
    ***** To clear value of org.unit field
    ****      READ TABLE i_t_var_range INTO LS_T_VAR_RANGE
    ****      WITH KEY IOBJNM = '0ORGUNIT'.
    ****      IF sy-subrc EQ 0.
    *****        CLEAR LS_T_VAR_RANGE-low.
    ****        DELETE i_t_var_range index sy-tabix.
    ****      ENDIF.
       ENDCASE.
    ENDFUNCTION.
    Once this code has been executed it goes back to the selection screen and there is still an org.unit value on the screen even though I have removed it in my code in red above in i_t_var_range.
    Therefore when I execute the query, the value for org.unit field is not emptied.
    Can you please teach me how to clear that value of org.unit field?
    Let me know if you need further details.
    Thanks,
    Rebekah

    hi thomas,
    yes i get your point but the thing is i need to modify a value in the import table. coz the export table is not for the org.unit field but the ref.org.unit field.
    Basically i pass in org.unit = A1 and e_t_range will have the lookup values to be passed in ref.org.unit field which is B2 and C3.
    Then when i click execute, i want my filter only to have the values B2 and C3 and A1 shud be removed.
    is there any way i could do that?
    please advice.
    Thanks,
    Rebekah

  • Include character value variable processed by customer exit in the report

    I have defined a character value variable' processed by 'customer exit'. i am troubleshooting a problem so I need to see the value of this variable. Is there a way to display this variable in the report. If so, what section, rows or columns? And how to configure?
    Thanks,
    Sharon

    Hi,
    You can add directly the variable, in BEx Analyzer 7.0 you can add variables in the Excel Cell that you would.
    Steps:
    - Select the Excel Cell
    - In the BEx Design Toolbox, select Insert text
    - When you are in Design Mode - click over the text element
    - Go to Constants tab and select the Custom Exit Variable
    - Save the workwook
    Regards,
    Dani

  • Variable with Customer Exit  on BEX

    Hi Experts,
    I have a query with a key figure 0CALDAY, restricted by the variable ZSCAL7 (Acumulated Period). This variable is defined as 'customer exit'.
    How can I see with is the exit that apply?

    Go to CMOD tcode and select project for enhancement RSR00001.
    In the Function module EXIT_SAPLRRS0_001 create click oninclude ZXRSRU01  and there find your variable.
    Hope it helps.
    Regards

  • Customer exit in BEx to derive Cal month

    hey all,
    i need to write  a customer exit, to derive  prev Cal Month value from the given Calday. I have written the code but it derives the current cal month instead of previous. any suggestions ?
    case I_VNAM.
      when 'ZCU_CMTH' .
        if i_step = 2.
          loop at i_t_var_range into l_s_var
                  where vnam = 'ZCCCD'.
            CMTH_YR = l_s_var-low.
            l_s_range-low = CMTH_YR(6).
            CMTH = CMTH_YR+4(2).
            CMTH = CMTH - 1.
            L_S_RANGE-LOW+4(2) = CMTH.
            l_s_range-sign = 'I'.
            l_s_range-opt  = 'EQ'.
            write :/ l_s_var.
            append l_s_range to e_t_range.
          endloop.
        endif.
           clear l_s_range.
    endcase.
    thanks
    Laura.

    Hi,
    Try the following logic to get the previous year month based on calday:
    data :CMTH_YR (4),
             cmth_mn(2).
    case I_VNAM.
    when 'ZCU_CMTH' .
    if i_step = 2.
    loop at i_t_var_range into l_s_var
    where vnam = 'ZCCCD'.
    if l_s_var-low+4(2) eq '01'.
      CMTH_YR = l_s_var-low+0(4) - 1 .
      concatenate CMTH_YR  '12' into L_S_RANGE-LOW.
    else.
      cmth_mn =  l_s_var-low+4(2) - 1 .
      concatenate l_s_var-low+0(4)  cmth_mn into L_S_RANGE-LOW.
    endif.
    l_s_range-sign = 'I'.
    l_s_range-opt = 'EQ'.
    append l_s_range to e_t_range.
    endloop.
    endif.
    clear l_s_range.
    endcase.
    hope it works...
    regards,r
    raju

  • Customer exit in BEx

    Dear all,
    I do not have the clear picture regarding where we write the ABAP coding in
    BEx.
    Thanks
    V.G.VG

    HI,
    In CMOD, you ned to look [or create] for project that contains enhancement RSR00001, where u can find the function module "EXIT_SAPLRRS0_001".
    try to follow some steps in 'how to' doc related to this, and sample code may useful for you
    https://websmp206.sap-ag.de/~sapdownload/011000358700002762582003E/HowToDeriveVariableValue.pdf
    https://websmp206.sap-ag.de/~sapdownload/011000358700002765042003E/HowToVerifyVariableInput.pdf
    Regards,
    DST

  • Derive 0OBJ_CURR from 0COST_CENTER master data in customer exit

    Hi,
    I'm having trouble with the syntax in the following case:
    I'm trying to create a customer exit variable for reporting which is reading the cost center value from cost center variable (ZIPCC) and then using that value to determine the home currency of that cost center by reading the 0OBJ_CURR field from cost center master data.
    The code is as follows:
    DATA D1 Like 0OBJ_CURR.
    remark: Object currency is unit. How to declare units?
    WHEN 'ZIPCUR'.
    if I_STEP = 2.
    loop at i_t_var_range into lt where vnam = 'ZIPCC'.
    Select single OBJ_CURR into D1 from /BI0/PCOSTCENTER where COSTCENTER = i_t_var_range-low.
    remark: I'm having also trouble with the selection of OBJ_CURR.
    clear l_s_range.
    l_s_range-low = D1.
    l_s_range-sign = 'I'.
    l_s_range-opt = 'EQ'.
    append l_s_range to e_t_range.
    endloop.
    endif.

    Found the answer, to bad i cannot give points to myself :-P
    In the ABAP i use the E_T_RANGE output structure.
    That structure has several fields (sign, opt, low, high).
    In my ABAP i stored the same value in the low and high field.
    This should work fine for normal (flat) characteristic values.
    However, because i use a hierachy i should enter the 0HIER_NODE value in the high field.
    For details see: SAP NOTE: 912473
    Regards

  • 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

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

Maybe you are looking for

  • Technical system creation in SLD

    Hi, 1. I have installed Netweaver sneak preview-java edition. 2. I am trying to create a new technical system for WebAS ABAP. We are on ECC 5.0 . 3. I have imported Cimsap.zip and content.zip successfully. 4. Now in the screen "Technical system wizar

  • How do I set apple mail to default to firefox?

    Before switching from Safari to Firefox, links in apple mail (v1.3.11) e-mails would default to Safari for opening. After changing to Firefox as my preferred browser, now apple mail defaults to IE 5.2 to open links in e-mails. I can't find anything i

  • Using ImageIcon in Linux

    Hi, I tried to use jpg image inside JLabel. This is working in Windows. But I tried in RedHat Linux 9. I can't see the jpg image inside the label. I have included the code. Thanks in advance. import java.awt.*; import java.awt.event.*; import javax.s

  • Continuous processing service in Java EE & Glassfish

    I'm new to Java EE architechture but have been doing some reading on it, examining tutorials and practicing with simple EJB, web-service etc.. I have a application design type of question that I thought might be better to ask than to make up a soluti

  • Word X Slow

    I have a MacBook, 2Ghz, 512MB. When I open Word X, it is excrutiatingly slowwwww. If I try to go from one application, like Mail, back to Word, it takes about 20 seconds. This can't be right. I might have another app open, like Camino or Palm Desktop