cancel
Showing results for 
Search instead for 
Did you mean: 

OVS Output Error

Former Member
0 Kudos

Hello

I am using OVS properties for getting Purchase Products via BAPI. I can show OVS Filter pop up windows. But When I press GO button, I am getting this error message:"

The method bind(Collection) in the type IWDNode is not applicable for the arguments (Bapi_Mara_Ga)"

I checked cardinality for OutputNode and RFC Output node is same.

You can find following query code:

public void onQuery(IWDNodeElement queryInputNodeElement, IWDNode queryOutputNode) {

IPublicOVSCust.IOVSPurchaseQueryInputElement input =

(IPublicOVSCust.IOVSPurchaseQueryInputElement) queryInputNodeElement;

IPublicOVSCust.IOVSPurchaseQueryOutputNode output =

(IPublicOVSCust.IOVSPurchaseQueryOutputNode) queryOutputNode;

Bapi_Material_Getall_Input bapiInput = new Bapi_Material_Getall_Input();

if (input.getMaterial() != null) {

bapiInput.setMaterial(input.getMaterial());

}

try {

bapiInput.execute();

queryOutputNode.<b><u>bind</u></b>(bapiInput.getOutput().getClientdata());

}

Does anyone know what is wrong?

Kind Regards,

Rasim

Message was edited by:

Rasim Donmez

Message was edited by:

Rasim Donmez

null

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Basim.

Here you can find the code I used to implement OVS:


 public void onQuery(IWDNodeElement queryInputNodeElement, IWDNode queryOutputNode) { 
  		IPublicOVSCustomController.IZpct_Matchcode_Grafo_InputElement ovsInput = (IPublicOVSCustomController.IZpct_Matchcode_Grafo_InputElement) queryInputNodeElement; 
  		//IPublicOVSCustomController.IGrafoOutputNode ovsOutput = ( IPublicOVSCustomController.IGrafoOutputNode) queryOutputNode; 
		IPublicOVSCustomController.IP_GrafosNode ovsOutput = ( IPublicOVSCustomController.IP_GrafosNode) queryOutputNode;
  		try { 
  			ovsInput.modelObject().execute(); 
  			ovsInput.node().getChildNode("Output",0).invalidate();
		} catch (Exception e) { 
			IWDMessageManager msgMgr = wdComponentAPI.getMessageManager(); 
			msgMgr.reportException(e.getLocalizedMessage(), false); 
		} 
  	}

I can see several differences between my code and yours:

  • First thing I see is that you copy input and output, not to the RFC input and output nodes, but to some other Node called OVSPurchaseQueryInput. I think you should be using the input and output nodes of the Bapi_Material_Getall_Input.

  • I dont fully understand your code, but it seems to me that you are trying to apply the results of the RFC directly on this method. Remember that this method is only to initiate the call of the RFC function. You should get the results of the RFC call with the method applyResult of your IWDOVSContextNotificationListener class.

I'm not sure I made myself very clear with this post.It might be helpful if you posted the entire code of your IWDOVSContextNotificationListener class.

Regards

Francisco.

Answers (1)

Answers (1)

monalisa_biswal
Contributor
0 Kudos

you dont have to bind output node to an instance.

invalidate model output node after execute method and copy data to query output node.

Former Member
0 Kudos

Hi Biswal,

Thanks for your valuable answer. But I dont understand exactly. I used to FlightBooking example for this code. Could you give me sample code about this problem? How can i copy data to query output node?

Thanks in advance.

Best Regards,

Rasim