‎2007 May 23 4:55 AM
Hi Experts,
i have requirement where i need to upload the file from the desktop and validate the file data like formating structure of the fields (i.e., numeric fields contain numeric values, character fields contain alphanumeric characters, if a field is eight characters in lengh, input is equal to eight characters or less) .
Do we have the isnumeric , ischar , isdecimal functions in SAP to check for numeric , character and decimals fields . Appreciate your suggestions.
Thanks,
Latha.
‎2007 May 23 4:59 AM
Hi,
In SAP there are many FM, or there is simple way to check fields using ABAP keywords such as CO(Contains Only), CA(Contain Any), etc
You can check help on these operators.
Reward points if useful.
Regards,
Atish
‎2007 May 23 4:59 AM
Hi,
In SAP there are many FM, or there is simple way to check fields using ABAP keywords such as CO(Contains Only), CA(Contain Any), etc
You can check help on these operators.
Reward points if useful.
Regards,
Atish
‎2007 May 23 5:13 AM
Hi,
To check for only numeric value u can check if field co '0123456789'
To get the filed length use strlen(field) & get it in integer field.
Thanks
Sandeep
Reward if helpful
‎2007 May 23 5:12 AM
Hi,
To check whether seq no contains only numericals
if seqno na '0123456789'.
to check whether v_string contains only characters
if v_string ca sy-abcde.
reward points if helpful
Thanks
venki
‎2007 May 23 5:34 AM
hi,
Use
CATS_NUMERIC_INPUT_CHECK
or
You can use the Function Module:
NUMERIC_CHECK
Usage:
CALL FUNCTION 'NUMERIC_CHECK'
EXPORTING
STRING_IN = X
IMPORTING
STRING_OUT = X
HTYPE = H_TYPE.
if h_type = 'CHAR'.
WRITE:/ 'NOt Numeric'.
else.
write:/ 'Numeric'.
ENDIFRgds
Anversha.S