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: 

Field symbols

Former Member
0 Kudos

Hi All,

I have a structure which has type DATA. So, I need to declare a filed symbol. I would like to pass some integer value to that.

I have declared like this.

FIELD-SYMBOLS <value> type any.

I was not able to pass like , <value> = '1000'.

I declared one variable lv_value and tried to pass value to that <value>.

Iam getting an error.

How would I pass value to a variable of type DATA.

pls suggest.

Thank You,

Suresh.

1 ACCEPTED SOLUTION

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

You mean something like this?




data: lv_value type ref to data.
field-symbols: <fs> type any.

create data lv_value type string.
assign lv_value->* to <fs>.
<fs> = '1000'.


REgards,

RIch Heilman

5 REPLIES 5

former_member194669
Active Contributor
0 Kudos

Hi,

look this


data f1(3) value 'XYZ'.
FIELD-SYMBOLS <f> type any.
Assign f1 to <f>.

aRs

Former Member
0 Kudos

hi Suresh,

Try this

lv_value = '1000'.

assign: (lv_value) to <fv>.

Sri

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

You mean something like this?




data: lv_value type ref to data.
field-symbols: <fs> type any.

create data lv_value type string.
assign lv_value->* to <fs>.
<fs> = '1000'.


REgards,

RIch Heilman

0 Kudos

Thank you Rich.

Former Member
0 Kudos

FIELD-SYMBOLS <value> type any.

data: lv_value type i VALUE 1000.

ASSIGN lv_value TO <value>.