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

assign a value to an internal table dynamically.

Former Member
0 Likes
727

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

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
Read only

Former Member
0 Likes
695

Hi friends

before assigning ie.,

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

I write,

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

Read only

0 Likes
695

Hi Friends,

Any ideas on this?

This is an urgent issue.

Please send your suggestions

Thanks & Regards,

Raju

Read only

Former Member
0 Likes
695

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.

Read only

rodrigo_paisante3
Active Contributor
0 Likes
695

Hi,

Maybe this link be useful.

Regards

Paisante