Skip to Content
0
Former Member
Apr 26, 2009 at 03:37 AM

Trouble with RFC table input

22 Views

Greetings Experts,

I'm having trouble with calling an RFC with table input.

Here is my code so far:

  public void executeZps_Fm_War_Mat_Update_Input( )
  {
    //@@begin executeZps_Fm_War_Mat_Update_Input()
		//$$begin Service Controller(344531631)
		IWDMessageManager manager = wdComponentAPI.getMessageManager();
		try {
			int size =
				wdContext
					.nodeZps_Fm_War_Mat_Prefill_Input()
					.nodeWarOut()
					.nodeEx_Warout()
					.size();
			for (int i = 0; i < size; i++) {
				IPublicWARComp.IEx_WaroutElement srcElement =
					wdContext
						.nodeZps_Fm_War_Mat_Prefill_Input()
						.nodeWarOut()
						.nodeEx_Warout()
						.getEx_WaroutElementAt(i);
				IPublicWARComp.IIm_WarmatinElement trgElement =
					wdContext.createIm_WarmatinElement(
						new com.kaisa.mwci.models.updatezpsmur.Zps_War());
				WDCopyService.copyCorresponding(srcElement, trgElement);
				wdContext
					.nodeZps_Fm_War_Mat_Update_Input()
					.nodeIm_Warmatin()
					.addElement(
					trgElement);
			}
			wdContext
				.currentZps_Fm_War_Mat_Update_InputElement()
				.modelObject()
				.execute();
			wdContext.nodeOutWarMatIn().invalidate();
		} catch (WDDynamicRFCExecuteException e) {
			manager.reportException(e.getMessage(), false);
		}
		//$$end
    //@@end
  }

I can call the RFC, it actually returns a value, but not one that I expect. I think the table data is not being passed at all?

Ideas will be greatly appreciated. Thanks!

Cheers,

Alfonso