on 10-30-2013 4:00 PM
Hello Colleagues,
I need to achieve following message mapping result
MT_Employee_In
Name
FullName
Contact
StreetNumber
ZipCodeTown
ContactData
Phone
Name
FullName
Contact
StreetNumber
ZipCodeTown
ContactData
Phone
For 2 Employee test User records
I already created a respective message mapping with following DT structures.
Source Structure
Target Structure
Test Input
After executing under message mapping test I receive following context
Please what is wrong and how I am able to get the right structure?
Many thanks in advance!
Regards,
Jochen
Hi Jochen,
add a level of hierarchy in your structure.
MT_EMPLOYEE_Out
Records - declare this 0...unbounded.
Name (same structure like yours below)
first name
......................
Have a similar structure at the target. Map and test again
Ambrish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Ambrish, Hello ALL,
first of all, many thanks to you for your great reply!
All of you helps me very much!
The mapping context issue is solved by additional tag at source structure.
Please see below the adapted mapping configuration
... and the result after executing
Finally one question please.
During my tests regarding occurrences on the source side, I didn't identify any effects to the mapping at all.
It looks like to me, for occurrences on source there is no need to change anything?!
Here you are able to see "UserDate" at source structure is set to 1..1. and it works.
Changes for occurrences only done at target structure.
Regards,
Jochen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jochen,
In source structure you have given max occurrence of UserDate as 1..1. but while running the test I think you are duplicating the node. This makes UserDate appear twice which is more than its max count of 1. Thus the the data not according to source XSD design.
This works during testing but in actual runtime you will find only first of the queue value is picked up for mapping and not the rest.
Regards
Anupam
Hi Anupam,
please find message mapping configuration and the result of the real file test executing below.
For this test I configured a real test scenario with a sender and receiver file adapter (communication channel).
Anupam, you will see that source tag for "FirstName" and "SurName" is still set to 1..1.
"FullName" on the target side is set to 1..unbounded.
Add Test File I added additional tags for "FirstName" and "SurName".
This shouldn't allowed by configuration in the source structure but it works
.
Regards,
Jochen
Hi Jochen,
Another thing in your source structure max occurrence of Name, address and Contact is 1. Thus In run time if you want to generate multiple Names /address/ contact you have to make them 1... unbounded.
Even if you change the occurrence the structure is not suitable since you cannot know which address corresponds to which name. Sender has to to strictly maintain the order, in case of mistakes data might garble up at receiver end.
Regards
Anupam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anupam,
If you encapsulate the NAME, Address and Contact node within a record, which is 0...unbounded, then changing the occurrence of Name, address etc is not required. Joen would need to change the target structure as well and do one to one mapping.
Off course the data from the source should come in sequence per employee.
Hope you agree!
Ambrish
Hi Ambrish,
I understand your point, in fact in my mapping example I did the same.
Then I was trying to do the mapping keeping source structure as provided by Jochen. Then felt that this kind of source structure should not be used as in real production scenario it will be difficult to relate name with address while troubleshooting.
Regards
Anupam
Hello,
Very similar to what u need:
http://scn.sap.com/community/pi-and-soa-middleware/blog/2010/01/14/file-conversion-using-nodeception
Tweak ur target structure (as already suggested above by others) and then use java mapping
Thanks
Amit Srivastava
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.