cancel
Showing results for 
Search instead for 
Did you mean: 

Communication between SAP ERP and SAP MII through RFC destination

aravinth_anandhan
Active Participant
0 Kudos

Hi All,

Our requirement is, while executing an RFC/BAPI, some message should trigger to MII and MII message listener should capture that message. And we will execute some transaction soon after receiving that message in MII.

For this, we configured RFC destination in SAP system using SM59 transaction and connection test is successful.

And we created Message Processing Rule in MII side.

Now we are trying to execute an RFC using,

CALL FUNCTION <function module name> IN BACKGROUND TASK DESTINATION <our RFC destination name>

but we are not getting any messages in MII message listener and also RFC is not updating anything in SAP side. Is there any other configuration needs to be done for our requirement?

Kindly give me some inputs to achieve our requirement.

Regards,

Aravinth

Accepted Solutions (1)

Accepted Solutions (1)

aravinth_anandhan
Active Participant
0 Kudos

Hi All,

please give me some inputs to resolve this.

Regards,

Aravinth

Former Member
0 Kudos

Hi Aravinth.

We are facing similar problem.

Have you figured out how to solve it?

Regards.

agentry_src
Active Contributor
0 Kudos

Hi Aravinth,

What version of MII are you using?  Depending upon the version, there are probably some more steps to registering the ProgramID required on both ends of the message transfer.  Depending upon what version of MII/NW you are using, the configuration is done differently.

The most common use of the MII Listeners is for receiving IDocs, (LOIPRO, MATMAS, etc.), RFC type documents (Control Recipes typically), and web service calls.  Depending upon your MII version, you may be limited strictly to IDocs.

Regards, Mike

Regards, Mike

Former Member
0 Kudos

Hi Mike.

We are facing the same problem that Aravinth.

In our case we are using SAP MII 12.1.10.

We have already a XMIIIDOC01 listener working just fine and we need to configure the XMIIRFC01. We followed the same step descrbed for XMIIIDOC01 but it keeps showing the message:

com.sap.conn.jco.JCoException: (104) RFC_ERROR_SYSTEM_FAILURE: no Beans listening for name ZRFC_XXXX registered for XMIIRFC01 on system SERVERXX_MID_00

together with this message we got the following message as well

[JRA]ReaderManaged_Application_Thread_22, onRollback(), no bean for given tid=0A010033133850915E220598

Any tip?

Regards

Italo Stefani

Vetta Group

agentry_src
Active Contributor
0 Kudos

Hi Italo,

The configuration of the RFC Listener is a little different and mostly simpler than the IDoc Listener.  I have some written instructions around somewhere on configuring the RFC Listener and will see if I can find them for you and Aravinth's use.  It will probably be sometime tomorrow before I get a chance to dig them up.

Regards, Mike

Former Member
0 Kudos

Ok Mike. It would be great.

Thanks.

Italo Stefani

Vetta Group

aravinth_anandhan
Active Participant
0 Kudos

Hi Mike,

Our MII version is 12.2 and NW version is 7.1

I will brief you my requirement one more time. If I execute my RFC in ECC, I should get some message in message listener of MII and based on message processing rule, I will be executing some transaction in MII.

For this, we have created one RFC destination "XMIIRFC02" with connection type T and program ID is also "XMIIRFC02". So, this program ID we registered in NW. Then we created message processing rule in MII.

In ECC, I am calling my RFC with

CALL FUNCTION <function module name> IN BACKGROUND TASK DESTINATION  'XMIIRFC02'

But our RFC is not updating any values in SAP and we are not receiving message in message listener of MII.

If I remove that DESTINATION addition in my coding, my RFC is working fine.

CALL FUNCTION <function module name> IN BACKGROUND TASK

please help me to achieve this requirement.

Thanks,

Aravinth

agentry_src
Active Contributor
0 Kudos

Hi Aravinth,

Haven't found the document yet, but I can start with asking what you did with the ProgramID in both ERP and NW for configuring the RFC Listener.  Remember you can't use the same ProgramID in more than one place (it is a one to one relationship between MII and ERP).  A common problem is reusing the ProgramID for both IDoc Listener and RFC Listener or using the same ProgramID on multiple MII instances.  The ProgramID should be added to the definition of the RFC Listener in NW as well as in the configuration of the Logical System in ERP.  Do not change the binding (leave it as the default).

Regards, Mike

former_member185280
Active Contributor
0 Kudos

If I remember correctly I think you need to do a " COMMIT WORK. " statement after your function call to trigger SAP to actually execute the RFC call. You may be doing this already but I figured I would mention it just in case.

aravinth_anandhan
Active Participant
0 Kudos

Hi Mike,

We are not using Program ID in multiple MII instance or in multiple RFC destination. And you mentioned, configuration of the logical system in ERP. What is that?  Are we need to do some configuration in WE21 transaction ?

Regards,

Aravinth

aravinth_anandhan
Active Participant
0 Kudos

Hi Christian,

I am already using COMMIT WORK statement after my RFC call.

Regards,

Aravinth

agentry_src
Active Contributor
0 Kudos

Hi Aravinth,

Here is what I found in my notes for setting up the ERP side:

  1. Go to transaction “Maintain RFC
         Connections” via the Tools - ALE - ALE Administration à Runtime Settings or use transaction code
         SM59.
  2. Choose “Create”.
  3. Add a name, e.g. MII_BM.
  4. Chose connection type T (TCP/IP
         connections).
  5. Add a description.
  6. On the tab “technical writings” check
         “Registered Server Program”.
  7. Enter the program ID MII_BM.
  8. Check “Unicode”.
  9. Enter the gateway host, i.e. the server
         address and the gateway service you got from your system administrator.
  10. Save your settings.

On the MII side:

 

  1. Log on to Netweaver and go to NW Admin - Configuration Management - Infrastructure -
    Application Resources
  2. Select a message listner that is not yet used , e.g. XMIIRFC01 and make the following
    entries on the tab “properties”
    • ProgramID: MII_BM
    • MaxReaderThreadCount: ≥1
    • SAP client: Client MII should be connected to,
      e.g. 100
    • Username and password as described in 2.1.2.2,
      MII_BM3, password: sap_1972
    • ServerName: address of the gateway server
    • Portnumber: system number, e.g. 00

  1. In case the message listener is not available or you changed the password on an
    established listener, go to the NW Admin menu - Operation Management -
    Systems - Start & Stop:
  • Go to tab Java EE, Applications
  • Select tc~sapjra~temp
  • Stop the application
  • Wait until all instances are really stopped
    (refresh the sreen)
  • Start the application again
  • Select xapps~xmii~ear on the same screen.
  • Check if it is up and running, if not start the
    application.
  • Check the message listner as described in point
    3 if is up and running.

Important Comment Number 1:

I will admit to a lot less experience with RFC Listeners than IDoc Listeners, but the basic processes are very similar.  One thing is that you do not use the ProgramID in multiple places on either ERP or MII.  The common result is seeing some of your documents showing up and some disappearing. 

Important Comment Number 2:

NW self-registers the ProgramID when you complete the MII operations above.  If you manually register your ProgramID with NW, it will now reside in two locations in NW - see Important Comment Number 1.

Hope this helps!  Sorry about the delay.  Coworkers dragged me out to a really good steak restaurant and forced much food and drink upon my helpless carcass. 

Regards, Mike

Message was edited by: Michael Appleby

Former Member
0 Kudos

Hi Mike,

I have created another thread to discuss about my problem (similar to this).

The thread is

http://scn.sap.com/thread/3264604

I have created a new one to not interfere in Aravinth Ananthan problem.

PS: Was it a brazilian steak house style?? Usually it takes couple weeks to come back to life!!

Thanks!!

Italo Stefani

agentry_src
Active Contributor
0 Kudos

Hi Italo,

No, the steakhouse was more American Mid-West style, but I really have enjoyed the Brazilian steak houses I have been to.  But getting a month's worth of protein and cholesterol in one meal does slow down the metabolism a bit. 

I will check your new thread. 

Thanks, Mike

Former Member
0 Kudos

Thanks Mike.

I just solved the problem! We had couple issues.

1) I restarted both tc~sapjra~temp and xapps~xmii~ear application and the messages started to be sent correctly.

2) I am not sure if the restart is really necessary, I was convinced it was until I found a duplicated configuration. Someone configured the XMIIRFC01 and XMIIRFC10 and I did not see. So, after the application restart all messages had been received by XMIIRFC10 Listener, whatever was the destination in the SAP ECC. So, I left only the XMIIRFC01 listener working and the messages are ok now.

Thank you very much for your help. The steps were very helpful!!

Italo Stefani

Vetta Group

agentry_src
Active Contributor
0 Kudos

Hi Italo,

And thank you for posting how you solved the problem.

Regards, Mike

Former Member
0 Kudos

hi michael,

When i configured connections in XMII for XMIIIDOC01 and updated the message listerner XMIIIDOC01 and saved the data after relogin to the system  message listerner XMIIIDOC01 missing.

how to resolve the issue. kindly let us know.

Thanks

agentry_src
Active Contributor
0 Kudos

Please open a new Discussion as this one was already answered a long time ago.

Regards, Mike (Moderator)

SAP Technology RIG

Answers (1)

Answers (1)

HariCS23
Contributor
0 Kudos

Aravinth, What was that connection type 'H' or 'T' in SM59 ?

And where are you trying to execute this "

CALL FUNCTION <function module name> IN BACKGROUND TASK DESTINATION <our RFC destination name>", I mean MII or ECC?

Thanks

Hari

aravinth_anandhan
Active Participant
0 Kudos

Hi Hari,

Our connection type is T in SM59.

We are trying to execute function module in ECC only.

Thanks,

Aravinth

HariCS23
Contributor
0 Kudos

From what i remember when i  usedRFC destination long time back to call RFC from another ECC system. It was H type.

And conceptually, If you are calling this statement,

CALL FUNCTION <function module name> IN BACKGROUND TASK DESTINATION <our RFC destination name> in ECC,

RFC destination of H type looks to execute FM in the destination system but i excepts same function module to be present in source system too.

But any way, I never understood what those RFC listeners in MII are for? There is not public documentation available other few questions in SDN what they are for. 

Thanks

Hari