11-27-2007 5:30 AM
Dear All,
i have two internal tables itab1 & itab2.
ITAB1 is of strecture EBANX, and ITAB2 is declared as fallows:
TYPES: BEGIN OF gty_temp_stru,
BANFN TYPE eban-BANFN,
matnr TYPE eban-matnr,
werks TYPE eban-werks,
land1 TYPE t001w-land1,
taxim TYPE mlan-taxim,
END OF gty_temp_stru.
DATA: ITAB2 TYPE TABLE OF GTY_TEMP_STRU,
GWA_ITAB2 TYPE GTY_TEMP_STRU.
now once i fetch the data into ITAB2 i have to sort it based on ITAB2-TAXIM.
based on the result of ITAB2 i have to sort the data in ITAB1.
How to do this, plz help me in solving the issue.
Thanks,
Rama
11-27-2007 5:32 AM
11-27-2007 5:42 AM
Hi,
itab1 is an internal table of strecture EBANX, its not a strecture.
11-27-2007 5:35 AM
11-27-2007 5:36 AM
11-27-2007 5:51 AM
Hi Prashant ,
please go through the below explination
*************************************
sort itab2 by taxim.
sort itab1 by taxim.
this can not be done, because we don't have the field TAXIM in ITAB1.
****************************************
itab1 can have records as fallows
BANFN BNFPO NEW_PO NEW_ITEM
9000000011 | 00010 | X | space
9000000012 | 00010 | space | X
9000000013 | 00010 | space | X
9000000015 | 00010 | space | X
9000000014 | 00010 | X | space
9000000016 | 00010 | space | X
and based on the values that we fetch from EBAN, T001W and MLAN into itab2
we have to sort thouse itab2 results based on the values for TAXIM.
once the table itab2 is sorted, based on the result we have to sort the table itab1.
Regards,
Rama
11-27-2007 5:43 AM
hai friend do one thing...take a final internal table t_final and add all the fields of itab1 and itab2 now sort the final with first what u want ..
sort t_final by itab1-field itab2-field..
now first it will sort it by itab2-field and then itab1-field..
regrads points if usefull