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

MULTIPLE SELECTION IN DIALOG PROGRAMMING

knitinkumarsethy
Explorer
1,713

Hello exports,

I need to provide an interface to user where he can Put multiple selected invoice number at a time. (Like multiple selection in select option). It should be done in dialog programming.

plz suggest me .

1 ACCEPTED SOLUTION
Read only

Emre_tr
Active Participant
883

Hi,

you can use this function module : 'COMPLEX_SELECTIONS_DIALOG' .

FORM call_dialog.

RANGES s_pernr FOR pa0001-pernr.

DATA tab_and_field TYPE rstabfield.

tab_and_field-tablename = 'PA0001'.

tab_and_field-fieldname = 'PERNR'.

s_pernr-sign = 'I'.

s_pernr-option = 'EQ'.

s_pernr-low = 12345.

APPEND s_pernr.

*-- ls_options for remove options

CALL FUNCTION 'COMPLEX_SELECTIONS_DIALOG'

EXPORTING

title = 'Personal Number'

*excluded_options = ls_options

tab_and_field = tab_and_field

TABLES

range = s_pernr.

ENDFORM.

3 REPLIES 3
Read only

Former Member
0 Likes
883

Hai ,

You can use RANGES or can use TYPE RANGE OF while declaring.

For eg:

DATA:it_invoice TYPE RANGE OF vbrk-vbeln,

. wa_invoice LIKE LINE OF it_invoice.

Now u need a bit of coding,

wa_invoice -sign = 'I'.

wa_invoice -option = 'BT'. i.e between

r_carrid_line-low = your screen fieldname inwhich the lower limit was selected

r_carrid_line-high = your screen fieldname inwhich the higher limit was selected.

APPEND wa_invoice TO it_invoice.

Now u can use this internal table IT_INVOICE in query using operator IN in the WHERE caluse as u use with select-options.

Or you can create a report program which has only a selection screen

You can EXPORT the object(select option name) to ur dialog program using IMPORT/EXPORT MEMORY ID .

But you need to declare the select options in ur dialog program with the same name and the structure

DATA: BEGIN OF rtab OCCURS {10|n},

sign TYPE c LENGTH 1,

option TYPE c LENGTH 2,

low LIKE dobj,

high LIKE dobj,

END OF rtab.

Thanks,

Neeraj

Read only

Former Member
0 Likes
883

Hi,

you can use selection-screens in a subscreen of a dynpro:

1) define a subscreen (called subsi in this example)

in your dynpro (called 0100 in this example)

2) define the selection-screen in your programm like this:

SELECTION-SCREEN BEGIN OF SCREEN 101 AS SUBSCREEN.

SELECT-OPTIONS: s_parm1 FOR ztable-parm1,

s_parm2 FOR ztable-parm2.

SELECTION-SCREEN END OF SCREEN 101.

3) define your PAI and PBO-moduls like this:

PROCESS BEFORE OUTPUT.

MODULE status_0100.

CALL SUBSCREEN subi INCLUDING sy-cprog '0101'.

PROCESS AFTER INPUT.

CALL SUBSCREEN subi.

Kindly regards,

Stefan

Read only

Emre_tr
Active Participant
884

Hi,

you can use this function module : 'COMPLEX_SELECTIONS_DIALOG' .

FORM call_dialog.

RANGES s_pernr FOR pa0001-pernr.

DATA tab_and_field TYPE rstabfield.

tab_and_field-tablename = 'PA0001'.

tab_and_field-fieldname = 'PERNR'.

s_pernr-sign = 'I'.

s_pernr-option = 'EQ'.

s_pernr-low = 12345.

APPEND s_pernr.

*-- ls_options for remove options

CALL FUNCTION 'COMPLEX_SELECTIONS_DIALOG'

EXPORTING

title = 'Personal Number'

*excluded_options = ls_options

tab_and_field = tab_and_field

TABLES

range = s_pernr.

ENDFORM.