Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Select name1 from kna1 into internal table

0 Kudos

Hello guys,

I am learning ABAP, I am doing some exercise about the basic stuff.

I encountered a problem, If I am using internal table tab_result, sy-subrc will return 4.

if I am using an identical internal table tab_result2, the name1 and maktx will be empty.

I'v checked tab_result and tab_result2, they have value of kunnr and matnr.

I am running HANA.

here is the code.

APPEND LINES OF tab_result TO tab_result2.

SELECT name1
FROM kna1
INTO TABLE tab_result
FOR ALL ENTRIES IN tab_result2
WHERE kunnr = tab_result2-kunnr.

SELECT maktx
FROM makt
INTO TABLE tab_result
FOR ALL ENTRIES IN tab_result2
WHERE matnr = tab_result2-matnr.

0 REPLIES 0