02-06-2009 6:25 AM
Hi,
in table i have one character field with length 4.
i want to validate char field while directely entering values in table level.
i want to enter only numc values in char field because i doesnot change char to numc datatype.
how can i validate at table level.
Regards,
Suresh.
02-06-2009 6:32 AM
Hi,
try on at selection-screen on char field.
take string length of char field( string u entered ) and perform do.
check for every literal in sy-abcde.
if sy-subrc eq 0.
give message like donot enter characters.
exit.
endif.
endloop.
02-06-2009 6:29 AM
02-06-2009 6:49 AM
02-06-2009 6:51 AM
>
> this is custom table
>
> Regards,
> Suresh
Hello,
What is the Data Element for that particular field? Can you change it to NUMC4 and check ?
BR,
Suhas
02-06-2009 6:53 AM
So how are you maintaining this table? Via SM30, well then, as already mentioned, use the predefined events for this.
02-06-2009 7:04 AM
02-06-2009 7:04 AM
02-06-2009 6:29 AM
How are you entering data directly into this table? Via maintenance view? If so, there are several events defined for maintenance views to do all sorts of validation.
02-06-2009 6:32 AM
Hi,
try on at selection-screen on char field.
take string length of char field( string u entered ) and perform do.
check for every literal in sy-abcde.
if sy-subrc eq 0.
give message like donot enter characters.
exit.
endif.
endloop.
02-06-2009 6:33 AM
Hi ,
Value range in domain level of that field you can specify Intervals as " 0000 to 9999 ".
It might solve your problem.
Regards
Pinaki
02-06-2009 6:33 AM
Hi,
Try this condition
IF NOT '1,2,3,4,5,6,7,8,9,0' CS ITAB-num.
" Error Message
ENDIF.
02-06-2009 6:35 AM
Hi Suresh,
u can not validate char field while directely entering values in table level.
Regards,
N.Neelima
02-06-2009 9:17 AM
Hi Suresh,
while appendng the record to the table check for the validation.
say w_char(4) type c is the field of table t_tab to be validated.
w_char = '0010'.
if w_char na sy-abcde.
append t_tab.
endif.
Regards,
Mdi.Deeba Najam.