Hi,
I am trying to execute a method associated with a function module (in BWAFMAPP table)
when I create the outboundfactory instance like below:
OutboundContainerFactory outfactory = OutboundContainerFactory.getInstance();
It throws an exception with message as:
Method <method name> is not registered.....
Can anyone please help me....
Thanks
Deepak
Hello Deepak,
<b>1. First you write InboundProcessor for the method you want to call.</b>
import com.sap.ip.me.api.sync.InboundProcessor;
// For every method you want to call, there must be a InboundProcessor aasociated with it.
public class MyInboundProcessor implements InboundProcessor {
public String getMethodName() {
// In transaction ME_WIZARD you enter java name for the method.
// This is the name by which Mobile applications refer to method in R/3.
return "ENTER YOUR JAVA NAME FOR THE METHOD HERE";
}
public void process(InboundContainer container) {
// Write code here to read return data from the R/3
}
}
<b>2. Now register this processor to InboundProcessorRegistry.</b>
MyInboundProcessor processor = new MyInboundProcessor();
InboundProcessorRegistry.getInstance().register(processor);
<b>3.Now create OutBoundContainer.</b>
OutboundContainer container = OutboundContainerFactory.getInstance().createOutboundContainer(VisibilityType.SEPARATED,"JAVA METHOD NAME",OutboundContainer.TYPE_REQUEST);
<b>4. Add paramters values for the method to be called.</b>
container.addItem("ITEM1",itemValue);
<b>
5.Close the container.</b>
container.close();
<b>6. Start Synchronization</b>
SyncManager.getInstance().synchronizeWithBackend();
Add a comment