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

String splitting at double hyphen while exporting from Spool to excel

Former Member
0 Likes
1,414

Hi All,

My report output contains a string with double hyphen in one of the column of ALV. When i run the report in background and try to export the result from Spool to excel, the string is splitting into two separate columns.

eg: if the value is 123456--7 then, it will split into 1232456 in one column and 7 in another

Any idea to prevent this? please suggest a solution for this.

Regards

Sarath

Hi All,

My report output contains a string with double hyphen in one of the column of ALV. When i run the report in background and try to export the result from Spool to excel, the string is splitting into two separate columns.

eg: if the value is 123456--7 then, it will split into 1232456 in one column and 7 in another

Any idea to prevent this? please suggest a solution for this.

Regards

Sarath

4 REPLIES 4
Read only

Former Member
0 Likes
1,075

Try to save the o/p in a notepad or in *.rtf format.

Copy and paste the data from notepad to xls sheet, ensure the columns in the xls sheet are Text formatted.

Regards

Vinayak

Read only

former_member222860
Active Contributor
0 Likes
1,075

Hi,

Give a sigle quote ( ' ) in front of the string.

Just try if it works.

data: v_str type string.

v_str = '123456--7'.

if v_str CA '--'.

  CONCATENATE '''' v_str  into v_str.

endif.

write:/ v_str.

Mahesh

Read only

0 Likes
1,075

Thanks mahesh for the reply,

i tried this, it wont work

regards

Sarath

Read only

Former Member
0 Likes
1,075

This might happen if you have already issued a "text to columns" in one of the excel sheets with delimiter option '-'.

Close all the excel documents and open a new excel sheet and try to copy the data.

Thanks,

Mahesh