06-20-2007 2:43 PM
Hi,
In MPP, I have 3 screens, 1 is main (screen no: 100) and other 2 (screen nos: 10, 20) are sub screens. In one of the sub screen (20) has List box and Command Button. When I am trying to click the command button I am not able to get the result, I think this is because of there is no OKCODE for sub screens. So cant we use command buttons in sub screen? If yes can you help me please with sample code?
Thanks & Regards,
Satya
06-21-2007 6:33 AM
Satya,
Defining Subscreen Screens
You can create subscreen screens either in the same program or a different program. To create a subscreen screen, enter the screen type Subscreen in the screen attributes. The statically-defined next screen must be the number of the subscreen itself. Choose a size for the screen, making sure that it fits within the subscreen area into which you want to place it. If the subscreen screen is too big for the subscreen area, only the top left-hand corner of it will be displayed.
You create the layout, element list, and flow logic of a subscreen screen in the same way as a normal screen. Subscreens may also include other subscreens. However, the following restrictions apply:
You should arrange the screen elements so that they are not truncated if a subscreen area is too small.
If you want to create several subscreen screens in an ABAP program, you should make sure that the individual screen elements have names unique among the subscreens. If the subscreen screens belong to the same program as the main screen, you should also make sure that names are not used twice there. Otherwise, you must separate data transported from the screen in your ABAP program after each user action (see example).
Subscreens cannot have their own OK_CODE field. Function codes linked to user actions on subscreens are placed in the OK_CODE field of the main screen. This also applies to subscreen screens defined in a different program to the main screen.
The flow logic of a subscreen screen may not contain a MODULE ... AT EXIT-COMMAND statement. Type E functions may only be handled in the main screen.
The flow logic of a subscreen screen may not contain any dialog modules containing the statements SET TITLEBAR, SET PF-STATUS, SET SCREEN, LEAVE SCREEN, or LEAVE TO SCREEN. Any of these statements causes a runtime error. You cannot change the GUI status of a main screen in a subscreen screen.
Don't forget to reward if useful....
06-20-2007 2:55 PM
define functional code to the button it will take care.
double click the button, small pop up will come there small FCTCODE box should be there, there you need to define it.
06-21-2007 5:42 AM
hi,
GUI status can not be set to the sub screen.
OKCODE is not applicable to the sub screen.
It can not contain AT EXIT-COMMAND.
so u can't handle that button,instead place this in the calling screen and use it
06-21-2007 6:33 AM
Satya,
Defining Subscreen Screens
You can create subscreen screens either in the same program or a different program. To create a subscreen screen, enter the screen type Subscreen in the screen attributes. The statically-defined next screen must be the number of the subscreen itself. Choose a size for the screen, making sure that it fits within the subscreen area into which you want to place it. If the subscreen screen is too big for the subscreen area, only the top left-hand corner of it will be displayed.
You create the layout, element list, and flow logic of a subscreen screen in the same way as a normal screen. Subscreens may also include other subscreens. However, the following restrictions apply:
You should arrange the screen elements so that they are not truncated if a subscreen area is too small.
If you want to create several subscreen screens in an ABAP program, you should make sure that the individual screen elements have names unique among the subscreens. If the subscreen screens belong to the same program as the main screen, you should also make sure that names are not used twice there. Otherwise, you must separate data transported from the screen in your ABAP program after each user action (see example).
Subscreens cannot have their own OK_CODE field. Function codes linked to user actions on subscreens are placed in the OK_CODE field of the main screen. This also applies to subscreen screens defined in a different program to the main screen.
The flow logic of a subscreen screen may not contain a MODULE ... AT EXIT-COMMAND statement. Type E functions may only be handled in the main screen.
The flow logic of a subscreen screen may not contain any dialog modules containing the statements SET TITLEBAR, SET PF-STATUS, SET SCREEN, LEAVE SCREEN, or LEAVE TO SCREEN. Any of these statements causes a runtime error. You cannot change the GUI status of a main screen in a subscreen screen.
Don't forget to reward if useful....
06-22-2007 1:00 AM
If you add a pushbutton on a subscreen, and assign a function code to it there, you should be able to pick up this in your "module dnnnn_user_command" logic within the PBO of the main screen.