05-15-2011 8:38 AM
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.
05-15-2011 10:05 AM
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
05-15-2011 10:05 AM
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
05-15-2011 11:32 AM
Thanks Clemens. It solved that issue.
Edited by: Rameshkumar Raamasamy on May 15, 2011 1:52 PM