cancel
Showing results for 
Search instead for 
Did you mean: 

Grouping of Records having same Key and posting an IDOC

Former Member
0 Kudos

Hi ,

I has a small Requirement where i need to group records having same key and create an IDOC for this records having similar key.I need to create another IDOC if the key value changes .

Iam having the following XML structure where C93 is the key field value which will have dynamic value

where i need to Group the records having the same vale for C93 and create an IDOC for this .

When the value of C93 changes a new IDOC needs to be created .Please suggest me how i can do this in Mapping.Request you to please Guide

For eg:

<?xml version="1.0" encoding="UTF-8"?>

<ns0:parmReport xmlns:ns0="">

<Report GROUPID="20" C93="Ny ordre-8718" C94="697005" C96="3"

</Report>

<Report GROUPID="20" C93="Ny ordre-8718" C94="697005" C96="3"

</Report>

<Report GROUPID="20" C93="Ny ordre-8718" C94="697005" C96="3"

</Report>

<Report GROUPID="20" C93="Ny ordre-8718" C94="697005" C96="3"

</Report>

<Report GROUPID="20" C93="Ny ordre-8718" C94="697005" C96="3"

</Report>

<Report GROUPID="20" C93="Ny ordre-8720" C94="697005" C96="3"

</Report>

<Report GROUPID="20" C93="Ny ordre-8720" C94="697005" C96="3"

</Report>

<Report GROUPID="20" C93="Ny ordre-8720" C94="697005" C96="3"

</Report>

<Report GROUPID="20" C93="Ny ordre-8740" C94="697005" C96="3"

</Report>

..............................................................................................

..............................................................................................

</ns0:parmReport>

Thanks & Regards,

Yeswanth Raj

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi,

you can use node function split by value (for value change).

regards,

navneet

Former Member
0 Kudos

Hi navneet,

could you please elaborate how to use this function in Mapping.

Thnaks & Regards,

Y.Raj

Answers (1)

Answers (1)

SudhirT
Active Contributor
0 Kudos

Hi,

I guess Keyfield is coming as an attribute,Do as below

KeyField------>removeContext(node fun)------->(SplitByValue)(NodeFunction with property Value Change)---->target

Thanks!