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: 

Dropdown box in Module pool

milusai
Participant
0 Kudos

Hi experts,

I have two dropdown boxes on Module pool screen with one on different subscreen and the other on different subscreen.

When the user selects a value from one dropdown box a specific set of values are populated in second dropdown box......

I have done the above things, but the thing is that, after selecting a value from first dropdown the user have to press ENTER then only the second dropdown is populated.........

I have used the FM DYNP_READ_VALUES

Still not working

Can anybody give the solution is to how to avoid pressing ENTER.....

Regards,

Milind

4 REPLIES 4

Former Member
0 Kudos

Hi,

Have u tried assigning a function code to the first drop-down?

Regards,

Kiran

0 Kudos

Hi Kiran,

I have tried assigning FCODE, but not working,

0 Kudos

Hi Milind,

you have an attribute "Responds to double-click" under the Display attributes. Do select that and use double click and catch the FCODE.

Probably this shall help you.

Regards,

Kiran

Former Member
0 Kudos

Hi Milind Mungaji ,

As the abap programs needs some event to start execution atleast the user should press enter for the next dropdown to fill.

Hey this is not possible the FCODE returns when there is a event when you are not pressing enter, then no event will be triggered..

Check THIS " MODULE mod AT CURSOR-SELECTION."

The module mod is called whenever the function code of the user action is CS with function type S. If you use this statement, it is best to assign the function code CS to function key F2. This also assigns it to the mouse double-click.

Check whether the field is blank or not in the first dropdown.

PROGRAM demo_dynpro_on_condition.

DATA: ok_code TYPE sy-ucomm,

input1(20) TYPE c, input2(20) TYPE c, input3(20) TYPE c,

fld(20) TYPE c.

CALL SCREEN 100.

MODULE init_screen_100 OUTPUT.

SET PF-STATUS 'STATUS_100'.

ENDMODULE.

MODULE cancel INPUT.

LEAVE PROGRAM.

ENDMODULE.

MODULE cursor INPUT.

GET CURSOR FIELD fld.

MESSAGE i888(sabapdocu) WITH text-001 fld.

ENDMODULE.

MODULE module_1 INPUT.

MESSAGE i888(sabapdocu) WITH text-002.

ENDMODULE.

MODULE module_2 INPUT.

MESSAGE i888(sabapdocu) WITH text-003.

ENDMODULE.

MODULE module_* INPUT.

MESSAGE i888(sabapdocu) WITH text-004 input3.

ENDMODULE.

MODULE c1 INPUT.

MESSAGE i888(sabapdocu) WITH text-005 '1'.

ENDMODULE.

MODULE c2 INPUT.

MESSAGE i888(sabapdocu) WITH text-005 '2' text-006 '3'.

ENDMODULE.

The screen flow logic is as follows:

PROCESS BEFORE OUTPUT.

MODULE init_screen_100.

PROCESS AFTER INPUT.

MODULE cancel AT EXIT-COMMAND.

CHAIN.

FIELD: input1, input2.

MODULE module_1 ON CHAIN-INPUT.

FIELD input3 MODULE module_* ON *-INPUT.

MODULE module_2 ON CHAIN-REQUEST.

ENDCHAIN.

FIELD input1 MODULE c1 AT CURSOR-SELECTION.

CHAIN.

FIELD: input2, input3.

MODULE c2 AT CURSOR-SELECTION.

ENDCHAIN.

MODULE cursor AT CURSOR-SELECTION.

Check this link.

http://help.sap.com/saphelp_nw70/helpdata/en/9f/dbabbd35c111d1829f0000e829fbfe/content.htm

Never Forget to reward people who helps you.

Regards,

Midhun Abraham

Edited by: Midhun Abraham on Oct 1, 2008 7:29 AM