SAP SCROLLING_IN_TABLE Function Module for Scroll internal tables according to SAP Style Guide
SCROLLING_IN_TABLE is a standard scrolling in table SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Scroll internal tables according to SAP Style Guide processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.
See here to view full function module documentation and code listing for scrolling in table FM, simply by entering the name SCROLLING_IN_TABLE into the relevant SAP transaction such as SE37 or SE38.
Function Group: STAB
Program Name: SAPLSTAB
Main Program: SAPLSTAB
Appliation area: *
Release date: 15-Dec-1994
Mode(Normal, Remote etc): Normal Function Module
Update:
Function SCROLLING_IN_TABLE pattern details
In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.CALL FUNCTION 'SCROLLING_IN_TABLE'"Scroll internal tables according to SAP Style Guide.
EXPORTING
* ENTRY_ACT = 0 "Starting index
* ENTRY_FROM = 1 "Start of table substructure
ENTRY_TO = "End of table substructure
* LAST_PAGE_FULL = 'X' "Indicator whether last page is full
LOOPS = "Number of entries per page
* OK_CODE = ' ' "Function code for scroll operation
* OVERLAPPING = ' ' "Indicator for overlapping scrolling
* PAGE_ACT = 0 "Start page
* PAGE_GO = 0 "Target page
IMPORTING
ENTRIES_SUM = "Total number of entries of the table (sub-) structure
ENTRY_NEW = "Index of first entry to be output
PAGES_SUM = "Total no. of pages
PAGE_NEW = "Page scrolled to
EXCEPTIONS
NO_ENTRY_OR_PAGE_ACT = 1 NO_ENTRY_TO = 2 NO_OK_CODE_OR_PAGE_GO = 3
IMPORTING Parameters details for SCROLLING_IN_TABLE
ENTRY_ACT - Starting index
Data type: SY-TABIXOptional: Yes
Call by Reference: No ( called with pass by value option)
ENTRY_FROM - Start of table substructure
Data type: SY-TABIXDefault: 1
Optional: Yes
Call by Reference: No ( called with pass by value option)
ENTRY_TO - End of table substructure
Data type: SY-TABIXOptional: No
Call by Reference: No ( called with pass by value option)
LAST_PAGE_FULL - Indicator whether last page is full
Data type:Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
LOOPS - Number of entries per page
Data type: SY-TABIXOptional: No
Call by Reference: No ( called with pass by value option)
OK_CODE - Function code for scroll operation
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
OVERLAPPING - Indicator for overlapping scrolling
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
PAGE_ACT - Start page
Data type: SY-TABIXOptional: Yes
Call by Reference: No ( called with pass by value option)
PAGE_GO - Target page
Data type: SY-TABIXOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for SCROLLING_IN_TABLE
ENTRIES_SUM - Total number of entries of the table (sub-) structure
Data type: SY-TABIXOptional: No
Call by Reference: No ( called with pass by value option)
ENTRY_NEW - Index of first entry to be output
Data type: SY-TABIXOptional: No
Call by Reference: No ( called with pass by value option)
PAGES_SUM - Total no. of pages
Data type: SY-TABIXOptional: No
Call by Reference: No ( called with pass by value option)
PAGE_NEW - Page scrolled to
Data type: SY-TABIXOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NO_ENTRY_OR_PAGE_ACT - no start index or page specified
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_ENTRY_TO - End of table substructure is zero
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_OK_CODE_OR_PAGE_GO - no function code or target page specified
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for SCROLLING_IN_TABLE Function Module
The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.DATA: | ||||
lv_entry_act | TYPE SY-TABIX, " 0 | |||
lv_entries_sum | TYPE SY-TABIX, " | |||
lv_no_entry_or_page_act | TYPE SY, " | |||
lv_entry_new | TYPE SY-TABIX, " | |||
lv_entry_from | TYPE SY-TABIX, " 1 | |||
lv_no_entry_to | TYPE SY, " | |||
lv_entry_to | TYPE SY-TABIX, " | |||
lv_pages_sum | TYPE SY-TABIX, " | |||
lv_no_ok_code_or_page_go | TYPE SY, " | |||
lv_page_new | TYPE SY-TABIX, " | |||
lv_last_page_full | TYPE SY, " 'X' | |||
lv_loops | TYPE SY-TABIX, " | |||
lv_ok_code | TYPE SY, " SPACE | |||
lv_overlapping | TYPE SY, " SPACE | |||
lv_page_act | TYPE SY-TABIX, " 0 | |||
lv_page_go | TYPE SY-TABIX. " 0 |
  CALL FUNCTION 'SCROLLING_IN_TABLE' "Scroll internal tables according to SAP Style Guide |
EXPORTING | ||
ENTRY_ACT | = lv_entry_act | |
ENTRY_FROM | = lv_entry_from | |
ENTRY_TO | = lv_entry_to | |
LAST_PAGE_FULL | = lv_last_page_full | |
LOOPS | = lv_loops | |
OK_CODE | = lv_ok_code | |
OVERLAPPING | = lv_overlapping | |
PAGE_ACT | = lv_page_act | |
PAGE_GO | = lv_page_go | |
IMPORTING | ||
ENTRIES_SUM | = lv_entries_sum | |
ENTRY_NEW | = lv_entry_new | |
PAGES_SUM | = lv_pages_sum | |
PAGE_NEW | = lv_page_new | |
EXCEPTIONS | ||
NO_ENTRY_OR_PAGE_ACT = 1 | ||
NO_ENTRY_TO = 2 | ||
NO_OK_CODE_OR_PAGE_GO = 3 | ||
. " SCROLLING_IN_TABLE |
ABAP code using 7.40 inline data declarations to call FM SCROLLING_IN_TABLE
The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8."SELECT single TABIX FROM SY INTO @DATA(ld_entry_act). | ||||
"SELECT single TABIX FROM SY INTO @DATA(ld_entries_sum). | ||||
"SELECT single TABIX FROM SY INTO @DATA(ld_entry_new). | ||||
"SELECT single TABIX FROM SY INTO @DATA(ld_entry_from). | ||||
DATA(ld_entry_from) | = 1. | |||
"SELECT single TABIX FROM SY INTO @DATA(ld_entry_to). | ||||
"SELECT single TABIX FROM SY INTO @DATA(ld_pages_sum). | ||||
"SELECT single TABIX FROM SY INTO @DATA(ld_page_new). | ||||
DATA(ld_last_page_full) | = 'X'. | |||
"SELECT single TABIX FROM SY INTO @DATA(ld_loops). | ||||
DATA(ld_ok_code) | = ' '. | |||
DATA(ld_overlapping) | = ' '. | |||
"SELECT single TABIX FROM SY INTO @DATA(ld_page_act). | ||||
"SELECT single TABIX FROM SY INTO @DATA(ld_page_go). | ||||
Search for further information about these or an SAP related objects