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: 

SELECT-OPTIONS in Module Pool Sub-Screen

nishant_nayyar
Explorer
0 Kudos

Hi,

I have been working on a Module-Pool Development, in the header portion of the Screen, I have provided a Selection-Screen as a Sub-Screen because the requirement specifies to display a SELECT-OPTION in the Header Area.

Now the problem is that, when working with the Screen, as soon as I press <ENTER> the Main Screen re-calls the Selection-Screen in the Sub-Screen area and all the entries made in the Selection-Screen are reset/erased.

Kindly provide a solution either to stop the <ENTER> action to re-call the sub-screen. Or on any alternate method(s) to provide a SELECT-OPTION on a Module Pool based Screen UI.

-


MAIN SCREEN Code:
*****************************************************************
*  PROCESS BEFORE OUTPUT
*****************************************************************
PROCESS BEFORE OUTPUT.
*~  Set PF-STATUS and TiTLE for Screen 100
  MODULE status_0100.
*~  Call the Subscreen Dynamically
  CALL SUBSCREEN subscr1 INCLUDING sy-cprog gv_dynnr1.
  CALL SUBSCREEN subscr2 INCLUDING sy-cprog gv_dynnr2.


*****************************************************************
*  PROCESS AFTER INPUT
*****************************************************************
PROCESS AFTER INPUT.
*~  Handle the Exit Commands of Screen 100
  MODULE user_command_0100 AT EXIT-COMMAND.
*~  Handle the User Command(s) for screen 100
  MODULE user_action_0100.
  CALL SUBSCREEN subscr1.
  CALL SUBSCREEN subscr2.

-


So whenever <ENTER> is pressed, the PBO re-calls:

CALL SUBSCREEN subscr1 INCLUDING sy-cprog gv_dynnr1.

and the Selection-Screen is reset.

Regards,

Nishant Nayyar.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Haii Nishant,

This problem was earlier solved by one of the members and after going through it i have now created a select-option in the Subscreen. Just create two input fields, name them as if they were low and high (for convinience as in case of select-option).

U now need to create a table of type rstabfield.

Ex: gt_rstab_bukrs type rstabfield.

Now create a button and assign a Fcode for it. When you click on this button then u need to implement the ranges functionality as in select-option. For that use the following function module:

CALL FUNCTION 'COMPLEX_SELECTIONS_DIALOG'

EXPORTING

  • TITLE = ' '

TEXT = ''

SIGNED = 'X'

SEARCH_HELP = 'H_T001'

TAB_AND_FIELD = gt_rstab_bukrs

TABLES

RANGE = rg_bukrs1.

Hope it helps.

Best Regards,

rama

2 REPLIES 2

Former Member
0 Kudos

Haii Nishant,

This problem was earlier solved by one of the members and after going through it i have now created a select-option in the Subscreen. Just create two input fields, name them as if they were low and high (for convinience as in case of select-option).

U now need to create a table of type rstabfield.

Ex: gt_rstab_bukrs type rstabfield.

Now create a button and assign a Fcode for it. When you click on this button then u need to implement the ranges functionality as in select-option. For that use the following function module:

CALL FUNCTION 'COMPLEX_SELECTIONS_DIALOG'

EXPORTING

  • TITLE = ' '

TEXT = ''

SIGNED = 'X'

SEARCH_HELP = 'H_T001'

TAB_AND_FIELD = gt_rstab_bukrs

TABLES

RANGE = rg_bukrs1.

Hope it helps.

Best Regards,

rama

daniel_pietrosz
Explorer