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

Read dynamic internal table

Former Member
0 Likes
21,537

hi all,

i am working with dynamic internal table. how to use a read statement for the dynamic internal table.

Thanks

1 ACCEPTED SOLUTION
Read only

Former Member
7,340

hi

try with this sample code.

DATA: tab TYPE TABLE OF mara,

field_key TYPE char100.

FIELD-SYMBOLS: <tab> TYPE ANY TABLE,

<wa> TYPE ANY.

SELECT * UP TO 10 ROWS FROM mara INTO TABLE tab[].

ASSIGN tab[] TO <tab>.

field_key = 'MATNR'.

READ TABLE <tab> ASSIGNING <wa>

WITH KEY (field_key) = '000000000000000200'.

Cheers,

Madhu

8 REPLIES 8
Read only

Former Member
0 Likes
7,339

use field symbols for the same.

Read only

Former Member
7,341

hi

try with this sample code.

DATA: tab TYPE TABLE OF mara,

field_key TYPE char100.

FIELD-SYMBOLS: <tab> TYPE ANY TABLE,

<wa> TYPE ANY.

SELECT * UP TO 10 ROWS FROM mara INTO TABLE tab[].

ASSIGN tab[] TO <tab>.

field_key = 'MATNR'.

READ TABLE <tab> ASSIGNING <wa>

WITH KEY (field_key) = '000000000000000200'.

Cheers,

Madhu

Read only

Former Member
0 Likes
7,339

Hi,

checkout the link

Read only

Former Member
0 Likes
7,339

HI,

Check this code...

CREATE DATA dy_line LIKE LINE OF <fs_table_llm>.
    ASSIGN dy_line->* TO <fs_wa_llm>.

    READ TABLE <fs_table_llm> INDEX g_index ASSIGNING <fs_wa_llm>.

Read only

Former Member
0 Likes
7,339

.

Edited by: Jayapradha Neeli on Mar 3, 2009 2:29 PM

Read only

0 Likes
7,339

Hi Jayapradha,

Read dynamic table into dynamic wa

then move correspondin <dyn_wa> to wa_final.

where wa_final is of type table for whic dynamic table is created.

Thanks & Regards,

Ruchi Tiwari

Read only

Former Member
0 Likes
7,339

Hi Ahila,

Check out this link.

Much Regards,

Amuktha.

Read only

Former Member
0 Likes
7,339

Hi, u cannot use read stmt.

use field symbols

and which uses below ASSIGN stmt inspite of read.

ASSIGN COMPONENT w_change-usnam OF STRUCTURE <gs_1>

TO <lv_value>.