ABAP - Customer exit varaible

Hi,
DATA: l_s_range TYPE rsr_s_rangesid,
loc_var_range LIKE rrrangeexit,
zpl TYPE char4.
IF i_step = 2.
  CASE i_vnam.
WHEN 'ZPLANT'.
      LOOP AT i_t_var_range INTO loc_var_range WHERE vnam = 'ZV_TXT1'.
        CLEAR: l_s_range.
        zpl = loc_var_range-low.
        CASE zpl.
          WHEN 'A'.
            l_s_range-low = '0010'.
            l_s_range-high = '0060'.
            l_s_range-sign = 'I'.
            l_s_range-opt = 'BT'.
          WHEN 'B'.
            l_s_range-low = '0091'.
            l_s_range-high = '0175'.
            l_s_range-sign = 'I'.
            l_s_range-opt = 'BT'.
          WHEN OTHERS.
            l_s_range-low = '0010'.
            l_s_range-high = '3LHP'.
            l_s_range-sign = 'I'.
            l_s_range-opt = 'BT'.
        ENDCASE.
        APPEND l_s_range TO e_t_range.
      ENDLOOP.
  ENDCASE.
ENDIF.
I use a customer exit variable into the BEx. When I choose "A" Into variable, I get Plant "0010" until "0060".
This is perfectly working but it's not really what I require.
I would like to choose the plant that I want to appaear into "A"
The meaning of my need is the selection doesn't depend of the range (order) of the plant.
So Into "A" I would like for example plants "0010", "....",  "0175"
So Into "B" I would like for example plants "0160", "....",  "0030"
So this is new code ABAP:
DATA: l_s_range TYPE rsr_s_rangesid,
loc_var_range LIKE rrrangeexit,
zpl TYPE char4.
    WHEN 'ZPLANT1'.
      LOOP AT i_t_var_range INTO loc_var_range WHERE vnam = 'ZV_TXT2'.
        CLEAR: l_s_range.
        zpl = loc_var_range-low.
        CASE zpl.
          WHEN 'A'.
            l_s_range-low = '0010'.
            l_s_range-high = ''.
            l_s_range-sign = 'I'.
            l_s_range-opt = 'EQ'.
            l_s_range-low = '0175'.
            l_s_range-high = ''.
            l_s_range-sign = 'I'.
            l_s_range-opt = 'EQ'.
            l_s_range-low = '0015'.
            l_s_range-high = ''.
            l_s_range-sign = 'I'.
            l_s_range-opt = 'EQ'.
            l_s_range-low = '0151'.
            l_s_range-high = ''.
            l_s_range-sign = 'I'.
            l_s_range-opt = 'EQ'.
            l_s_range-low = '0030'.
            l_s_range-high = ''.
            l_s_range-sign = 'I'.
            l_s_range-opt = 'EQ'.
            l_s_range-low = '0140'.
            l_s_range-high = ''.
            l_s_range-sign = 'I'.
            l_s_range-opt = 'EQ'.
          WHEN 'B''.
            l_s_range-low = '0058'.
            l_s_range-high = ''.
            l_s_range-sign = 'I'.
            l_s_range-opt = 'EQ'.
            l_s_range-low = '0060'.
            l_s_range-high = ''.
            l_s_range-sign = 'I'.
            l_s_range-opt = 'EQ'.
            l_s_range-low = '0091'.
            l_s_range-high = ''.
            l_s_range-sign = 'I'.
            l_s_range-opt = 'EQ'.
            l_s_range-low = '0094'.
            l_s_range-high = ''.
            l_s_range-sign = 'I'.
            l_s_range-opt = 'EQ'.
            l_s_range-low = '0125'.
            l_s_range-high = ''.
            l_s_range-sign = 'I'.
            l_s_range-opt = 'EQ'.
          WHEN OTHERS.
            l_s_range-low = '0010'.
            l_s_range-high = '0175'.
            l_s_range-sign = 'I'.
            l_s_range-opt = 'BT'.
        ENDCASE.
        APPEND l_s_range TO e_t_range.
      ENDLOOP.
  ENDCASE.
ENDIF.
> This not totally working properly because into the BEx, When I choose "A" into the variable, on the screen I only get the last plant mentionned into WHEN 'A'-> "0140" (plant)
Please write the code that will aggregate all plants that are defined into both categories ("A" & "B")
Thank you in advance.
Best Regards
Batou

