Skip to Content
author's profile photo Former Member
Former Member

How to register a method associated with a function module

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Mar 24, 2006 at 05:27 AM

    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
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      hello deepak,

      take note also that you have to register your processors

      PRIOR to synchronization. you might want to implement a

      SyncEventListener in your application that will register

      your processor incase when it is not yet registered prior

      to synchronization.

      take note as well that InboundProcessing interface extends

      Serializable. MI framework will try to serialize your

      processor on the first time you register it. but if MI

      encounters an exception during the serialization process,

      it will be ignored. thus you need to listen to the SyncEvent

      and register your processor if necessary.

      hope this help.

      regards

      jo

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.