Skip to Content
author's profile photo Former Member
Former Member

Issue using assign for dynamic work areas....

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.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Feb 25, 2009 at 05:27 PM

    I think SF4. is the field name. then

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

    and try.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      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.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.