Hello, have 2 internal tables. both have different structures but there is one field in both tables which is the same but it is named differently in both internal tables.
internal table 1 has a lot of fields but i only want these fieldS:
MATNR
BUKRS
BELNR
Internal table 2 has a lot of fields but i only want these fields:
PartNumber
Store
What I did is this.
I created one final internal table and declared it as this.
TYPES: BEGIN OF s_fin,
MATNR type MARA-MATNR,
BUKRS type BSEG-BUKRS,
BELNR type BSEG_BELNR,
Part type MATNR-MATNR,
Store type Zext-Store,
END OF s_fin.
DATA: int_fin type standard table of s_fin,
wa_int_fin type s_fin.
LOOP AT IT_TAB1 INTO WA_TAB1.
wa_int_fin-MATNR = WA_IT_TAB1-MATNR.
.
.
.
wa_int_fin-PART = WA_IT_TAB2-PART.
wa_int_fin-store= WA_IT_TAB2-STORE.
APPEND WA_itab_final to itab_final.
ENDLOOP.
The problem is that data in my first internal table is coming in my final table fine but, second internal table keeps sending one store number to my final table. somehow i need to refresh the work area of my second table as well and also match Material number to part number. I am not sure how to do that. Please help.
Thanks.
Thanks.