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 the data in selection screen in module pool programming

Former Member
0 Likes
2,220

Hi experts,

I am using a selection screen as a sub-screen in second screen of module pool programming.

screen one has create change and display options.

At the time of creation i am ok with the selection screen in second screen.

At the time of Change and Display mode i want to get the data from database and to be displayed in the selection screen. Getting the data from the database is ok but unable to display the data in the selection screen fields. Main problem is when the record is created with the multiple entries in selection screen, i.e,  by using the arrow button in selection screen.  how the data to be displayed for such records.

Thanks in advance.

1 ACCEPTED SOLUTION
Read only

Patrick_vN
Active Contributor
0 Likes
1,226

First question.. what do you mean by 'selection screen'? Is that a screen defined by the SELECTION-SCREEN command? Or something else.

As far as the rest goes, it should not be that complicated. Often you have 2 structures. One of them is bound field by field to the different elements of your screen, the second has your data (either directly from the database, or from an internal table ). In the PBO you transfer the data from the 'data'-structure to the 'screen'-structure. In the PAI it goes the other way around (only in case of editable fields ofc).

So after pressing your arrow, you only have to read the next (or previous) record of the internal table in your 'data'- structure.

And why 2 structures? Because often they are not exactly alike..

Hi experts,

I am using a selection screen as a sub-screen in second screen of module pool programming.

screen one has create change and display options.

At the time of creation i am ok with the selection screen in second screen.

At the time of Change and Display mode i want to get the data from database and to be displayed in the selection screen. Getting the data from the database is ok but unable to display the data in the selection screen fields. Main problem is when the record is created with the multiple entries in selection screen, i.e,  by using the arrow button in selection screen.  how the data to be displayed for such records.

Thanks in advance.

3 REPLIES 3
Read only

Patrick_vN
Active Contributor
0 Likes
1,227

First question.. what do you mean by 'selection screen'? Is that a screen defined by the SELECTION-SCREEN command? Or something else.

As far as the rest goes, it should not be that complicated. Often you have 2 structures. One of them is bound field by field to the different elements of your screen, the second has your data (either directly from the database, or from an internal table ). In the PBO you transfer the data from the 'data'-structure to the 'screen'-structure. In the PAI it goes the other way around (only in case of editable fields ofc).

So after pressing your arrow, you only have to read the next (or previous) record of the internal table in your 'data'- structure.

And why 2 structures? Because often they are not exactly alike..

Read only

0 Likes
1,226

Thanks for the reply Patrick.

yes selection screen is a subscreen 210 used in the screen 200 which is defined by the statement selection- screen begin of screen 210 as subscreen.

At time of input i click on arrow and enter the data and click on save the data saves.

I should get the same data in change mode and in display mode.

Read only

0 Likes
1,226

Any special reason for using a selection screen? Displaying data in a module pool is generally done in dynpro's (not web-dynpro's ofc).

Anyway, you should populate the fields of your selection/sub screen with the data of your 'current record'. The contents of the 'current record' are changed to the next/previous record of the internal table when a button is pressed..