Application Development 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: 

Tab characters converting to # signs

paul_pendleton
Participant
0 Kudos

Has anyone ever had a problem with tab characters converting to pound(#) signs into sap. It does not seem to matter how we migrate the data into the system it converts the tab character into a # sign. This causes us problems down the road in other applications.

We use txshuttle, text files(EDI and other apps), and one application that I cannot think of the name at the moment. I am hoping there might be a SD user exit that can be used to help control this. Most of the data that has this problem is coming into material master or related tables, sales order tables, PO tables.

I know this is kind of broad but I am hoping someone has ran into this and knows right off what the problem might be.

Thanks

1 ACCEPTED SOLUTION

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Yes, when the data is brought in, the tab is represented as "#" because it is a non-printable character. You must handle then accordingly in your code. For example, you will need to recognize tab using the attribute CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB.

Helpful links.

Regards,

Rich Heilman

3 REPLIES 3

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Yes, when the data is brought in, the tab is represented as "#" because it is a non-printable character. You must handle then accordingly in your code. For example, you will need to recognize tab using the attribute CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB.

Helpful links.

Regards,

Rich Heilman

Former Member
0 Kudos

hi PAul,

please use the following logic to solve your issue..

The '#' is nothing but the separators between columns in the excel sheet....

include the following logic to split the record at the field separator.

data ls_excel_tab1 type ty_s_senderline.

types: begin of itabtype,

field1(20), " as per your requirement

field2(30), " as per your requirement

.........

.........

end of itabtype.

data itab type table of itabtype.

data ls_itab type itabtype.

loop at excel_tab1 into ls_excel_tab1.

split ls_excel_tab1 at cl_abap_char_utilities=>horizontal_tab into

ls_itab-field1 ls_itab-field2 (.....).

append ls_itab to itab.

clear ls_itab.

endloop.

at the end of the loop, you will get itab with the required values, in the required form.

Hope this helps.

Sajan.

paul_pendleton
Participant
0 Kudos

There are several tools used to load data into our system. These tools may allow or insert several different non-printable characters. I want to place code in the user exits for each of the different areas such as SD etc to check particular text fields to see if they contain these special characters. If they do then I am going to issue an error so that it does not load. So with this in mind does anyone know of a function module or have code that will allow me to maybe check all the ascii codes for a FIELD to see if it contains one of these non-printable codes? That way I can send an error if it does contain one of them.