Application Development 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: 

Fill a table in my screen

former_member215107
Active Participant
0 Kudos

Desar All,

From a Parameter, i want to display a table.

Here my code:

SELECTION-SCREEN BEGIN OF BLOCK block WITH FRAME TITLE text-100.

SELECTION-SCREEN: BEGIN OF LINE.

parameters : p_toto like table-toto.

SELECTION-SCREEN PUSHBUTTON 40(8) text-102 USER-COMMAND action_but.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN: BEGIN OF LINE.

SELECTION-SCREEN COMMENT 1(79) dis_01.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN: BEGIN OF LINE.

SELECTION-SCREEN COMMENT 1(79) dis_02.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN: BEGIN OF LINE.

SELECTION-SCREEN COMMENT 1(79) dis_03.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN: BEGIN OF LINE.

SELECTION-SCREEN COMMENT 1(79) dis_04.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN: BEGIN OF LINE.

SELECTION-SCREEN COMMENT 1(79) dis_05.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN: BEGIN OF LINE.

SELECTION-SCREEN COMMENT 1(79) dis_06.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN: BEGIN OF LINE.

SELECTION-SCREEN COMMENT 1(79) dis_07.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN: BEGIN OF LINE.

SELECTION-SCREEN COMMENT 1(79) dis_08.

SELECTION-SCREEN END OF LINE.

AT SELECTION-SCREEN.

  • i read my table

SELECT * FROM table UP TO 1 ROWS

WHERE toto = p_toto AND

titi = 'A'.

ENDSELECT.

  • i format the wanted information

concatenate

table-toto table-titi table-toto table-tutu into comment_string.

  • and i filled:

whîle ...

integer = integer + 1.

case integer.

when 1.

move comment_tmp to dis_01.

when 2.

move comment_tmp to dis_02.

when 3.

move comment_tmp to dis_03.

when 4.

move comment_tmp to dis_04.

when 5.

move comment_tmp to dis_05.

when 6.

move comment_tmp to dis_06.

when 7.

move comment_tmp to dis_07.

when 8.

move comment_tmp to dis_08.

Have you an other way to fill a table in my screen ?

thanks a lot

Rodolphe.

1 ACCEPTED SOLUTION

guilherme_frisoni
Contributor
0 Kudos

Hi,

change AT SELECTION-SCREEN. for AT SELECTION-SCREEN OUTPUT..

Frisoni

4 REPLIES 4

guilherme_frisoni
Contributor
0 Kudos

Hi,

change AT SELECTION-SCREEN. for AT SELECTION-SCREEN OUTPUT..

Frisoni

Former Member
0 Kudos

Hi

What's INTEGER?

U should place your code in AT SELECTION-SCREEN OUTPUT event instead of AT SELECTION-SCREEN

Max

former_member215107
Active Participant
0 Kudos

I use integer to display line by line my table.

Ok, i try with selection screen output but i don't know how i can display my table easily.

Rodolphe.

0 Kudos

Hi

What I can't understand is how u can decide to fill the lines (from 1 to 😎 of the selection-scrren.

It seems u're using a counter INTEGER, so that means the user has to press enter to fill a single line, so he needs to press it for 8 times in order to fill all lines.

If you need to fill all lines at the same time, u should insert your conde into SELECT/ENDSELECT stamanet, but u're using the option UP TO 1 ROWS so your select is like a SELECT SINGLE, so which is your issue?

Max