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: 

Field Symbol : Value assignment problem

Former Member
0 Kudos

Dear all,

This is regarding below mentioned code :

G_FVALUE = WA_MSEG-MEINS. "G_MEINS. " line 1

ASSIGN COMPONENT 'MEINS' OF STRUCTURE <FS_DYN_WA> TO

<FS_FLDVAL>. " MEINS

<FS_FLDVAL> = WA_MSEG-MEINS. "G_FVALUE. "line 4

CLEAR G_FVALUE.

CLEAR G_FNAME.

G_FVALUE = G_QTY.

G_FVALUE1 = G_QTY.

G_FNAME = WA_MSEG-BLDAT. " value is 20100424 " start of Problem code

ASSIGN COMPONENT G_FNAME OF STRUCTURE <FS_DYN_WA> TO <FS_FLDVAL>. " MENGE

ASSIGN G_QTY TO <FS_FLDVAL_TO>.

ASSIGN G_QTY TO <FS_FLDVAL>. "End o

5 REPLIES 5

jayesh_gupta
Active Participant
0 Kudos

Hi,

At Line 4, value of wa_mseg-meins is getting copied to <fs_dyn_wa>-meins.

At line 10, ASSIGN COMPONENT G_FNAME OF STRUCTURE <FS_DYN_WA> TO <FS_FLDVAL>.

field <fs_dyn_wa>-20100424 is assigned to <fs_fldval>.

Now if you have to pass value of G_QTY to <fs_dyn_wa>-20100424, you should use

<fs_fldval> = G_QTY. (Instead of ASSIGN G_QTY TO <FS_FLDVAL>.)

<FS_DYN_WA>-20100424 will then get populated.

Regards,

Jayesh

0 Kudos

Thanks. It is working fine.

0 Kudos

Thanks. It is working fine.

SuhaSaha
Advisor
Advisor
0 Kudos

Hello Vishal,

G_FNAME = WA_MSEG-BLDAT. " value is 20100424 " start of Problem code
ASSIGN COMPONENT G_FNAME OF STRUCTURE <FS_DYN_WA> TO <FS_FLDVAL>.

Check in debug if your structure <FS_DYN_WA> contains a field named '20100424', if not the assignment will fail.

Anyways if you provide what is the logic you are trying to achieve you may receive better responses.

Former Member
0 Kudos

Solved.