Customer Exit  (ABAP) Error

Hi Experts,
I developed a Customer Exit Variable (BEx)..ZVDAT
In Variable definition i defined  'Processing Type-Customer Exit' and in CMOD i have written below code
My requirment is to display records whose Expiry Date is Greater than and equal(>=)  to Current Sys Date (Current Date)
The system is not displaying any error but when i execute query it is not displaying the desired
Please correct any errors in the code below
IF I_STEP = 1.
CASE i_vnam.
WHEN 'ZEDAT'.  "Policy  Expiry Date"
CLEAR: l_s_range.
l_s_range-low  = sy-datum.
l_s_range-opt = 'GE'.
l_s_range-sign = 'I'.
APPEND l_s_range TO e_t_range.
Endcase.
Endif.

Hi,
   Use the below code and try your program. I think this is the one you should use at i_step = 2
   not i_step = 1
CASE i_vnam.
WHEN 'ZEDAT'. "Policy Expiry Date"
          IF I_STEP = 2. "after the popup
            LOOP AT I_T_VAR_RANGE INTO LOC_T_VAR_RANGE
            WHERE VNAM = 'Your Variable Name'. '
              CLEAR L_S_RANGE.
              L_S_RANGE-LOW = 'Policy Start Date'    'Variable Start Date Value entered by User
              L_S_RANGE-HIGH = Sy-Datum. "high value = input
              L_S_RANGE-SIGN = 'I'.
              L_S_RANGE-OPT = 'GE'.
              APPEND L_S_RANGE TO E_T_RANGE.
              EXIT.
            ENDLOOP.
          ENDIF.
Regards,
Raj

