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: 

assign a value to an internal table dynamically.

Former Member
0 Kudos

Hi Friends,

I have three field symbols

FIELD-SYMBOLS: <component> TYPE table,

<line> TYPE ANY,

<field> TYPE ANY.

Before my code was.

ASSIGN COMPONENT 'DATA-LOGSYS' OF STRUCTURE <line> TO <field>.

when <component> had a structure

DATA (type u - structure without internal table)

>DATA-LOGSYS.

But now the <component> has a structure

SET (type h - Internal table)

>DATA-LOGSYS.

Now how should I modify my code to work properly?

How can I access the field inside this dynamically created internal table?

ASSIGN COMPONENT <b>' '</b> OF STRUCTURE <line> TO <field>.

What should I write in this space?

Regards,

Raju

4 REPLIES 4

Former Member
0 Kudos

Hi friends

before assigning ie.,

ASSIGN COMPONENT 'DATA-LOGSYS' OF STRUCTURE <line> TO <field>.

I write,

READ TABLE <component> INDEX 1 ASSIGNING <line>.

0 Kudos

Hi Friends,

Any ideas on this?

This is an urgent issue.

Please send your suggestions

Thanks & Regards,

Raju

Former Member
0 Kudos

Hi Raju,

Plese refer the following link. This explains creation of the dynamic internal table.

And to access the contents of the dynamically generated table. The following link ll help you...

http://www.sapfans.com/forums/viewtopic.php?p=107594

Hope this helps!!

*Reward if useful

regards,

Naveenan.

rodrigo_paisante3
Active Contributor
0 Kudos

Hi,

Maybe this link be useful.

Regards

Paisante