Hi,
DATA: l_s_range TYPE rsr_s_rangesid, loc_var_range LIKE rrrangeexit,
zpl TYPE char4.
IF i_step = 2. CASE i_vnam. WHEN 'ZPLANT'. LOOP AT i_t_var_range INTO loc_var_range WHERE vnam = 'ZV_TXT1'. CLEAR: l_s_range. zpl = loc_var_range-low. CASE zpl. WHEN 'A'. l_s_range-low = '0010'. l_s_range-high = '0060'. l_s_range-sign = 'I'. l_s_range-opt = 'BT'. WHEN 'B'. l_s_range-low = '0091'. l_s_range-high = '0175'. l_s_range-sign = 'I'. l_s_range-opt = 'BT'. WHEN OTHERS. l_s_range-low = '0010'. l_s_range-high = '3LHP'. l_s_range-sign = 'I'. l_s_range-opt = 'BT'. ENDCASE. APPEND l_s_range TO e_t_range. ENDLOOP. ENDCASE. ENDIF
IF i_step = 2.
  CASE i_vnam.
**********To get the Plant details (interval) as per the user input data*************
*******************BAPTISTE GEORGE : )*05-01-2010**********************************
    WHEN 'ZPLANT'.
      LOOP AT i_t_var_range INTO loc_var_range WHERE vnam = 'ZV_TXT1'.
        CLEAR: l_s_range.
        zpl = loc_var_range-low.
        CASE zpl.
          WHEN 'A'.
            l_s_range-low = '0010'.
            l_s_range-high = '0060'.
            l_s_range-sign = 'I'.
            l_s_range-opt = 'BT'.
          WHEN 'B'.
            l_s_range-low = '0091'.
            l_s_range-high = '0175'.
            l_s_range-sign = 'I'.
            l_s_range-opt = 'BT'.
          WHEN OTHERS.
            l_s_range-low = '0010'.
            l_s_range-high = '3LHP'.
            l_s_range-sign = 'I'.
            l_s_range-opt = 'BT'.
        ENDCASE.
        APPEND l_s_range TO e_t_range.
      ENDLOOP.
  ENDCASE.
ENDIF.
. I use a customer exit variable into the BEx. When I choose "A" Into variable, I get Plant "0010" until "0060". This is perfectly working but it's not really what I require. I would like to choose the plant that I want to appaear into "A" The meaning of my need is the selection doesn't depend of the range (order) of the plant. So Into "A" I would like for example plants "0010", "....", "0175" So Into "B" I would like for example plants "0160", "....", "0030" So this is new code ABAP: DATA: l_s_range TYPE rsr_s_rangesid, loc_var_range LIKE rrrangeexit, zpl TYPE char4. WHEN 'ZPLANT1'. LOOP AT i_t_var_range INTO loc_var_range WHERE vnam = 'ZV_TXT2'. CLEAR: l_s_range. zpl = loc_var_range-low. CASE zpl. WHEN 'A'. l_s_range-low = '0010'. l_s_range-high = ''. l_s_range-sign = 'I'. l_s_range-opt = 'EQ'. l_s_range-low = '0175'. l_s_range-high = ''. l_s_range-sign = 'I'. l_s_range-opt = 'EQ'. l_s_range-low = '0015'. l_s_range-high = ''. l_s_range-sign = 'I'. l_s_range-opt = 'EQ'. l_s_range-low = '0151'. l_s_range-high = ''. l_s_range-sign = 'I'. l_s_range-opt = 'EQ'. l_s_range-low = '0030'. l_s_range-high = ''. l_s_range-sign = 'I'. l_s_range-opt = 'EQ'. l_s_range-low = '0140'. l_s_range-high = ''. l_s_range-sign = 'I'. l_s_range-opt = 'EQ'. WHEN 'B''. l_s_range-low = '0058'. l_s_range-high = ''. l_s_range-sign = 'I'. l_s_range-opt = 'EQ'. l_s_range-low = '0060'. l_s_range-high = ''. l_s_range-sign = 'I'. l_s_range-opt = 'EQ'. l_s_range-low = '0091'. l_s_range-high = ''. l_s_range-sign = 'I'. l_s_range-opt = 'EQ'. l_s_range-low = '0094'. l_s_range-high = ''. l_s_range-sign = 'I'. l_s_range-opt = 'EQ'. l_s_range-low = '0125'. l_s_range-high = ''. l_s_range-sign = 'I'. l_s_range-opt = 'EQ'. WHEN OTHERS. l_s_range-low = '0010'. l_s_range-high = '0175'. l_s_range-sign = 'I'. l_s_range-opt = 'BT'. ENDCASE. APPEND l_s_range TO e_t_range. ENDLOOP. ENDCASE. ENDIF. > This not totally working properly because into the BEx, When I choose "A" into the variable, on the screen I only get the last plant mentionned into WHEN 'A'-> "0140" (plant) Please write the code that will aggregate all plants that are defined into both categories ("A" & "B") Thank you in advance. Best Regards Batou
Edited by: Batou444 on Jan 7, 2010 2:55 PM

