on 12-02-2013 7:19 AM
Greetings experts!
It is often needed to interact with data placed in SQL DBs from SAP MII to execute different transactions in SAP ERP. The most common scenario of SQL-to-MII interaction is described below:
In common, I need to execute two basic actions: download data from SQL and transfer data to ERP.
I am not very expirienced in SAP MII, so I use the following approach to download data from SQL DB:
This approach works fine, but I think it's not a good practise. I need to run the download transaction periodically to monitor new records in SQL DB.
The question is: Is it possible to trigger MII download transaction from SQL? Maybe by webservice or another kind of messages that need to be placed in SQL trigger? If it is possible, I will not need to monitor new records in SQL DB all the time. The trigger will initiate the download and SQL data will be stored in MII MDO in online mode.
Any reply will be greatly appreciated!
Thanks in advance!
Best Regards,
Vitaliy
Well, I can suggest
1. To write stored procedure in SQL and use trigger. Can send as message to MII and can be recieved through Message Listenser exposing the webservice.
2. Develop MII screen and provide to SQL user so that user clicks on some button when there is a change, so that button activity can run your transaction to make new insertions.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello, Padma
Thank you a lot for your answer. Sorry, but I've never worked with messages before.
I have three kinds of Message Listeners in MII: XMIIIDOC, XMIIRFC and XMIIMESSAGELISTENER. As I've understood I have to use the last one to communicate with SQL. Is that correct?
And how will I preceed the messages in MII? Should I use "Read Message" Action Block? Or maybe another one?
Can you please guide me how to set up this process?
Thank you for your time!
Best Regards,
Vitaliy
Hi Vitaliy,
Can you just let me know where you pulling data? Is it from ERP? or some legacy system DB(some oracle or sql DB)?
I can say there are 3 Message Type and corresponding server or resource adapters used :
1. Web Service : XMIIMESSAGELISTENER
2. IDoc : XMIIIDOC01 to XMIIIDOC10
3. RFC : XMIIRFC01 to XMIIRFC10
Again, there are 2 types of Processing once you recieve any message to MII
1. Transaction --Synchronous Processing
2. Category -- Asynchronous Processing
Check link below for more understanding
Message Processing Rules (SAP Library - Message Services)
If you choosing Transaction, it is synchronous processing, If suppose using RFC to recieve data , then it immediately calls the MII linked transaction and executes. Even if second message is sent,it takes second message only after it process the first.
if you choosing Category, It is asynchronous and messages are stored in queue/data buffer which is retrieved and processed from queue using Message services actions in your Transaction and you should schedule transaction in Schedule Editor.
SAP Library - SAP MII Workbench
You can expose the webservice URL to get messages through message listener as below. You can test this in HTTP post action of MII.
Web Service Interface - Content Development - SAP Library
Just let me know where you getting data from to MII.So I can say what method is best.
Thanks,
Padma Rao
Hi Vitaliy,
Make use of XMIIMESSAGELISTENER and give an webservice url to send data when there is new data. In MII create a processing rule of type Transaction(I mean processing type is Transaction and link your download transaction)
You can use Webservice URL as below
You can create single MII Transaction to get new data and send to ERP as below.
Warm Regards,
Padma Rao
User | Count |
---|---|
13 | |
6 | |
3 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.