Application Development and Automation 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: 
Read only

Field Symbol : Value assignment problem

Former Member
0 Likes
600

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 Problem code

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

ASSIGN

4 REPLIES 4
Read only

Former Member
0 Likes
570

Based on your below line of code G_FNAME will have value 20100424.

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

Based on below line of code, you are assigning component 20100424 OF STRUCTURE <FS_DYN_WA> .

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

this is incorrect.

Make sure G_FNAME has the name of the field that your are assigning and not the value of the field.

Raj

Read only

Former Member
0 Likes
570

Hi Vishal ,

What is your question.

Please elaborate.

Still ,

The error is in this line

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

ASSIGN

G_FNAME should be a field name from structure value contained in <FS_DYN_WA> , but it seems that you have moved a value instead of field name in G_FNAME. So thats the reason , it is giving error.

Hope it is helpful,

Regards,

Uma Dave

Edited by: UmaDave on Jun 21, 2010 5:53 AM

Read only

Former Member
0 Likes
570

Thanks guys!!!

The problem was resolved.

Actually there was some problem while posting and line of code is missing in the post.

G_FVALUE = G_QTY.

G_FVALUE1 = G_QTY.

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

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

ASSIGN G_QTY to <FS_FLDVAL>. " Value not getting assigned.

I changed the last line to

<FS_FLDVAL> = G_QTY.

So it started assigning the values to the dynamic field of <FS_DYN_WA>

Cheers

VJ

Edited by: Vishal Jindal on Jun 21, 2010 6:19 AM

Read only

Former Member
0 Likes
570

anwered.