cancel
Showing results for 
Search instead for 
Did you mean: 

Node Function help required in XML message mapping !!

Former Member
0 Kudos

Hi Brilliants,

Source Message
    <ROOT>			0..1    
      <OUTPUT>		0..n
         <Group_N1> 		0..n	<Header>
            <H02_N1_DTM> 	                     0..1
	 DTM_Y2K_DATE	0..1
         <Group_LIN>		0..n                <Lin Item>
	<Group_ZA>		0..n
	     <D02_ZA>	0..n
      </OUTPUT>
</ROOT>


The above Source <OUTPUT> tag comes 2 times. In this two time, Header comes once per header and more than 50 times Lin item occurs.

Target Message

ProductActivityNotification		                                                  0..n
	ProductActivity	                                                  1..1
		Item	                                                  1..unbound  (Lin Item level on target side)
		   SalesTimeSeries		        0..1
		            Item	                         	        1..unbound
			     ValidityPeriod	         1..1
				StartDate	         0..1
				EndDate	         0..1

The above source message Lin item, whatever the times it replicates, the same number of times u201CItemu201D tag has to occur and DTM_Y2K_DATE value has to pass to StartDate.

Could anybody please put your valuable idea on this? I suppose to deliver this interface tomorrow.

I will highly appreciate your intellectual ability.

Many Thanks in Advance

Kind Regards

San

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Sandhya,

Try in this way:

<Group_LIN> -


mapped to -


Item

DTM_Y2K_DATE -


mapped to --- StartDate

Try to test this mapping with varity of inputs (diffrent occurances of elements) , and adjust the context accordingly.

Thanks ,

Jyoti

Answers (3)

Answers (3)

Former Member
0 Kudos

If I am correct, I understand that you would like to replicate the ITEM tag in the target to replicate as many times as the source structure is provided and also DTM_Y2K_DATE value has to be passed to StartDate.

<Group_Lin>--map directly to ITEM.

DTM_Y2K_Date>Removecontext>startdate

The structures provided seem to be difficult to understand. If my assumption is wrong regarding the query, please provide source and receiver structures once again.

Former Member
0 Kudos

Hi Sandhya,

Have you tried the node function UseOneAsMany. Try using it with the Start date node of your target.

First Parameter: DTM_Y2K_DATE

Second parameter: Group_LIN

Third Parameter: Any item under the main node <Group_LIN>

This should work if my understanding of your problem is correct, else plz give some more clarity on your structure as the structure looks little cofusing.

Regards,

Rahul

Former Member
0 Kudos

Hi All,

Many Thanks, problem resolved, with UseOneAsMany direct to Target element (StartDate)

Cheers

San

Former Member
0 Kudos

HI San,

Based on your this post, i think u want like this way...

How many times from source DTM_Y2K_DATE or <LinItem>(because DTM_Y2K_DATE in LinItem ) occurs that many of <Item> in target is required rt??

Then u map like,

DTM_Y2K_DATE (Change context to LineItem(right clich and choose context)) and map to LineItem of target.

and also now map directly from DTM_Y2K_DATE to Start Date(Dont change any context now..)

If still nt clear do post..

Babu