XI/PI在开发过程中最容易也是出错最多的地位就是mapping.错误大多数是结构不正确与数据不符合要求等。今天找到了一篇文章讲的就是怎么对报错mapping进行测试。
[size=medium]
[b][color=red]转自:http://sap-xi.com/sap-xi-tutorial-test-mapping.html[/color][/b][/size]
Author : Himesh Rashi
This tutorial shows a very simple path on how to test them with two scenarios:
a) if you're not using BPM
b) if you're using BPM
When you send the data to XI you might see that your mapping program doesn't always work the way
you'd like it to work. Very often it's because either your Data Type or your inbound message
does not have a correct format. Your mapping program works when you test it from the Test Tab
(inside Integration Repository) but you wonder why is shows mapping errors when you send a real message.
The best (and only?) way to resolve such errors is to use the REAL inbound message.
Testing mapping programs without BPM.
Step 1
- go to TCODE - SXMB_MONI
- choose you message
- choose the payload of the inbound message
[img]http://dl.iteye.com/upload/attachment/0062/2696/0de4bb66-3f52-3d98-8728-46c8b3c54705.jpg[/img]
Step 2
- copy the source XML of your message
[img]http://dl.iteye.com/upload/attachment/0062/2698/7f2a5dd9-e521-313a-859d-c9aed232934b.jpg[/img]
Step 3
- paste the source of your message into your mapping program
[img]http://dl.iteye.com/upload/attachment/0062/2700/44fba79b-392c-3ff9-b2bb-bebe4992094d.jpg[/img]
Now you can be sure that you test a correct message.
Testing mapping programs with the use of BPM.
Step 1
- open the Technical workflow log of your BPM
- choose Show container option (from your mapping step)
- choose your inbound message
[img]http://dl.iteye.com/upload/attachment/0062/2711/34fc67c3-8f18-39e7-b3c0-baa8769ff6ab.png[/img]
[img]http://dl.iteye.com/upload/attachment/0062/2719/e045d6c8-7157-3a32-9207-c97496a76cf2.png[/img]
Step 2
- open your message and now follow the same steps as for testing without BPM
With these few steps you can be sure that the message you test has a correct format - exactly the one that was sent to your adapter, so you can debug it easily inside your mapping program.
[size=medium]
[b][color=red]转自:http://sap-xi.com/sap-xi-tutorial-test-mapping.html[/color][/b][/size]
Author : Himesh Rashi
This tutorial shows a very simple path on how to test them with two scenarios:
a) if you're not using BPM
b) if you're using BPM
When you send the data to XI you might see that your mapping program doesn't always work the way
you'd like it to work. Very often it's because either your Data Type or your inbound message
does not have a correct format. Your mapping program works when you test it from the Test Tab
(inside Integration Repository) but you wonder why is shows mapping errors when you send a real message.
The best (and only?) way to resolve such errors is to use the REAL inbound message.
Testing mapping programs without BPM.
Step 1
- go to TCODE - SXMB_MONI
- choose you message
- choose the payload of the inbound message
[img]http://dl.iteye.com/upload/attachment/0062/2696/0de4bb66-3f52-3d98-8728-46c8b3c54705.jpg[/img]
Step 2
- copy the source XML of your message
[img]http://dl.iteye.com/upload/attachment/0062/2698/7f2a5dd9-e521-313a-859d-c9aed232934b.jpg[/img]
Step 3
- paste the source of your message into your mapping program
[img]http://dl.iteye.com/upload/attachment/0062/2700/44fba79b-392c-3ff9-b2bb-bebe4992094d.jpg[/img]
Now you can be sure that you test a correct message.
Testing mapping programs with the use of BPM.
Step 1
- open the Technical workflow log of your BPM
- choose Show container option (from your mapping step)
- choose your inbound message
[img]http://dl.iteye.com/upload/attachment/0062/2711/34fc67c3-8f18-39e7-b3c0-baa8769ff6ab.png[/img]
[img]http://dl.iteye.com/upload/attachment/0062/2719/e045d6c8-7157-3a32-9207-c97496a76cf2.png[/img]
Step 2
- open your message and now follow the same steps as for testing without BPM
With these few steps you can be sure that the message you test has a correct format - exactly the one that was sent to your adapter, so you can debug it easily inside your mapping program.