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: 

Parsing the field name

Former Member
0 Kudos

Hello All,

I eed to get the field ame of a structur from one of the custom tables .Now, in the program I need to assign a structure value to the

the structure-(dynamic fieldname) ,how will I do this??? I will not be able to concatenate in and assign it ..

1 REPLY 1

Former Member
0 Kudos

Hello Shakuntala,

You can use field symbol to get to the dynamic fields of the structure.

you can also use the selection from table dd03l to get the fields of the structure.

select * from dd03l to get the lt_comp_list for your structure.

field-symbol: <fs_tab> type data,

<fs_field> type any.

.

loop at lt_comp_list into ls_comp.

ASSIGN COMPONENT ls_comp OF STRUCTURE your structure TO <fs_field>.

<fs_field> = desired value.

end loop.

Hope this helps.

-Vinita