cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping requirement

Former Member
0 Kudos

Hi

I've the source like this

Header

2154001 1258

items

123 121 001 900

124 122 001 900

125 123 001 900

126 124 001 900

trailer

BYE-BYE-one

header

2154002 1258

items

123 121 001 900

124 122 002 900

125 123 003 900

trailer

BYE-BYE-two

header

2154003 1258

items

123 121 001 900

124 122 001 900

125 123 001 900

126 124 001 900

123 121 001 900

124 122 001 900

125 123 001 900

126 124 001 900

123 121 001 900

124 122 001 900

125 123 001 900

126 124 001 900

trailers

BYE-BYE-three

MY REQUIREMENT IS

Each header should have ONE item and One trailer.

Regards

S.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi swarna,

explain in detail with example - what u want at target end as well.

requirement is not clear.

chirag

Former Member
0 Kudos

According to the above Input - the OUT PUT SHOULD be

154001 1258

123 121 001 900

BYE-BYE-one

2154001 1258

124 122 001 900

BYE-BYE-one

2154001 1258

125 123 001 900

BYE-BYE-one

2154001 1258

126 124 001 900

BYE-BYE-one

........

.......

Thanks much.

former_member556603
Active Contributor
Former Member
0 Kudos

Hi ,

Map header and trailer as UseOneAsMany to each item node at target and map item values one to one...

Regards,

akshay.

Former Member
0 Kudos

hi swarna,

read the file usig file content conversion with key value, after reading

Create target node as below

Root -0-unbounded

- Header -0-1

- Item - 0-1

- Footer 0-1

Map root node with item.

Use split by value with item mapping.

Just try with the above function.

chirag

Former Member
0 Kudos

Hello Akshay,

The given logic does not work.

S.

former_member556603
Active Contributor
0 Kudos

Dear Swarna,

Youn can achieve with SplitByValue

Use

SplitByValue() is the counterpart to removeContexts(): Instead of deleting a context, you can insert a context change in the source value queue. You then receive this element for each inserted context change instead of a top node element. However, for this to be possible, the top node source field must be assigned a top node target field and minOccursmust be >0. A maximum of minOccurs top node target fields can be inserted here.

You can insert a context change in the queue after each value, after each change to the value, or after each tag without a value.

Please follow the below example:

http://help.sap.com/saphelp_dimp50/helpdata/en/21/3bb8c495125e4eb5969f0377885fe0/content.htm

Thanks,

Satya Kumar

Former Member
0 Kudos

HI,

You hae to apply split by value after applygin use one as many .

Whatever logic is applied at node level has to be same for each field from header and trailer.

Regards,

akshay.

Former Member
0 Kudos

SOURCE AVAILABLE FOR ME

100001 2014

2001 1325 2145 1254

2002 1326 2146 1255

2003 1327 2147 1256

Good-day.

TARGET SHOULD AS FOLLOWS

100001 2014

2001 1325 2145 1254

Good-day

100001 2014

2002 1326 2146 1255

Good-day

100001 2014

2003 1327 2147 1256

Good-day

So, now I need to acheive this target. As suggested by many i cant get my target structure.

Hope my requirement with the above would be very clear to you.

Thanks.

Former Member
0 Kudos

HI,

Map this node values using use one as many to target node.

-


header

100001 ->useoneasmany->splitbyvalue->target

2014->useoneasmany->splitbyvalue->target

-


item

2001->spklitbyvalue->target

1325 ->spklitbyvalue->target

2145->spklitbyvalue->target

1254->spklitbyvalue->target

-


Good-day->useoneasmany->splitbyvalue->target

-


You have to consider contexts accordingly.

hope this helps.

regards,

akshay.

Former Member
0 Kudos

Granted for all your help.

It's enough to map with node levels with the one as many + split by value. As, am expecting to repeat the header for every item, So, I have mapped item node to top record node level.

Done.

Answers (0)