cancel
Showing results for 
Search instead for 
Did you mean: 

B2MML and xMII

Former Member
0 Kudos

Hello,

I'm trying to get the following problem solved:

If in SAP a production order is released, I wan't SAP to send the corresponding B2MML-file (ProductionSchedule)

to an external application that processes and evaluates the data and finally sends a B2MML-file (ProductionPerformance) back to the SAP System. The SAP system should then update the Data corresponding to the ProductionPerformance-file.

My central issue is that I still don't have any access to a SAP system (I'll still have to wait for this a few weeks) so my study was merely theoretical.

Btw, if anyone can suggest a good book for this kind of problem I would be very grateful. Last week I ordered Implementing and Configuring SAP MII by Abesh Bhattachargee - hope this will help.

As I learned by now there are several ways to get this problem solved and xMII should be the best way to do so.

But how can I trigger xMII to create a ProductionSchedule and send it to the external application? What are the first steps in the right direction?

thanks in advance,

Pete

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello,

thanks for your detailed answer.

I still got an understanding problem. You wrote "Once you get the SAP data you can then model a BLS using the Reference Document and other Logic and XML action blocks to transform the SAP interface XML into ISA95 B2MML XML"

What do you mean by model and how will this work? Can SAP or rather xMII automatically transform the data in B2MML or will I have to "map" the data somehow to the XML structure of the B2MML files?

If I will have to map the data by myself (to a B2MML XML), it would also mean that I'll have to understand the B2MML standard completely.

regards,

Pete

former_member4529
Active Contributor
0 Kudos

Hi,

Sorry for the confusion. Yes you got it correct - BLS is a logic development framework in MII using which you can model business logic for data processing graphically using action blocks provided there. To generate or transform the B2MML messages you need to develop the logic in BLS to transform one XML structure into another. And for that ofcourse you need to have detail understanding of both SAP interfaces as well as B2MML. As per my experience goes it is very difficult to provide a generic B2MML mapping which will satisfy everyone's need and in almost all cases I've seen the B2MML is customized according to the specific MES/process requirements. So the best way to go forward should be to leverage the terminology, object and message definitions from ISA95/B2MML to enable the common communication standard across different plants and then customizing the detail message structure according to the local requirements.

Thanks,

Dipankar

Former Member
0 Kudos

I see...

"As per my experience goes it is very difficult to provide a generic B2MML mapping which will satisfy everyone's need"

