SQL Server administration and T-SQL development, Web Programming with ASP.NET, HTML5 and Javascript, Windows Phone 8 app development, SAP Smartforms and ABAP Programming, Windows 7, Visual Studio and MS Office software SAP ABAP Programming and HANA Database Tutorials
Development resources, articles, tutorials, code samples and tools and downloads for ASP.Net, SQL Server, R Script, Windows, Windows Phone, AWS, SAP HANA and ABAP, like SAP UI5, Screen Personas, etc.

Install SAP Free

ABAP Code to Display SAP Table Contents

Here is a simple sample ABAP code and ABAP program source code which displays the contents of an SAP table on screen.


  gs_saplane TYPE saplane,
  gt_saplane TYPE TABLE OF saplane.

SELECT * FROM saplane INTO TABLE gt_saplane.

LOOP AT gt_saplane INTO gs_saplane.
  WRITE: /

In the above ABAP code the SAP table SAPLANE is being used.
The ABAP code is making a selection using SELECT command in order to select table contents.
In the ABAP LOOP AT command, using the ABAP WRITE statement we display table contents one row at a time.
Table display in ABAP can be managed by similar codes in small SAP tables where table data is not causing too much LOOP.


You can also limit the number of rows or number of SAP table lines by using the UP TO n ROWS syntax within SELECT ABAP code.
This is equal to SELECT TOP n syntax in T-SQL on SQL Server.

SELECT * FROM saplane
  INTO TABLE gt_saplane UP TO 3 ROWS.

SAP Resources

SAP Tutorial

SAP Forums

SAP Tools

SAP Transaction Codes Table

Meetup Sunumu 1 meetup

Copyright © 2004 - 2020 Eralper YILMAZ. All rights reserved.
Community Server by Telligent Systems