on 08-19-2010 11:23 AM
I've following requirement
1) output XML consist a section of address data which are mandatory (mandatory data are pointed below with * *);
*<ShipToParty>*
*<Party>*
<Identification>
*<InternalID></InternalID>*
<ExternalID></ExternalID>
</Identification>
*<NameAddress>*
*<Name></Name>*
*<Address1></Address1>*
<Address2/>
*<PostalCode></PostalCode>*
*<City>SANDEFJORD</City>*
<Country></Country>
</NameAddress>
<Contact>
<Identification>
*<InternalID></InternalID>*
</Identification>
*<ContactName></ContactName>*
*<EMail></EMail>*
</Contact>
</Party>
</ShipToParty>
2) I should map from INVOICE02 IDOC partner address data for WE if they exists;
3) In case they doesn't exists I need to map address data from special Z segment;
4) If Z-segment doesn't exist I need to put there some default values (to simplify case, let it be "1");
The point is, that I can would like to find out solution which
A) will use createIf for <ShipToParty> when WE found with else - create covering 2) and 3)
B) I want to avoid checking against PARVW = WE for each node under <ShipToParty>
Any ideas how to create such mapping?
Hi Tomasz
This seems to be your requirement.Correct me if i am wrong
IF PARVW = WE then your creating <ShipToParty>
(if this fails then)
else if Zsegment exists then your creating <ShipToParty>
else you have to pass some default value (constant) which you have mentioned in your point 4)
What default constant to pass? That can be answered by a functional.
You have to create this node as its a mandatory node. I hope this helps.
Thanks
S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
This is not complicated. At the <ShipToParty> you can check the condition using if else conditions, but be sure to pass a default value incase WE condition fails or if Z segment does not exist,,this is a mandatory node and will throw error if not mapped.
Thanks
S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Saiyog
Could you paste an example how you suggest to solve this. I think I can't understand you logic. Why? If I'm checking against WE, on success I'm creating <ShipToParty> node. On false, I'm checking against Z segment. If success then I'm creating, when false then what? I can't find out what to do at this point!
User | Count |
---|---|
78 | |
10 | |
9 | |
7 | |
6 | |
6 | |
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.