I understand this difficulty entirely (even though I believe that industry standards shouldn't be customized that much).

Is there any generic B2MML mapping for xMII which I can use to start from (which would be very helpful)? And are there any example B2MML files (because I couldn't find any on the net)? I always thought that SAP would support B2MML by now so that it does the conversion automatically.

Thanks,

Pete

former_member4529
Active Contributor
0 Kudos

Hi,

You can download the B2MML xsd from [WBF Website|https://www.wbf.org/catalog/b2mml.php]

SAP provided an example ISA95/B2MML mapping in MII sometime back in SCN which is not available anymore there. Maybe you can contact SAP for that. But I think you should first look at your local MES interface requirements to define the B2MML mappings.

Thanks,

Dipankar

Former Member
0 Kudos

Thanks for your help, Dipankar!

Who can I contact for the B2MML mapping for xMII?

I downloaded the xsd files already and read the documentation.

"But I think you should first look at your local MES interface requirements to define the B2MML mappings"

In the beginning I thoght that I could do it like this:

1. SAP automatically generates and sends (on production order) B2MML XML file to my application

2. In my app I extract the data that I need from the B2MML file and process it (Here my plan was to map between B2MML and other Systems - so there is phyically no MES System in between).

3. Then I generate another B2MML XML (ProductionPerformance) in my app and send it back to SAP

4. SAP receives the B2MML and automatically extracts and updates the data.

That's how I thought the things would work.

Thanks,

Pete

Former Member
0 Kudos

Hi Pete,

we are using B2MML in projects, and I would also follow Dipankars proposal and download the B2MML schemas from the wbf site to a MII folder. Inside the MII workbench, you can then use the reference schema loader to load the Schema you need. The MII Link editor displays all the contained nodes you are able to use in your mapping. You may assign some values and use the XML Saver action to save the B2MML file. This way you can easily build your own example files.

It is quite easy to add new properties to the "standard" B2MML, using the "frame" definitions that the B2MML offers. I can understand your wish to find some out of the box functionality for the data transfer from SAP XML to B2MML, but I think you will always have to do some kind of customizing and / or mapping. The act of creating a BLT is quite straightforward, if you had your mapping ready and discussed with both ends (production and SAP). The Link Editor helps you with some nice XML features to build the target B2MML, or to extract values from a B2MML.

Before downloading anything from the wbf site, you should check which B2MML version you need. Currently there are at least 4 versions available. In one of our projects we had to use a specific version which our MES system could understand.

Michael

Former Member
0 Kudos

Pete,

this may be a plan for you:

1. SAP sends a LOIPRO to MII

2. MII extracts the values from LOIPRO and builds a B2MML ProductionSchedule xml and sends it to MES

3. MES generates a ProductionPerformance and sends it to MII

4. MII extracts the values and builds the CONS and PROD messages for SAP

5. MII send the messages using BAPI BAPI_PROCESS_MESSAGE_CREATEMLT

This would be your way, I guess.

Michael

Former Member
0 Kudos

Thanks Michael,

this was very useful.

As I mentioned in my first post I ordered Implementing and Configuring SAP MII by Abesh Bhattachargee.

Will this book provide me with all the information and knowledge for solving that problem (on SAP side) or should I definitely get myself another book (if so - what book?)?

thanks,

Peter

Former Member
0 Kudos

Pete,

I have just got the book yesterday...from my first look you will find all the information needed to build BLTs.

However, if you never worked with MII before, I would recommend to attend a regular course where you will get your first practice in working with MII. You will get your "real" knowledge when you are working in your first project.

Besides the book, I strongly recommend to have a look at the [SAP MII Best Pratice Guide|https://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/f08d7ae2-6f56-2c10-50b4-8a3bb1d43502] before you start a project. Have a look at the naming conventions and other tips to organize your project.

You should come back to this forum in case of questions. Also have a look at the Wiki and download area. You will find some [sample projects|http://www.sdn.sap.com/irj/scn/manufacturing-tools] that you can directly import into your MII system. You can take this as a foundation to see how SAP has built the wheel...

Good luck!

Michael

jcgood25
Active Contributor
0 Kudos

Aren't standard just wonderful - there are about as many hacked versions of B2MML as there are limiting OPC server implementations (OPC being a standard where 90% of it seems to be optional).

Answers (2)

Answers (2)

Former Member
0 Kudos

hello,

I received the book today and it really seems that it will be very helpful.

However, I read also before that it is possible to solve such a problem with SAP XI or PI.

In XI it is also possible to load XML-schemas such as the B2MML xsds and handle ProductionOrders (by transforming IDOCS in B2MML manually - as with xMII).

One of the requirements was that I need SAP to send me a B2MML when a new production order is released. With xMII

this is possible. Is it also possible with XI/PI? Or will I have to poll XI from my application every now and then to see if a production order was released (and if so then download it)?

What are the benefits of using xMII or XI/PI? What's better for this scenario and why? (I really don't know where to find answers to such questions else than in these forums)?

regards,

Pete

Former Member
0 Kudos

bump...

after some work with XI, I still don't know the pro's and con's of both MII and XI/PI.

I know that the Message Service is a big pro on the side of MII.

Does anybody have the neccessary knowledge to compare both systems? What are the pros and cons and what are the application areas?

regards,

Lunatikk

Former Member
0 Kudos

Lunatikk,

this topic XI vs. MII has often been asked in this forum. If you use the search function with term "XI" and the Date Range "Last Year", you will find several entries like "XI vs. XMII".

You may start with the thread [xMII vs. XI|/thread/173946 [original link is broken]; which is also linked in the [MII Wiki FAQ|https://wiki.sdn.sap.com/wiki/display/xMII/FAQ].

If you have more questions that are not answered in one of the existing threads, please start a new thread.

Michael

former_member4529
Active Contributor
0 Kudos

Hi,

First of all thanks for ordering our book on MII which we think shall help you in your MII implementation project to a great extent as well as learning the new solution.

Though you can get the details of ISA95 implementation using MII in our book in Chapter 10, let me give a brief outline here for benefit of everyone.

You can either trigger an IDoc or tRFC or Outbound Asynchronous Enterprise Services from SAP ERP and receive that data in MII using the Message Services, which will get buffered in MII database, otherwise you can pull the data from ERP by executing RFC/BAPI or synchronous Enterprise Services from MII BLS using JCo/JRA or Web Service action blocks respectively. Once you get the SAP data you can then model a BLS using the Reference Document and other Logic and XML action blocks to transform the SAP interface XML into ISA95 B2MML XML, which then you can send to other external system by executing an external web service or by HTTP call. Similarly from the external system you can send the B2MML XML message to MII Message Service using the HTTP Post to the XMIIMESSAGELISTENER which gets buffered in MII and then you can transform it by BLS into the SAP interface format as required and can update in SAP ERP by executing RFC/BAPI/Enterprise Services. You can refer our book for more detail and step by step description of how to configure Message Services or model BLS using the action blocks.

Thanks,

Dipankar