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: 

Issue using assign for dynamic work areas....

Former Member
0 Kudos

Hello,

I am using field-symols for dynamic internal table and dynamic wo0rk areas.

When I do following, the dynamic work area gets updated with the value of field in SF4. The <dyn_wa> is also automactially updated with value of field SF4 field which is equated to <DATA> in code (a) below.

a)

ASSIGN COMPONENT v_component of STRUCTURE <dyn_wa> TO <DATA>.
<DATA> = SF4

But when I do following, I see that <DATA> now contains value of field SF4 but the

dynamic work area still does not have value of <DATA>.

b)

ASSIGN COMPONENT v_component of STRUCTURE <dyn_wa> TO <DATA>.
v_screenfield = SF4.
assign (v_screenfield) to <DATA>

I want to use code technique (b) because then I would not have to code for case-endcase for each screen-fields, but I want to make sure that dynamic work area gets updated as in code (a).

Regards,

Jainam.

1 ACCEPTED SOLUTION

former_member194669
Active Contributor
0 Kudos

I think SF4. is the field name. then


v_screenfield = 'SF4'.   " Put this in single quotes
write (v_screenfield) to <data>.

and try.

2 REPLIES 2

former_member194669
Active Contributor
0 Kudos

I think SF4. is the field name. then


v_screenfield = 'SF4'.   " Put this in single quotes
write (v_screenfield) to <data>.

and try.

0 Kudos

Well there is issue with write statement for date. The date gets convrted to user format.

So, if v_screenfild = 20090202, the execution of statement below will cause <data> to have 02.02.2009 (user defined format) but I want <data> = 20090202

v_screenfield = 'SF4'.   " Put this in single quotes
write (v_screenfield) to <data>.

Regards,

Jainam.