‎2007 Jun 27 8:05 AM
Hello friends,
how can i move an inernal table in to a string.
for this i m declaring a string table.
data : string type s occurs 0.
loop at internal table.
move internal_table_structure to string.
endloop.
but in my case the internal table data contains decimal(h) type data type
nd it says that type h can not be moved or the data is
it is not mutually convertable in unicode program
please people help me with this
maximum reward point guaranteed
‎2007 Jun 27 8:10 AM
Hi Summet,
Do like this,
data: str type string.
loop at itab
concatenate itab str into str.
endloop.
Reward if useful!
‎2007 Jun 27 8:14 AM
hello dear,
it still says the srting can not be converted to the type of table.
‎2007 Jun 27 8:17 AM
Hi Sumeet,
Are you passing itab or itab-<fieldname>?
Pass fieldname.
Sorry my mistake.
‎2007 Jun 27 8:26 AM
Hi,
here a short example:
TABLES: MARA.
*
DATA: BEGIN OF ITAB OCCURS 0,
MATNR LIKE MARA-MATNR,
MATKL LIKE MARA-MATKL,
END OF ITAB.
*
DATA: STRG TYPE STRING.
*
SELECT MATNR MATKL FROM MARA INTO TABLE ITAB UP TO 10 ROWS.
*
LOOP AT ITAB. WRITE: / ITAB-MATNR, ITAB-MATKL. ENDLOOP.
*
LOOP AT ITAB.
CONCATENATE STRG ITAB INTO STRG.
ENDLOOP.
*
WRITE: / STRG(100).
*
Regards, Dieter
‎2007 Jun 27 8:34 AM
hello friends,
thanx for the solution given
i will try these and will reply in sometime
‎2007 Jun 27 8:39 AM
hello dieter,
with your solution i m getting a message 'gs_item_contract' (my structure) must be a character type data object (C,N,D,T or string)
i am using menge field which has a data type of Quan
‎2007 Jun 27 9:03 AM
Hi,
it's only a warning.
Look at this:
TABLES: MARA.
*
DATA: BEGIN OF ITAB OCCURS 0,
MATNR LIKE MARA-MATNR,
MATKL LIKE MARA-MATKL,
BRGEW LIKE MARA-BRGEW,
END OF ITAB.
*
DATA: BRGEW LIKE MARA-BRGEW.
DATA: IDX LIKE SY-INDEX.
DATA: STRG TYPE STRING.
*
SELECT MATNR MATKL BRGEW FROM MARA INTO TABLE ITAB UP TO 10 ROWS.
*
LOOP AT ITAB. WRITE: / ITAB-MATNR, ITAB-MATKL, ITAB-BRGEW. ENDLOOP.
*
LOOP AT ITAB.
CONCATENATE STRG ITAB INTO STRG.
ENDLOOP.
*
DO 10 TIMES.
IDX = SY-INDEX * 27 + ( ( sy-index - 1 ) * 7 ).
WRITE STRG+IDX(7) TO BRGEW.
WRITE: / BRGEW.
ENDDO.
*
the Quan-Field will be stored correct.
Regards, Dieter
‎2007 Jun 27 8:27 AM
hi,
try like this
declare a character variables for float values as
data: flchar type c.
flchar = floatvalue.
and declare internal table for string [strtab]
loop at <internal table>
move itab to strtab.
endloop.
or
move itab[] to strtab[].
if helpful reward some points.
with regards,
Suresh.A