04-22-2006 12:55 PM
Hi,
I am implementing a BADI, and in the PUT method of the BADI, I am calling a "Z" function module. In the function module I am doing a call transaction to call a customized screen.
This works fine as long as the attribute of the customized screen is normal, but when I change the attribute of the customized screen to subscreen, it dumps. The dump does not have any info about the reason for the dump.
I want to call a customized screen keeping the screen attribute as subscreen (module pool).
How do I do that? Please help with the syntax.
Thanks in advance.
Mick
04-22-2006 1:12 PM
Hi,
I guess you have changed the properties of screen only.
I assume you have made a Ztransaction Code.
When you define a transaction code, you need to specify a screen number for radio option program and screen and you need to specify a screen and not subscreen.( I think so!!)
You changed only the code without changing the transaction code properties.
Therefore, i think u r getting a dump.
If you want to call your subscreen, call it in some screen and then call that screen using your transaction code properties.
To include a subscreen screen in the subscreen area of the main screen and call its PBO flow logic, use the following statement in the PBO event of the main screen:
PROCESS BEFORE OUTPUT.
...
CALL SUBSCREEN <area> INCLUDING <prog> <dynp>.
...
To call the PAI flow logic of the subscreen screen, use the following statement in the PAI flow logic of the main screen:
PROCESS AFTER INPUT.
...
CALL SUBSCREEN <area>.
...
Refer:
http://help.sap.com/saphelp_webas630/helpdata/en/9f/dbabfe35c111d1829f0000e829fbfe/content.htm
Regards,
Tanveer.
Please mark helpful answers.
Message was edited by: Tanveer Shaikh
Message was edited by: Tanveer Shaikh
04-24-2006 6:48 AM
Thanks for the reply Tanveer.
One more thing that I would like to add is that, the error message that I am getting
"Screen SAPLZ_CUST_SCREEN 1001 must not be an Include screen"
Also I am displaying the screen in the web and I am seeing the dump in the web.
Thanks,
Mick
04-24-2006 6:58 AM
Hi,
It will NOT work as the Sub screen has to be placed on a SUB SCREEN element on the main screen where you are going to call the sub screen.
The usual process is you have a MAIN screen and you place the SUB SCREEN control on that. On this SUB SCREEN you call the sub screens dynamically, right. In your case you don't have a main screen, so the dump.
Regards,
Ravi
Note : Please mark the helpful answers
04-24-2006 7:07 AM
Hi Mick,
As i said earlier.. u need to call the subscreen inside some screen. You are directly calling the subscreen in your transaction code which actually should have been a screen call.
You dont have a screen to display the subscreen and hence you are getting a dump!!
Regards,
Tanveer.
Please mark helpful answers.
04-24-2006 7:32 AM
Thanks Tanveer/Ravi.
This is what I have done. I have created a screen, No 1002 (main screen), type normal. In this screen I have created a sub screen area. I have also created a screen type subscreen number 111. In the PBO of this main screen, I have written the code
CALL SUBSCREEN SUBSCR111 INCLUDING SY-REPID 111
In the PAI of the main screen I have written the code
CALL SUBSCREEN SUBSCR111
I have also written suitable code for PBO and PAI for subscreen 111.
I have activated all the screens.
Now when I execute, I do not get a dump but I get the error:
"CALL SUBSCREEN: SAPLZSRM_CUST_SCREEN 1002 NO_DYNPRO_NUMBER"
Please help!!!!!
Thanks,
Mick
04-24-2006 7:37 AM
try putting quotes round the 111:- '111'.... or use a variable which holds the value '111'.
You would need to populate this variable in the PBO.
04-26-2006 3:26 AM
Hi Mick,
one other possibility is that the program involved is not sy-repid. Make sure the call subscreen references the program the subscreen belongs to, i.e. it might not be sy-repid.
04-26-2006 3:53 AM
Mick,
This is the right way of doing it now, as now you have a MAIN screen and that you have a sub screen, like the way I have explained in my previous post.
Regards,
Ravi
Note : Please mark all the helpful answers and close the thread if the issue is resolved.
04-24-2006 7:17 AM
Hi Mick,
sorry but subscreens can only be accessed from the screen flow logic (not native abap) via CALL SUBSCREEN.
04-24-2006 7:45 AM
hi james,
thes3 are the steps to be followed :
1. in the pbo of the main screen, write the stmt :
CALL SUBSCREEN SUBSCR111 INCLUDING SY-REPID num .
2. In the main pgm, decalare a variable num type sy-dynnr.
3. In the PAI of main screen assign num = '111' .
Regards,
Kunal.