Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

selecting data from data base tables into itab with multiple select queries

Hi all,

i am dealing with a situation where in there is 3 DB tables in all say

1. ITAB - ZTBL_MAIN.

2. DB table - ZTBL_SUB1.

3. DB table - ZTBL_SUB2.

ZTBL_MAIN contains feilds from both tables 2 and 3 so to choose some records from ZTBL_SUB1 into the ITAB a select query has been written as below.

SELECT * FROM ZTBL_SUB1 INTO CORRESPONDING FIELDS OF TABLE ZTBL_MAIN

WHERE <condition>.

now i also want some feilds in main for each record to be filled from the other DB table for which if i use another select query after the above one in my report prog. say..

SELECT * FROM ZTBL_SUB2 INTO CORRESPONDING FIELDS OF TABLE ZTBL_MAIN

WHERE <condition>.

then all the previous records are going to be erased..Kindly let me know a way in which i can implement the above implementation.

Thanks&Rgds,

Naveen M

Tags:
Not what you were looking for? View more on this topic or Ask a question