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 concept

Former Member
0 Kudos

Hi,

I have a deep structure(line type CRMT_MKTIMEX_FIELD_TAB) inside one field-symbol and the contents are as follows:

1 FLD_POS I 4 1

2 FLD_NAME g 0

3 FLD_VALUE g 5 MXDIA

I have one structure as follows:

I want to update one more structure-field with the FLD_VALUE of field symbol.And I am writting the code as follows:

LOOP AT lt_field ASSIGNING <fs>.

gw_tab = <fs>-FLD_VALUE.

APPEND gw_tabto gt_cust_tab.

ENDLOOP.

But it throws error as "the data object <fs> has no structure and therefore no component called FLD_VALUE".Please help on this.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

If you are using the structure gw_tab = <fs>-FLD_VALUE, you need define the field symbol type in the DATA definition statement.

If you do not do that then you can a statement similar to the following:

ASSIGN COMPONENT 'STRUCT_COMP' OF STRUCTURE <structuire_name> TO <field_symbol>.

and then,

gw_tab = <field_symbol>

Hope this helps.

Regards,

Wenonah

3 REPLIES 3

former_member194416
Contributor
0 Kudos

To use field symbol like `<fs>-FLD_VALUE` you must define it in type of your internal table structure.

Former Member
0 Kudos

Hi,

Define <fs> of type lt_field.

This will solve your query.

Regards,

Manish

Former Member
0 Kudos

Hi,

If you are using the structure gw_tab = <fs>-FLD_VALUE, you need define the field symbol type in the DATA definition statement.

If you do not do that then you can a statement similar to the following:

ASSIGN COMPONENT 'STRUCT_COMP' OF STRUCTURE <structuire_name> TO <field_symbol>.

and then,

gw_tab = <field_symbol>

Hope this helps.

Regards,

Wenonah