05-04-2009 9:49 AM
Hi all,
I'm using field symbol as internal table. this table has got a standard database structure.
I want to make the 3rd column of this internal table as 1st colums keeping rest of the columns as it is.
Is there any way to do this?
Thanks,
Anil.
05-04-2009 10:00 AM
Hi
Instead of directly taking the type as a standard structure , declare the FS internal table as type of types structure.
Data: fs_scarr like type_s_scarr.
FIELD-SYMBOLS <scarr2> TYPE fs_scarr
In the types put the third column as first one and use into corresponding in select query
or else
while displaying the internal table change the order of the columns
Loop at itab into fs_itab.
write : col3
col2
col4
endloop.
Thanks,
Viquar Iqbal
05-04-2009 9:53 AM
insted of using standard database structure , declare each and every field of internal table using the corresponding data element
05-04-2009 9:54 AM
hi,
Can u briefly describe ur structure? and why is dat u need ordering? Since without ordering also u can extract, load and display data in whichever position u want.
ags.
05-04-2009 10:07 AM
Actually I want to use at end of...endat control structure on the 3rd field but it takes the end of the combination of 1st 3 fields which i dont want.
05-04-2009 10:26 AM
U will have to make a Z structure for ur table and the field at which u r calling at end of should be declared as 1st field and also the table should be sorted on this field. There is no other way in which u can change the order of ur internal table fields.
05-04-2009 10:00 AM
Hi
Instead of directly taking the type as a standard structure , declare the FS internal table as type of types structure.
Data: fs_scarr like type_s_scarr.
FIELD-SYMBOLS <scarr2> TYPE fs_scarr
In the types put the third column as first one and use into corresponding in select query
or else
while displaying the internal table change the order of the columns
Loop at itab into fs_itab.
write : col3
col2
col4
endloop.
Thanks,
Viquar Iqbal