Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8581

Re: how to replace the value of one field with value of a corresponding field in internal table

$
0
0

Hi Shah,

 

 

There are two ways to change the data in the internal table

1) use modify statement with transporting

2) using field symbols

its better to use field symbols, for better performance.


In the above statement kindly debug that code,so you will understand what you done.

 

READ TABLE ist_data into wa_data with key afnam = wa_data-afnam.


read table syntax will read the content of the table in matching condition. in your case its afnam = wa_data-afnam. in that wa_data-afnam is zero. so sy-subrc is alwalys 4.


so use,

declare field symbol.

sort ist_data by afnam.

loop at ist_data assigning <fs_data> where afnam is not initial.

<fs_data>-werks = <fs_data>-afnam.

Endloop.


check for field symbol is assigned or not before using field symbol and kindly unassign after using.


Regards,

sampath kumar.


Viewing all articles
Browse latest Browse all 8581

Trending Articles



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