on 06-20-2007 6:42 AM
Hi Experts,
I have a scenario in which user needs to provide two Date fields From_Date & To_Date. Now i want to validate these fields that To_Date > From_Date in the selection Screen.How can i achieve this.
I have written a code in the Customer Exit giving an Error Message as in ABAP but as this error is raised connection to the BW Server gets disconnected. I want that, control should remain at the selection screen and it should ask for valid values.
Thanks.
Arpit Agarwal
Hi,
If i am right the code is in the i_step = 2.
Please send me your code, let me check and get back to you.
--Hari
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
WHEN 'ZVALD05'.
IF i_step = 2 .
CLEAR : ls_range ,
wa_range ,
varcal_d.
ls_range-sign = 'I'.
ls_range-opt = 'EQ'.
READ TABLE i_t_var_range INTO wa_range
WITH KEY vnam = 'ZVALD04'.
varcal_d = wa_range-low.
READ TABLE i_t_var_range INTO wa_range
WITH KEY vnam = 'ZVALD01' .
IF wa_range-low > varcal_d.
MESSAGE e000(000) WITH 'Expiry Before should be greater than validon date'.
ENDIF.
ls_range-low = wa_range-low.
APPEND ls_range TO e_t_range .
ENDIF .
This is the code I am using.
Hi,
Have chek this link for hot to documnet.
use this link if you have an OSS ID.
Also you should verify the values in ISTEP 3.
put this code in I_STEP 3
IF wa_range-low > varcal_d.
MESSAGE e000(000) WITH 'Expiry Before should be greater than validon date'.
ENDIF.
Thanks
Try this code...
IF I_STEP = 3.
SORT I_T_VAR_RANGE BY VNAM.
READ TABLE I_T_VAR_RANGE INTO LOC_VAR_RANGE
WITH KEY VNAM = 'ZFV_QTR' BINARY SEARCH.
IF SY-SUBRC = 0.
CASE LOC_VAR_RANGE-LOW+51(8).
WHEN ' 1.00000' OR ' 2.00000' OR ' 3.00000' OR ' 4.00000'.
WHEN OTHERS.
CALL FUNCTION 'RRMS_MESSAGE_HANDLING'
EXPORTING
I_CLASS = 'RSBBS'
I_TYPE = 'I'
I_NUMBER = '000'
I_MSGV1 = 'Quarter Value Should be 1 or 2 or 3 or 4!'.
RAISE NO_REPLACEMENT.
ENDCASE.
ENDIF.
ENDIF.
change the Variable Name and Logic. Trigger your message using FM. Variable values you can get from I_T_VAR_RANGE.
Nagesh Ganisetti.
Assign points if it helps.
Hi Arpit ,
1. Define a static variable of let say LV_ERROR Type C .
2. In step I_STEP =2 if errornous situation found then set this flag (LV_ERROR) to 'X' .
3. Check the value of this varaible in I_STEP =3 if the value remains 'X' then issue error message. This way you wont require all the variable values in I_Step = 3.
Hope that helps.
Regards
Mr Kapadia
Hi all,
I forgot to mention that this all needs to be done in Bex.
Thanks again
Arpit Agarwal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.