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: 

To create 'multiple selction'

Former Member
0 Kudos

Hi all

I want to give a multiple selection option for a particular dictionary field where i will have the option of single values ,ranges,exclude single values and exclude ranges.

regards

jindow joseph.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Joseph,

you can define a selection screen in the top-include of your dialog-program.

for example:

DATA: sub_9050_1_dynnr LIKE sy-dynnr VALUE '9051'.

SELECTION-SCREEN BEGIN OF SCREEN 9051 AS SUBSCREEN NO INTERVALS.

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN: COMMENT 1(8) text-042.

SELECT-OPTIONS: o_kostl FOR wa_csks-kostl.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN END OF SCREEN 9051.

Next step:

In your main-dynpro/subscreen you define a subscreen-area with the screen-painter.

Give it the name SUB_9050_1 (for this example)

At pbo of your dynpro you call:

PROCESS BEFORE OUTPUT.

[...

MODULE status_9050.

...]

CALL SUBSCREEN sub_9050_1 INCLUDING 'name_of_program' sub_9050_1_dynnr.

*

PROCESS AFTER INPUT.

CALL SUBSCREEN sub_9050_1.

...

('name_of_program' = 'SAPxZxyz' name of dialog-program)

Now in your dialog-program-dynpro in the subscreen-area the field appears with

sap-standard select-options as if in a report.

regards

Reinhold

11 REPLIES 11

Former Member
0 Kudos

Hi,

DO this..

1) when your user-prompt comes..press f4 at user entry.

then click on filter.

2) there will be an screen..see the right of it..there will be yellow arrow in box. click that..then see the 4th tab.

<b>Reward points</b>

Regards

0 Kudos

I am sorry.. I want to creat that yellow arrow in a box using screen programming...

I want to know how to create it....

regards

jindow joseph.

0 Kudos

Hi,

You mean to say you want to create something like a SELECT-OPTIONS in a normal dialog screen.

This is not possible. What you can do is you can create a selection-screen where in you can create select-options and then you can use CALL SELECTION-SCREEN to call that.

Regards,

Sesh

0 Kudos

i want to somehow create this yellow button in the box so that i will have the option of multiple selection... how do i do it..?

regards

jindow.

0 Kudos

Hi,

WHat is the type of your Program, I mean is it a Module pool program or Report or what kind?

This Yellow button comes only in SELECTION-SCREENS and when you use SELECT-OPTIONS in the SELECTION-SCREEN, if you want this then you have to use a selection screen there is no option to create this on your own in a normal screen.

Regards,

Sesh

0 Kudos

on a particular situation i would be calling a modal dialogue screen ... I would be calling a fn module from which the call to this screen would be made.and this screen would be in the same function group.

regards

jindow

0 Kudos

Hi Jindow,

Itsn ot possible to create select-options kind of a screen element in a normal screen. Select-options is only possible in Selection-Screens which can be created only in Executable programs. (In function groups or Module pool programs we can only create normal screens) It is not possible to have this kind of option in a normal screen.

What you can do is create an executable program and then there provide this option using Selection-Screen and in your Function module you can think of using CALL TRANSACTION to call this report program.

Regards,

Sesh

0 Kudos

Hi,

When you use the select option with NO INTERVALS you will get only one INPUT box for the select option.

ANd when you click on the button next to it you will get all this options.

And there is also a button to provide Multiple selection.

Regards,

Sesh

Former Member
0 Kudos

Hi Joseph,

you can define a selection screen in the top-include of your dialog-program.

for example:

DATA: sub_9050_1_dynnr LIKE sy-dynnr VALUE '9051'.

SELECTION-SCREEN BEGIN OF SCREEN 9051 AS SUBSCREEN NO INTERVALS.

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN: COMMENT 1(8) text-042.

SELECT-OPTIONS: o_kostl FOR wa_csks-kostl.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN END OF SCREEN 9051.

Next step:

In your main-dynpro/subscreen you define a subscreen-area with the screen-painter.

Give it the name SUB_9050_1 (for this example)

At pbo of your dynpro you call:

PROCESS BEFORE OUTPUT.

[...

MODULE status_9050.

...]

CALL SUBSCREEN sub_9050_1 INCLUDING 'name_of_program' sub_9050_1_dynnr.

*

PROCESS AFTER INPUT.

CALL SUBSCREEN sub_9050_1.

...

('name_of_program' = 'SAPxZxyz' name of dialog-program)

Now in your dialog-program-dynpro in the subscreen-area the field appears with

sap-standard select-options as if in a report.

regards

Reinhold

0 Kudos

Actually it is possible to do this yourself in dialog programming.

First define a pushbutton on the screen (use "ICON_ENTER_MORE" if you want a similar look) and give it a function code as per usual... then in the user command in the PAI you can call a function to deliver the popup you need - the example below is for a date range selection.

form complex_selections.                                                
*
* Invoke complex search criteria popup
*
  ranges:                                                               
    lr_datum        for sy-datum.                                                                                
call function 'COMPLEX_SELECTIONS_DIALOG'                             
       exporting                                                        
            text      = 'Some text'                                     
       tables                                                           
            range     = lr_datum                                        
       exceptions                                                       
            cancelled = 0                                               
            others    = 1.                                                                                
if not sy-subrc is initial.                                           
    clear: lr_datum, lr_datum[].                                        
  endif.                                                                
 
endform.

0 Kudos

Hi Jonathan Coleman

You suggested the perfect solution.

It makes me grin like a Cheshire cat. <b>:)</b>

Regards

Jindow Joseph