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: 

Concatenate stmt

Former Member
0 Kudos

Hi

In my pgm am using the contatnete stmt and moving as a word file into a server.I want to concantenate more than 15 fields out of which 5 are currency fields.For the currency fields part am getting error.How to correct it.Its not accepting currency only characters is accepted.

1 ACCEPTED SOLUTION

former_member156446
Active Contributor
0 Kudos

this can be handled easily using field-symbols:


LOOP AT p_final_table ASSIGNING <fs_record>.
DO.
ASSIGN COMPONENT sy-index OF STRUCTURE <fs_record> TO <fs_comp>.
.......
......
...
ENDDO.
CONCATENATE lf_line co_line_feed INTO lf_line.
APPEND lf_line TO p_output_file.
CLEAR lf_line.
ENDLOOP.

4 REPLIES 4

Former Member
0 Kudos

Hi Hema,

CONCATENATE statement can accpet only char or numeric data types hence take five additional variables which are of character type and move currency fields to these variables. Use CONCATENATE with the character type variables.

Thanks,

Vinay

0 Kudos

Can u please tell a sample code .am getting this concept

Former Member
0 Kudos

You might want to assign those to character variables and then Concatenate.

former_member156446
Active Contributor
0 Kudos

this can be handled easily using field-symbols:


LOOP AT p_final_table ASSIGNING <fs_record>.
DO.
ASSIGN COMPONENT sy-index OF STRUCTURE <fs_record> TO <fs_comp>.
.......
......
...
ENDDO.
CONCATENATE lf_line co_line_feed INTO lf_line.
APPEND lf_line TO p_output_file.
CLEAR lf_line.
ENDLOOP.