Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Read Dataset Issue - #

Hi,

Im trying to read internal table which has just one field. In the application server, tab is recognised as # and so at the end of every line we have #. Here as we have only one column,so the value is having #.

In application server :

Directory /usr/sap/B01/SYS/global/

Name: plants_of_salesorg_cc1_txt.csv

Plants of Sorg 1#

210#

250#

280#

290#

Generally if there are more number of columns we use SPLIT by which this # issue is not raised. In my requirement as we have only column the value is containg # at the end.

Tried

gc_tab TYPE c VALUE cl_abap_char_utilities=>horizontal_tab .

REPLACE gc_tab IN wa_upload WITH gc_b.

APPEND wa_upload TO gi_upload.

Here # is not being recognised in wa_upload.

How can this issue be resolved.

Thanks in advance.

Regards,

Dedeepya

Tags:
Former Member
Former Member replied

chances are there for a new line also

data : line TYPE c VALUE cl_abap_char_utilities=>newline .

REPLACE line IN wa_upload WITH gc_b.
APPEND wa_upload TO gi_upload.

if still you are facing then try with cr / lf

try with carrage return.

data: cr TYPE c VALUE cl_abap_char_utilities=>cr_lf .

REPLACE cr  IN wa_upload WITH gc_b.
APPEND wa_upload TO gi_upload.

if it is not working , try with line feed.

data : lf  TYPE c VALUE cl_abap_char_utilities=>cr_lf .
lf = cl_abap_char_utilities=>cr_lf +1(1).
REPLACE lf IN wa_upload WITH gc_b.
APPEND wa_upload TO gi_upload.

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question