cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding Tab Delimeter seperation Between Fields

Former Member
0 Kudos

Hi,

My requirement is to upload the file with tablimited to unix directory.

Actually here i am not havin the class <b>cl_abap_char_utilities</b> in SE24.

So i can't make use of <b>cl_abap_char_utilities=>horizontal_tab</b>.

<b>So how can i download the SAP data into Application server with TAB Delimited.</b>

MY Version is <b>4.6</b>.

If anybody have the solution please post.

Is there any other way for this.

In Output i am getting # B/N fields.

Thanks in advance.

Thanks & Regards,

Rayeez.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Shaikh,

I suppose you have tab delimited text file with you .

If you want to upload that text file.

Have you used the Function Module GUI_UPLOAD? In that, use the parameter HAS_FIELD_SEPARATOR.

CALL FUNCTION 'GUI_UPLOAD'

exporting

filename = 'D:\SP\KUN1.TXT'

FILETYPE = 'ASC'

HAS_FIELD_SEPARATOR = '#'

tables

data_tab = itab[].

This will work.

Regards,

SP.

Former Member
0 Kudos

Hi,

It is in Application Server.

I have to Upload the SAP DATA[I_TAB] to APPlication Server Path[AL11].

Anybody knows the solution for it.

i am not having <b>CL_GUI_FRONTEND_UTILITIES</b> in SE24.

Thanks,

Rayeez.

Former Member
0 Kudos

Hi,

Any body knows solution for the above issue!

Thanks & Regards,

Rayeez.

Former Member
0 Kudos

Hi All,

Has anybody have the solution for the above mentioned issue.

<b>My issue issue Gettiing Fileds seperated by TAB DELIMITER when Transaferring data from SAP to APPLICATION SERVER in 4.6C Version.</b>

Has anybody done it before!

Thanks in advance.

Thanks & Regards,

Rayeez.

athavanraja
Active Contributor
0 Kudos

data: tab TYPE X VALUE '09' .

now use this variable in concatenation where tab is required.

Regards

Raja

Former Member
0 Kudos

Hi,

When i tried to declare the following:

<b>data: tab TYPE X VALUE '09'.</b>

it is giving error saying 'TAB' Must be char-type data object [C,N,D,T,X].

Can u tell me alternative!

Thanks,

Rayeez.

Former Member
0 Kudos

Your error message is confusing. If you look at what is enclosed in the paranthesis, you can see that there is 'X' in it as one of the possibilities. This is the only way in 46 version. Can you post your data declaration as it is and also the code where you do the concatenate?

Regards,

Srinivas

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

This is actually working pretty good for with a tab delimited text file.



report zrich_0001.


types: begin of ttabx  ,
      fld1(20) type c,
      fld2(20) type c,
      fld3(20) type c,
      end of ttabx.

data: itabx type table of ttabx.
data: xtabx type ttabx.

start-of-selection.

  call method cl_gui_frontend_services=>gui_upload
    exporting
      filename            = 'c:test.txt'
      has_field_separator = 'X'
    changing
      data_tab            = itabx.


  loop at itabx into xtabx.

    write:/ xtabx-fld1, xtabx-fld2, xtabx-fld3.
  endloop.

This has been tested on a WebAS 7.0

Regards,

Rich Heilman

Former Member
0 Kudos

Hi All,

I tried the code in following way.



REPORT  ztab_delim                              .

<b>DATA: part1(2) TYPE c.
DATA: part2(3) TYPE c.
DATA: combine(100) TYPE c.
DATA: lv_ctab(1) TYPE c.
DATA: v_ppath(50) TYPE c
            VALUE '/pw/data/erp/D5S/pp/down/Tabtest.txt'.

FIELD-SYMBOLS <f_hex> TYPE x.

ASSIGN lv_ctab TO <f_hex> CASTING.
<f_hex> = '09'.

part1 = 'aa'.
part2 = 'bb'.

CONCATENATE part1 part2 INTO combine SEPARATED BY lv_ctab.

WRITE combine.

OPEN DATASET v_ppath FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.

TRANSFER combine TO v_ppath.

CLOSE DATASET v_ppath.</b>

And in specified Application server path <b>['/pw/data/erp/D5S/pp/down/Tabtest.txt']</b> i got the output as below:

<b>aa#bb</b>

Then i had down loaded above code into presentation server <b>C:\</b> Drive there i got the output as below:

<b>aa bb</b>

So i think obviously using the above process TAB Delimeter is working fine.

Thanks for all your efforts.

Thanks & Regards,

Rayeez.

athavanraja
Active Contributor
0 Kudos

use this code.

data: tab type x value '09' .

data: w_data type string .

w_data = 'abc' .

concatenate w_data tab w_data into w_data .

error message 'TAB' Must be char-type data object [C,N,D,T,X]. will happen if "Unicode checks active" check box is selected in the program attributes. just uncheck you will no longer get the error message.

Regards

Raja

Former Member
0 Kudos

Hi Raja,

Yes that's Great Reply Mr. Raja.

The <b>Unicode checks active</b> Check Box is checked, Well found out.

Anyway i had already done with the issue early today i am assigning only few points to you.

Thanks for that reply.

Thanks,

Rayeez.

Former Member
0 Kudos

> The <b>Unicode checks active</b> Check Box is

> checked, Well found out.

I thought you mentioned that you are working on 46C version. I don't see unicode checkbox in 46C. It came into existance from 47 onwards if I am not mistaken here.

Also, please close the post since it is resolved now.

Former Member
0 Kudos

Hi Srinivas,

I got that declaration problem while trying that piece of code at my office.

At home i am having 4.6C.

I had already assigned points & closed the post.

Thanks & Regards,

Rayeez.

Former Member
0 Kudos

You assigned points but did not close it. The post is closed when you click on 'Solved Problem' next the one that solved your issue or 'Solved on my own' next to your first post.

Former Member
0 Kudos

Hi srinivas,

ok i will do the same.

I have just one clarification.

I want to change my user name in SDN Site.

How can i!

Please tell me if u know!

Thanks,

Rayeez.

Answers (2)

Answers (2)

Former Member
0 Kudos

Use this FM and declare the field separator that you want

SAP_CONVERT_TO_TEX_FORMAT

ferry_lianto
Active Contributor
0 Kudos

Hi Shaik,

Go to Profile Management (top of menu) -> Update Profile -> Change your First Name, Last Name and Display Name -> Click on Update Profile button (Below).

Hope this will help.

Regards,

Ferry Lianto

Former Member
0 Kudos

Yes Done Thanks.