Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

ALV Count

Hello!

How can I sum up in 'REUSE_ALV_DISPLAY_LIST' CHARS or STRINGS? I need to know how many entries I have in the table.

Thank you!

Tags:
Former Member
replied

sy-loopc or used discribe table itab by lines v_num.

DATA: BEGIN OF LINE,

COL1 TYPE I,

COL2 TYPE I,

END OF LINE.

DATA ITAB LIKE HASHED TABLE OF LINE WITH UNIQUE KEY COL1

INITIAL SIZE 10.

DATA: LIN TYPE I,

INI TYPE I,

KND TYPE C.

DESCRIBE TABLE ITAB LINES LIN OCCURS INI KIND KND.

WRITE: / LIN, INI, KND.

DO 1000 TIMES.

LINE-COL1 = SY-INDEX.

LINE-COL2 = SY-INDEX ** 2.

INSERT LINE INTO TABLE ITAB.

ENDDO.

DESCRIBE TABLE ITAB LINES LIN OCCURS INI KIND KND.

WRITE: / LIN, INI, KND.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question