‎2008 Jun 17 6:53 AM
Hi
reference no (p_ref) is in my selection screen.
If this field contains special characters (\ / : * ? " < > |, ) system must prompt error in selection screen. How to do this. Pls help me
Regards
Anbu
‎2008 Jun 17 7:02 AM
use this inside a subroutine.. after start of selection
PERFORM Validations.
:
:
:
FORM Validations.
if pa_fpath CS '\' or
pa_fpath CS '*' or
pa_fpath CS '/' .
MESSAGE e999 WITH 'Special chars not allowed'.
endif.
endform.
use above...
Reward points...if its useful...
Regards
Rudra
Edited by: Rudra Prasanna Mohapatra on Jun 17, 2008 8:02 AM
‎2008 Jun 17 7:02 AM
use this inside a subroutine.. after start of selection
PERFORM Validations.
:
:
:
FORM Validations.
if pa_fpath CS '\' or
pa_fpath CS '*' or
pa_fpath CS '/' .
MESSAGE e999 WITH 'Special chars not allowed'.
endif.
endform.
use above...
Reward points...if its useful...
Regards
Rudra
Edited by: Rudra Prasanna Mohapatra on Jun 17, 2008 8:02 AM
‎2008 Jun 17 9:55 AM
try this;
PARAMETERS p_var TYPE char30.
CONSTANTS c_invalid_characters(6) VALUE '%&?*+-'. "variable length has to be consistent with content length
AT SELECTION-SCREEN.
IF p_var CA c_invalid_characters.
MESSAGE e001(00).
ENDIF.
‎2008 Jun 17 11:46 AM
Hi,
PARAMETERS p_var TYPE char10.
AT SELECTION-SCREEN.
IF p_var NE '\' OR '/' OR ':' .
MESSAGE e000(00).
ENDIF.