09-04-2009 6:21 AM
Hi
how to display values of a column as different columns. for example getting the values of Master Inspn char (VERWMERKM) u2013 UTS , YS , EL , Hardness and displaying it as different headers i.e uts , ys,el, hardness.
09-04-2009 6:26 AM
Hi,
u can use the SPLIT command.
If there are any seperators in the data, u can split at the separator.
Else, you need to split at the number of char for each field.
Regards,
Teja.
09-04-2009 6:26 AM
Here's one-way to do that:
data: begin of itab occurs 0,
word(100),
word1(100),
end of itab.
data: begin of jtab occurs 0,
word(100),
word1(100),
end of jtab.
itab-word = 'field1'.
append itab.
itab-word = 'field2'.
append itab.
itab-word = 'field3'.
append itab.
itab-word = 'field4'.
append itab.
loop at itab.
write:/ itab-word, 20 itab-word1.
endloop.
loop at itab.
concatenate jtab-word itab-word into jtab-word separated bY SPACE.
concatenate jtab-word1 itab-word1 into jtab-word1 separated bY SPACE.
endloop.
append jtab.
skip.
*write: 'Transposed Rows'.
loop at jtab.
write:/ jtab-word, jtab-word1.
endloop.
09-04-2009 6:41 AM
Hi,
Either use Dynamic Internal Table for this.
or
Declare an Internal Table with One Field for each of these values.
Like :
DATA : BEGIN OF ITAB OCCURS 0,
MAIN FIELDS .....,
FIELD1 TYPE C, " FOR UTS
FIELD2 TYPE C, " FOR YS
FIELD3 TYPE C, " FOR EL
FIELD4 TYPE C, " FOR Hardness
END OF ITAB.
Regds,
Anil