cancel
Showing results for 
Search instead for 
Did you mean: 

Order of dublicated subtree in MM

Former Member
0 Kudos

Hi folks,

I have a weird problem:

I map IDOCs to a JDBC structure. I use the JDBC to Insert_Update changes that are transmitted in the IDOC.

Now we discovered that the absence of fields in the IDOC leads to these fields missing as well in the JDBC (of course).

A missing field means that the entry needs to be set to "" in the DB though.

My solution approach is that I duplicated the table-subelement and that I want to have a DELETE message first and then the INSERT_UPDATE I already did.

Anyway - when I dupliate the subtree the new subtree is below the old one. But I need the DELETE first.

Does anyone know how to change the order of the sub-trees?

I also tried to copy the mapping down using a mapping template. But mapping templates never work here. They solely map the first element and everything else is not mapped.

Please help. I don't dare to re-do my some 100 elements mapping...

Cheers,

Helge

Accepted Solutions (1)

Accepted Solutions (1)

former_member189558
Contributor
0 Kudos

Helge,

Is your problem:

After suplicate subtree in mapping it is coming below the existing one?

Then why don;t you just copy the mapping of the first node and paste for the second...?

If you right click and copy any function from mapping editor the whole mapping to the left of the functions will be copied and can be pasted for any other node.....

Thanks,

Himadri

Message was edited by:

Himadri Chakraborty

Former Member
0 Kudos

Himadri,

thanks for that suggestion - anyway this won't help too much as the mappings are basically field1->field2 - nothing in between.....

It would be great to make the mapping template work.

Anyone an idea what could help here?

former_member189558
Contributor
0 Kudos

Helge,

I have a crude and very bad idea ... )

The node you are duplicating say A .. the next duplicated node will be represented as A[1] ..

Now in the dataflow editor you click CNTL + SHIFT _ Rt. Click and can export the whole mapping as MTE file..

Open the file in notepad... replace all the As with A[1] and A[1] with A.... and reimport....

You can try this once.. to check if it works or not...

Cheers,

Himadri

Former Member
0 Kudos

Himadri,

thanks so much! That was exactly the solution I required.

You really saved my day (and probably my weekend as well)

BIG BIG THANKS!

former_member189558
Contributor
0 Kudos

Its feels great to know that it helps....

However unless you actually import it and make it work we can never be sure.. I tried it myself and my system is hanging while importing...

Cheers,

Himadri

Former Member
0 Kudos

Well - I did this [1] excerise an re-imported it.

It worked instantly

former_member189558
Contributor
0 Kudos

Great .. )

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

One option is that you can use a second mapping in the 'Interface Mapping' request side.

Dont duplicate the subtree in the first mapping.

In the second mapping create mapping for Delete statement first, then one to one mapping for the insert_update statement.

If i get any further simpler technique will post you that.

Regards,

P.Venkat

Message was edited by:

Venkataramanan

Former Member
0 Kudos

Thanks for the suggestion.Anyway - it's not really an option since that would required to touch every mapping.

an I have really a lot of fields here...

Former Member
0 Kudos

Helge,

>>Now we discovered that the absence of fields in the IDOC leads to these fields missing as well in the JDBC (of course).

A missing field means that the entry needs to be set to "" in the DB though.

You can map only for the input fields which can be empty during run time..

Your mapping would be like this

Source node -- mapWithDefault -- Target node

Am not sure, if there is annother easy work around to this...

Regards,

Jai Shankar

Former Member
0 Kudos

Have you tried "mapWithDeafault" available in node functions?

Regards,

Jai Shankar