on 12-04-2006 3:39 PM
Hi All,
I've got a IDoc to Soap call scenario working for me with simple mappings. The scenario is as follows.
If any field in a segment is modified, the entire segment is sent in an IDoc to XI. This gets mapped with a SOAP call to a webservice.
<b>The Problem:</b>
The problem arises, when a field is deleted(not modified) in SAP. This triggers an IDoc to XI, which contains the segment(but the deleted field is missing). Since the field is missing, it doesn't get mapped to the SOAP call(with empty tags <tag></tag>) and the logic breaks!
<b>The Solution:</b>
a. Check if the segment exists.
b. If so, pass empty tags(<tag></tag>) for all the fields missing in the IDoc segment.
<b>The Problem with the Solution!:</b>
a. This logic needs to implemented at a per field level! So if I have 20 fields per segment and 5 segments, it means 100 modifications!
b. And if I have multiple interfaces/IDocs!!!
Is there a better way to do this?
Thanks,
Harsh
Harsh,
If you see your outbound idoc to file interface in ur implemenation..you can see that we used a UDF to generate mandatory fields even if source idoc doesnot provide..:)..but yes u have to do mapping at every field or use XSLT or java mapping if you wanna avoid that..:)..You are a java expert..choice is yours:)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Harsh,
The approach you have taken is correct. But instead of doing a if exists check you can do like following
Source=>mapWithDefault=>Target
With this evenif the source is not having the field which is deleted, the XML tag will be generated in your target side.
But unfortunately this you need to do it at field level.
Cheers
JK
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
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.