Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Selection Screen error message

Former Member
0 Likes
527

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

1 ACCEPTED SOLUTION
Read only

former_member195383
Active Contributor
0 Likes
506

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

3 REPLIES 3
Read only

former_member195383
Active Contributor
0 Likes
507

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

Read only

Former Member
0 Likes
506

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.

Read only

Former Member
0 Likes
506

Hi,

PARAMETERS p_var TYPE char10.

AT SELECTION-SCREEN.

IF p_var NE '\' OR '/' OR ':' .

MESSAGE e000(00).

ENDIF.