Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9218

Re: select statement for structure

$
0
0

Hi Hari,

 

The internal table gt_list has 2 components

1) zhemplead

2)  cellstyles

 

when you try to directly fill the internal table  using Select statement (i.e. from zhemplead ) then the internal table should have the same structure of zhemplead . But in "gt_list" , there is an additional filed "Cellstyles". So you cannot direclty use it in select statement.

 

You can try with a temporay table for select query and then fill gt_list using a loop.

something like below logic .

 

DATA : lt_zhemplead   TYPE TABLE OF zhemplead ,

        wa_zhemplead   TYPE zhemplead.

 

DATA: wa_list TYPE LINE OF gt_list.

 

SELECT * FROM zhemplead INTO TABLE lt_zhemplead.

 

LOOP AT lt_zhemplead INTO ls_zhemplead.

 

   MOVE-CORRESPONDING ls_zhemplead TO wa_list.

 

   APPEND wa_list TO gt_list.

 

ENDLOOP.


Viewing all articles
Browse latest Browse all 9218

Trending Articles