cancel
Showing results for 
Search instead for 
Did you mean: 

Can i execute bapi two times if yes then wht code i need to write 2 time.

Former Member
0 Kudos

Hi,

I am trying to execute my bapi at wdDoInit() method of view . Same Bapi will execute at Controller.

But my view bapi is not running.

Why this is happeded?

My code for View is like this

public void wdDoInit()

{

//@@begin wdDoInit()

IWDMessageManager manager = wdComponentAPI.getMessageManager();

try

{

wdContext.currentZcrm_Sales_Orders_InputElement().setRun_Bp("ALL");

wdContext.currentZcrm_Sales_Orders_InputElement().setUname("SUNIL103");

wdContext.currentZcrm_Sales_Orders_InputElement().modelObject().execute();

wdContext.nodeOutput().invalidate();

}

catch(WDDynamicRFCExecuteException e)

{

manager.reportException(e.getMessage(), false);

}

//@@end

}

Please help me to trace this thing ,

Regards,

Gurprit Bhatia

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi

Check whether ur model node in view is context mapped with the controller?

Regards

Renu

Former Member
0 Kudos

Hi,

Same code is running with NWSD 7.0 but it does not work with NWDS 2.0.6.

Please Help me to solve this Problem.

Regards,

Gurprit Bhatia

Former Member
0 Kudos

Hi,

Change this code a bit:


Zcrm_Sales_Orders_Input input = new Zcrm_Sales_Orders_Input();

wdContext.nodeZcrm_Sales_Orders_Input().bind(input);

input.setRun_Bp("ALL");
input.setUname("SUNIL103");

wdContext.currentZcrm_Sales_Orders_InputElement().modelObject().execute();
 

wdContext.nodeOutput().invalidate();

Regards,

Satyajit.

Former Member
0 Kudos

Hi,

Sorry but this code is not working, My application gives same result.

Regards,

Gurprit Bhatia