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

cg3z t-code

Former Member
0 Likes
847

hi SDNers,

During upload a file from presentation server to application server using cg3z, it is successfully uploaded with # symbol inbetween the datas.

I dont want # symbol in between the datas.how to do that?

FYI,

I am uploading excel file or tab delimited formatted text file without title.

I am using that datas for one std program.

plz help.

5 REPLIES 5
Read only

Former Member
0 Likes
753

Hi,

When TAB delimited file is uploaded into application server, # will be coming as the separator b/w the values in place of TAB space.

With Regards,

Dwarakanath.S

Read only

0 Likes
753

And this cannot be avoided

Read only

Former Member
0 Likes
753

Those '#' are nothing But Tabs.

They are equivalent to Tabs.

if you don't want them to see you have to upload a plain text file.

Programatically you can replace them when you are reading if you wnat..

Using CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB you can replace them inside a program.

Read only

Former Member
0 Likes
753

Hi,

'#' is an internal representation of the tab.

As Vijay said,

Programatically you can replace them when you are reading if you want.

Check this sample code, here i uploaded thetab delimited formatted text file and removed the # by using cl_abap_char_utilities=>horizontal_tab.

CONSTANTS:
  con_tab TYPE c VALUE cl_abap_char_utilities=>horizontal_tab.

DATA:
  BEGIN OF itab OCCURS 0,
        data(100),
  END OF itab.

DATA:
  BEGIN OF itab1 OCCURS 0,
    vbeln  LIKE vbap-vbeln,
    posnr  LIKE vbap-posnr,
  END OF itab1.

CALL FUNCTION 'GUI_UPLOAD'
  EXPORTING
   filename = 'C:\temp\text2.txt'
  TABLES
   data_tab = itab.

LOOP AT itab.
  SPLIT itab-data AT con_tab INTO itab1-vbeln itab1-posnr.
  APPEND itab1.
ENDLOOP.

Regards

Adil

Read only

Former Member
0 Likes
753

Hi Senthil,

I just happened to see your thread....

The Solution to remove the #s is this....

1. Save your excel file in .csv (Comma seperated) format.

2. Open the saved .csv file in a Notepad.

3. Now, replace the comma with nothing.

4. Save the file.

5. Your problem is Solved.

Check this solution.

Thanks & Regards,

Kumarpal Jain.