2009 Feb 06 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.
2009 Feb 06 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.
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.
2009 Feb 06 6:29 AM
2009 Feb 06 6:49 AM
2009 Feb 06 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
2009 Feb 06 6:53 AM
So how are you maintaining this table? Via SM30, well then, as already mentioned, use the predefined events for this.
2009 Feb 06 7:04 AM
2009 Feb 06 7:04 AM
2009 Feb 06 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.
2009 Feb 06 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.
2009 Feb 06 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
2009 Feb 06 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.
2009 Feb 06 6:35 AM
Hi Suresh,
u can not validate char field while directely entering values in table level.
Regards,
N.Neelima
2009 Feb 06 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.
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |