2009 Dec 02 11:33 AM
Hi SDN community,
I need your help:
I have a dynpro with a button. Clicking this button, I want to display a new screen with many "SELECT-OPTIONS", but I don't want to create the "SELECT-OPTIONS" via ScreenPainter, I want to generate them via e.g.:
SELECT-OPTIONS : s_matnr FOR mara-matnr.Is there any possibility to do this? I have already tried this:
Process After Input on the StartScreen clicking the button:
PERFORM selection_screen.
FORM selection_screen.
SELECT-OPTIONS : s_matnr FOR mara-matnr.
ENDFORM.But it doesnt work, SELECT-OPTIONS may not be local or something =/
You know whats my point? I wanna generate a new Selection-Screen by using
SELECT-OPTIONS : s_matnr FOR mara-matnr.and not by using the ScreenPainter...
PS: I also tried to generate the SelectionScreen by writing
SELECT-OPTIONS : s_matnr FOR mara-matnr.directly into the PAI, but then, this SelectionScreen is displayed immediately after I execute the program and this overrides the StartScreen with the button =[
Thanks for your help, hope you got my points
Marius Klaus
Edited by: Marius Klaus on Dec 2, 2009 12:34 PM
Edited by: Marius Klaus on Dec 2, 2009 12:35 PM
2009 Dec 02 11:41 AM
Hi!
Try it like this:
SELECTION-SCREEN BEGIN OF SCREEN 1111.
SELECTION-SCREEN BEGIN OF BLOCK BL1.
SELECT-OPTIONS SEL0 FOR SY-REPID.
PARAMETERS PAR0.
SELECTION-SCREEN END OF BLOCK BL1.
SELECT-OPTIONS SEL1 FOR SY-REPID.
PARAMETERS PAR1.
SELECTION-SCREEN PUSHBUTTON /10(30) PUBU USER-COMMAND US03.
SELECTION-SCREEN END OF SCREEN 1111.
And when the user presses the button:
IF sy-ucomm = 'BUTTONPRESS'.
CALL SCREEN 1111.
ENDIF.
It's untested, but hopefully will work...
Regards
Tamá
Hi!
Try it like this:
SELECTION-SCREEN BEGIN OF SCREEN 1111.
SELECTION-SCREEN BEGIN OF BLOCK BL1.
SELECT-OPTIONS SEL0 FOR SY-REPID.
PARAMETERS PAR0.
SELECTION-SCREEN END OF BLOCK BL1.
SELECT-OPTIONS SEL1 FOR SY-REPID.
PARAMETERS PAR1.
SELECTION-SCREEN PUSHBUTTON /10(30) PUBU USER-COMMAND US03.
SELECTION-SCREEN END OF SCREEN 1111.
And when the user presses the button:
IF sy-ucomm = 'BUTTONPRESS'.
CALL SCREEN 1111.
ENDIF.
It's untested, but hopefully will work...
Regards
Tamá
2009 Dec 02 11:41 AM
Hi!
Try it like this:
SELECTION-SCREEN BEGIN OF SCREEN 1111.
SELECTION-SCREEN BEGIN OF BLOCK BL1.
SELECT-OPTIONS SEL0 FOR SY-REPID.
PARAMETERS PAR0.
SELECTION-SCREEN END OF BLOCK BL1.
SELECT-OPTIONS SEL1 FOR SY-REPID.
PARAMETERS PAR1.
SELECTION-SCREEN PUSHBUTTON /10(30) PUBU USER-COMMAND US03.
SELECTION-SCREEN END OF SCREEN 1111.
And when the user presses the button:
IF sy-ucomm = 'BUTTONPRESS'.
CALL SCREEN 1111.
ENDIF.
It's untested, but hopefully will work...
Regards
Tamá
2009 Dec 02 11:44 AM
Hi,
Tamas code will work, except that use call-selection screen instead of call screen
IF sy-ucomm = 'BUTTONPRESS'.
CALL SELECTION-SCREEN 1111.
ENDIF.
2009 Dec 02 11:41 AM
Hello,
I dont think just by declaring a select-options will generate a new selection screen as in a normal report in a module pool program. You may have to use CALL SELECTION-SCREEN or SUBMIT to a normal report with the selection screen you require.
Vikranth
2009 Dec 02 11:51 AM
2011 Feb 10 2:49 PM
2011 Feb 10 4:05 PM
I made a post some time ago with many screen examples, including this one.
Check it out here: http://www.abapzombie.blog.br/codigos-exemplo/2011/01/05/abap-zombie-screen-examples-a-tela-de-selec...
It has many other examples. Hope it helps!
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |