on 09-19-2007 2:26 PM
Hi All,
I have to validate the user input value for a variable.
So I started writing i_step = 3.
But I want to to know where the value of that variable is stored so as to check the value in variable.
Suppose ZCUR1 is variable name.I want to know the value of ZCUR1 which user enters at runtime so that I can compare with another value.
Please suggest the code.
Thanks in advance!
Hi Pallavi,
Sample code: <a href="http://www.box.net/encoded/9392209/93812043/f33416d8267def58bfc0e95365532cc8">User Exit sample codes</a>
Hope it Helps
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Pallavi,
You should be able to search de forum for issues like this, it was discussed many times.
Check this link for help on using customer exit for variables:
http://help.sap.com/saphelp_nw70/helpdata/en/1d/ca10d858c2e949ba4a152c44f8128a/frameset.htm
You should look at I_VNAM for the name of your variable.
Hope this helps.
Regards,
Diego
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Diego,
Please check this code.
REQ is it should take default monday and if user enters a date, it should check whether it is current Monday, otherwise it should pop up a message.
DATA : wa_var_range TYPE rrs0_s_var_range.
DATA : wa_data TYPE rrrangesid,
ZVAR LIKE RSZGLOBV-VNAM.
DATA : L_S_RANGE TYPE rrrangesid.
DATA: mid TYPE sy-msgid VALUE 'Enter A Valid Date',
mtype TYPE sy-msgty VALUE 'I',
num TYPE sy-msgno VALUE '014',
k type N.
DATA : i_date type D,
w_date type D,
i_date1 type D,
w_date1 type D,
i_date2 type D,
w_date2 type D.
CASE i_vnam.
WHEN 'ZCURMON'.
IF I_STEP = 1.
i_date = sy-datum.
break-point.
CALL FUNCTION 'BWSO_DATE_GET_FIRST_WEEKDAY'
EXPORTING
DATE_IN = i_date
IMPORTING
DATE_OUT = w_date.
L_S_RANGE-LOW = w_date.
L_S_RANGE-SIGN = 'I'.
L_S_RANGE-OPT = 'EQ'.
APPEND L_S_RANGE TO E_T_RANGE.
break-point. .
endif.
IF i_step = 3.
break-point.
i_date1 = sy-datum.
CALL FUNCTION 'BWSO_DATE_GET_FIRST_WEEKDAY'
EXPORTING
DATE_IN = i_date1
IMPORTING
DATE_OUT = w_date1.
break-point.
clear I_T_VAR_RANGE.
LOOP AT I_T_VAR_RANGE INTO wa_var_range WHERE VNAM = 'ZCURMON'.
i_date1 = wa_var_range-LOW.
break-point.
check var1 is only current monday only
IF i_date ne w_date1.
CALL FUNCTION 'RRMS_MESSAGE_HANDLING'
EXPORTING
I_CLASS = 'RSBBS'
I_TYPE = 'I'
I_NUMBER = '000'
I_MSGV1 = 'Only Current Monday Allowed'.
IF SY-SUBRC <> 0.
MESSAGE ID mid TYPE mtype NUMBER num.
ENDIF.
ENDIF.
endloop.
ENDIF.
endcase.
Thanks in Advance!
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.