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: 

How to convert internal tables to .tsv format

Former Member
0 Kudos

Hello Colleagues,

    Before you all ask me to check the existing threads for this, i tried a lot searching for it but it was of no help hence i have to ask this question.

My requirement is to build a index file with .tsv format and write the same to the application server.In order to write it to the server i can make use of open dataset and close dataset but how do i convert the internal table to .tsv format? Do i write it to a string separated by TAB and save it as .tsv?

Please please let me know about it.

Thanks a ton in advance!!

Regards,

Urbashi

1 ACCEPTED SOLUTION

ainjaka_narivelo
Explorer
0 Kudos

Hi Urbashi,

I don't know if there is an FM that can do your requirement but if I were you, I'll proceed as follow:

  1. Open dataset filename
  2. Concatenate all fields into one string value which should be separated by TAB (cl_abap_char_utilities=>horizontal_tab)
  3. transfer it to filename
  4. close dataset

Hope it helps.

Rgds,

Ainjaka

3 REPLIES 3

FredericGirod
Active Contributor
0 Kudos

Hi,

I don't know the .tsv  maybe you could explain the specificity .. 

I think you will have to do it manually

regards

Fred

ainjaka_narivelo
Explorer
0 Kudos

Hi Urbashi,

I don't know if there is an FM that can do your requirement but if I were you, I'll proceed as follow:

  1. Open dataset filename
  2. Concatenate all fields into one string value which should be separated by TAB (cl_abap_char_utilities=>horizontal_tab)
  3. transfer it to filename
  4. close dataset

Hope it helps.

Rgds,

Ainjaka

nabheetscn
Active Contributor
0 Kudos

Hi Urbashi

TSV is nothing but tab separated values. So you can use CL_CHAR_UTILITY stuff to concatenate you table in to one big string and write it to application server which you know.

Nabheet