cancel
Showing results for 
Search instead for 
Did you mean: 

extract data from Idoc and send to SQL query

former_member745782
Active Participant
0 Kudos

hello everybody,

I'm new in MII. I'm triing to build a very easy transaction but i'm lost and I don't find any information about this:

I'm sending an Idoc from ECC (LOIPRO01) and i want write in a sql table the data stored in a specific segment.

I configured correctly everything and Idoc arrive in MII but i cannot understand how and where configure steps necessary for retrieve data and map it into sql statement.

At the moment my trasaction is build like this:

DOCUMENT (SAP MII XML Document)

       I

      V

XML SAVER (Web)

       I

      V

SQL QUERY (Data Queries)

It's correct? some step are missing?

How i need configure first step?

Where i can find examples or documents about build Transaction?

thanks in advance

Alessandri

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Alessandro,

when you are receiving an IDOC then it comes to MII in Message service. So you have to read the IDOC from there. Now there have two way to read data from message service.

1) Using Category based processing rule

2) Using Transaction based rule

For both the cases you have to define a processing rule (Message Services --> Message Processing Rule from MII admin pages).

If you want to create a Category based processing rule then you have to define a category and have to assign it to the listeners

If you want to create a transaction based processing rule then you have to assign the transaction name by which you want to process and have to assign it to the listener.

Now,

if you are using category based processing rule then you have to create a BLS and have to call that BLS from the scheduler by some interval. and within the the BLS you have to use "Query Message" action block to get the message ID and then have to read the msg by "Read Message" action block for that same message ID. then you will get the IDOC XML in your BLS.

Hope it will help you.

Regards,

Suman

former_member745782
Active Participant
0 Kudos

thanks so much.

we decided to use Transaction based rule.

Former Member
0 Kudos

Hi Alessandro,

Just to add one point, as you mentioned in your post that the you are going to use LOIPRO IDOC for your solution, so I can suggest you (from my SAP MII experience), you may use category based rule.

If you use category based rule then you can kind of tagging the IDOC msg with a message ID. So it will help you lot later.

The advantages you will get from it, they are:

1) You have no need to store the complete IDOC XML anywhere.

2) You can reuse the same IDOC XML anytime anywhere just by reading the msg using "Read Message" action block by the Message ID

3) You only need to store the message ID and few key fields only in the SQL table, so it will help you query small amount of data. and anything else from the IDOC you can get by simply reading by the message ID.

4) Last but not the least, performance wise it will be a good solution.

Hope it will help.

Regards,

Suman

former_member745782
Active Participant
0 Kudos

thanks so much for your suggestion!

Answers (0)