cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping default values

former_member737583
Participant
0 Kudos

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?

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member193376
Active Contributor
0 Kudos

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

former_member193376
Active Contributor
0 Kudos

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

former_member737583
Participant
0 Kudos

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!