Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 3441

SELECT while MODIFYING existing rows

$
0
0

Hello,

 

I have an internal table with material, plant, PSS status and some other fields that is already full of data. I want to select the material description from MAKT using the entries in this table and modifying this table at the same time:

 

SELECT maktx FROM makt INTO CORRESPONDING FIELDS OF TABLE itab

FOR ALL ENTRIES IN itab

WHERE matnr = itab-matnr.

 

However, this deletes the current entries.

 

I also tried to use SELECT .... APPENDING INTO CORRESPONDING FIELDS OF TABLE

but am unsure if I am doing it correctly or if there is a different way to do it because the way I have written it, it adds additional rows to my table.

 

I am aware I can create a separate internal table and then loop through it to modify itab but was trying to see if there is a more efficient way to do this.

 

Thank you!


Viewing all articles
Browse latest Browse all 3441

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>