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

[ABAP OO] Generic method get lines

$
0
0

Hi Experts,

 

I am creating a generic method to get the numbers of lines from any table, like below:

 

TABNAME type string.

LINES type i.

METHOD get_lines_from_any_dbtab.


  DATA lo_tab TYPE REF TO data  .

 
CREATE DATA  lo_tab  TYPE TABLE OF (tabname) .
 
SELECT FROM (tabnameINTO TABLE lo_tab .

 
DESCRIBE TABLE lo_tab LINES lines  .
 
CONDENSE lines 


METHOD.

 

I have an error message during the compilation as:

 

LO_TAB is not an internal table.

Any idea ?

 

Kind regards.

Rachid.


Viewing all articles
Browse latest Browse all 9238

Trending Articles



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