‎2009 May 15 6:05 PM
Hi
I've a z program with two different screens (one made by copy of another), both with atribute "screen type subscreen" at my code
FORM mostra_cabecalho.
CALL SCREEN 0002.
call SCREEN 0001.
ENDFORM. "mostra_cabecalho
----
FORM esconde_cabecalho *
----
FORM esconde_cabecalho.
CALL SCREEN 0022.
CALL SCREEN 0001.
ENDFORM. "esconde_cabecalho
and i've a system error
Erro tpo.exec. DYNP_WRONG_SCREEN_TYPE
Data e hora 15.05.2009 18:00:10
Texto breve
Incorrect screen type: Screen is incorrectly defined or used.
Can somebody help me ?
Thanks
‎2009 May 15 6:09 PM
Hi Ricardo,
use the syntax..
"Write this way...
CASE ok_code.
WHEN 'FC1010'.
LEAVE TO SCREEN 1010.
Encase.
or
FORM mostra_cabecalho.
CALL SCREEN 0002. "Comment this
LEAVE TO SCREEN 0002. "Write this
call SCREEN 0001. "Comment this
LEAVE TO SCREEN 0001. "Write this
ENDFORM. "mostra_cabecalho
Regards,
Prabhudas
‎2009 May 15 6:23 PM
Hi
I try, but i've the same error...
Erro tpo.exec. DYNP_WRONG_SCREEN_TYPE
Data e hora 15.05.2009 18:22:57
The attribute screen type with the values 'Normal Screen' and
'Subscreen' determines the use of the screen. If a normal screen is used
as subscreen or vice versa, an error occurs.
The screen "ZPRMM02_TROCAS_DEVOLUCOES" 0022 has, in this respect, an
inappropriate screen type.
‎2009 May 16 1:40 PM
Hi,
Pinaki gave you right clues. I will extend them to make sure you get the idea correcly.
- CALL SCREEN can be used in ABAP program directly
- CALL SUBSCREEN can only be used in main screen's flow logic
- main screen must be "normal" screen and should be called via CALL SCREEN
- main screen has to have subscreen area where you put your subscreen
- inside main screen flow logic (NOT in ABAP program) use CALL SUBSCREEN to call you subscreen on this main screen
So the example code would look like:
"ABAP program
CALL SCREEN 0100. "main screen (type normal) with subscreen area placed on it (i.e 'SUB_AREA')
"flow logic of screen 0100
PROCESS BEFORE OUTPUT.
...
CALL SUBSCREEN sub_area INCLUDING sy-repid '0200'. "0200 is subscreen (type subscreen)
PROCESS AFTER INPUT.
...
CALL SUBSCREEN sub_area.
Regards
Marcin
‎2009 May 15 6:17 PM
Hi ,
CALL SCREEEN ... is for normal screen.
Make these two screen as normal screen .
Your issue will be resolved.
I f you do not want to make those subscreens to normal screens, then you need to use
the proper syntax of subscreen from the flow logic not from the program.
PROCESS BEFORE OUTPUT.
MODULE status_0100.
CALL SUBSCREEN sub_area INCLUDING sy-repid '0200'.
CALL SUBSCREEN sub_area1 INCLUDING sy-repid '0300'.As per your specified code , I suggest you to write like ---
FORM mostra_cabecalho.
CALL SUBSCREEN <sub_area> INCLUDING sy-repid '0002'.
CALL SUBSCREEN <sub_area> INCLUDING sy-repid '0001'.
ENDFORM. "mostra_cabecalho
----------------------------------------------------------------------
* FORM esconde_cabecalho *
----------------------------------------------------------------------
FORM esconde_cabecalho.
CALL SUBSCREEN <sub_area> INCLUDING sy-repid '0022'.
CALL SUBSCREEN <sub_area> INCLUDING sy-repid '0001'.
ENDFORM. "esconde_cabecalho" But you need to write the CALL SUBSCREEN ... in the Flow logic of the screen only.Regards
Pinaki
‎2009 May 15 6:26 PM
‎2009 May 16 3:08 PM
Hi,
If you want to display the screens in the sub screen area then you need to call these screen in this way..
(The screen type should be SubScreen in screen attributes tab... Refer to example DEMO_DYNPRO_TABSTRIP_LOCAL
call subscreen: sub1 including sy-repid '0110',
sub2 including sy-repid '0120',
sub3 including sy-repid '0130'.If you want to call these screen as normal screen then screen type should be Normal in screen attributes tab.The code should be
Call Screen 100.
‎2009 May 16 4:12 PM
hi,
u have created 2 screens with subscreen attribute tick on. so those screens are not normal screen.
to call normal screen we use 'CALL SCREEN' statement but for subscreens we have to use
'CALL SUBSCREEN' statements.
now for this u hve to create screen of type subscreen which u hve already created.
after go to the screen layout and create a subscreen area by selecting the subscreen icon on the left side of the layout screen.
after this set the name n attr of ur subscreen area.
once this is done call ur subscreen in ur PBO & PAI by using:
'CALL SUBSCREEN <subscreen_area_name> INCLUDING prog_name/sy-repid <dynnr no. screen no> this will come in ur PBO
n in PAI u jst have to use :
CALL SUBSCREEN <subscreen_area_name>
now as per the SAP rules the 1 statement shld come after all the statements of PBO i.e it shld be the last statement of the PBO and the 2 statement shld be the first statement of the PAI.
hope this will help you!!!
Thanks & Regards,
Punit Raval.