Quantcast
Channel: SCN : All Content - ABAP Development
Viewing all articles
Browse latest Browse all 8332

Issue on copy Internal Table using field-symbol

$
0
0

Hi Experts,

 

I am trying to copy Internal table by use of field-symbol.

 

I wrote code like below.

 

DATA: itab1 TYPE STANDARD TABLE OF t100,  

          itab2 TYPE STANDARD TABLE OF t100.

 

FIELD-SYMBOLS: <fs_1> TYPE ANY TABLE,

                            <fs_2> TYPE ANY TABLE.

 

 

ASSIGN itab1 TO <fs_1>.

 

SELECT * FROM t001

         INTO TABLE <fs_1>

         UP TO 10 ROWS.

 

ASSIGN itab2 TO <fs_2>.

 

<fs_2> = <fs_1>.

 

DATA: v_lines TYPE i.

 

v_lines = LINES( <fs_2> ).

 

WRITE: v_lines.

 

 

My Problem is : While i am executing this program its going for dump and shows that : " The Itab use to hold the record must as wide as the db table from where you fetch the data records.

 

So How i increase the  size of <fs_1> field symbol , so that it will keep the records from T001 Table.

 

 

Regards,

 

Ajit


Viewing all articles
Browse latest Browse all 8332

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>