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

Re: Assign value to variable that contain the field-symbol at run time

$
0
0

Just a thought that below should work.

 

Field-symbols :  <mat_val> type matnr,

                        <f_val>  TYPE ANY.

 

constants : lv_mat type char5 value 'MATNR'.

 

ASSIGN lv_val to <f_val>.

ASSIGN COMPONENT <f_val> OF STRUCTURE <l_fs_name> TO <mat_val>.

 

and now <mat_val> should have value 44.

 

But this is used when your variable name is dynamic like MATNR1, MATNR2 and you have decide variable at run time. But try once.


Viewing all articles
Browse latest Browse all 3354

Trending Articles



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