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

MATNR validation

Former Member
0 Likes
442

hi experts,

the users here sometines by mistake upload wrong material number. now i want to make a velidation so that it allows just character types . like there should be nospace ( leading , trailing, in between), or any special character ( leading , trailing, in between).

can anyone please tell me the same.

thanx in advance

2 REPLIES 2
Read only

Former Member
0 Likes
403

Hi,

Use the following code

AT SELECTION-SCREEN on S_MATNR.

DATA v_l_matnr TYPE mara-matnr.    
  CLEAR v_l_matnr.

* Fetch Functional Location
  SELECT SINGLE matnr FROM mara
                      INTO v_l_matnr
                      WHERE matnr IN s_matnr .            


  IF sy-subrc NE 0.
    'Error Message'
  ENDIF.

REWARD POINTS IF USEFUL

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
403

Check u r previous...PLZ dont post duplicate QNS..its confusing..

I have given the answer for the previous one