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

errors in flatfile

Former Member
0 Likes
299

hi,

i have an internal table(uploaded the records from flat file) comprising of 7 fields,

all the fields are of type c.

i need to find if there are any errors in those records.(don't need to correct them)

for example: if the field length do not match it is an error record.

to find if field length matches or not i used string operation STRLN(f)

f is one of the fields in the internal table of field length 10.

IF STRLN(f) <> 10.

WRITE : / 'ERROR RECORD'.

ELSE.

WRITE : / 'CORRECT RECORD'.

i should not use either call transaction or session method

incase if the record has anyother errors then how to identify those errors.

1 REPLY 1
Read only

Former Member
0 Likes
283

hi Saritha,

If you want to find out length of the field you can even use this one


DESCRIBE FIELD FLD length len_i
IF len_i  gt 10.
WRITE : / 'ERROR RECORD'.
ELSE.
WRITE : / 'CORRECT RECORD'.

Regards,

Santosh