02-11-2005 1:40 PM
I want to put a select option in a screen type screen painter
Using this the user could enter a ranger of personal numbers.
Can any one give me a clue on how to do that ?
02-11-2005 1:43 PM
Yep, the easiest way is to put a "selection-screen" inside of a subscreen on your dynpro.
Here is a sample program.
report zrich_0006 .
tables: mara.
* Custom Selection Screen 1010
selection-screen begin of screen 1010 as subscreen.
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.
selection-screen end of block b1.
selection-screen end of screen 1010.
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.
* Screen 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
02-11-2005 2:04 PM
Thanks for your answer Rich,
I'm goin to test that then!
But what if I want my select option to be dynamc ...
For example I want to use a logical database ?
Is it possible ?
Thanks again
02-11-2005 2:12 PM
02-11-2005 2:15 PM
This is the code of the program and I my break point I do not have anything in SELPERNR
REPORT ZY_TESTSUBSCREEN .
TABLES: PA0003.
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: SELPERNR FOR PA0003-PERNR.
SELECTION-SCREEN END OF BLOCK B1.
SELECTION-SCREEN END OF SCREEN 1010.
CALL SCREEN 100.
BREAK STEPHANK.
&----
*& Module USER_COMMAND_0100 INPUT
&----
text
----
MODULE USER_COMMAND_0100 INPUT.
CHECK SY-UCOMM(1) NE '%'.
LEAVE TO SCREEN 0.
ENDMODULE. " USER_COMMAND_0100 INPUT
This is the screen flow
PROCESS BEFORE OUTPUT.
MODULE STATUS_0100.
*
CALL SUBSCREEN AREA INCLUDING SY-REPID '1010'.
PROCESS AFTER INPUT.
MODULE USER_COMMAND_0100.
Rich do you have any idea why ?
02-11-2005 2:20 PM
02-11-2005 2:25 PM
The function modules in function group SLDBFREE support dynamic LDB processing. Specifically FM LDB_PROCESS allows you to dynamically invoke a LDB. Function groups SLDB and SSEL may also be of interest.
02-11-2005 2:25 PM
Damn !
I'm so stupid today!
Too tired before the week end ! Thanks for you very helpful answer I'm gonna check that!
02-14-2005 9:11 AM
It seems that this technique does not work on SAP 4.0.
Is there anything possible to do to have a select option in a screen done by screenpainter in sap 4.0
'AS SUBSCREEN' addition does not exists in 4.0.
Thanks
02-14-2005 9:28 AM
You can also use the following FM to achieve this.
COMPLEX_SELECTIONS_DIALOG
Regards
Raja
02-14-2005 9:37 AM
That is not how I want the screen to look like...
It works perfectly from 4.6 but do not work earlier.
02-14-2005 9:45 AM
Hi Stephan,
Instead of trying to call a selection-screen as a subscreen, why don't you consider calling the selection-screen directly using the CALL SELECTION-SCREEN statement?
Regards,
Anand Mandalika.
02-14-2005 9:59 AM
Hi,
I told you I need to put this SELECT-OPTION in a screen-paintern screen...
I need to put a control inside the screen...
Do you get what I mean?
02-14-2005 10:14 AM
Hello Stephan,
Consider the following points.
1. You want a SELECT-OPTIONS on a normal screen. The easiest way is to call a selection-screen as a subscreen. But that is not possible in 4.0B.
2. As Raja had suggested, you need to manually put the buttons for the SELECT-OPTIONS extension and code them using the FM. But you do not want to do that either.
3. You could call a selection-screen as if you were calling a normal screen. But you do not want to do that, because you have controls on the screen as well.
I'm afraid you will not be able to meet the requirement with all these restrictions. By the way, what control do you want to have in the selection-screen? I presume you mean you want a custom control in there. But so far as I know, Custom Controls were not introduced in 4.0B, as they are purely object-oriented.
Could you please explain further why you cannot call a selection-screen directly?
Regards,
Anand Mandalika.
02-14-2005 10:19 AM
Ok
the function module is a good solution! What I'm tring to find is a standard solution! That even SAP is using.
The control I want to put is a table control. So it is existing in 4.0.
I do not want a full SELECTION-SCREEN.
That's why I thing the FM module is a good solution but I'm not convincec that sap is doin the same!
I'll check but all of these options are good.
The best for me is the call subscreen but infortunatly it is not working on 40
Any further information is welcomed!
S
02-14-2005 4:02 PM
Hi Stephan ,
you can try this below option..
Use select-options for the variable which u require...
Activate the program...
Now your Selection-screen would get generated...
Now double-click upon the variable..U will be taken to screen logic of the selection-screen...
Just (without disturbing any of the modules that are concerned with the select-options) place all the controls as you wish and proceed with your program as usual..
you need not use call Screen <scrNo>..
Instead do your operation in 'AT-SELECTION-SCREEN' event Block...
Reply if you find this as a Good solution
How is it??!!!
Regards
Immanuel
Immanuel
02-14-2005 4:09 PM
Hi Stephan...
You can do as i said before...
or just generate the selection-screen and look after the thing that is in it..follow that in the screen which you are creating...
Regards
Immanuel
Hi Stephan ...
Did you find the above suggestion useful??
Message was edited by: Immanuel Gnana Prakasham Daniel