Similar Messages

  • 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

  • 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

  • Customer Exit VAriable Error

    Hi
      Please fix this or update me on how to fix it as i am struggling to fix
    I created a restricted Key Figure based on Info object data Type DATS
    User Enter Date intreval 01.01.2007 to 31.12.2007
    My requirment is to develop a Variable on Cal Year/Month (0CALNONTH) of Processing Type CUSTOMER EXIT that will take the user input date and display the Year/Month accordingly
    Code
    When 'EXIT_CYM_VAR'.
        DATA: Low_ymon1 Type N,
              High_ymon1 Type N.
        IF i_step = 2.
          LOOP AT i_t_var_range INTO  ls_varrange
              Where vnam = '0I_DAYS'."User Specified Key date Intreval
            CLEAR l_s_range.
            Low_ymon1 = ls_varrange-low+0(6).
            High_ymon1 = ls_varrange-high+0(6).
            l_s_range-low = Low_ymon1.
            l_s_range-high = High_ymon1.
            l_s_range-sign = 'I'.
            l_s_range-opt = 'BT'.
            APPEND l_s_range TO e_t_range.
          ENDLOOP.
        ENDIF.
    Error
    Check the user exit for variable EXIT_CYM_VAR. Make sure that variables for characteristic values are in internal format and are not compounded. This means, for example, that a date variable must have the value 20000914 and not the value 14.09.2000.
    Thanks

    Hi,
    may be u try this.
    When 'EXIT_CYM_VAR'.
    DATA: Low_ymon1(6) Type N,
    High_ymon1(6) Type N.
    IF i_step = 2.
    Read i_t_var_range INTO ls_varrange
    Where vnam = '0I_DAYS'."User Specified Key date Intreval
    CLEAR l_s_range.
    Low_ymon1 = ls_varrange-low+0(6).
    High_ymon1 = ls_varrange-high+0(6).
    l_s_range-low = Low_ymon1.
    l_s_range-high = High_ymon1.
    l_s_range-sign = 'I'.
    l_s_range-opt = 'BT'.
    APPEND l_s_range TO e_t_range.
    ENDIF.
    regards,
    rakesh.

  • 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

  • Fun BEx i_step 2 Customer Exit / ABAP Question!

    Hello Gurus
    We run two queres, one has a restriction on ZCOMPCODE (which is an OpCo), the other on ZCOMPHIER (Which is an OpCo Hierarchy).
    We have too many cubes under our multiProvider so to aid performance we have an 'InfoProvider' Customer Exit Variable in our queries. This restricts the cubes to those relevant to the selected OpCo by indexing against a predefined table.
    The code works for ZCOMPCODE.
    ZLASTHIER has a one to one relationship with ZCOMPCODE so we want to enhance our 'InfoProvider' Exit Variable to incorporate restrictions on ZLASTHIER.
    Ie currently we have:
    LOOP AT i_t_var_range INTO ls_var_opco WHERE VNAM = 'ZVAR006'.
    (Where ZVAR006 is on ZCOMPCODE)
    I want to enhance this so that if VNAM = 'ZVAR007' (which is a variable based on ZCOMPHIER), it will convert it.
    I need to tag something along the following lines into my code:
    If VNAM 'ZVAR007' = 'H1'.
    ls_opco = '001'.
    ELSEIF 'ZVAR007' = 'H2'.
    ls_opco = '002'
    etc etc
    Im not very good at abap but im sure I can't be miles off!
    Any help appreciated!
    Tom

    Hi
    Basically the requirement is to get Company code corresponding to the Hierarchy in ZVAR007 and then restrict to the particular Infoprovider. Plz let me know if my understanding is correct.
    Here we go :
    LOOP AT i_t_var_range INTO loc_var_range WHERE VNAM = 'ZVAR007'. "reads Hier value
    If sy_subrc is not initial.
    Select comp_code  comp_hier from table
    into itab1 where comp_hier = loc_var_range-low. " selects company code from thetable which has comp code - hierarchy mapping.
    read itab into wa_itab. " not giving condition assuming there s only one record.
    "Add the same code as in the user exit for Comp Code, to select the Infoprovider based on the company code selected(wa_itab-comp_code).
    L_S_RANGE-SIGN = 'I'.
    L_S_RANGE-OPT = 'EQ'.
    APPEND L_S_RANGE TO E_T_RANGE.
    ENDLOOP.
    Plz let me know in case of issues.
    Regards,
    Aparna

  • Customer Exit Code Error

    Hi All,
    i have an issue while executing customer exit code for a query.
    Its giving the following error
    WValue "07.2010" is too long for variable Z_RAPMONTHS
    EValue "07.201" for user-exit variable Z_RAPMONTHS is invalid
    EVariables contain invalid values.
    I>> Row: 82 Inc: LRRMSU13 Prog: SAPLRRMS
    ASystem error in program CL_RSR_OLAP_VAR and form INIT-02- (see long text)
    Requiremnt is: variable value should corresponds to last six months including current month (six months in total), e.g.  if we execute the report today (December month) the desired value should be 07.2010 - 12.2010.
    code which i have written is:
    when 'abc'.
        DATA: curr_month(2) TYPE n,
              calc_month(2) TYPE n,
              curr_year(4) TYPE n,
              prev_year(4) TYPE n.
        CLEAR:curr_month,curr_year,prev_year.
        if i_step eq 1.
          curr_month = sy-datum+4(2).
          curr_year = sy-datum+0(4).
          if curr_month = '01'.
            calc_month = curr_month + 7.
            prev_year = curr_year - 1.
           CONCATENATE calc_month '.' prev_year INTO l_s_range-low.
          else.
            calc_month = curr_month - 5.
          CONCATENATE calc_month '.' curr_year INTO l_s_range-low.
         else.
         l_s_range-low = lv_zp0003_year.
            ENDIF.
      CONCATENATE curr_month '.' curr_year INTO l_s_range-high.
          IF l_s_range-low = l_s_range-high.
              l_s_range-opt = 'EQ'.
            ELSEIF l_s_range-high IS INITIAL.
              l_s_range-opt = 'EQ'.
            ELSEIF l_s_range-low LT l_s_range-high.
              l_s_range-opt = 'BT'.
            ENDIF.
            l_s_range-sign = 'I'.
            APPEND l_s_range TO e_t_range.
    Can any one please let me where i am doing the mistake.
    Thanks & Regards.
    AKG

    remove the '.' from the below concatenate statements.
    CONCATENATE calc_month '.' curr_year INTO l_s_range-low.
    CONCATENATE curr_month '.' curr_year INTO l_s_range-high.
    use the code as
    CONCATENATE calc_month curr_year INTO l_s_range-low.
    CONCATENATE curr_month curr_year INTO l_s_range-high.

  • Customer Exit - ABAP Class in WAD 7.0

    I am using the Customer Exit  (CUSTOMER_EXIT_TYPE  - ABAP_CLASS_NAME) in the WAD 7.0 to place some urls on the web application. I pass the url value as <a href=u201Dhttp://www.yahoo.comu201D>yahoo</a> in the ABAP class to the the template but when I execute the template it converrts to the following - &lt;a href=u201Dhttp://www.yahoo.comu201D>yahoo</a> in the source code.
    Does any one has experienced the same problem and know the solution.
    Thanks
    Amit

    Just to Clarify I am passing value as l_s_values-value = '<a href=u201Dhttp://www.yahoo.comu201D>yahoo</a>'
    and the IE is interpreting it as l_s_values-value = '&lt;a href=u201Dhttp://www.yahoo.comu201D>yahoo</a>'.

  • 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

  • Explain Customer Exit (ABAP) Logic

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

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

  • Customer Exit-ABAP

    Hi Experts,
    The following code is return as a customer exit used in reports,Could you please tell me what exactly it is doing and also modify this code,So that it won't display zero values
       Please convert this machine language into human language
       WHEN 'ZYTD'.
        CLEAR l_s_range.
        wdate = ww_date.
        weekno = '01'.
        SELECT SINGLE * FROM  /bic/pycalday_w
             WHERE  /bic/ycalday_w  = wdate
             AND objvers = 'A'.
        thisweek = /bic/pycalday_w-/bic/ylwk_w.
        CONCATENATE thisweek(4) weekno INTO firstweek.
        l_s_range-low = firstweek.
        l_s_range-high = thisweek.
        l_s_range-sign = 'I'.
        l_s_range-opt = 'BT'.
        APPEND l_s_range TO e_t_range.
    Thanks

    Hi,
    Functionality- ZYTD --this variable gives the first week of the year to the current week of year.
    low- first week as 012006
    high -the current week as per "wdate" which can to enter by user...
    /bic/pycalday_w - master data table for calday_w infoobject where for current date ..you will find week.
    you can go ti se11 and enter the table name...you then see thw master data for this...
    now understand the code...
    WHEN 'ZYTD'. <b>''This is custtom exit variable create in query..</b>
    CLEAR l_s_range.
    wdate = ww_date. <b>''contains the date as 10.01.2006</b>
    weekno = '01'.
    SELECT SINGLE * FROM /bic/pycalday_w
    WHERE /bic/ycalday_w = wdate
    AND objvers = 'A'. <b>''now you are finding the current week as per wdate..' it will fetch you 02 (as 10.01.2006)</b>
    thisweek = /bic/pycalday_w-/bic/ylwk_w.
    <b>(thisweek=022006)</b>
    CONCATENATE thisweek(4) weekno INTO firstweek.
    <b>(thisweek(4) will give you year ie. 2006 and weekno is 01..whihc make '200601'</b>
    l_s_range-low = firstweek. <b>'200601'</b>
    l_s_range-high = thisweek. <b>'200602'</b>
    l_s_range-sign = 'I'.
    l_s_range-opt = 'BT'.
    APPEND l_s_range TO e_t_range.
    now where are you getting zero value...
    regards,
    San!
    Message was edited by: San!

  • Explain Customer Exit (ABAP) Written in CMOD

    Hi Experts,
    Please explain what this Customer Exit (CMOD) is performing
    Here var1 is the user entered expiry date and test1 is the newly created customer exit variable.
    What happens if user enters 01.05.2008 to 31.05.2008
    data: yrr1(4) type n,
    mn(2) type n,
    dy1(2) type n.
    when 'test1'.
    if i_step = 2. "after the popup
    loop at i_t_var_range into loc_var_range
    where vnam = 'var1'.
    yrr1 = loc_var_range-low+0(4).
    mn = loc_var_range-low+4(2).
    dy1 = loc_var_range-low+6(2).
    clear l_s_range.
    concatenate yrr1 mn '01' into l_s_range-low.
    concatenate yrr1 mn dy1 into l_s_range-high.
    l_s_range-sign = 'I'.
    l_s_range-opt = 'BT'.
    append l_s_range to e_t_range.
    exit.
    endloop.
    endif.

    HI,
    it will populate the below range for test1.
    01.05.2008 to 01.05.2008.
    based on the selection provided in var1, it takes the from value.
    then it takes the first day of the month of the from value from the var1 to the from date in var1.
    suppose you give in var1 25.05.2008 to 31.05.2008
    then in test1 it will take 01.05.2008 to 25.05.2008
    retgds,
    Shashank

  • 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

  • Customer Exit var (basedOn 0P_KEYDT) ABAP error - Going into Debug mode

    Hello All,
    I have created a BEX Query based on Infoset, so i couldnt use '0P_KEYDT' SAP Exit in a variable.
    Instead i created a Z 'Customer exit' with the same code.
    But when i execute query in RSRT, query is going into Debug mode.
    InfoProviders are all active, when i remove the Z 'Customer Exit' from the query then query is running fine. So i see that the problem is with the Z 'Customer exit' code.
    Here is the 0P_KEYDT code:
    FUNCTION RSVAREXIT_0P_KEYDT.
    *"*"Lokale Schnittstelle:
    *"  IMPORTING
    *"     VALUE(I_VNAM) LIKE  RSZGLOBV-VNAM
    *"     VALUE(I_VARTYP) LIKE  RSZGLOBV-VARTYP
    *"     VALUE(I_IOBJNM) LIKE  RSZGLOBV-IOBJNM
    *"     VALUE(I_S_COB_PRO) TYPE  RSD_S_COB_PRO
    *"     VALUE(I_S_RKB1D) TYPE  RSR_S_RKB1D
    *"     VALUE(I_S_RKB1F) TYPE  RRO01_S_RKB1F
    *"     VALUE(I_THX_VAR) TYPE  RRO01_THX_VAR
    *"     VALUE(I_STEP) TYPE  I DEFAULT 0
    *"  EXPORTING
    *"     VALUE(E_T_RANGE) TYPE  RSR_T_RANGESID
    *"  EXCEPTIONS
    *"      UNKNOWN_VARIABLE
    *"      UNEXPECTED_VARTYPE
    *"      VARIABLE_INITIAL
      DATA:
          LS_RA_SID  TYPE   RSR_S_RANGESID.
      IF I_STEP EQ 0 OR                    " without popup or
         I_STEP EQ 1.                      " before popup
        REFRESH E_T_RANGE.
        CLEAR: LS_RA_SID.
        LS_RA_SID-SIGN = 'I'.
        LS_RA_SID-OPT = 'EQ'.
        LS_RA_SID-LOW = SY-DATUM.
        APPEND LS_RA_SID TO E_T_RANGE.
      ENDIF.
    ENDFUNCTION.
    Here is Z 'Cusotmer Exit Code:  (Defined I-STEP and E_T_RANGE)
    method ZPKEYDT.
      Data: ls_var_range TYPE rrs0_s_var_range,
            l_s_range TYPE rsr_s_rangesid.
      IF  I_STEP EQ 1.                  
    REFRESH e_t_range.
        CLEAR: l_s_range.
        l_s_range-SIGN = 'I'.
        l_s_range-OPT = 'EQ'.
        l_s_range-LOW = sy-datum.
        APPEND l_s_range TO e_t_range.
      ENDIF.
    endmethod. 
    I could really appreciate your help!
    Thanks in advance,
    DC

    Hi DeeCh.
    If you want to populate the value before the variabel screen input.then please follow below code
    case i_vnam.
      when 'ZPKEYDT'.
      if i_step = 1.
        l_s_range-low  = sy-datum..
          l_s_range-sign = 'I'.
          l_s_range-opt = 'EQ'.
          APPEND l_s_range TO e_t_range.
          clear l_s_range.
              endif.
              endcase.
    Regards,
    Nanda.S

  • Error message in customer exit

    HI ABAPer's,
    I am facing the one problem  while giving the error message in customer exit  ZXM06U43(POCustomer exit). The scenario is i am looping the  tekpo(PO line item) internal tables and doing some validations if any lineitem fail in the validation i need  give the error message .I dd the  but all ways it showing the error in last line item in the  PO.
    Thanks,
    Harinath

    Hi,
    You have to either leave the screen. Also you can try EXIT in place of LEAVE SCREEN as per suitable to your transaction.
    SAMPLE CODE:
      IF SY-SUBRC <> 0.
        MESSAGE E059(ZGO) WITH I_MSEG-MATNR I_MSEG-AUFNR.
        LEAVE SCREEN.
      ENDIF.
    Regds,
    Anil
    Edited by: Anil Katoch on Sep 3, 2009 7:37 AM

Maybe you are looking for