cancel
Showing results for 
Search instead for 
Did you mean: 

How to create transaction to read IDOCs

Former Member
0 Kudos

Hi,

I have xMII 12.0. I have configured the IDOC communication with xMII via Message listener.

When I am trying to send IDOCs those are successfully received in xMII. I have added the xMII_IDOC as category where all IDOCs will be available.

1. Now I am not clear how to access those IDOC data in transaction using Message query and read (Steps for creating transaction).

and

2. how to see the IDOC data in xMII 12.0. I can see the IDOCs coming in xMII in Message monitor but not able to see the data.

I know in xMII 12.0 the IDOCs get stored in NW table, but how to see and access it.?

I saw couple of discussions on SDn, but not able to get the proper direction.

Appriciate quick response on this.

Thanks

Swarup

Edited by: Swarup Sawant on Mar 31, 2009 9:18 AM

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

I am able to use the Message service action blocks for getting the messaage ID and accordingly get the xml data.

But still the questions remained are where I can see the IDOC data ??

&&&

How to access the individual fields from IDOC structure.

Thanks

Swarup

0 Kudos

For just reviewing the IDoc, I would simply read the message in a transaction and use an XML Saver to create a file with the IDoc. Or instead of saving it, simply take the contents of the message and link them to a tracer action block's Message property. Double click on the tracer message in the execution window to copy. Then you can paste it to an editor.

Good luck,

Mike

matthias_prller
Participant
0 Kudos

Hello Swarup,

when I tried to read the Data I had problems to get them into the transaction. The problem was, that I used an transaktion Input type xml but string is the correct one in this case.

If you use a string-input you can pass the data to a tranascation in the Message Processing Rules.

Just for testing I added the "string-input" as an attachement to an e-mail and send it to my e-mailadress and this worked very well.

Hope this helps you.

Regards,

Matthias

Former Member
0 Kudos

Hi Mike,

I use the xml server and now I could be able to see the IDOC xml as you had said. thanks...

But as you had said this will help to simply read the data.

If we need to use the individual data/ IDOC fields for further processing in the transaction the how to access those specific IDOC structure.

Thanks

Swarup

Former Member
0 Kudos

Hi Matthias,

I am able to get the IDOC data with Read message. As per the suggestion from Mike, I could be able to write the xml file as well.

But the concern is to how we can access the individual fields of IDOC in further processing of transaction.

Thanks

Swarup

0 Kudos

Create a Local property of type xml. Take a copy of your IDoc and paste it in the Local property. That will allow you to have a template for mapping your fields.

When processing your Message (IDoc), assign it to the Local property. Then continue with whatever processing you need. Your fields should be easily dragged and dropped.

Enjoy,

Mike

Former Member
0 Kudos

Hi,

That makes more sense for me. This will definately help to access individual IDOC fields.

I will try on this.....

Meanwhile Please can you help me to clarify my understanding on one more issue.

I have the transaction to query message then read it with message ID and write to XMLserver i.e. IDOC.xml

Now whenever IDOCs will be processed from SAP, those will overwrite the file IDOC.xml.

Is there any way that we can access the previous IDOCs as well.

Please let me know about it.

Thanks

Swarup

0 Kudos

Use a unique name for the IDoc. Some folks use either some version of a timestamp name structure. Others read the EDI segment of the IDoc and use the IDoc type and DOCNUM for a unique name.

But make sure you come up with an archiving or clean up process for periodic purging.

Good luck,

Mike

Former Member
0 Kudos

That's really cool. and the important thing will be to clean up the messages.

But is it possible that if we setup the cleanup then the file that will be created will also be deleted.

The cleanup will delete the IDOCs maintained on the categaory that will be defined in Mesasge Service.

Please correct me if my understanding is wrong.

Thanks

Swarup

0 Kudos

If you save the file after successful processing, you can use Get File List action block to determine the age of the file. Then you can either delete the file after some preset time frame, archive it to some longer term storage option (file server, perhaps), or limit it to a certain number of files with the oldest ones being deleted.

I would not recommend using the Message Services Queue to store after the IDoc has been successfully processed.

I suspect that after a while, you may find the value of the saved file to be minimal once it has been successfully processed. That is why I emphasize the automated clean up process.

Good luck,

Mike