2008 Aug 06 1:19 PM
Hi all,
pls provide me idea how two compare two dynamic internal tables fields'
i have two internal table <gt_itab1> & <gt_itab2> , how to compare these field for both case if both structure is same or different.
regards,
Hi all,
pls provide me idea how two compare two dynamic internal tables fields'
i have two internal table <gt_itab1> & <gt_itab2> , how to compare these field for both case if both structure is same or different.
regards,
2008 Aug 06 1:29 PM
hiiii
refer to following link
[Dynamic internal table fields comparision|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/comparing%2btwo%2binternal%2btables%2b-%2ba%2bgeneric%2bapproach]
regards
twinkal
2008 Aug 06 1:29 PM
Hi,
Both internal tables gt_itab1 and gt_itab2 are have make
the same structure, then only we move one internal table to another like
gt_itab1[] = gt_itab2[].
MOVE CORRESPONDING gt_itab1 TO gt_itab2.
regars,
bhupal.
Edited by: bhupal reddy on Aug 6, 2008 2:29 PM
2008 Aug 06 1:32 PM
If you have no idea how the structure of your internal table is, you can do this:
assign every single field of your structures to two different field symbols and compare the contents of the field symbols one by one.
ASSIGN COMPONENT sy-index OF STRUCTURE ls_structure TO <fs>.
If you know the field you want to compare, assign this particular field of your structure to your field symbol and use that for comparison.
ASSIGN 'FIELDNAME' OF STRUCTURE ls_structure TO <fs>.
Check the exact syntax, I have no SAP system at hand right now.
2009 Oct 13 7:46 AM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |