cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

MII Webservice

Former Member
0 Kudos
1,508

Hi all!

I have a technical decision to help make. We need to move information from SAP into MII. I could not find information on this. I have worked with PI, and wanted to do something similiar.

Here's the two options we are looking at:

Option 1:

1. Create an MII webservice. Call the URL from SAP.

2. Run the MII transaction passing a key that we would use for an RFC in SAP.

3. In the MII Transaction, use the key to call the RFC in SAP. Get the data, and write into a table.

4. Have an MII transaction that is running in the background. That transaction will move the data from one table to another.

Option 2:

1. Create an MII service in a transaction.

2. Call the webservice from SAP via proxy. Pass all the data to MII via the transaction.

3. Update the MII tables.

We are on MII 12.0, and SAP ECC 6.0.

Has anyone done either of the options? Any other suggestions? My consultant is telling me that option 2 cannot be done. Am I wasting my time trying to do it?

Thank you!

Michelle

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

We are using Option 2. So, its possible.

Chanti.

Answers (6)

Answers (6)

Former Member

I'm not experienced with IDOCs. So I'd like to avoid them. Unless they are the bes way to do this.

I'd love to do this via RFC. However, I have to start an MII transaction from my RFC. It would be a push and not a pull. I haven't pushed anything to MII via an RFC. ( I have pulled data from SAP with an RFC. I didn't have any problems going that way.)

Former Member
0 Kudos

The second document from my last reply (Calling services...) gives you an idea how to push data to MII from SAP.

We use this to get some process related data from SAP to MII whenever the data is released and the corrsponding process order is saved.

Michael

Former Member
0 Kudos

I work with Michelle and would like to expand upon her description of the problem in order to get your feedback. First, thank you for posting the link to the article about calling MII web services from ABAP. That is useful.

In our case we'd like to call the MII transaction (as a web service) and pass it a table (containing 100 rows or more), and have the MII transaction write the data into a MII connected database.

Can we do this? Will the MII transaction accept a table as input? If so, is there a maximum size to the amount of data that it can receive?

Thank you again!

Former Member
0 Kudos

Steven,

MII can process the XML it gets from SAP. Using a repeater action you can run through the rows of the XML and do what you need (executing queries etc.).

I do not know how big the message can grow...I have seen XML files with 1,5MB (in that case about 800 rows with 40 columns) that have been processed without problems.

Michael

Former Member
0 Kudos

Hi Michael,

Thank you again for the information. Are you using "MII Message Services" to pass the XML file into MII via the URL: http://<server>:<port>/XMII/Illuminator?Service=WSMessageListener&mode=WSMessageListenerServer&NAME=...;

Or are you able to pass the multi-row XML directly into a BLS transaction property of type xml via webservice URI? http://<servername>/XMII/WSDLGen/<TransactionFolder(s)>/<Transaction>;

Thank you again,

Steve

agentry_src
Active Contributor
0 Kudos

Hi Michelle/Steven,

You can certainly use either IDOC or RFC (push from ECC) Listeners for your data downloads. The RFC push or the IDOC Listener is fairly simple to set up on the ECC system and in MII. Or Message Listeners, if you wish.

But I would not be so quick to discount using IDOCs for one primary reason: Change Pointers.

Change pointers are configured in ECC to push out IDOCs upon certain triggers. For example, some customers use Change Pointers to update local cached master data such as Material Masters. Upon creation, deletion, or updates to Material Master records, an IDOC would be automatically sent to your IDOC listener in MII containing the updates. So maintaining a local copy of master data becomes a pretty automatic process.

Good luck with whichever method you implement.

Mike

Former Member
0 Kudos

Steve,

to answer your question: we are using the WSMessageListener as well as the WSDLGen option.

We are receiving the input as String and using the String to XML Parser action to convert it to XML which can be easily processed using the Repeater.

One hint you will also find in other threads: when sending xml content to WSMessageListener, use UTF-8 encoding and Content Type text/xml. You should also append "&Session=false" to you URL to prevent MII to create a dialog session each time the webcall is received.

Michael

Former Member
0 Kudos

What about performance when you have large amounts of data sent as a (comma delimited) string?

Former Member
0 Kudos

As we are using the String to XML action first, MII then processes the XML which is fairly quick. From experience there are no performance problems.

Michael

Former Member
0 Kudos

Thank you everyone for your responses!

I will look at IDOCs too. I'm not very good with IDOCs. I have a question out already about IDOCs for a different project.

There are a lot more options than I expected. I'll have to pick one of them.

Former Member
0 Kudos

The table would be an internal table - XML from SAP to MII.

Former Member
0 Kudos

So far we have only tested text fields as input to MII. But I am pretty sure XML input would also work. That is our next task. I could let you know in due course.

In the case of IDocs, MII receives XML as an input; you can extract the data elements as needed. You can have an update/insert query in your BLS to write to the local table.

Former Member
0 Kudos

Are the field inputs passed in the URL of the web service? So if you want to pass in XML, must the full value of the XML data be included in the URL?

Former Member
0 Kudos

I would say so. Although, as I mentioned before, we haven't tested that scenario yet. I would check with your in-house ABAP expert about it.

I remember the following recent threads -

Let me know your findings as it is going to be my next task. I am on MII 12.1.3 Build(65).

Regards,

Chanti.

Former Member
0 Kudos

Michelle,

there are also other options to get information from SAP to MII. Have you thought about using RFC or IDocs? For example, you can create a RFC or use SAP standard functions which can send data to MII. It is quite easy to customize the connection between MII and SAP for sending RFC or IDoc messages.

Have a look at the following documents:

- [How to send IDocs from SAP ECC to SAP MII|http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/50775783-6cb1-2b10-90b0-e6bc2c0b8563]

- [Calling services and queries in SAP xMII from ABAP|http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/9f101377-0c01-0010-269f-c3ee905d583b]

Michael

Former Member
0 Kudos

I like to know that it is possible to do option 2.

Thank you both. It's nice to have other options.

Michelle

Former Member
0 Kudos

Michelle,

from my experience it is a good idea to separate the message input and processing of the received data. From this point I would recommend to use a web call.

In MII you can configure the XMIIMESSAGELISTENER which is already in place to receive your web calls. Create a Processing rule to process the message and execute your desired queries. This way you will have a good overview of the incoming messages in the MII Message Listener. If there are errors, you may reprocess messages.

You will find several entries in the forum about XMIIMESSAGELISTENER, e.g. thread [Message Listener|http://forums.sdn.sap.com/click.jspa?searchID=37719041&messageID=8400072].

Hope this helps.

Michael