‎2008 Mar 03 6:08 AM
Hi All,
I have a internal table where i populate equipment details. The requirement i have to display the columns of these internal table as a string in sap-script.
For eg: I have to display the values in the internal table it_equip-sernr(serial number) as
Serial Number : 12345,34567......
Equipment Number :3456, 6789....
Is there a function module to convert the field column to string?
Please advice
Thanks in Advance
Regards,
Subodh
‎2008 Mar 03 6:14 AM
Hi,
DATA int_var TYPE i value '1234534567'.
DATA chr_var(15) TYPE c .
Write int_var to chr_var.
Try this
Regards
‎2008 Mar 03 6:33 AM
Hi,
Try like below
FIELD-SYMBOLS: <lfs_table>, " Internal table structure
<lfs_con>. " Field Content
DATA: l_con(50) TYPE c. " Field Content in character format
Columns to be tab delimeted
LOOP AT it_extract ASSIGNING <lfs_table>.
DO.
ASSIGN COMPONENT sy-index OF STRUCTURE <lfs_table>
TO <lfs_con>.
CLEAR: l_con.
MOVE <lfs_con> TO l_con.
CONDENSE l_con.
IF sy-index = 1.
CLEAR: wa_output_file-sline.
MOVE l_con TO wa_output_file-sline.
ELSE.
CONCATENATE wa_output_file-sline l_con INTO wa_output_file-sline
SEPARATED BY cseparator.
ENDIF.
ENDDO.
APPEND wa_output_file TO it_output_file. " Add to output file
ENDLOOP.
(OR)
v_repid = sy-repid
CALL FUNCTION 'GET_COMPONENT_LIST'
EXPORTING
program = v_repid
fieldname = 'ITAB'
TABLES
components = components.