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: 

Passing values tofield catalog

rameshkumar_ramasamy2
Participant
0 Kudos

Hi all,

I have dynamically created a structure based on my requirement and assigned to field symbols as well. But i dont know how to assign the values to the column fields of that Field Symbols.

Consider the dynamic structure of the field symbol is VBELN, AUDAT, MAT, QUANTITY.

I tried to pass like


<FS>-VBELN = '000101010'.
<FS>-AUDAT = '20110101'.
<FS>-MAT = '100-100'.
<FS>-QUANTITY = '10'.

But this showing an error VBELN is not a component of <FS>.

Plz help me out for the same.

Thanks in Advance.

1 ACCEPTED SOLUTION

Clemenss
Active Contributor
0 Kudos

Hi Ramesh,

you need one more field-symbol.

If <fs> is assigned to the line of the dynamic table, then

ASSIGN COMPONENT 'VBELN' OF STRUCTURE <fs> TO <f2>.
<F2> = '000101010'.

Or even more dynamic:

data: lv_fieldname type fieldname.

lv_fieldname = 'VBELN'.
ASSIGN COMPONENT (lv_fieldname) OF STRUCTURE <fs> TO <f2>.
<F2> = '000101010'.

... and so on.

Regards,

Clemens

2 REPLIES 2

Clemenss
Active Contributor
0 Kudos

Hi Ramesh,

you need one more field-symbol.

If <fs> is assigned to the line of the dynamic table, then

ASSIGN COMPONENT 'VBELN' OF STRUCTURE <fs> TO <f2>.
<F2> = '000101010'.

Or even more dynamic:

data: lv_fieldname type fieldname.

lv_fieldname = 'VBELN'.
ASSIGN COMPONENT (lv_fieldname) OF STRUCTURE <fs> TO <f2>.
<F2> = '000101010'.

... and so on.

Regards,

Clemens

0 Kudos

Thanks Clemens. It solved that issue.

Edited by: Rameshkumar Raamasamy on May 15, 2011 1:52 PM