08-17-2006 6:42 PM
I'm just beginning to use Screen Painter and so far I really like it. However, I'm running into a dead end. I would like to have a field that allows multiple selections, for which I formerly entered text such as:
SELECT-OPTIONS: p_atinns FOR cabn-atinn NO INTERVALS.
The above code will automatically produce a button that brings up another small screen to enter (either manually or from a file). Using Screen Painter, I have linked the field to the cabn-atinn dictionary, which works very nicely, but can I also make this a multiple select without having to go back into my ABAP code?
08-17-2006 6:48 PM
The easiest way to include select-options in a dynpro or screen is to embed a subscreen into your dynpro. You define a selection screen as a subscreen, then embed the subscreen in your dynpro. Here is a sample program.
report zrich_0006 .
tables: mara.
* Custom Selection Screen 1010
<b>selection-screen begin of screen 1010 as subscreen.</b>
selection-screen begin of block b1 with frame title text-001.
parameters: p_rad1 radiobutton group grp1 default 'X',
p_rad2 radiobutton group grp1,
p_rad3 radiobutton group grp1.
select-options: s_matnr for mara-matnr,
s_matkl for mara-matkl,
s_mtart for mara-mtart.
<b>selection-screen end of block b1.
selection-screen end of screen 1010.</b>
start-of-selection.
call screen 100.
*&---------------------------------------------------------------------*
*& Module STATUS_0100 OUTPUT
*&---------------------------------------------------------------------*
module status_0100 output.
* SET PF-STATUS 'xxxxxxxx'.
* SET TITLEBAR 'xxx'.
endmodule.
*&---------------------------------------------------------------------*
*& Module USER_COMMAND_0100 INPUT
*&---------------------------------------------------------------------*
module user_command_0100 input.
endmodule.
Here is the screen flow of the screen 100. You must create a subscreen are using screen painter, Name it as Subscreen_1010.
* Create screen 100 with a subscreen area called "subscreen_1010"
* Screen Flow Logic follows
process before output.
module status_0100.
call subscreen subscreen_1010 including sy-repid '1010'.
process after input.
call subscreen subscreen_1010 .
module user_command_0100.
Regards,
Rich Heilman
08-17-2006 6:48 PM
The easiest way to include select-options in a dynpro or screen is to embed a subscreen into your dynpro. You define a selection screen as a subscreen, then embed the subscreen in your dynpro. Here is a sample program.
report zrich_0006 .
tables: mara.
* Custom Selection Screen 1010
<b>selection-screen begin of screen 1010 as subscreen.</b>
selection-screen begin of block b1 with frame title text-001.
parameters: p_rad1 radiobutton group grp1 default 'X',
p_rad2 radiobutton group grp1,
p_rad3 radiobutton group grp1.
select-options: s_matnr for mara-matnr,
s_matkl for mara-matkl,
s_mtart for mara-mtart.
<b>selection-screen end of block b1.
selection-screen end of screen 1010.</b>
start-of-selection.
call screen 100.
*&---------------------------------------------------------------------*
*& Module STATUS_0100 OUTPUT
*&---------------------------------------------------------------------*
module status_0100 output.
* SET PF-STATUS 'xxxxxxxx'.
* SET TITLEBAR 'xxx'.
endmodule.
*&---------------------------------------------------------------------*
*& Module USER_COMMAND_0100 INPUT
*&---------------------------------------------------------------------*
module user_command_0100 input.
endmodule.
Here is the screen flow of the screen 100. You must create a subscreen are using screen painter, Name it as Subscreen_1010.
* Create screen 100 with a subscreen area called "subscreen_1010"
* Screen Flow Logic follows
process before output.
module status_0100.
call subscreen subscreen_1010 including sy-repid '1010'.
process after input.
call subscreen subscreen_1010 .
module user_command_0100.
Regards,
Rich Heilman
08-17-2006 7:09 PM
Rich,
I've included the following code in my Flow Logic:
PROCESS BEFORE OUTPUT.
MODULE status_0100.
CALL SUBSCREEN subscreen_1010 INCLUDING sy-repid '1010'.
PROCESS AFTER INPUT.
CALL SUBSCREEN subscreen_1010 .
MODULE user_command_0100.
and the following code in my ABAP:
* Custom Selection Screen 1010
SELECTION-SCREEN BEGIN OF SCREEN 1010 AS SUBSCREEN.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS: p_char FOR cabn-atnam.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN END OF SCREEN 1010.
However, when I do a syntax check in my Flow Control, I get an error that says "Screen 0100 Include block not specified, not defined or spelt incorrectly" (typo not mine).
08-17-2006 7:16 PM
08-17-2006 7:20 PM
08-17-2006 7:21 PM
06-22-2007 9:56 PM
Hi Rich, i know is more than a year, but your post is more than useful to me. So thank you very much. I have one problem with this, i use the select option for the BKPF-BUDAT, (date format) I do all the steps you say, and i have a very nice dynpro wiht my select option, but i can read the value that is on the select option.
My code is like this:
SELECTION-SCREEN BEGIN OF SCREEN 102 AS SUBSCREEN.
SELECT-OPTIONS: s_budat FOR bkpf-budat.
SELECTION-SCREEN: END OF SCREEN 102.
But s_budat is always initial, also i choose values for it in the dynpro.
What can i do?? Thank you in advance.
Fidel
08-22-2012 5:09 PM
Hi Fidel,
It's been 5 years since you posted this, but may I know how you solved your problem of retrieving select-options values from the subscreen? I am facing a similar problem right now.
Will be glad if you could help.
Regards,
Gautam
08-17-2006 6:48 PM
Hi Eric,
Place another I/O Field in the screen-painter and link that to cabn-atinn field.
Hope this solves UR problem, it it does please reward.
Thanks,
Bharath.
06-17-2010 6:20 AM
Hi,
I do have the same problem.
while calling subscreen in both pbo and pai,
pbo
CALL SUBSCREEN SUBUPLD INCLUDING 'SAPMZSD_UPLD' '9001'
and not as
CALL SUBSCREEN 'SUBUPLD' INCLUDING 'SAPMZSD_UPLD' '9001'