01-05-2013 5:06 PM
Hello,
I use screen painter to create a screen. Only when a checkbox is ticked, will a subscreen pop up including text fields and input/output fields. But fields cannot be added to the Subscreen Area. The message wites 'Collision at target location (element not placed)'. Do I have to hard code to control the visibility of the subscreen under the condition I mentioned above? Where can I write code to check the condition for the subscreen to diaplay?
Thanx.
01-05-2013 6:32 PM
You cannot add any element in a subscreen area, you have to display a subscreen in this area, so create another dynpro, type subscreen and display it in the area with a CALL SUBSCREEN statement in PBO and PAI of main screen.
Regards,
Raymond
01-05-2013 6:53 PM
raymond already says that you cant create any element in subscreen area. for this, you have to create another screen(type: subscreen). after creating this screen you click on attributes tab. here you have to check radiobutton 'SUBSCREEN' in screen type. go to layout. you can add any element (input/outputfields) here. next go to screen where you define subscreen area. in pbo you have to write:
call subscreen <subscreen area name> including sy-repid '<subscreen dynpro number>'.
in pai you have to write:
call subscreen <subscreen area name>.
hope you understand
Regards
Sabyasachi
01-06-2013 12:18 AM
"a subscreen pop up"?
If you want a pop up, you need a screen with type "Modal Dialog Box".
01-06-2013 6:38 AM
Hi,
Subscreen and pop up are two completly different things.
As you said, you need a pop up with certain screen elements, then you shoud design a new screen(not subscreen) of type "Modal Dialog Box" which is already told by Chinmay.
Now if you want to display some elements within the screen in which the check box is present then you can do it through subscreen, which is again defined by Sabyasachi as well as Raymond.
HAPPY ABAPing
Vishal
01-06-2013 7:43 AM
Hello Vishal Yadav,
Thanks for your reply. I am also wondering where can I supplement the code to show the pop up screen when a checkbox is ticked.
Many thanks!
01-06-2013 8:04 AM
Hi,
What you can do is. Assign a function code to check box. For that...
Goto screen painter.
double click check box
in the popup opened assign a unique FCODE(can be any unique string)[lets call it CHK]
Now in PAI
There must be sum module within which you will be checking FCODE or say SY-UCOMM to identify what user just did. There you can place a code to call your screen. All you need to do is
case sy-ucomm.
when 'SAVE'.
"save things
when 'CANC'
"dont save and return back
when 'CHK'
"call your screen
endcase.
HAPPY ABAPing
01-06-2013 8:06 AM
And for calling a dialog box you can use this link
http://help.sap.com/saphelp_nw04/helpdata/en/9f/dba4e635c111d1829f0000e829fbfe/content.htm
01-06-2013 8:35 AM
Hello Vishal Yadav,
I followed your instructions and created a PAI Module and coded as follows:
MODULE ZPOPUP_SCREEN INPUT.
CASE SY-UCOMM.
WHEN 'CHK'.
CALL SCREEN 8001.
ENDCASE.
ENDMODULE.
But it didn't work.
Best regards
01-06-2013 11:20 AM
Hi,
Try this out
MODULE ZPOPUP_SCREEN INPUT.
CASE SY-UCOMM.
WHEN 'CHK'.
CALL SCREEN 8001 STARTING AT 4 10 "Top left of dialog to be placed
ENDING AT 20 10. "Bottom right corner
ENDCASE.
ENDMODULE.
01-08-2013 3:28 AM
Hello,
The driven program for the screen and modal dialog box is not created by myself. I actually use it for custom tabs in VL01N. By far, I have added a custom tab to VL01N including fields on the tab page. I wanna show the modal dialog box when a checkbox on the tab is ticked. Would you mind provide detailed instructions?
I really appreciate it.
01-08-2013 6:57 PM
Hi,
Presently I dont have access to R3(I dont have idea about VL01N), so I will try to wrap up everything in story kind of thing. As you have mentioned custom tab, so definatly for that custom tab you would have defined some subscreen.
1. Goto the subscreen for your custom tab.
2. Add check box in screen of that custom tab
3. Now after adding the checkbox you need to declare a function code in screen painter that you can do as mentioned above.
4. Now rather than writing the code for calling modal dialog in main screen PAI, you should write it subscreens PAI.
5. Once you are done with it, this is all done for calling modal dialog from subscreen.
Reply for sure if it dont work.
01-09-2013 3:57 AM