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

Similar Messages

  • How to Write a CUstomer Exit for a variable in BEx

    Hi,
    How to write a customer exit variable in bex Query designer
    Do i need developers key for this (If so what type of key do i need so that i can ask basis tean to generate)
    Info Object: ZEXP_DTE (Expiry Date)
    Variable on ZEXP_DTE :
    ZEDTE
    Type: Customer Exit
    Can any one please tell me how to write a code in CMOD from this (Step-by Step)
    Expiry Date > Current Cal Day
    As arun said
    'l_s_range-low = SY-DATUM.
    l_s_range-opt = 'I'.
    l_s_range-sign = 'GT'.
    APPEND l_s_range TO e_t_range.'
    I want to insert the above code for the above customer exit but as i am new to BW as  ABAP please explain me what are the steps involved in CMOD
    Thanks

    Hi,
    To write customer exit for a variable, you require Access key.
    Contact your BASIS to get that.
    Access Key,BASIS?
    To write Customer exit,
    User Exits
    User Exit for Variable
    /thread/809285 [original link is broken]
    Hope these helps u...
    Regards,
    KK.

  • How to create customer exit for characteristic variables and for text vars.

    hi friends,
      can anybody tell me how to create customer exit for characteristic variables and for text variables in bw ides system.
    thanks,
    sree

    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

  • Customer exit for query variable to calculate amount since 1998

    Hi Experts,
    I am trying to fetch the expenses since 1998 till last fiscal year in Bex Query.
    I have created a variable ZFYRVAR1, processing type customer exit, Interval, Mandatory. I unchecked 'Variable is ready for input' box. There is no 0CALYEAR in the infocube. We have 0FISCYEAR and 0FISCPER in the InfoCube.
    We wrote following code to populate the variable. It is throwing a warning message.
    Value " is too long for variable ZFYRVAR1.
    The column remains empty and nothing is populated. Can somebody tell me whats wrong with the code. I also defined another variable instead of l_year. like
    zyear like /bi0/pfiscyear-fiscyear.  but same error.
    Any help is appreciated.
    data: l_s_range type rsr_s_rangesid.
    data: l_year(4)     type n.
    case i_vnam.
    l_year = sy-datum+0(4).
      l_s_range-high = l_year - 1.
       l_year = 1998.
      l_s_range-low = l_year.
      clear e_t_range.
      l_s_range-sign = 'I'.
      l_s_range-opt  = 'BT'.
      append l_s_range to e_t_range.
    endcase.

    Hi Sheo,
    Hope the sample code below helps you. You can debug it in RSRT to be sure.
    DATA: L_S_RANGE TYPE rsr_r_rrrangesid.
    DATA: l_yearh(4) type c,
          l_yearl(4) type c.
    IF I_STEP = '2'.
      if i_vnam = 'ZFYRVAR1'.
         *Please check your user profile to make sure l_year is in the format YYYYMMDD.
         l_yearh = sy-datum(4).
         l_yearh = l_yearh - 1.
         l_yearl = '1998'.
         l_s_range-high = l_yearh.
         l_s_range-low = l_yearl.
         l_s_range-sign = 'I'.
         l_s_range-opt = 'BT'.
        APPEND L_S_RANGE TO E_T_RANGE.
        exit.
      endif.
    ENDIF.

  • How to look at sap exit  for bex variable

    hi gurus
    how can i read a sapexit for a standard variable created by sap. i need to replicate that same code and modify it and make my own user exit for a custom variable.
    thanks

    hi Adnan,
    sap variable exit is process with function module RSVAREXIT[variable name],
    e.g you want to see code for 0date, run SE37, RSVAREXIT0DATE and display.
    hope this helps.

  • How to write customer exit for the variable

    Hi Experts,
    I have a requirement to create the variable, the scenaria is like this..
    I need to create the variable which gives the period/year values,if yours enters the values 05.2007 then the variable should return the first monthe the year i.e.01.2007.
    I hope it can be done by writing the customer exit..but iam unware how to achieve this.
    Please explain me step by step and cope for customer exit to done this.
    Points will be awarded
    Suraj.

    hi Suraj,
    there should variable sap exit for first month,
    for customer exit, check this how to doc for steps
    https://websmp210.sap-ag.de/~sapdownload/011000358700002762582003E/HowToDeriveVariableValue.pdf
    your code may look like
      INCLUDE ZXRSRU01                                                   *
      DATA: L_S_RANGE TYPE RSR_S_RANGESID.
      DATA: LOC_VAR_RANGE LIKE RRRANGEEXIT.
      CASE I_VNAM.
      WHEN 'your 1st month variable'.
        IF I_STEP = 2.                                  "after the popup
          LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
                  WHERE VNAM = 'your user input variable'.
            CLEAR L_S_RANGE.
            L_S_RANGE-LOW      = LOC_VAR_RANGE-LOW(4)."low value, e.g.200001
            L_S_RANGE-LOW+4(2) = '01'.
            L_S_RANGE-SIGN     = 'I'.
            L_S_RANGE-OPT      = 'EQ'.
            APPEND L_S_RANGE TO E_T_RANGE.
            EXIT.
          ENDLOOP.
        ENDIF.
      ENDCASE.
    hope this helps.

  • Need help in writing code Customer Exit for reporting Variable

    Hello Gurus,
           I have a requirement.When a authorized user logins to view the report, he should see only customers available in the value help screen.In the value help screen it is displaying all the customers, but data is displayed perfectly fine for the authorized sales rep. By default, Value help screen displaying all the customer numbers.
    How can I restrict in the value help screen?
    Any help appreciated with points.
    Regards,
    PNK

    Hello PNK,
    You can use a variable with Process type Authorization. This enables variables to be filled with values automatically from the user authorization.
    http://help.sap.com/saphelp_sem40bw/helpdata/EN/44/599b3c494d8e15e10000000a114084/content.htm
    Thanks
    Chandran

  • Customer Exit for BW Variables

    Dear all,
    I am a BW Consultant and have a very limited knowledge in ABAP. I have the following scenario:
    My BW query has the following input variables:
    0P_FYEAR      Fiscal Year (Single Value Entry)
    0P_PER3      Posting Period (Single Value Entry)
    and the following text variables:
    ZT_FYEAR     (Text variable for Year)
    ZT_PER3     (Text variable for Period)
    ZT_CQTR   (Text variable for Comparative Quarter)
    Now, I need guidance to write ABAP code in CMOD that will achieve the following results:
    1.     Display last date of Period., e.g.:
    -     Return 31 to ZT_PER3, if January (Period 1) is selected from 0P_PER3.
    -     Return 28/29 to ZT_PER3,  if February (Period 2) is selected from 0P_PER3.
    2.     Display as Period 12.
    Display Period 13, Period 14, Period 15 & Period 16 as Period 12, e.g.:
    -       Return 12 to ZT_PER3, if Period 13 is selected from 0P_PER3.  The same goes for Period 14, 15, & 16.
    -       Otherwise, return the same period to the text variable.
    3.     Quarter-to-date Comparison
    -     If Quarter 1 periods (Period 1, 2 or 3) and Year 2012 is selected from 0P_PER3 and 0P_FYEAR, return Quarter 4 to ZT_CQTR and Year 2011 to ZT_FYEAR.
    -      Otherwise, return previous quarter and same fiscal year to the text variables.
    Would really appreciate your assistance.
    Thanks!

    Hi Fulham,
    For point 3:
    case 0P_PER3.
    when '1' or '2' or '3'.
    ZT_CQTR = '4'.
    ZT_FYEAR = 0P_FYEAR - 1.
    when '4' or '5' or '6'.
    ZT_CQTR = '1'.
    ZT_FYEAR = 0P_FYEAR.
    when '7' or '8' or '9'.
    ZT_CQTR = '2'.
    ZT_FYEAR = 0P_FYEAR.
    when '10' or '11' or '12'.
    ZT_CQTR = '3'.
    ZT_FYEAR = 0P_FYEAR.
    endcase.
    Hope This Helps.
    Ernesto.

  • Customer Exit for Formula Variable

    Hi all, and thanks in advance for your help on this one.
    I'm trying to run a function module to convert the value of a characteristic in my ODS to a formula variable. To do this, I've created a replacement path variable to hold the value of the characteristic, and then I'm passing this value to another module to convert it to factory date.
    Here is my code ZTSTGIDT is the name of the replacement path variable that is set to equal the characteristic key value.
    DATA: CONVERTDATE  TYPE SYDATUM. " Date
    DATA: FAC_DATE     TYPE FACDATE. " Factory Date
    DATA: ZE_T_RANGE TYPE RSR_T_RANGESID WITH HEADER LINE.
        WHEN 'ZFACDY01'.
            CLEAR: ZE_T_RANGE, E_T_RANGE.
    *  Get the Goods Issue date from the formula variable.
        IF I_STEP = 2.
          READ TABLE I_T_VAR_RANGE
          WITH KEY VNAM = 'ZTSTGIDT'
          INTO CONVERTDATE.
          CALL FUNCTION 'DATE_CONVERT_TO_FACTORYDATE'
          EXPORTING
          CORRECT_OPTION = '+'
          DATE = CONVERTDATE
          FACTORY_CALENDAR_ID = 'ZB'
          IMPORTING
          FACTORYDATE = FAC_DATE
          EXCEPTIONS
          CALENDAR_BUFFER_NOT_LOADABLE = 1
          CORRECT_OPTION_INVALID = 2
          DATE_AFTER_RANGE = 3
          DATE_BEFORE_RANGE = 4
          DATE_INVALID = 5
          FACTORY_CALENDAR_NOT_FOUND = 6
          OTHERS = 7.
          IF SY-SUBRC = 0.
              ZE_T_RANGE-LOW = FAC_DATE.
              ZE_T_RANGE-SIGN = 'I'.
              ZE_T_RANGE-OPT = 'EQ'.
              APPEND ZE_T_RANGE to E_T_RANGE.
          ENDIF.
        ENDIF.
    The variable ZFACDY01 does not receive a value from this code, and it seems as if the variable CONVERTDATE never receives a value from the replacement path variable.
    1.) Is it even possible to read the characteristic value in this way?
    2.) Is there another way to read the characteristic value directly from my ODS at runtime for the record in question?
    The much easier solution is to create new key figures for each date that we need to convert to factory days and to do the conversion in the update rules, but doing so would require extensive reloads of many years worth of data. Even though performance will be impacted, we're trying to find a workaround (queries will be batch-run at night, anyway).
    Many thanks (and points!) for the person who can figure this out

    I tried using different I_STEP stages, but the replacement path variable still doesn't seem to be populated when it passes the value to the function module to convert to factory days.

  • How to find out query name in customer exit for variables

    We use the same customer exit variable in different queries. In the customer exit we want to find out, which query has called the customer exit. With the technical query name we want to read a master data table entry.
    e.g. If we come from query ZG1_TEST1 we want to use selection sel1
    Query name  |  selection
    ZG1_TEST1   |  sel1
    ZG1_TEST2   |  sel2  
    How can we find out the query name in the customer exit for variables?
    Thanks for your help,
    Evi

    Hi Evi,
    check out the structure I_S_RKB1D in your exit. It contains the query.
    Siggi

  • Customer Exit for Calendar Month based on the day (system Date)

    Hello,
    I need help in creating a customer exit for Calendar month without the user input. The logic is as follows:
    For the BEx variable created with customer exit option and no user input:
    If the day on the system date falls in between 1 to 14 take the calendar year/month value as previous month.
    If the day on the system date falls in between 15 through 31 then take the calendar year/month as current month.
    eg if report is run on March 24th2009 the calendar year/month variable should be calculated as 03/2009 (March 2009)
    if the report is run on March 1st2009 the calendar year/month should be calculated as 02/2009 (Feb 2009).
    The code should be effective when run in the first 15 days of Jan when the previous month would contain the previous year as well.
    Thank You
    Srishti

    Thanks Shanthi. I am trying to incorporate the logic when the query is run in beginning of Jan when the year should be the previous year.Following is the code.please let me know if it would work. Is there a way I can test it as well?
    CASE I_VNAM.
    WHEN 'ZCURCALMON'.
    IF i_step = 2.
    data: mm(2),
            dd(2),
            yy(4),
            FM(6).
    if sy-datum+4(2) EQ 1.
    sy-datum(4) = sy-datum(4) - 1.
    else.
    sy-datum(4) = sy-datum(4).
    endif.
    if sy-datum+6(2) LE 15.
      mm = sy-datum+4(2) - 1.
      concatenate sy-datum(4) mm into FM.
    else.
      concatenate sy-datum(4) sy-datum+4(2)  into FM.
    endif.
    l_s_range-low = FM.
    l_s_range-sign = 'I'.
    l_s_range-opt = 'EQ'.
    append l_s_range to e_t_range.
    Endif.
    ENDCASE.
    Thanks
    Srishti

  • How to find the customer exits for a particular transaction

    hi
    how to find the customer exits for a particular transaction

    Hi jyothsna vankadari ,
    ther is a convenient way to find all BADIS called. You may know that BADIS are the newer version of EXITs.
    I would suggest you to go for BADI.
    Follow the below steps to find out what all BADI's are called when you press any button in any transaction.
    1) Goto se24 (Display class cl_exithandler)
    2) Double click on the method GET_INSTANCE.
    3) Put a break point at Line no.25 (CASE sy-subrc).
    Now
    4) Execute SAP standard transaction
    5) Press the required button for which you need to write an exit logic, the execution will stop at the break point.
    6) Check the values of variable 'exit_name', it will give you the BADI name called at that time.
    7) This way you will find all the BADIs called on click of any button in any transaction.
    Regards,
    Clemens

  • 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

  • Take influence on search help (F4) for BEx variables

    Hi Experts,
    we use BI 7.3.
    Within the release 3.x we had the possibility to influence the search help of Bex Variables via the transaction se12 -> search help --> search help exit.
    This fuba is still used for the search help  in the screen to maintain masterdata. However it is not used anymore for the search help in the selection screen for BEx variables.
    Do I have any new possibilities to take influence on the values shown in the search help? I don't want to show all values in the masterdata table, and not even all values which are stored in the infoProvider.
    Thanks,
    best regards
    Frederike

    Dear Frederike,
    In that case you should maintain the read mode as "Only Posted Values for Navigation" ; This means only values that are part of the query results are used for the input value request . This mode is called Q.
    RSA1 -> Info-object display -> Business Explorer Tab -> Query Def. Filter Value Selection -> change to Q Mode..
    You can overwrite the value in Infoprovider level as well. Goto Info-provider -> Right click Infooprovide specific properties -> change there as well..
    Regards,
    Arvind

  • How to select data from an aggregate in a customer exit for a query?

    Hi,
    I have written a virtual key figure customer exit for a query. Earlier the selection was from the cube, where there was severe performance issue. So I have created an aggregate, activated and have loaded the data.
    Now when I select that data I find that the Key table is different in development and production. How do I resolve this.
    My code is attached below. The table in developemnt is KEY_100027 and in production is KEY_100004. This code is activated and running in BW development server.
    SELECT
        F~KEY_1000041 AS K____035
         F~KEY_1000271 AS K____035
         F~QUANT_B AS K____051
         F~VALUE_LC AS K____052
    INTO (xdoc_date, xval1, xqty1)
    UP TO 1 ROWS
    FROM
    FROM
    */BIC/E100004 AS F JOIN
    /BIC/E100027 AS F JOIN
    /BIC/DZMM_CGRNU AS DU
    ON FKEY_ZMM_CGRNU = DUDIMID
    JOIN /BI0/SUNIT AS S1
    ON  DUSID_0BASE_UOM = S1SID
    JOIN /BI0/SCURRENCY AS S2
    ON DUSID_0LOC_CURRCY = S2SID
    JOIN /BI0/SMATERIAL AS S3
    *ON FKEY_1000042 = S3SID
    ON FKEY_1000272 = S3SID
    JOIN /BI0/SMOVETYPE AS S4
    *ON FKEY_1000043 = S4SID
    ON FKEY_1000273 = S4SID
    JOIN /BI0/SPLANT AS S5
    *ON FKEY_1000044 = S5SID
    ON FKEY_1000274 = S5SID
    JOIN /BIC/D100004P AS DP
    *ON FKEY_100004P = DPDIMID
    ON FKEY_100027P = DPDIMID
    WHERE
    WHERE
    ( ( ( ( F~KEY_1000041 BETWEEN 20051230 AND 20060630  ) ) AND  ( (
    ( ( ( ( F~KEY_1000271 BETWEEN 20051230 AND 20060630  ) ) AND  ( (
             S3~MATERIAL = <l_0material> ) ) AND  ( (
                s2~movetype BETWEEN '101' AND '102' OR
             s4~movetype BETWEEN '921' AND '922' OR
             s4~movetype BETWEEN '105' AND '106' OR
             s4~movetype BETWEEN '701' AND '701' OR
             s4~movetype BETWEEN '632' AND '632' ) ) AND  ( (
             S5~PLANT = <l_0plant> ) ) AND  ( (
             DP~SID_0RECORDTP = 0  ) ) ) )
    GROUP BY
        ORDER BY F~KEY_1000271 DESCENDING.
          IF sy-subrc NE 0.
            EXIT.
          ENDIF.
        ENDSELECT.
    How do I transport the code and make it work?
    Whats the reason that the two key fields are different.
    I had transported the aggregate from development to production. Activated it and filled the data.
    What is the way out? Please help.
    Regards,
    Annie.

    Hi Sonu,
    The main task is to move the contents of the one internal table to another with some condition.
    First sort and delete the duplicate entries from the First Internal table like below : 
    sort it_tab by material ascending date_modified descending.
    delete adjacent duplicates from it_tab.
    Then move that Internal table contents to another internal table.
    Define another internal table with the same structure as you have first internal table and then
    Second Step :
    it_itab1 = it_itab.
    If you are using seperate Header line and Body then you can do like below :
           it_itab1[] = it_itab[].
    This will fix the issue.
    Please let me know if you need any further explonation.
    Regards,
    Kittu
    Edited by: Kittu on Apr 24, 2009 12:21 PM

Maybe you are looking for

  • I need help with Sunbird Calendar, how can I transfer it from one computer to the other and to my iphone?

    I installed Sunbird in one computer and my calendar has all my infos, events, and task that i would like to see on another computer that i just downloaded Sunbird into. Also, is it possible I can access Sunbird on my iphone? Thank you in advance,

  • HP Color LaserJet Pro MFP M277dw digital sending feature

    Does the HP Color LaserJet Pro MFP M277dw support the scan to file over network feature?  I have a Windows Server with a file share, and I want users to be able to scan documents to the file share. Can I do this with this printer?? Kindly help...

  • Some icons are not shown correctly in Gnome tray

    The image should tell everything. In the tray there should be icons from Guake, Dropbox and Skype. However only Skype is visible. Does anyone know where could be the problem? I noticed that Synergy icon behaves also wrongly. thanks Jan

  • Problem with Acrobat Pro - install, etc.

    I have problem with my Acrobat Pro (in Adobe Design Standard CS6 edition) - Regularly once a month throughout the software crashes and will not turn on. Only helps to re-install. Now I additionally happened that when reinstalling does not load serial

  • Subscript beyond count ORA-06533

    Hi, I am using Oracle Express with SQL Developer on platform XP. I am attempting to run a procedure that works error free as an anonymous PL/SQL block. I have come across a few problems today and would like to Thank the following, 1. Mohana - creatin