Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to display data using table control in dialog programming?

Former Member
0 Likes
997

Hi Experts,

Would like to seek for your help and guidance. I've a requirement whereby to display the records in a table

on the screen '0200' via dialog programming. Please guide me. Thanks.

Scenario:

After the program has retrieve from the database and there are total of 9 records. In the screen '0200', the table are

only allow to view 6 records maximum at a time. The program should display 3 records and user need to use the

scroll bar to scroll up to view the remaining 6 records.

Regards,

Shawn

Moderator message: "spec dumping", please work yourself first on your requirement.

Message was edited by: Thomas Zloch

3 REPLIES 3
Read only

Former Member
0 Likes
660

hi,

Use table control  in menu painter. design the layout

  declare table control using below

CONTROLS tc1 TYPE TABLEVIEW USING SCREEN 200

declare internal table for records u want display

design the table control using the dictionary/program fields. select the fields u want drag in table control.

fill the internal table in the program.

loop at internal table in PBO as well as PAI as below.

  PROCESS BEFORE OUTPUT.

* MODULE INITIALIZATION_0101.
MODULE STATUS_0101.

LOOP AT IT_DATA_ITEM INTO T_DATA_ITEM
  WITH CONTROL TC1 CURSOR TC1-CURRENT_LINE.

ENDLOOP.

for scrolling

use tc-lines = tc-lines + sy-tabix.

Read only

Former Member
0 Likes
660

This is very basic Module Pool Programming.

Please search the forum before posting a question.

Read only

bharat_rathod2
Active Participant
0 Likes
660

dear,

Just do 1 thing create table control with wizard and adjust table control size to allow 6 records.