10-16-2008 2:47 PM
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.
10-16-2008 2:51 PM
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.
10-16-2008 2:50 PM
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
10-16-2008 2:52 PM
10-16-2008 2:51 PM
You might want to assign those to character variables and then Concatenate.
10-16-2008 2:51 PM
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.