cancel
Showing results for 
Search instead for 
Did you mean: 

Scales to SAP ERP integration

Former Member
0 Kudos

Greetings!

First of all I want to say that I am new in SAP MII, so please excuse me for my incompetence.

I am developnig the project which main aim is "Scales-to-SAP" integration. Accordings to the terms of the project, the integration platform is SAP MII. Up to this current moment, I've made some progress - SAP MII recieves data from scales. Basically, the information channel has the following architecture:

Scales PLC -> ERP-Scale Software -> SAP MII

Information transferring process:

1. Scales PLC generates information packet (contains weight, date, time, .. etc) and sends it to ERP-Scale;

2. ERP-Scale parses the incoming message and generates an XML in xMII format;

3. SAP MII communicates with ERP-Scale built-in Webserver and executes on-demand XML queries to receive data from scales.

As a result, MII can receive an information about current scales status at the moment when XML query was executed.

The integration project has two goals:

1. Scales data trasferring to SAP ERP;

2. Data visualization and monitoring.

I have faced problems to reach that goals.

Scales data trasferring to SAP ERP. According to the project terms, SAP ERP must receive the information about the batch of units (10-20 entries). As I understood, I have to from MII "reports" (or tables) in XML or iDOC format with the information about currently weighted batch, and then sent them to SAP ERP (by using transactions). I have learned lots of MII manuals and read different forums, but still have no idea about approach for this case. I have found the information about MDO (manufacturing data odject) that can create and populate own database. Maybe this is the correct solution?

Qusetion 1: Can someone help me to figure out the suitable approach for this situation: geathering one-row-queris data into a package and transmitting it to SAP ERP?

Data visualization and monitoring. As MII is able to get data about current scales status, I can create grids (or others applets), that indicates currently received data (from on-demand XML query). But this is not enough. The customer want to see not only current data, but weghting history also. According to project terms, the usage of historain software (e.g. SQL Danabeses) must be avoided.

Question 2: What approach can be used in this case? Maybe I have to create "SAP MII-to-SAP ERP" queries to get the historian data? Or maybe there is another solution?

Any help, any recomendation and any reply will be greatly appreciated!

Best regards,

Vitaliy

Accepted Solutions (1)

Accepted Solutions (1)

former_member4529
Active Contributor
0 Kudos

Hi Vitaliy,

To update the weighing data to SAP ERP you can execute a RFC/BAPI from MII using the SAP JCo interface action block passing the relevant data to its input parameters. So when you are getting the weighing data from the scales call the RFC from BLS transaction and update that in ERP. I guess you need to pass few more relevant information to ERP along with the weighing data, for which you need to clarify the logic and the available RFC interface from the SAP team.

To display historical weighing data you need to store it somewhere preferably in a Plant Historian, as time-series data. In absence of which you can probably use MDO to temporarily store the weighing information, from which you can query and display in reports/charts over a period of time. Also it'll be a good practice to have a clean-up mechanism to delete the old data from the MDO which you don't need after a certain period of time.

Let me know if this helps.

Thanks,

Dipankar

Former Member
0 Kudos

Hello Dipankar,

Thank you for your prompt reply, it is realy helpful and I greatly appreciate it!

As I assumed, usage of MDO is the best approach to fit the terms of my project. Unfortunately I've faced the problem in the very beginning of MDO implementation. When I try to create new MDO, MII shows an error message: "The system could not access the MDO data source".

I've checked the MDOConnector status (in "Data services" -> "Data servers") - it is switched on, but in "System management" -> "System administration" menu field "MDO data source" is blank.

Question: Can this cause the mentioned error? If so, what should be placed into that blank field? Maybe, the problem reason is different?

Please, help me to solve this problem, any reply will be greatly appreciated!

Thank you!

Regards,

Vitaliy

former_member4529
Active Contributor
0 Kudos

Hi Vitaliy,

It seems you are using an older SP of MII 12.2 when separate MDO datasource was being used. From SP03 now the MDO datasource has been moved to NetWeaver database itself and that way it has become much stable and  with no extra configuration. Please upgrade to SP04 and I hope that will resolve your issue.

Thanks,

Dipankar

Former Member
0 Kudos

Hi Dipankar,

Thanks a lot for your reply. Can you please tell me, where can I download MII 12.2 SP04?

Regards,

Vitaliy

former_member4529
Active Contributor
0 Kudos

Hi Vitaliy,

You can download it from SMP (service.sap.com). Please check with your BASIS team.

Thanks,

Dipankar

Former Member
0 Kudos

Hi Dipankar,

Thank you a lot for your reply, it was very helpful! According to your advise, SAP MII 12.2 was updated to SP04 and the mentioned issue ("The system could not access the MDO data source") was resolved.

I have started to explore MDOs and ways to apply them in "Scales-to-SAP" integration project. As was mentioned before, it is planned to use MDOs as a temporary weghting data storage. I have viewed diferent topics and manuals on SCN and geathered some information about MDO. As I've understood, I need to create a "Persistent MDO", indicate the datasource for it (I use XML-query). Then I have to create the MDO-query with "Insert" mode selected to populate the MDO (Is my understanding of the process correct?).

Unfortunately, the only progress I have achieved is that MDO can receive one data string from scales with its current status, whereas I need to store those XML data strings into MDO.

Can you please help with the issue of storage data into MDOs? What should be done first, second and so on? Any reply and kind of help will be greatly appreciated!

Thanks a lot for assistance and excuse my for my incompetence!

Regards,

Vitaliy

former_member4529
Active Contributor
0 Kudos

Hi Vitaliy,

It depends on how you get the data from scales. If you can simply query the scale software by a webservice or HTTP/XML call then you can probably get set of values in BLS and then loop into the XML rows (using Repeater action) and then call the MDO insert query to insert those data. You may need to build the check so that no duplicate data is inserted (using timestamp or other key as available).

Otherwise if the scale software can directly call MII to pass the data, then you can provide the BLS URL as a HTTP service (Runner) or WebService (WSDLGen) which it'll call and inside the BLS you can simply call the MDO insert query to insert the data from the BLS input parameters.

Thanks,

Dipankar

Answers (0)