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

Add multiple selection screen

Former Member
0 Likes
1,808

Hi!

I've set up an initial screen (selection screen) in my dynpro-program, with company code (BUKRS) as input field. This screen has been developed using the Screen Painter and is of the screen type 'Normal'.

I have managed to add a search help to the input field, but how can I <b>add a multiple selection screen</b> to it?

Thank you for all your help!

- Mari Virik

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,316

Hi!

Thank you for helping me - but I'm not sure my explaination was sufficient enough...

When you create a selection screen in the old fashion way (with SELECTION-SCREEN ... and SELECT-OPTIONS) and <b>leave out</b> the NO INTERVALS / NO EXTENSION statements, the <b>"Multiple selection" button</b> will appear for the input field in question.

Is it possible to add a similar multiple selection functionality for my BUKRS input field? Isn't this multiple selection screen a <b>standard function</b>?

- Mari

6 REPLIES 6
Read only

Former Member
0 Likes
1,316

HI,

when company code is entered and executed.... u can create other screen with selection parameters and call the screen if user press executed.

if pa_bukrs is not initial.

call screen 100.

else.

Message eneter company code.

endif.

in screen 100, u can write ur logic in PBO and PAI modules.

Regards

CNU

Read only

Former Member
0 Likes
1,317

Hi!

Thank you for helping me - but I'm not sure my explaination was sufficient enough...

When you create a selection screen in the old fashion way (with SELECTION-SCREEN ... and SELECT-OPTIONS) and <b>leave out</b> the NO INTERVALS / NO EXTENSION statements, the <b>"Multiple selection" button</b> will appear for the input field in question.

Is it possible to add a similar multiple selection functionality for my BUKRS input field? Isn't this multiple selection screen a <b>standard function</b>?

- Mari

Read only

0 Likes
1,316

Hi Mari. The easiest solution is to define the selection screen as a subscreen, and then simply embed the subscreen in your dynpro. You will get all of the functionality that is required for SELECT-OPTIONS and you don't have to code it. Here is a example program.



report zrich_0006 .

tables: mara.

* Custom Selection Screen 1010
selection-screen begin of screen 1010 as subscreen.
selection-screen begin of block b1 with frame title text-001.
parameters: p_rad1 radiobutton group grp1 default 'X',
            p_rad2 radiobutton group grp1,
            p_rad3 radiobutton group grp1.
select-options: s_matnr for  mara-matnr,
                s_matkl for  mara-matkl,
                s_mtart for  mara-mtart.
selection-screen end of block b1.
selection-screen end of screen 1010.


start-of-selection.

  call screen 100.
*&---------------------------------------------------------------------*
*&      Module  STATUS_0100  OUTPUT
*&---------------------------------------------------------------------*
module status_0100 output.
*  SET PF-STATUS 'xxxxxxxx'.
*  SET TITLEBAR 'xxx'.

endmodule.
*&---------------------------------------------------------------------*
*&      Module  USER_COMMAND_0100  INPUT
*&---------------------------------------------------------------------*
module user_command_0100 input.

endmodule.


* Screen screen 100 with a subscreen area called "subscreen_1010"
* Screen Flow Logic follows

*process before output.
*
*  module status_0100.
*
*  call subscreen subscreen_1010 including sy-repid '1010'.
*
*process after input.
*
*  call subscreen subscreen_1010 .
*
*  module user_command_0100.

Regards,

Rich Heilman

Read only

0 Likes
1,316

HI,

Create button beside BUKRS field.

and use FM <b>K_CMPERS_MULTIPLE_SELECTION</b> when the button is pressed.

this FM provides u a multiple selection screen. Use 'R' for Fieldtype.

***************************************

data: parm like cmpersdata occurs 0.

call screen 300.

&----


*& Module USER_COMMAND_0300 INPUT

&----


  • text

----


module USER_COMMAND_0300 input.

case sy-ucomm.

when 'MULT'.

CALL FUNCTION 'K_CMPERS_MULTIPLE_SELECTION'

EXPORTING

p_fieldtype = 'R'

p_fieldname = 'MATNR'

p_tablename = 'MARA'

tables

pt_parm = parm

.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

endcase.

endmodule. " USER_COMMAND_0300 INPUT

********************************************************

Regards

CNU

Read only

Former Member
0 Likes
1,316

u can do that...in ur code write as no-intervals.

Read only

Former Member
0 Likes
1,316

Thank you very much