‎2007 Jun 06 7:12 AM
hello,
I wish ot display my internal tabel in such a way that say i have n no of fields in my internal table material number,material description,quantity,unit....
now the material number and description is same for several records n i wish to display them only once... dat is display should b like
mat1 desc1 qunt1 unit1
qunt2 unit2
mat2 desc2 qunt3 unit3
(dat is mat1 n des1 is same for both qunt1,unit1 and qunt2,unit2)
is possible wid sapscript? how can achive this ?
‎2007 Jun 06 7:15 AM
HI,
It is posible, but the internal table should have the like what you plant to display.
Lets say you have a Internal table which is having MATNo, Des, Qunatitu,
Take another internal table, and use the AT NEW command and move the Values to the New Internal table, so in this Internal table the data will be stored like what you explained.
then use this Internal table to Print in the Layout
Regards
Sudheer
‎2007 Jun 06 7:15 AM
HI,
It is posible, but the internal table should have the like what you plant to display.
Lets say you have a Internal table which is having MATNo, Des, Qunatitu,
Take another internal table, and use the AT NEW command and move the Values to the New Internal table, so in this Internal table the data will be stored like what you explained.
then use this Internal table to Print in the Layout
Regards
Sudheer
‎2007 Jun 06 7:19 AM
thnx for quik reply...i had da same plan jst wanned to knw ders ny other way to do so................
‎2007 Jun 06 7:18 AM
Use sort criteria event on sort begin or event on sort end for the internal table node in smartform
‎2007 Jun 06 7:20 AM
Hi
In the program you have to keep the fields in the internal table in that order and sort by MATNR MAKTX and use AT NEW command.
sort ITAB by MATNR
loop at ITAB..
at new MATNR.
perform WRITE_FORM using 'WINDOW' 'ELEMENT'.
< in the script create this element and write only 2 fields MATNR and MAKTX)
endat.
perform WRITE_FORM using 'WINDOW' 'ELEMENT1'.
< here again create another element and in that write the remaining fields of the
itab which has to come below same material>
endloop.
Reward points if useful
Regards
Anji
‎2007 Jun 06 7:21 AM
Hi,
You can do it in other method also.
store material no. in some variable.
and in LOOP code like this
IF V_MAT = MATNR.
&QUAN& ,, &.UNIT&.
ELSE.
...
..
Regards,
Naveen