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 and pushbuttons

Former Member
0 Likes
1,173

hi

on my selection screen, i have declared select-options (date range) and I need to chose an action with a pushbutton.

if i didnt press enter after entering the values into the select options, and pressed a pushbutton, the select options table is empty.

can i fake an event or something so that the select options table is filled without pressing enter? because i cant force the users to do so.

thanks in advance,

Eli.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
969

hi,

Use the FM 'DYNP_VALUES_READ' to get the values filled in the selection screen fields.

When the Push Button is pressed call the above FM it will give you the field values entered on the screen fields.

data: l_dyname type standard table of dynpread,

w_dynpread type dynpread.

clear w_dynpread.

w_dynpread-fieldname = 'S_MATNR'. " is selection screen field

append w_dynpread to l_dyname.

clear w_dynpread.

CALL FUNCTION 'DYNP_VALUES_READ'

EXPORTING

dyname = sy-repid

dynumb = sy-dynnr

TABLES

dynpfields = l_dyname.

Edited by: avinash kodarapu on Dec 28, 2008 4:29 PM

hi

on my selection screen, i have declared select-options (date range) and I need to chose an action with a pushbutton.

if i didnt press enter after entering the values into the select options, and pressed a pushbutton, the select options table is empty.

can i fake an event or something so that the select options table is filled without pressing enter? because i cant force the users to do so.

thanks in advance,

Eli.

4 REPLIES 4
Read only

Former Member
0 Likes
969

we can have push buttons on the selection screen..

to have a push button on the selection screen , do the following coding..

SELECTION-SCREEN:

BEGIN OF SCREEN 500 AS WINDOW TITLE TIT,

BEGIN OF LINE,

PUSHBUTTON 2(10) BUT1 USER-COMMAND CLI1,

PUSHBUTTON 12(10) TEXT-020 USER-COMMAND CLI2,

END OF LINE,

BEGIN OF LINE,

PUSHBUTTON 2(10) BUT3 USER-COMMAND CLI3,

PUSHBUTTON 12(10) TEXT-040 USER-COMMAND CLI4,

END OF LINE,

END OF SCREEN 500.

AT SELECTION-SCREEN.

CASE SSCRFIELDS.

WHEN 'CLI1'.

.....

WHEN 'CLI2'.

.....

WHEN 'CLI3'.

.....

WHEN 'CLI4'.

......

ENDCASE.

do this it will work...

bye...

Read only

0 Likes
969

i know i can have pushbuttons , im talking about a problem that when i press a pushbutton, the table value for the select options i have defined on the screen is empty.

how can i fill this select options table value without having to press enter after inserting the values.

Read only

0 Likes
969

hi there.. did you try writing the code in some other event? like in Initialization or at selection-screen output/Input etc..

Read only

Former Member
0 Likes
970

hi,

Use the FM 'DYNP_VALUES_READ' to get the values filled in the selection screen fields.

When the Push Button is pressed call the above FM it will give you the field values entered on the screen fields.

data: l_dyname type standard table of dynpread,

w_dynpread type dynpread.

clear w_dynpread.

w_dynpread-fieldname = 'S_MATNR'. " is selection screen field

append w_dynpread to l_dyname.

clear w_dynpread.

CALL FUNCTION 'DYNP_VALUES_READ'

EXPORTING

dyname = sy-repid

dynumb = sy-dynnr

TABLES

dynpfields = l_dyname.

Edited by: avinash kodarapu on Dec 28, 2008 4:29 PM