on 06-06-2007 4:29 PM
Hi all!
I'm calling a BAPI from my component controller, and I'd like to fire an outboundplug (which is located in a view ) from this controller, depending on the result of the BAPI execution.... Is there any way to access the IWDViewController for firing this plug? I've accessed the IWDOutboundPlugInfo object, but I don't konw how to fire it....
Thanks in advance!
Hi ,
Either you can call this BAPI parameter from the view and based on the return value.. you can navigate..
Or raise a event in Component controller.. handle the event in view.. in the event handler .. fire the plug..
U cant access Viewcontroller api here..
Regards
Bharathwaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Eneko,
Another approach:
1) define interface:
package com.sap.sdn;
public interface ICallBack {
public void start();
public void successfulEnd();
public void failedEnd(Exception e);
}
2) make ICallBack as parameter for method in controller and implement something like this:
//@@begin javadoc:method()
/** Declared method. */
//@@end
public void method( com.sap.sdn.ICallBack callback )
{
//@@begin method()
try {
callback.start();
//do the logic
callback.successfulEnd();
}
catch (Exception e)
{
callback.failedEnd(e);
}
//@@end
}
3) In view controller pass inctanse of anonymous class:
//@@begin javadoc:onActionClick(ServerEvent)
/** Declared validating event handler. */
//@@end
public void onActionClick(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
{
//@@begin onActionClick(ServerEvent)
wdThis.wdGetSDNController().method(new ICallBack(){
public void start() {
}
public void successfulEnd() {
wdThis.wdFirePlugOut();
}
public void failedEnd(Exception e) {
}
});
//@@end
}
Work fine for me ;-).
Best regards, Maksim Rashchynski.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
9 | |
8 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.