08-22-2016 9:22 AM
Hello,
is there a way to open a Dynpro in a new modus?
something like:
CALL_SCREEN XYZ IN_NEW_MODUS.
best regards
08-22-2016 11:23 AM
08-22-2016 9:40 AM
08-22-2016 9:44 AM
yes, but i don't have a transaction for my dynpro. i just got the dynpros number, so i need something like
call_screen 33 in new mode.
there is no transaction '33'.
08-22-2016 10:28 AM
There is for instance function module TH_CREATE_FOREIGN_MODE - already discussed in the forum
08-22-2016 10:36 AM
i already used the function th_create_mode, but there is just a tcode or a transaction name. what i need is a dynpro number.
CALL FUNCTION 'TH_CREATE_FOREIGN_MODE'
EXPORTING
CLIENT =
USER =
* TCODE =
* RETURN_ERROR = 1
* CREATE_EXCLUSIVE = 0
* EXCEPTIONS
* USER_NOT_FOUND = 1
* CANT_CREATE_MODE = 2
* NO_AUTHORITY = 3
* OTHERS = 4
.
IF SY-SUBRC <> 0.
* Implement suitable error handling here
ENDIF.
what i need is something like:
CALL FUNCTION 'TH_CREATE_FOREIGN_MODE'
EXPORTING
CLIENT =
USER =
DYNPRO_NUMBER =
* RETURN_ERROR = 1
* CREATE_EXCLUSIVE = 0
* EXCEPTIONS
* USER_NOT_FOUND = 1
* CANT_CREATE_MODE = 2
* NO_AUTHORITY = 3
* OTHERS = 4
.
IF SY-SUBRC <> 0.
* Implement suitable error handling here
ENDIF.
08-22-2016 11:16 AM
A Dynpro is always part of a program. You can only open programs in new modes (ABAP sessions) and that only with CALL FUNCTION STARTING NEW TASK. But never just one Dynpro, how should that work at all?
Horst
08-22-2016 11:23 AM
08-22-2016 12:48 PM
i would try to call my dynpro in a popup. is there a custom popup for this solution or how u do that?
08-22-2016 12:51 PM
For displaying a dynpro as a popup, you must declare the dynpro as a modal window (it's a dynpro main attribute), and call it using CALL SCREEN ... STARTING AT ...
08-22-2016 12:54 PM
The ABAP statement for popups command is CALL SCREEN ... STARTING AT.
But the dynpro must be defined accordingly and also the GUI status.
Maybe the best is, you scan the Dynpro documentation a bit.
General Dynpros - Classic Dynpro Programming - SAP Library
especially
Embedding Modal Dialog Boxes - Classic Dynpro Programming - SAP Library
08-22-2016 1:11 PM
There is one problem with that solution, when i define the dynpro as a modal window, because i have to display the dynpro normally or in a popup window. if i define it as a modal window, it can't be used in a normal way.
08-22-2016 1:16 PM
I've already tried something similar to that with:
CALL SCREEN BILD STARTING AT WINX1 WINY1
ENDING AT WINX2 WINY2.
but that kind of code just opens the screen with the number of the variable "BILD".
The screen is not shown as a popup-window.
08-22-2016 1:16 PM
You can declare the dynpro as a subscreen and reuse it in a normal and a modal window ...