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

Not recognizing # while reading the file from application server

Former Member
0 Likes
849

Hi

I am reading a file from application server. While reading into internal table with read statement the last field in each record is filling with hash symbol in the last digit. If I write any if condition with HASH symbol its not going inside the if condition, means its not recognizing as hash may be its internally treating as some other. I need to remove the hash from that field. How I can do that.

Thanks,

kishore

4 REPLIES 4
Read only

former_member156446
Active Contributor
0 Likes
664

Hi.. for this you have couple of options

1. when the file is writen in App server write it in ASC format, and when you are downloading it use ASC format as well... mostly this will solve ur problem.

2. when you are splitting the data into internal table... at the last field find the string length of the file and using offset remove the last character and update ur internal table

Read only

Former Member
0 Likes
664

Hello,

Try to use WITH WINDOWS LINEFEED with open data .

Hope it helps.

Thanks

Jayant

Read only

Former Member
0 Likes
664

I faced exact situation. Yes, internally its treated as some other special character. What i did was, becuase hash symbol was always coming at the end...i created a dummy field in my internal table so that it will not interfere with my actual data. When i see the data in my internal table, the hash always falls in the last field (dummy) which i will ignore. I could not get solution to remove this hash so i adopted this approach and it worked!!

Hope it helps,

SKJ

Read only

Adi_Bathineni
Participant
0 Likes
664

Hi Guru's,

we have encountered the same problem,

we can use the following method to resolve that problem, we did it successfully.

CL_ABAP_CHAR_UTILITIES=>CR_LF

Thanks,

Adi.