The Insider‘s Guide to Resizing and Configuring ABAP Table Controls

As an SAP ABAP developer, mastering table controls is a must for delivering optimized data entry and analysis capabilities. Table controls provide powerful features for adjusting field widths, row heights, responsive layouts, and more.

In this comprehensive guide, we’ll explore 8 key techniques for resizing, configuring, and enhancing ABAP table controls for peak flexibility and performance.

1. Enable Automatic Column Resizing

The most basic table control resize capability is automatic column widening/shrinking as users adjust screen sizes:

CONTROLS: my_table TYPE TABLEVIEW USING SCREEN 100.  

my_table-resizable = abap_true.

With that single property, columns stretch and contract to match available width.

Tip: For field readability, set minimum widths with column_min_width. And use column_resize_unity [in pixels] to increment by ~5px vs. 1px for less jumpy resizing.

Here‘s a screenshot mid-resize with these configs enabled:

Animated GIF of column resize

Table control with auto column resizing

And the result snaps columns to optimized widths:

Table control with resized columns

This auto-resize can also be disabled by setting my_table-resizable = abap_false.

2. Allow Row Height Adjustments

Beyond width, users can resize individual row heights with:

my_table-row_resizable = abap_true.

Row height also uses row_resize_unity for snap increments.

Note multi-line rows don‘t support resizing. Height locks automatically if text wrapping occurs.

3. Persist Personalized Sizing

Don’t make users endlessly resize their optimized views!

Save sizing preferences with:

GET CURSOR LINE sy-stepl. 

my_table-lines_optimal = sy-stepl. " Saves vertical size  

DESCRIBE TABLE my_table.
my_table-columns_optimal = sy-fdpos. " Saves horizontal size

Next session, their profiled heights and widths load automatically.

4. Allow Column Reordering

Beyond resizing, columns can be reordered with drag-and-drop simplicity:

my_table-column_movable = abap_true.

No more being stuck with poor initial orderings!

5. Use Toolbars for Advanced Interactions

Enable toolbars with specialized buttons for:

  • Hiding/Unhiding columns
  • Selecting columns
  • Freezing left + right most columns
  • Sorting
  • Exporting, Printing
  • Layout switching
  • Searching rows

All activated via:

my_table-toolbar_mode = true.

Table control with toolbar example

For full customization, build your own specialized runtime toolbar.

6. Allow Editing Within Cells

Make entire rows/cells editable for data entry. No need tonavigate to separate edit screens:

my_table-edit_mode = abap_true.

Offers:

  • Inline input
  • Validation checks
  • Dropdowns
  • Date pickers, and more!

Table control in edit mode animation

Inline editing table control

7. Configure Mobile-Friendly Column Stackling

On smaller mobile screens, horizontally scrolling through dozens of columns is impractical.

Instead automatically stack columns vertically with:

my_table-vertical_scrolling = abap_true.

Column stacking mobile layout

The result focuses on a few key fields at a time – optimized for touch and swipes.

8. Design for Accessibility

Ensure table controls work for all users by:

  • Using proper contrast ratios and color palettes
  • Allowing full keyboard navigation and control
  • Adding aria tags, alt text for screen readers
  • Testing with disabled user groups
  • Following Web Content Accessibility Guidelines
my_table-cell_disabled_color = ... . " Visible with color blindness

my_table-cell_disabled_font = ... . "Bigger touch target fonts 

Over 75% of Fiori apps now meet accessibility standards – modernizing UIs protects disabled users.

Go Forth and Build Flexible Data Views!

While old SAPGUI step loops provided only basic grids, modern table controls enable responsive, user-centric data representations.

Follow these 8 tips to build ABAP apps ready for any resolution, device, or user ability level unlocking the full potential of SAP data.

What strategies have you used to maximize table control flexibility? Share your experiences below!

Read More Topics