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

download internal table containt without using function module

Former Member
0 Likes
866

Hi all there,

How to download internal table containt into csv file without using function module.

my requirement is that following are the containt of internal table.

A20000459,040409,1100.00,110.00,2.20,1.10,0.00

*,M1304000265,20.000,,,,

in the second line of internal table it is showing few commas after volum 20.000 which i don't want, how can i remove only those commas without affecting other commas.

these commas are for the blank places.

regards

sagar

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
826

Hi Sagar,

Declare a structure using TYPES for your content. Use SPLIT statement to get content into internal table.

SPLIT <file_content> AT ',' INTO TABLE <internal_table>.

Thanks,

Vinay

7 REPLIES 7
Read only

Former Member
0 Likes
827

Hi Sagar,

Declare a structure using TYPES for your content. Use SPLIT statement to get content into internal table.

SPLIT <file_content> AT ',' INTO TABLE <internal_table>.

Thanks,

Vinay

Read only

raviahuja
Contributor
0 Likes
826

Hi Sagar,

Create an internal table of type you want.

Use

SPLIT <WORK-AREA> AT ',' INTO TABLE <internal_table>.

This would create a new line entry into the new internal table without commas which you can write to the file.

for example new line in internal table would look like

Column1 | Column 2 | Column 3 |

M1304000265 | 20.000 | |

Regards,

Ravi

Read only

Former Member
0 Likes
826

hi ravi,

i want commas inthe file but don't want only where there is space or the fields doesnot contain any entry.

Pl suggest for this

regards

sagar

Read only

0 Likes
826

Hi Sagar,

I'm not actually getting your requirement now. What i'm understanding is that, you need ',' ony when there is a blank field in the internal table, or you dont want the commas at all.

If you want ',' wherever there is a blank fields, then just check for the field before priting. If it is blank, append ',' to it.

Regards,

Ravi

Read only

Former Member
0 Likes
826

Hi,

why dont you use replace statement.....

the statement which i have written below will remove commas only where the field is blank... pls take a look at it.

REPLACE ALL OCCURENCES OF ',,' IN <work_area> WITH space.

Regards,

Siddarth

Read only

Former Member
0 Likes
826

Hi ravi,

I don't want commas wherever fields is blank elsewhere i want commas

regards

Sagar

Read only

Former Member
0 Likes
826

done