‎2008 Feb 08 3:40 AM
hi,
i have internal table like below:
0567(plant) 08(chrac.length)
0567 12
0570 12
0570 14
0580 16
now i have 3-different plant with 4-different length
now i want internal table like below:
0567 08
0567 12
0567 14
0567 16
0570 08
0570 12
0570 14
0570 16.
etc.......................
how can i make logic to make above format....
‎2008 Feb 08 3:53 AM
One way to do this as
0567(plant) 08(chrac.length)
0567 12
0570 12
0570 14
0580 16
for this sort table by plant and save only plant to one internal table. then sort by length and store it in diffrent internal table so now you have two internal table with one having plant and other having length. delete if any duplicate from both. then loop at one and again loop at second and store all combination into third internal table. note that i am considering length also one of the field in internal table.
‎2008 Feb 08 3:45 AM
‎2008 Feb 08 3:47 AM
can u plz once have a look into my requirement and then let me know how to do ?
‎2008 Feb 08 3:55 AM
sorry i thought just sorting
Edited by: jose on Feb 8, 2008 4:59 AM
‎2008 Feb 08 3:53 AM
One way to do this as
0567(plant) 08(chrac.length)
0567 12
0570 12
0570 14
0580 16
for this sort table by plant and save only plant to one internal table. then sort by length and store it in diffrent internal table so now you have two internal table with one having plant and other having length. delete if any duplicate from both. then loop at one and again loop at second and store all combination into third internal table. note that i am considering length also one of the field in internal table.
‎2008 Feb 08 3:56 AM
Hi
ITAB1 contains PLant and Itab2 contains Length ( u know length)
ITAB3 contains plant and field
SORT ITAB1 BY PLANT .
SORT ITAB2 BY Length .
LOOP At itab1 .
Loop at itab2 .
itab3-plant = itab1-plant .
itab3-length = itab2-length.
append itab3 .
endloop .
ENDLOOP .
Hope it helps,.
Praveen
‎2008 Feb 08 3:59 AM
hi,
If it has two fields like plant and length then you can do like sort internal table and if suppose these are different ..in this case you have to take another internal table which will have two fields i.e. plants and length then you can take all records into new internal table and then sort....