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 data from table type

Former Member
0 Likes
3,543

Hi everyone,

I am calling a FM BBP_READ_ATTRIBUTES, it exports a line ET_ATTR(Table type) , now in this there is a field VLIST which is an Internal table . and It has entry in it.

Now I require to get this internal table.

I declare in data statement var type tabletype.

How exactly can i retreive this internal table .

when i double clicl on ET_ATTR , it a tabl type but i calls a line type BBPS_ATTR which is like a structure and there is a feild like VLIST which is an internal table .

Please help me to retrieve the data in this internal table.

Reagrds,

Raj

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,608

Plz try the following..


FIELD_SYMBOLS: <fs_vlist_tab> type VLIST.  " plz give the table type of VLIST

DATA: WA_VLIST TYPE LINE OF VLIST

READ TABLE ET_ATTR INDEX 1. " as you saying it has only one line, read only index 1. o.w. you can read the other lines too as per you requirement.

ASSIGN ET_ATTR-VLIST TO <FS_VLIST_TAB>.
READ TABLE <FS_VLIST_TAB> into WA_VLIST index 1.

* and process your WA_VLIST as requried..

Regards

Prax

2 REPLIES 2
Read only

Former Member
0 Likes
1,608

try this


read table ET_ATTR into WA_BBPS_ATTR index 1.
if sy-subrc  = 0.
read table WA_BBPS_ATTR-VLIST into wa_vlist
index 1.

***do the necessary coding
 
endif.
endif.

hope this helps

Read only

Former Member
0 Likes
1,609

Plz try the following..


FIELD_SYMBOLS: <fs_vlist_tab> type VLIST.  " plz give the table type of VLIST

DATA: WA_VLIST TYPE LINE OF VLIST

READ TABLE ET_ATTR INDEX 1. " as you saying it has only one line, read only index 1. o.w. you can read the other lines too as per you requirement.

ASSIGN ET_ATTR-VLIST TO <FS_VLIST_TAB>.
READ TABLE <FS_VLIST_TAB> into WA_VLIST index 1.

* and process your WA_VLIST as requried..

Regards

Prax