2013 May 09 8:23 AM
Hi ,
Suppose i have two Module Pool Program
Program1
Screen 100 - Normal Screen
Program2
Screen 100 - Subscreen screen
Screen 101 - Model Dialog Box
Screen 102 - Normal Screen
Using T-Code ZTCODE , Program1 screen 100 is executed . Screen 100 Contain Tab strip functionality where i am calling Program2 subscreen 100. Now Program2 subscreen 100 contain a button by which i like to call "Dialog box Program2 screen 101" or "Normal Screen
Program2 screen 102" . But here it throws an error
" The system attempted to use dynpro 0101 in program "Program1".
This dynpro does not exist."
It is working fine if i am calling Program2 Directly .
Regards,
Jibin Joy
2013 May 09 8:30 AM
You can create a separate transaction of program2 and call the transaction in program1.
If you need shared data you can create that using function group and call the function for sending and receiveing data.
2013 May 09 8:30 AM
You can create a separate transaction of program2 and call the transaction in program1.
If you need shared data you can create that using function group and call the function for sending and receiveing data.
2013 May 09 8:41 AM
Hi Mohammed ,
Thanks For reply
1. Program1 Contain Tab strip so within one tab i like to call Program2 using subscreen .
But if i have separate transaction of program2 and call the transaction in program1 it will replace the whole screen .
2. This Functionality work well in function group but i cannt change the program2 to function group right now this is our last choice .
Can i know y this error is raised .
Thanks in Advance
Regards,
Jibin Joy
2013 May 09 10:23 AM
Hi,
Here is the explaination to the error with reference from SAP HELP
The statement CALL SCREEN accesses the dynpros of the relevantmain program of the currentprogram group and these use the global data and dialog modules of the main program. Except when calling a dynpro in an externally called subroutine, the main program usually is the current program. If the specified dynpro does not exist in the main program of the program group, an untreatable exception occurs.
For more details
2013 May 09 10:37 AM
Hi Mohammed ,
Thanks For Putting Effort on this ....
"If the specified subscreen dynpro is not defined in the current ABAP program, the specified program is loaded into internal mode, whereby LOAD-OF-PROGRAM is triggerred. If this is a function group, a new additional program group is formed. In the case of executable programs and module pools, the program is loaded into the program group of the current program.
"
http://help.sap.com/abapdocu_702/en/dynpcall.htm
So based on my observation it should find the dynpro in current Program Group since Program2 will also be added once subscreen is called for that the program .
And Ref
http://help.sap.com/abapdocu_70/en/ABENINTERNAL_SESSION.htm
Thanks in Advance
Regards,
Jibin Joy
2013 May 09 12:42 PM
Hi Jibin,
The answer to your question is in the link provided by you....
Only the dynpros of the main program of a program group can be called using CALL SCREEN. After an internal session is loaded, these are the dynpros of the main program of the main program group. The main programs (function groups) of additional program groups can also call their own dynpros.
The SUB-Screen call though the program will be loaded... but all call screen statements will correspond only to your main loaded program.
I hope this helps.....
2013 May 09 1:10 PM
Hi,
Thanks ...
I got confused previously.....
Regards,
Jibin Joy
2013 May 09 9:16 AM
try using this in the PBO and PAI of the main program.
PROCESS BEFORE OUTPUT.
...
CALL SUBSCREEN: <area1> INCLUDING [<prog 1>] <dynp 1>,
<area2> INCLUDING [<prog 2>] <dynp 2>,
<area3> INCLUDING [<prog 3>] <dynp 3>,
...
...
PROCESS AFTER INPUT.
...
CALL SUBSCREEN: <area1>,
<area2>,
<area3>,
...
...
2013 May 09 9:31 AM
Hi Susmitha ,
Thanks For response
I am able to call Program2 From Program1 using call subscreen statement . The problem comes when i am trying to call any other screen within Program2 .
Thanks in advance,
Regards
Jibin Joy
2013 May 09 10:01 AM
Two options.
Option 1.
You can create a function module, and write the call screen in that function module.
Then call this function module to display the other screens.
Option 2.
Copy the entire program2 into an include pgm. Eg INC_PGM2.
Then insert the include statement include INC_PGM2 in both the programs. (You may need to give unique screen numbers though)
2013 May 09 10:14 AM
Hi Susmitha ,
For Option 1 :
i cannt change the program2 to function group right now this is our last choice .
For Option 2 :
I dont think so it is possible in my scenario. It is going to be used in lot of place .
Can i know y this error is raised .
Thanks in Advance
Regards,
Jibin Joy