Application Development and Automation 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: 
Read only

Filling a Dynamic Structure

Former Member
0 Likes
448

Hi All,

I have generated a dynamic structure. The field names of the structure are related to the values I have generated from a table which can also be dynamic.

I was wondering if there was a way to move a value to a work area of this dynamic table using the field name?

thanks.

JB

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
408

Hi. You should be able to do it easily using field symbols and assign. There are lots of posts on here about this, but something simple like:

FIELD-SYMBOLS:

<fs_data> TYPE (structure name),

<fs_field> TYPE ANY.

ASSIGN (structure name) to <fs_data>.

ASSIGN COMPONENT (component name) OF STRUCTURE <fs_data> TO <fs_field>.

Just replace the data in brackets with your structure and field names. (component name) can be any variable you have selected in from anywhere. <fs_field> will contain your data from your structure.

Regards,

Dave.

2 REPLIES 2
Read only

Former Member
0 Likes
409

Hi. You should be able to do it easily using field symbols and assign. There are lots of posts on here about this, but something simple like:

FIELD-SYMBOLS:

<fs_data> TYPE (structure name),

<fs_field> TYPE ANY.

ASSIGN (structure name) to <fs_data>.

ASSIGN COMPONENT (component name) OF STRUCTURE <fs_data> TO <fs_field>.

Just replace the data in brackets with your structure and field names. (component name) can be any variable you have selected in from anywhere. <fs_field> will contain your data from your structure.

Regards,

Dave.

Read only

Former Member
0 Likes
408

Hi Jamie ,

you can achieve this by using field symbols.

Please check the link for details.

http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3860358411d1829f0000e829fbfe/content.htm

Press F1 on Field-symbols and assigning.

You can search SDN , there are many related threads.

Hope this helps you.