‎2006 Dec 12 1:22 PM
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.
‎2006 Dec 12 1:25 PM
Hi ,
Could you tell on which statement does the program dump.
Regards
Arun
‎2006 Dec 12 1:25 PM
hi Santosh,
Your code seems to be fine but anywayz ..
Check this out
http://www.sapdevelopment.co.uk/file/file_uptabsap.htm
Regards,
Santosh
‎2006 Dec 12 1:26 PM
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
‎2006 Dec 12 1:27 PM
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.
‎2006 Dec 12 1:30 PM
You should close you dataset....
enddo.
close dataset d1.
write : /10 ' number of records :'.
write : wt_counter.
Greetings,
Blag.