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

Internal table Syntax

Former Member
0 Likes
902

Hi,

is it possible to assign fields of an internal table like below

ftpost-fval = t_alv[1]-netwr

without doing a read in working area?

Thanks

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
872

No, you can not do that.

Regards,

Rich Heilman

9 REPLIES 9
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
873

No, you can not do that.

Regards,

Rich Heilman

Read only

0 Likes
872

I guess I would have to read it into a work area?

Read only

0 Likes
872

Yes, use READ statement into WA.

Regards,

Rich Heilman

Read only

0 Likes
872

Hi Sims,

you have to read the table into a workarea of the same structure like.

types: begin of ty_tab,

vbeln like vbak-vbeln,

vgbel like vbak-vgbel,

end of ty_tab.

data: i_tab type standard table of ty_tab.

..

..

Data: wa_tab type ty_tab

read table i_tab index 1 into wa_tab.

now wa_tab-vbeln and wa_tab-vgbel will have the values of the 1st row of the internal table i_tab.

Hope this sovles ur issue.

Regards,

Tushar

Read only

0 Likes
872

Hi

Yes, use Read Statement in to a WA ....

Regards,

Santosh

Read only

Former Member
0 Likes
872

hi,

this is not possible

this is not correct syntax in abap

Regards,

Naveen

Read only

Former Member
0 Likes
872

Hi Sims,

Its not possible by specifying indexes with work areas. You should need to write READ statement with specifying index to get value.

READ ITAB INDEX 1 TRANSPORTING FIELDS ITAB-NETWR.

Thanks,

Vinay

Read only

Former Member
0 Likes
872

HI Sims,

I think it is not possible .

Regards,

Laxmi.

Read only

abdul_hakim
Active Contributor
0 Likes
872

hi,

you should first read your table using READ/LOOP statement before performing any validation to the internal table contents.

i would advice you to read the corresponding document in the knowledge pool http://help.sap.com

Cheers,

Abdul Hakim