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

Describe table lines

Former Member
0 Likes
31,818

hi,

What is the purpose of using Describe table lines.

DESCRIBE TABLE gt_ADMN_patnr LINES V_LCNT1.

revert back as soon as possibe.

kirthi

1 ACCEPTED SOLUTION
Read only

Former Member
11,888

Hi Kirti,

This statement determines some properties of the internal table itab and assigns them to the specified variables. The various additions enable you to determine the table type, the number of currently filled rows and the initial memory requirement.

In addition, the system fields sy-tfill and sy-tleng are filled with the current number

of table rows and the length of a table row in bytes.

Regards

Aneesh.

Hi Kirti,

This statement determines some properties of the internal table itab and assigns them to the specified variables. The various additions enable you to determine the table type, the number of currently filled rows and the initial memory requirement.

In addition, the system fields sy-tfill and sy-tleng are filled with the current number

of table rows and the length of a table row in bytes.

Regards

Aneesh.

4 REPLIES 4
Read only

Former Member
0 Likes
11,888

say u have have or no data in ur internal table.

u need to do some validation or write code based on ur table data.

so, we use describe and get the line count into a variable. now, if linecount < 0.... execute the code or else jsut come out without executing the code. basically use for performance tuning...

Read only

former_member150733
Contributor
0 Likes
11,888

'Describe' can be used to get hte attributre values of the internal table.

In your case V_LCNT1 contains the number of records or lines in the internal table gt_admin.

Regards,

Anish Thomas

Read only

Former Member
11,889

Hi Kirti,

This statement determines some properties of the internal table itab and assigns them to the specified variables. The various additions enable you to determine the table type, the number of currently filled rows and the initial memory requirement.

In addition, the system fields sy-tfill and sy-tleng are filled with the current number

of table rows and the length of a table row in bytes.

Regards

Aneesh.

Read only

Former Member
11,888

Hello,

Describe statement is mainly used to get the number of record in the itab.

for example.

If itab has 5 records.

Then

data: lv_lines type i.

describe table itab lines lv_lines.

write: lv_lines.

Now in the output u will see 5.

Hope this helps you.

Vasanth