Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How to declare one internal table without header line without using structures?

0
Posted

How to declare one internal table without header line without using structures?

0

Ans No, we cannot declare internal table without header line and without structure because it gives error ITAB cannot be a table, a reference, a string or contain any of these object. Code with Header without Structure TABLES : ZREKHA_EMP. DATA : ITAB LIKE ZREKHA_EMP OCCURS 0 WITH HEADER LINE. SELECT * FROM ZREKHA_EMP INTO CORRESPONDING FIELDS OF ITAB. APPEND ITAB. ENDSELECT. LOOP AT ITAB. WRITE : / ITAB-EMPNO, ITAB-EMPNAME,ITAB-DEPTNO. ENDLOOP. Code without Header with Structure TABLES : ZREKHA_EMP. DATA : BEGIN OF ITAB OCCURS 0, EMPNO LIKE XREKHA_EMP-EMPNO, EMPNAME LIKE XREKHA_EMP-EMPNAME, DEPTNO LIKE XREKHA_EMP-DEPTNO, END OF ITAB. SELECT * FROM ZREKHA_EMP INTO CORRESPONDING FIELDS OF ITAB. APPEND ITAB. ENDSELECT. LOOP AT ITAB. WRITE : / ITAB-EMPNO, ITAB-EMPNAME,ITAB-DEPTNO. ENDLOOP.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123