Similar Messages

  • Customer Exit Variable

    Hi Experts,
    Good Morning all.
    I am using BI 7.0 Reporting, Customer Exit  variable where should be check, which place available, how to build the abap code.
    How to used customer exit varaible, which scenerio, how to work.
    Please provide the solutions ASAP.
    Thanks & Regards,
    Vijaay.

    Hi ,
    Customer exists are used when you want to populate values in restriction dynamically. Like for example you want to your report to run for the current date. At that time you can write a customer exit variable which will fetch the system date and pass that value to report.
    check this below link
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/20f119d9-922d-2c10-88af-8c016638bd90?quicklink=index&overridelayout=true
    Hope this will help.
    -Jaimin

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

  • Customer exit code to populate fiscal period for prior three months

    Dear frns,
    I need an ABAP customer exit code to populate prior three month's fiscal period.
    Please update on this...thanks
    Cheers! Shana

    Hi
    Here is the code that will satisfies ur condition.
    CASE I_VNAM.
    IF I_STEP = 2.
    WHEN 'ZVAR1'.
    DATA DATE1 TYPE D.
    DATA PERIOD1 TYPE N.
    DATE1 = SY-DATUM.
    CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'.
    exporting
    l_date = date1
    l_periv = 'v3'
    importing
    E_BUPER = PERIOD2
    E_GJAHR = YEAR2.
    DATA PER3 TYPE N.
    PER3 = PERIOD2 + 1.
    CONCATENATE YEAR2 PERIOD2 INTO FPERLOW.
    DATA LDATE TYPE D.
    LDATE = SY-DATUM + 365.
    CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'.
    exporting
    l_date = LDATE
    l_periv = 'v3'
    importing
    E_BUPER = PERIOD2
    E_GJAHR = YEAR2.
    CONCATENATE YEAR2 PERIOD2 INTO FPERHIGH.
    DATA WA1 LIKE LINE OF E_T_RANGE.
    WA1-LOW = FPERLOW.
    WA1-HIGH = FPERHIGH.
    WA1-SIGN = 'I'.
    WA1-OPT = 'BT'.
    APPEND WA1 TO E_T_RANGE.
    ENDIF.
    Hope u gotit,
    Regard,
    RaviChandra

  • Customer exit code to populate three month's fiscal period

    Dear frns,
    I need an ABAP customer exit code to populate three month's fiscal period.
    Please update on this...thanks
    Cheers! Shana

    Dear,
    Thank u for all replies.
    My requirement is simple.
    Rows:
    Fiscal Year
    Columns
    GR Value
    Filters
    Material Number
    Input Paramters:
    Material No.
    Fiscal Year
    Using customer exit if we populate current fiscal year in the selection screen output be like this....
    FISCAL YEAR    GR Value(in crores)
    2009                     4000
    2008                     3000
    2007                     2000
    2006                     1000
    The cube name Custom Cube ZBBP_C03.
    But I dont have time char 0FISCYEAR in my Cube.In my cube avaiable chars are Calender Year,Calender Year/Month,Calender Year/Quarter,Fiscal Period
    Please let me know if you need any information.
    Waiting for replies,
    Thanks & Regards,
    Praveen.K

  • Customer exit variable is invalid

    Hi Experts,
    I have created a cutsomer exit variable and given the code . While executing the report it displays error 05 variable is invalid.
    Can you please let me know how to solve this.
    Regards
    John

    Hi Expert,
    The following is the code i have given, Idea of the code is to get the current month from the sy-datuam abd display this is low value in the customer exit varaible and in the high value we shd get month which is 12 months back. Please let me know if this code is correct or any chnages.
    IF I_STEP = 1.
    WRITE sy-datum+4(2) to V_LOW.
    V_MM = V_LOW.
    WRITE V_MM TO V1_MM.
    IF V1_MM = '12'.
    V1_MM = '01'.
    ELSE.
    V1_MM = ( V1_MM -12 )* -1.
    ENDIF.
    WRITE V1_MM TO V_MM.
    CLEAR: L_S_RANGE.
       L_S_RANGE-LOW = SY-DATUM+4(2).
        L_S_RANGE-HIGH = V_MM.
        L_S_RANGE-SIGN = 'I'.
        L_S_RANGE-OPT = 'EQ'.
        APPEND L_S_RANGE TO E_T_RANGE.
      ENDIF.
    BestWishes
    Sudha

  • Error in the ABAP Code for Customer Exit Variable

    Could you please update me what is the wrong with the below ABAP Code developed for Customer Exit Variable in BW
    i created a Variable (ZVWKNO) of Customer Exit,Single Value ,Mandatory and Variable is ready for input
    In CMOD i had written the below Code:
    When 'ZVWKNO'.
    DATA: WEEK(2) TYPE N,
    WEEKNO(2) TYPE N.
    IF i_step = 1.
    l_st_date = SY-DATUM.
    CALL FUNCTION 'DATE_GET_WEEK'
    EXPORTING
    DATE = l_st_date
    IMPORTING
    WEEK = l_fn_week.
    CHECK sy-subrc = 0.
    WEEK = l_fn_week+4(2).
    If WEEK 0.
    WEEKNO = WEEK - 1.
    l_s_range-low = WEEKNO.
    l_s_range-sign = k_sign_inclusive.
    l_s_range-opt = k_option_equals.
    APPEND l_s_range to e_t_range.
    ENDIF.
    ENDIF.
    But when i execute the query the default value is not populated with Week-1 No in the variable screen
    Please update me what went wrong
    Thanks

    Case ZVWKNO.                "write this with out comments
    When '1'.              "write the value that needs to equal with value in varaible ZVWKNO after when in sungle quotes
    DATA: WEEK(2) TYPE N,
    WEEKNO(2) TYPE N.
    IF i_step = 1.
    l_st_date = SY-DATUM.
    CALL FUNCTION 'DATE_GET_WEEK'
    EXPORTING
    DATE = l_st_date
    IMPORTING
    WEEK = l_fn_week.
    CHECK sy-subrc = 0.
    WEEK = l_fn_week+4(2).
    If WEEK 0.                                    "check this Week Minimum is '01' and Maximum '52'
    WEEKNO = WEEK - 1.
    l_s_range-low = WEEKNO.
    l_s_range-sign = k_sign_inclusive.
    l_s_range-opt = k_option_equals.
    APPEND l_s_range to e_t_range.
    ENDIF.
    ENDIF.
    Prabhudas

  • Help needed in writting Customer exit - ABAP Code

    Hi Friends,
    I have a scenario in one of the query and need to write a customer exit for the same. Here is the scenario:
    I am using one input variable XXX to get input from user which feeds value to one of the charateristic  lets say "CHAR1" in query. I have one more characteristic "CHAR2" which has to get the value from the same variable XXX. This is not allowed in BI7.0 as the variable is Hierarchy Node type. It gives error that "Variable XXX is used for two different characteristics."
    So i need to create one more vaiable YYY which will get the value from XXX and then YYY will feed value to CHAR2.  I would appreciate if some one could tell me step by step how to write customer exit and give me the piece of ABAP code i need to write in my case.
    Your help will be appreciated in terms of points.
    Thanks,
    manmit

    Hi Arun,
    1. What should CHAR2 take - Hierarchy node variable or something else ?
    --> CHAR2 is a simple charateristic
    2. In your scenario - why have CHAR1 and CHAR2 ? why not have the user enter values against CHAR2 ??
    --> We dont want user to enter two input as the input values for both Chars are same.
    3. Did you try using a replacement path variable with the CHAR2 variable taking values from Variable on CHAR1 ?
    --> In BI7.0 replacement path variable only take values from Query results. So not able to do the same.
    Thanks

  • Looking for an ABAP-code for the customer-Exit Variable

    Hello,
    I have defined a Variable (Interval) which should be processed through Customer-Exit on characteristic Supplier-Date (date format). This Customer-Exit Variable is called ZDATE.
    We have another time characteristic Fiscal year / period (0FISCPER) which has single mandatory input variable for ex.  003.2011. This input variable is called ZFISCPER.
    Now I have to write an ABAP-Code where the customer exit variable ZDATE is derived (fiscal last year to last period) from input variable ZFISCPER in INCLUDE ZXRSRU01.
    Means when the input variable (ZFISCPER) is 003.2011 then the customer exit variable ZDATE should be calculated in INCLUDE ZXRSRU01 as 01.01.2010 u2013 28.02.2011 (fiscal last year to last period).
    Since I am quite new in ABAP, I will be grateful if you could write me sample ABAP for this.
    Many thanks.

    Hi,
    should be something like:
    DATA: l_s_range TYPE rsr_s_rangesid,
    input LIKE sy-datum.
    When 'ZDATE'
    CONCATENATE '0101' 0FISCPER+3(4)-1 into l_s_range-low. "You get 01012010
    CONCATENATE '01' Fiscper+1(6) into input.                            "You get 01032011
    l_s_range-high = input-1.                                                     "You get 28022011
    APPEND l_s_range TO e_t_range.
    Greetings
    Roman

  • 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

  • Help! Need Abap code in Bex for Customer Exit

    Hi,
    I am new to abap, i need help in creating variable type customer exit.
    i want to create a variable type customer exit the reqmnt is to create a variable that will derive quarter(0CALQUARTER) from FINANCIAL_CLOSING variable.
    Really appreciate if one can provide me the coding for this logic.
    Thanks.

    Hi Yaser,
    Check this below.
    http://scn.sap.com/thread/278890
    Regards.

  • ABAP Help for customer exit

    Hi All, I need help with ABAP code for customer exit for formula variable. I have ZVKDATE as formula var from customer exit. user enters date in ZVKEYDT(this is selection type var). I have the below code, I debugged it the l_var_range-low get the date but when I append it to e_t_range the table doesn't gets the date. The report shows the ZVKDATE has empty demarcation. kindly help.
    data l_var_range like rrrangeexit.
    data: l_s_range type RSR_s_RANGESID.
    data: w_day(2) type c,
          w_mth(2) type c,
          w_year(4) type c.
    define append_range_table.
    l_s_range-low = &1.
    l_s_range-sign = 'I'.
    l_s_range-opt = 'EQ'.
    append l_s_range to e_t_range.
    end-of-definition.
    *Activities performed before selection screen pop-up window
    if i_step = 2.
    Calculate the current date based on system date
      case i_vnam.
        when 'ZVKDATE'.
          read table i_t_var_range into l_var_range
                            with key vnam = 'ZVKEYDAT'.
          l_s_range-sign = 'I'.
          l_s_range-opt = 'EQ'.
          w_day = l_var_range-low+6(2).
          w_mth = l_var_range-low+4(2).
          w_year = l_var_range-low(4).
          concatenate w_year w_mth w_day into l_var_range-low.
          append l_s_range to e_t_range.
      endcase.
    endif.
    puneet

    Hi,
    Check your code again. You are not appending l_var_range but l_s_range. Also I think the concatenate statement should contain l_s_range-low instead of l_var_range-low.
    Hope this will help you.
    Regards,
    Vaibhav

  • Regarding Customer exit - ABAP Code

    Hi Friends,
    I have a scenario in one of the query and need to write a customer exit for the same. Here is the scenario:
    I am using one input variable XXX to get input from user which feeds value to one of the charateristic lets say "CHAR1" in query. I have one more characteristic "CHAR2" which has to get the value from the same variable XXX. This is not allowed in BI7.0 as the variable is Hierarchy Node type. It gives error that "Variable XXX is used for two different characteristics."
    So i need to create one more vaiable YYY which will get the value from XXX and then YYY will feed value to CHAR2. I would appreciate if some one could tell me step by step how to write customer exit and give me the piece of ABAP code i need to write in my case.
    Your help will be appreciated in terms of points.
    Thanks,

    Hi Manmit,
    The following link can guide you on how to write customer exits (this has example as well)
    [http://help.sap.com/saphelp_nw70/helpdata/EN/61/579b3c494d8e15e10000000a114084/frameset.htm]
    Hope this helps.
    Cheers,
    Sumit

  • ABAP code Help for Customer Exit variable

    Hello All,
    Can anyone provide ABAP code for a customer exit variable please?
    Requirement:
    0CALYEAR(InfoObject) - ZCALCYR (Variable) <b>Calender year with default value actual year</b>.
    Proiperties of variable: single value,mandatory,ready for input,can'be changed in query navigation.
    i have read some docs on customet exit variables which i got from SDN but i found it's difficult for me to get this as i am not that good in ABAP.
    Thanks,
    Rakesh.

    Hi,
       Just check the below code. You just need to make slight changes I believe. Hope this helps you.
    In CMOD………..
    Sample code
      INCLUDE LXRSRF01                                                   *
    data: l_s_range type rsr_s_rangesid.
    case i_vnam.
      when 'ZCALCYR'.
        if i_step = 1.
         l_s_range-low = sy-datum+0(4).
            append l_s_range to e_t_range.
        Endif.
    Endcase.

  • Code (ABAP) for the Customer Exit Variable (CMOD)

    Scenario
    An employee can purchase any no of policies in a day or month.each policy will have start date and expiry date.
    My requirment
    Count all the policies(valid) by employee on a ranges basis exception reporting
    (0-10;10-20;20-30;30-40) and then able to drill down by policy start date and expiry date.
    As per the requirment is to show policies that employee had with in the give date intreval  which are not yet expired (active) i need to write a condition that will count only policies whose Expiry date is > Current calender day
    As Policy Expiry Date is a char i am converting it to KF using fourmala variable so that i can write a condition on it using current cal day formula variable sap exit
    Requirment:
    Need a code for SAP exit variable which will meet the following requirment
    There are the following 2 variables in the query
    1) A variable (User Input)(Date Range) on Policy Start Date and
    2) Authorisation Variable which is based on Authorisation Object(Analysis Authorisations)
    I need a SAP Exit variable (CMOD) that will
    BAsed on the user entered Policy Start date it has to pick all the policy exiry date of the policies and display all the policies whose expiry date is greate than Sy Date (Current Date) and also if Policy Expiry Date is blank or # it has to display
    Arun supplied me with the below code...but i think it doesn't include blank expiry date or #...as i am new to ABAP please update me with releavent code
    Policy Start Date : ZPST_DTE
    Policy Expiry Date: ZPSP_DTE
    Variable (Type:Customer Exit) on Expiry Date: ZEEXP_DTE
    Arun's Code:
    IF I_STEP = 1.
    CASE V_NAME
    WHEN 'X' " X is the variable u created for the exit
    l_s_range-low = SY-DATUM.
    l_s_range-opt = 'I'.
    l_s_range-sign = 'GT'.
    APPEND l_s_range TO e_t_range.
    END CASE.
    Please modify above code to include Blank or # values of Expiry Date
    Thanks Arun
    Please ask if you need further info as this is urgent
    Thanks

    Hi Arun,
    Thanks for the help...will definetly assign points
    (Closed the previous thread)
    Please spare bit of ur time as this is my first ABAP Code
    Can i include 2 restrictions..# and Variable (Customer Exit)...But how can i include Records with Blank Values
    As the data from Source system the expiry date is filled up with either Date or # or Blank...my requiorment is to include all 3 and
    Question:
    As there are 2 other variables defined ..one on Policy Start Date (User input date intreval) and Location (Authorization Variable..Analysis Authorisations)...Do i need to change I_STEP in the code
    (Req: Reports shows all the(still valid) policies emp has purchased between  2 give date (Variable on Policy Start date)
    IF I_STEP = 1.
    CASE V_NAME
    WHEN 'X' " X is the variable u created for the exit
    l_s_range-low = SY-DATUM.
    l_s_range-opt = 'I'.
    l_s_range-sign = 'GT'.
    APPEND l_s_range TO e_t_range.
    END CASE.

Maybe you are looking for

  • Material Item Hierarchies in SRM 7.0

    Dear Experts, we are on PPS 3.0, SRM 7.0, Extended Classic scenario and using the MM-SUS scenario for sending POs from SRM to SUS via ECC and PI. The issue we are facing is the message mapping errors in PI, when  the PO from SRM contains a material i

  • IPhone 5 won't show up in iTunes 11.1.5 on Mac

    Just updated to iOS 7.1. When I backed up just prior to update, had a similar problem once, and re-booting iPhone took care of it. After update to 7.1 alert appeared on phone stating I had to plug into computer to re-establish WiFi syncing again. How

  • N80 and GPS pairing problem

    I have a BT GPS module (Holux M-1000B) and when I pair it for the first time with my N80 it works ok as long as I don't disconnect it. But if I stop using it (for example if I stop in Sports Tracker) I have to remove the pairing to reconnect. I've tr

  • Payment excel template - where do I find for PS AR 9.1?

    We are in the process of implementing PS AR and very interested in exploring the payment upload using Excel.  I am looking for a payment template. Any guidance would be much appreciated, Andrea Cameron Sonoma County - AR-BI Team Lead (functional)

  • Connecting to remote desktop?

    Hi there, Is it possible to connect to a remote network from my home Mac? Its a Windows XP network at my workplace that offers remote networking, I have the IP and account details but Im not sure how to go about it? If it is possible, how do I do it?