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: 

Help on moving fields

Former Member
0 Kudos

Hi expert,

I have one workarea called ls_college contains field guid, collegename, city,state, university.

It contains value of guid and college,i have another workarea called ls_modify having same fields but it contains only the value of city.

so i want to fill this value to ls_college workarea.

In this scenario ls_modify can hold any value of the field its dynamic,so i want to transfer these values to ls_college workarea.

but one more thing is, i have one variable which hold the field name which i want to transfer it to ls_college.

Thank you in advance..

1 ACCEPTED SOLUTION

dirk_wittenberg
Contributor
0 Kudos

Hi,

try:

field-symbols: <source> type any,

                       <target> type any.

assign component variable_with_comp_name of structure ls_modify to <source>.

assign component variable_with_comp_name of structure ls_college to <target>.

if <target> is assigned

and <source> is assigned.

  <target> = <source>.

else.

  message ...

endif.

Regards,

Dirk

1 REPLY 1

dirk_wittenberg
Contributor
0 Kudos

Hi,

try:

field-symbols: <source> type any,

                       <target> type any.

assign component variable_with_comp_name of structure ls_modify to <source>.

assign component variable_with_comp_name of structure ls_college to <target>.

if <target> is assigned

and <source> is assigned.

  <target> = <source>.

else.

  message ...

endif.

Regards,

Dirk