WD ABAP: call dialog window from component controller method
Hi all,
I need to call a dialog box from a method in the component controller. It would be helpful if u could post the code too.
Thanks,
Sravanthi
Hi Maksim,
this is the code i wrote:
DATA: api_component TYPE REF TO if_wd_component,
window_manager TYPE REF TO if_wd_window_manager.
api_component = wd_this->wd_get_api( ).
window_manager = api_component->get_window_manager( ).
wd_this->window = window_manager->create_window(
window_name = 'OPTIONWD'
close_button = abap_false ).
wd_this->window->open( ).
When i test it, this is the error i get.
"An Instance of the View OPTIONWD Already Exists in the Component"
how do i correct it?
Thanks,
Sravanthi
Similar Messages
-
Calling view controller method from component controller method
Hi,
Is there any way to call view controller method from component controller method?
Thanks,Hi Khandal.
You should not make you component controller dependent from a view controller.
But what you can do is to define an event in the component controller. The view
controller can register for this event.
In the stage where you currently want to call the view controller method just fire
the event. In the event handler method in the view controller you can call the
method then.
Why do you need to call a view controller method? Can you give more details
about the scenario?
Cheers,
Sascha -
Call a method in the view from Component Controller
Hi Friends,
I have written the code for calling the RFC in Component Controller.
My requirement is to change the properties of UI elements in the view, if I get any exception while calling RFC.
Can Call a method in the view from Component Controller.
Regards,
Lakshmi Prasad.HI,
You can get the error message during the exception of calling RFC in view itself.
Any way you may call the RFC at some action in the view only.
Can you explain me what you are trying to do?
Kind Regards,
Mukesh -
Call a component controller methods from a view
Hi,
I have created a view v1 with context node c1and binded the context node c1 of it with the component controller so that the values entered in the view v1 are available.
now can i know how to access this values from component controller context node which i binded in a other view......
Thanks,
PremHi Sayan,
component : BP_HEAD
View: BP_HEAD/BPHeadOverview
I have called event EH_ONPOPUP_CLOSED when popup is closed in view BP_HEAD/BPHeadOverview and i get all the values entered in the popup here using below code.
lr_context_node = gr_popup->get_context_node( iv_cnode_name = 'ZPOPUPCN' ).
lr_col_wrapper = lr_context_node->collection_wrapper.
lr_entity = lr_col_wrapper->get_current( ).
IF lr_entity IS BOUND.
lr_entity->get_properties( IMPORTING es_attributes = ls_data ).
ENDIF.
now ls_data contains all the data entered in the popup ie. - firstname, lastname, house_no, street, city, postal code, country.....
now it have tried the below code to map/set the entries with the Account management - individual account creation screen.
data : ls_header TYPE crmst_header_object_buil, " BuilHeader
ls_header1 TYPE crmst_address_buil, " BuilStandardAddress
ls_header-firstname = ls_data-zfirstname.
ls_header-lastname = ls_data-zlastname.
ls_header1-house_no = ls_data-zhouseno.
ls_header1-street = ls_data-zstreet.
ls_header1-city = ls_data-zcity.
ls_header1-postl_cod1 = ls_data-zpostcode.
ls_header1-country = ls_data-zcountry.
ls_header1-telephonetel = ls_data-ztelno.
ls_header1-e_mailsmt = ls_data-zemail.
entity ?= me->typed_context->builheader->collection_wrapper->get_current( ).
IF entity IS BOUND.
entity->set_properties( EXPORTING is_attributes = ls_header ).
ENDIF.
entity1 ?= me->typed_context-> BuilStandardAddress->collection_wrapper->get_current( ).
IF entity IS BOUND.
entity1->set_properties( EXPORTING is_attributes = ls_header1 ).
ENDIF.
but the problem is both the entity is INITIAL. -
How to call Custom or Component Controller methods from View Controller
Hy Guys,
how do I call Custom Controller or Component controller methods from a View or Context Controlller?
thanks in advance
JürgenHi Juergen
Yes it is possible, pls follow the below approach to access the component controller in context node class
1) since the standard component controller class is protect variable , declare a variable of type component controller in your controller class.
say for example the public variable you declared is g_comp_controller
2) now redefine the controller class method WD_CREATE_CONTEXT and add the below lines of code
g_comp_controller ?= me->comp_controller.
3) go to context node class (CNXX) there declare the varaible which of type controller class (IMPL) as public variable, for example g_owner
4) redefine the method IF_BSP_MODEL~INIT and write the below code
CALL METHOD super->if_bsp_model~init
EXPORTING
id = id
owner = owner.
g_owner ?= owner.
5) now the variable g_owner that is declared in (CNXX) contains reference to your controller class
6) in on_new_focus method access your component controller in the below manner and access the entities also.
DATA: lv_owner TYPE REF TO xxxxx_impl, " Implementation class
lr_comp_cont TYPE REF TO xxxx_bspwdcomponen_impl, " component controller class
lv_entity type ref to cl_crm_bol_entity.
lv_owner ?= g_owner.
lr_comp_cont ?= lv_owner->g_comp_controller.
IF lr_comp_cont IS BOUND.
lv_entity ?= lr_comp_cont->typed_context->mdfcampaign->collection_wrapper->get_current( ).
now lv_entity contains the value of component controller context node.
Thanks & Regards
Raj
Edited by: bmsraj on Sep 27, 2011 3:28 PM -
Call a view's method from Component Controller.
Hi
Is it possible to call a view's method from Component Controller.
Regards
NikhilHi Tummuru,
I have created an event in Component Controller by the name toMenuView. Now I created a method in which this event is getting fired. Foll. is the code of the method.
public void fireToMenuView( )
wdComponentAPI.getMessageManager().reportSuccess("fireToMenuView");
wdThis.wdFireEventToMenuView();
Now I have created an event handler "handleToMenuView" in the MenuView and subscribed the event handler to the event in Component Controller.
The control is reaching to the fire event in component controller but not to the Event handler in view controller.
What am I missing.
Regards
Nikhil -
Call component controller method from view
Hi
I have created an action in view Thus its event handler is "OnActionDoSomething()"
And, I have a method in component controller "MethodSaySomething()".
Now, how can I call MethodSaySomething() from OnActionDoSomething().
OnActionDoSomething()
// Call MethodSaySomething() defined in component controller
ThanksHi,
To access the methods present in component controller from View , first u need to add the component controller as the required controller.
open the view controller --> switch to propertues tab --> add the component controller as required controller(click add controller).
Now in your action handler , write this below code to add the method:
wdThis.wdGet<COmponent Controller>().MethodSaySomething();
Hope it helps
Thanks and Regards, -
Calling view method from component controller
Hi Experts,
How to refer a view method from component controller?if you have the view Instance, then you can call using the view instance. But this is not the correct apporach.
-
Calling Component controller method in webdynpro
Hi All,
Is it possible to call a method from component controller to view controller?
Regards,
Sasikalayes it is possible.
hope this would help you
http://help.sap.com/saphelp_nw70/helpdata/en/3b/29933f09a5fb47e10000000a114084/content.htm
Regards,
nag -
I need to call main window from a Standard program
I need to call main window from a Standard program for SAP Script. I have wrote the code like this but it is not working. Kindly help me on that.
FORM OPEN_AND_START_FORM
FORM open_and_start_form.
CALL FUNCTION 'OPEN_FORM'
EXPORTING
device = 'PRINTER'
dialog = space
form = 'ZOTC_SLI'
language = print_co-spras
OPTIONS = pr_options
EXCEPTIONS
canceled = 01
device = 02
form = 03
OPTIONS = 04
unclosed = 05.
CHECK sy-subrc IS INITIAL.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
window = 'MAIN'.
ENDFORM. "OPEN_AND_START_FORM
FORM CLOSE_AND_END_FORM_FORM *
FORM close_and_end_form.
CALL FUNCTION 'END_FORM'.
ENDFORM. "CLOSE_AND_END_FORMHi,
FORM CLOSE_AND_END_FORM_FORM *
FORM close_and_end_form.
CALL FUNCTION 'END_FORM'.
change this to CALL FUNCTION 'close_FORM'.
as you are not using the start_form
you can use End_form
i hope you understand now
ENDFORM. "CLOSE_AND_END_FORM
reward points if helpful.
thanks & regards,
venkatesh -
Mapping from component controller context and view context
Hi to all experts.
im trying to create my first webdynpro . Im stuck up here please help me .... How to map the node from component controller context and view context i have searched the forum....got the answers as Drag and Drop...But it is not working ....Hi
Check out this links and check saptechnical site
WDA in SAP Help
http://help.sap.com/saphelp_nw2004s/helpdata/en/7c/3545415ea6f523e10000000a155106/frameset.htm
Web Dynpro for ABAP in SDN
https://www.sdn.sap.com/irj/sdn/developerareas/webdynpro?rid=/webcontent/uuid/512040e1-0901-0010-769c-c238c6ca35d9 [original link is broken]
Developing ABAP Applications Using Web Dynpro
http://help.sap.com/saphelp_nw2004s/helpdata/en/42/d41b25d2216babe10000000a1553f6/frameset.htm
Web Dynpro ABAP: Development in Detail
http://help.sap.com/saphelp_nw2004s/helpdata/en/03/0048413e466e24e10000000a155106/frameset.htm
WDA Sample programs & tutorials
https://www.sdn.sap.com/irj/sdn/developerareas/webdynpro?rid=/library/uuid/49f2ea90-0201-0010-ce8e-de18b94aee2d
Web Dynpro ABAP Demonstration Videos
/people/thomas.jung/blog/2006/06/20/web-dynpro-abap-demonstration-videos
Web Dynpro ABAP Wiki's
https://www.sdn.sap.com/irj/scn/wiki?path=/display/wdabap/main&
New to Webdynpro
Thanks,
Tulasi Palnati -
Calling dialog program from report
Hi All,
I need to call dialog program from report and do not want the initial screen to be shown and execute the dialog program. can this be possible, if yes please let me know this to do this, when I tried using leave to transaction its showing the initial dialog screen.
Thanks in advane
jogHi,
Create a Z trnsaction Code for the Transaction you want to call.
Go to SE93. Give Transaction name and click on create.
Select start object as 'Transaction with Variant' or 'Transaction with Parameter'.
On second screen give transaction name and check the <b>check box for 'Skip initial screen'</b>.
Find out the initial screen for the transaction and mention it.
Now, you can call this Z transaction in your program. -
Web Dynpro - How to set and get info from Component Controller
Hi Gurus!!!
Im having some problems getting and setting info in component controller of my Web Dynpro.
I can't see the difference between View Context and Global Context.
How can i create a Global Context Between two views?
Thanks!
Regards.
Polakinho.-hii
difference between view context and global context is we can use the same component controller for all the views in the same application.but when when we create node in view context then it will be available for that view only not for any other view...so if we want to use the same node for all the views we need to create that view in the component controller.so it will become global for that application.
for using global node you need to map that context in view controller.for that you need to go to that view then click on context tab and drag and drop node from component controller.so it will be available for that view.i hope it helps you.
regards
twinkal -
Getting error while creating Service controller from component controller
Hi,
I have added CAF model in used model for DC project.But when i m trying to create service controller from component controller by selecting used model it is giving error like "Context element cannot be bound to model layer".
Can anybody help me out on this issue.
Thanks in advance.Hello,
try to check the check box in MS Word - File - Options - General - "Open e-mail attachements and other uneditable files in reading view"
I am not sure how this option really works, but I think you will find it checked. So try to uncheck it.
Or wise versa :c)
Kind regards -
Calling a method in view from component controller?
Hi,
Is it posible to call a method that is defined in the Component Controller in the View?
If it is posible please give some sample code how to call the method?
Regards,
Padmalatha.KPadmalatha, all the methods defined in a controller from 'Methods' tab are instance methods. An instance method defined in a component controller is callable from any view controller that holds a reference to the component controller.
Defining methods between the tags
//@@begin others
//@@end
is useful if you want to declare static methods.
Maybe you are looking for
-
I'm getting this email repeatedly. Not sure what the issue is.
A problem has been detected on this server. ============================================================ Status Summary Reason(s) for notification: Drives Server: Host : Xserve Model : RackMac3,1 Uptim
-
New Custom Field in MB1B Tcode
Hi All, In my requirement i have to add 4 custom field in MB1B TCode Screen. Please suggest some screen exit or BADI for the same. Please suggest some sollution. Moderator message: please do more research before asking, show what you have done yourse
-
Error while setting up the ContentDB as the source for OSES
Hello Experts, I am tring to create the ContentDB as the source to Oracle SES. 1. while creating the Identity plug-in for Oracle Internet Directory, I am passing the following information: Host name: hostname of the OID Port: 389 (non SSL) Use SSL: f
-
Where is the "File" "transfer purchases" button?
Where is the File>Transfer purchases button in itunes? Can't find it anywhere!
-
Hello! I would like to run FlexUnit Tests from within Flash Builder 4.7 but when I launch "Execute FlexUnit Tests", I get the "Launch failed" message popup with text: File not found: FlexUnitApplication.swf Is it possible to fix this? I'm using Mac O