Program to show records in internal table form a custom table in SAP

 Program: 

*&---------------------------------------------------------------------*
*& Report ZSM_IT
*&---------------------------------------------------------------------*
*&
*&---------------------------------------------------------------------*
REPORT ZSM_IT.

TYPES: BEGIN OF zsm_tablez,
  id type int4,
  var1 type int4,
  var2 type int4,
  end of zsm_tablez.

 data: it type STANDARD TABLE OF zsm_tablez,
       wa type zsm_tablez.

  select id var1 var2 from zsm_tablez INTO table it.

loop at it INTO wa.
  write:/ wa-id, wa-var1, wa-var2.
  endloop.


Output: 


                                


Post a Comment

0 Comments