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

Select-options "multiple selection" button in subscreen

Former Member
0 Likes
3,107

Hi experts,

I created a subscreen containing a select-options. This subscreen is then called on my selection screen.

The F4 help is working fine but nothing happens when I click the "multiple selection" button.

Is there a way to make it work without COMPLEX_SELECTIONS_DIALOG??

Here is a sample code:

SELECTION-SCREEN: BEGIN OF SCREEN 501 AS SUBSCREEN,
BEGIN OF LINE,
COMMENT (21) text-306 FOR FIELD s_pay01.
SELECT-OPTIONS s_pay01 FOR XXXXXX.
SELECTION-SCREEN: END OF LINE,
END OF SCREEN 501.

Flow logic:

PROCESS BEFORE OUTPUT.
  MODULE SET_STATUS.
   call subscreen sscr_0500 including sy-repid '0501'.
PROCESS AFTER INPUT.
   MODULE EXIT_PRG AT EXIT-COMMAND.
   call subscreen sscr_0500.
  MODULE ACC_USER_CHOICE.

Hi experts,

I created a subscreen containing a select-options. This subscreen is then called on my selection screen.

The F4 help is working fine but nothing happens when I click the "multiple selection" button.

Is there a way to make it work without COMPLEX_SELECTIONS_DIALOG??

Here is a sample code:

SELECTION-SCREEN: BEGIN OF SCREEN 501 AS SUBSCREEN,
BEGIN OF LINE,
COMMENT (21) text-306 FOR FIELD s_pay01.
SELECT-OPTIONS s_pay01 FOR XXXXXX.
SELECTION-SCREEN: END OF LINE,
END OF SCREEN 501.

Flow logic:

PROCESS BEFORE OUTPUT.
  MODULE SET_STATUS.
   call subscreen sscr_0500 including sy-repid '0501'.
PROCESS AFTER INPUT.
   MODULE EXIT_PRG AT EXIT-COMMAND.
   call subscreen sscr_0500.
  MODULE ACC_USER_CHOICE.

6 REPLIES 6
Read only

ipravir
Active Contributor
0 Likes
1,821

Hi Antoine,

Can you share COMPLEX_SELECTIONS_DIALOG FM code?

Because i check with a test program, and Multiple selection is working fine for me. Please find below code what i have used.

ranges: gt_matnr for MARA-matnr.

tab_and_field-fieldname   = 'MATNR'.

tab_and_field-tablename  = 'MARA'.

CALL FUNCTION 'COMPLEX_SELECTIONS_DIALOG'

      EXPORTING

        title             = 'Selection'               

        text              = 'Please select'

        tab_and_field     = tab_and_field

      TABLES

        range             = gt_matnr

      EXCEPTIONS

        no_range_tab      = 1

        cancelled         = 2

        internal_error    = 3

        invalid_fieldname = 4

        OTHERS            = 5.

Regards,

Praveer.

Read only

Former Member
0 Likes
1,821

Hi Praveer,

Thank you for your quick answer.

My question is: is it possible to have a multiple selection without explicitly calling FM COMPLEX_SELECTIONS_DIALOG??

When the select-options is on my selection screen, everything works fine. But when I place it in a subscreen and call it, the only thing that works is the value request for low and high value... It is like no event is triggered when I click on the "multiple selection" button!

Thank you for your help,

Antoine

Read only

ipravir
Active Contributor
0 Likes
1,821

Hi Antoine,

write selection-screen statement as below.

SELECTION-SCREEN: BEGIN OF SCREEN 0501 AS SUBSCREEN,


screen number should be full.


You have declare as 501, but when you calling it's 0501.


and in PBO, you have declare as


call subscreen sscr_0500. (but screen no is 501)


Please find below code.


SELECTION-SCREEN: BEGIN OF SCREEN 0100 AS SUBSCREEN.

SELECT-OPTIONS: so_matnr FOR mara-matnr.

SELECTION-SCREEN: END OF SCREEN 0100.

PROCESS BEFORE OUTPUT.

  MODULE status_9000.

  CALL SUBSCREEN subscreen INCLUDING sy-repid '0100'.

PROCESS AFTER INPUT.

  CALL SUBSCREEN subscreen.

MODULE USER_COMMAND_9000.



Regards,

Praveer.

Read only

Former Member
0 Likes
1,821

Hi Praveer,

Thank you very much for your answer, my problem is almost solved!

Now the multiple selection dialog appears when I click the button. The only thing that does not works is the F4 help IN the multiple selection dialog (the "on value request" event on low and high value still works perfectly). Do you have any idea how to fix this?

Regards,

Antoine

Read only

ipravir
Active Contributor
0 Likes
1,821

Hi Antonie,

You can create a search help object in SE11 and assign the same through match code object for the input field.

SELECTION-SCREEN: BEGIN OF SCREEN 0100 AS SUBSCREEN.

SELECT-OPTIONS: so_matnr FOR mara-matnr MATCHCODE OBJECT MAT1.

SELECTION-SCREEN: END OF SCREEN 0100.

Regards

Praveer

Read only

0 Likes
1,821

Hi,

Try,

FM  f4_if_int_table_value_request.

AT SELECTION-SCREEN ON field-low.

perform f4_content.

AT SELECTIOn-SCREEN ON field-high.

perform f4_content.


View the link.


Hope it helpful,


Regards,

Venkat.