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

problem in reading file from application server

Former Member
0 Likes
723

while reading the file from application server i am succesful in reading from dataset but the program gets terminated giving a runtime error "CONVT_CODEPAGE".

the code written is as below :

*******************************************

open dataset d1 for input in text mode encoding default.

IF sy-subrc NE 0.

EXIT.

ENDIF.

do.

Read dataset d1 into btab.

if sy-subrc <> 0.

exit.

else.

condense btab NO-GAPS.

wtt_text-text1 = btab-wa+0(10).

wtt_text-text2 = btab-wa+10(1).

wtt_text-text3 = btab-wa+11(3).

append wtt_text.

clear wtt_text.

wt_counter = wt_counter + 1.

ENDIF.

enddo.

write : /10 ' number of records :'.

write : wt_counter.

kindly help me asap.

regards,

rachu.

5 REPLIES 5
Read only

Former Member
0 Likes
609

Hi ,

Could you tell on which statement does the program dump.

Regards

Arun

Read only

Former Member
0 Likes
609

hi Santosh,

Your code seems to be fine but anywayz ..

Check this out

http://www.sapdevelopment.co.uk/file/file_uptabsap.htm

Regards,

Santosh

Read only

Former Member
0 Likes
609

Hi,

Please add one more parameter in READ DATASET statement.

Read dataset d1 into btab ENCODING DEFAULT.

Your Problem will be resolved.

Regards

Bhupal Reddy

Read only

Former Member
0 Likes
609

If I am not wrong you are working on a Unicode enabled system. That is why this error is coming.

Look at the link below, where the solution is provided.

http://help.sap.com/saphelp_nw2004s/helpdata/en/79/c554dcb3dc11d5993800508b6b8b11/content.htm

open dataset DSN in text mode for output encoding utf-8.

Regards,

Ravi

Note - Please close the thread by selecting PROBLEM SOLVED against the answer which helped your most, if the issue is resolved.

Read only

Former Member
0 Likes
609

You should close you dataset....


enddo.

close dataset d1.

write : /10 ' number of records :'.
write : wt_counter. 

Greetings,

Blag.