on 10-08-2014 8:07 AM
Hi
I found best article about dynamically embed view (without need adding used components).
etc.
http://scn.sap.com/thread/1161579
The main part code is:
CALL METHOD LV_NAV_SERV->DO_DYNAMIC_NAVIGATION
EXPORTING
SOURCE_WINDOW_NAME = 'ZWDA000' "my windows form I start
SOURCE_VUSAGE_NAME = 'MAIN_USAGE_0' "my view usage copied from Windows main
SOURCE_PLUG_NAME = 'DEFAULT' "used default value?
* PLUG_PARAMETERS =
TARGET_COMPONENT_NAME = 'ZWDA001' "my application who I want show
TARGET_COMPONENT_USAGE = 'ZWDA001' "same as above
TARGET_VIEW_NAME = 'MAIN' " view name of sub-application who I want show
TARGET_PLUG_NAME = 'DEFAULT' "used default value?
TARGET_EMBEDDING_POSITION = 'MAIN/VCO_APP' "MAIN is view of SOURCE component / VCO_APP is ViewContainerUIElement
* RECEIVING
* COMPONENT_USAGE =
I have a main application ZWDA000 and sub-application ZWDA001, ZWDA002, ZWDA003 e.g.
Each sub-application have a minimal 2 view (LOGON and MAIN). And component name is equal with Windows name. Sub-application have only one Windows.
Main application have many view (LOGON and MAIN, CHANGE e.g.). And have more Windows. Main windows have same name as component name (ZWDA000). This application has in MAIN view under ROOTUIELEMENTCONTAINER created VCO_APP type ViewContainerUIElement.
In main application I want show only MAIN view from sub-application.
I got this error
Instance of the view MAIN already exists in component
Thank you
Hi,
Looks like your view usage name is incorrect here.
SOURCE_VUSAGE_NAME = 'MAIN_USAGE_1' " see in properties the View usage name.
SOURCE_PLUG_NAME = 'TO_OUT' "Enter the Out bound plug name of your main view
hope this helps,
Regards,
Kiran
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kiran Kumar Valluru
Yes, i look about singleton (this is a standart static class). I thinking about this, but for this is better use set/get parameter or export/import to memory?
But I maybe like use your first advice with PLUGS.
I know how read data from inbound plugs, but I don't how this set to outbound plugs. Because I can't use
l_ref_main_window->fire_DEFAULT_plg(
p_name = stru_node_emp1-name
).
In my case I use:
CALL METHOD LV_NAV_SERV->DO_DYNAMIC_NAVIGATION
EXPORTING
TARGET_PLUG_NAME = 'DEFAULT'
How set parameters with using DO_DYNAMIC_NAVIGATION?
Thank you
Hi,
I thinking about this, but for this is better use set/get parameter or export/import to memory?
You cannot use Import/Export memory in WDA. instead you can use Shared Memory Objects. You can check this document for reference:
For your scenario its not required to use shared memory instead you can just use the singleton class.
And regarding plugs:
l_ref_main_window->fire_DEFAULT_plg(
p_name = stru_node_emp1-name
).
When you are passing the plug parameters you need to declare the parameter name as importing parameter in the corresponding inbound plug.
So, here in your window Default plug, you can declare the parameters as importing just like the Function module parameter declaration. In your window HANDLEDEFAULT method add the parameters which you are going to pass via plugs as importing parameters.
hope this helps,
Regards,
Kiran
I have a LOGON view in WDA000 and too in ZWDA001.
When I changed only TARGET_VIEW_NAME = 'LOGON'
I my MAIN application (ZWDA000) showed LOGON view from ZWDA000 - not LOGON view from ZWDA001!!! (TARGET_COMPONENT_NAME = 'ZWDA001')
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.