Skip to Content

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

two transparent table into one internal table

good day experts.

I just want to ask this cause I am puzzled what to do.

I have two transparent tables (BSID and BSAD). I want to take the fields BUDAT and DMBTR on both tables and place it on a single internal table. So what I did is, i make two SELECT statements like this:

*first select statement giving One (1) result

SELECT budat dmbtr INTO table it_lastPay

FROM bsid

WHERE kunnr = p_wa_data_kunnr

AND budat =< s_date

AND blart = 'DZ'

AND umsks IN ('', 'L', 'A')

AND umskz IN ('', 'L', 'A')

AND bschl IN ('15', '19').

*second select statement giving Four (4) results

SELECT budat dmbtr INTO table it_lastPay

FROM bsad

WHERE kunnr = p_wa_data_kunnr

AND budat =< s_date

AND blart = 'DZ'

AND umsks IN ('', 'L', 'A')

AND umskz IN ('', 'L', 'A')

AND bschl IN ('15', '19').

But the result is not what I expect. With this staments above, the result will be just four records.

The first select stament was superceded by the second statement.

Is there any idea to correct this statement or anything to do to produce five records using one internal table?

Thanks a lot for your replies.

Tags:
replied

replace "INTO" by "APPENDING" in second select statement.

Thomas

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question