HOW DO WE JOIN TWO INTERNAL TABLES USING READT STATEMENT??

Answer Posted / geeta

Hi This I searched on sdn and thought to post .

data: wa_gfsb like line of i_gfsb,
wa_gfsbdata like line of i_gfsbdata,
lv_tabix type sy-tabix.

* Sort Table by Plant.
sort i_gfsbdata by matnr.

loop at i_gfsb into wa_gfsb.

read table i_gfsbdata into wa_gfsbdata
with key matnr = wa_gfsb-matnr binary search.

if sy-subrc is initial.
lv_tabix = sy-tabix.

loop at i_gfsbdata into wa_gfsbdata
from lv_tabix.

if wa_gfsbdata-matnr ne wa_gfsb-matnr.
exit.
else.
wa_gfsbdata-werks = wa_gfsb-werks.
wa_gfsbdata-verpr = wa_gfsb-verpr.
wa_gfsbdata-peinh = wa_gfsb-peinh.
modify i_gfsbdata from wa_gfsbdata.
endif.
clear wa_gfsbdata.
endloop.
endif.

endloop.

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When value table becomes check table?

767


what is 3 tire architecture and how does SAP utilizes this architecture. and how do netweaver came into picture?

1940


Why do we use dynamic where conditions?

1077


How many types of tables exists and what are they in data dictionary?

1284


What is the significance of delivery class? : abap data dictionary

761






Can you create a table with fields not referring to data elements? : abap data dictionary

1005


What is the sap abap?

817


How to insert a line into abap internal tables?

783


Define alv programming in abap?

942


Can anyone done BDC/LSMW/BAPI for F-02 and F-04.If yes let me know the processs

2180


Can a domain, assigned to a data element be changed?

801


What are the different types of views in sap? : abap data dictionary

798


In Table Field when display the Name, whose first charecter should be capital letter and rest will be small letter.

1798


Can we display a list in a pop-up screen other than full-size stacked list?

876


What are the system table used in abap?

792