Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content

PI7.1

Former Member

- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content

on 02-09-2012 7:22 AM

Hi,

I am working on a message mapping.

Its IDoc to EDI message mapping.

There is one target node Root for which the mapping is done this way

E1EDK02-Qualf(Context-IDoc)-FixedValueMapping(for keys 001,002,012)-equals~~createif~~Root

(1)

Now to accomodate a few business requirements we splitted the logic by duplicating the Root,that total no Root node =3,one for keys001,002,012,second for001,002,third for 012,but now instead of 3 Root node,6 root nodes are getting created?

Can you please guide me?

Thanks

- SAP Managed Tags:
- SAP Process Integration

rajasekhar_reddy14

Active Contributor

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Report Inappropriate Content

02-09-2012
8:11 AM

Hi,

I am not 1005 clear about your requirement.

But try below mapping logic.

Create 3 root nodes at target and write a mapping logic like below.

use same mapping logic but in fix value table remove entries and compare with constant 001 like same way for 2nd root node 002 and 3rd root node 012.

Regards,

Raj

Former Member

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Report Inappropriate Content

02-09-2012
8:16 AM

Former Member

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Report Inappropriate Content

02-09-2012
8:18 AM

> How can I implement it without fixed vale mapping?

Yes

for first node give the map condition like

E1EDK02-Qualf~~Equals(001 and 002 and 012) createif~~targetnode(1)

For second node

E1EDK02-Qualf~~Equals(001 and 002) createif~~targetnode(2)

For third node

E1EDK02-Qualf~~Equals(012) createif~~targetnode(3)

Regards,

VR

Former Member

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Report Inappropriate Content

02-14-2012
4:49 PM

answered

former_member184681

Active Contributor

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Report Inappropriate Content

02-09-2012
7:59 AM

Hi,

total no Root node =3,one for keys001,002,012,second for001,002,third for 012

Look at your mapping again. For key 001, root 1. and 2. are created. For key 002 - roots 1. and 2. And for key 012 - roots 1. and 3. The total is 6 roots You will have to modify the conditions if you require precisely 3 roots (create one root per one key, most probably).

Hope this helps,

Greg

Former Member

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Report Inappropriate Content

02-09-2012
8:04 AM

Former Member

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Report Inappropriate Content

02-09-2012
8:15 AM

HI,

Repeat the target node for 3 times.

for first node give the map condition like

E1EDK02-Qualf-FixedMapping-Equals(001 and 002 and 012) createif--targetnode(1)

For second node

E1EDK02-Qualf-FixedMapping-Equals(001 and 002) createif--targetnode(2)

For third node

E1EDK02-Qualf-FixedMapping-Equals(012) createif--targetnode(3)

Regards,

Venkata Ramesh

Former Member

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Report Inappropriate Content

02-09-2012
8:18 AM

Hi Venkata,

Thanks for your reply.

```
Repeat the target node for 3 times.
for first node give the map condition like
E1EDK02-Qualf-FixedMapping-Equals(001 and 002 and 012) createif--targetnode(1)
For second node
E1EDK02-Qualf-FixedMapping-Equals(001 and 002) createif--targetnode(2)
For third node
E1EDK02-Qualf-FixedMapping-Equals(012) createif--targetnode(3)
```

What should be the context for the field Qualf?IDoc?

Please help me.

Thanks

former_member184681

Active Contributor

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Report Inappropriate Content

02-09-2012
8:25 AM

Dear Gayatri,

The actual mapping depends on your requirement. If you require different mapping rules for each of those three qualifiers, use:

E1EDK02-Qualf~~equals(001)~~createif--Root(1)

E1EDK02-Qualf~~equals(002)~~createif--Root(2)

E1EDK02-Qualf~~equals(012)~~createif--Root(3)

And provide detailed mappings under each node.

But if you want to map all three qualifiers exactly the same way, simply use one target root with:

E1EDK02-Qualf(Context-IDoc)-FixedValueMapping(for keys 001,002,012)-equals~~createif~~Root

Hope this helps,

Greg

Former Member

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Report Inappropriate Content

02-09-2012
8:38 AM

Hi,

Context should points to Idoc.

If the source field comes 001, 002 and 012 values then first node should populate the target node(1) so

https://picasaweb.google.com/bvramesh2006/February72012#5707050901322065970

For 2nd node use only 001 and 002 condition

for 3rd node use only 012 condition.

Regards,

VR

Former Member

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Report Inappropriate Content

02-09-2012
8:46 AM

Former Member

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Report Inappropriate Content

02-09-2012
8:54 AM

Former Member

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Report Inappropriate Content

02-09-2012
8:59 AM

Former Member

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Report Inappropriate Content

02-09-2012
9:07 AM

Hi Venkata,

Thanks for the reply.

```
E1EDK02-Qualf--Equals(001 and 002 and 012) createif--targetnode(1)
For second node
E1EDK02-Qualf--Equals(001 and 002) createif--targetnode(2)
For third node
E1EDK02-Qualf--Equals(012) createif--targetnode(3)
```

But the fixed value mapping has the value 1 for all the keys 001,002,012 and I need to compare the fixed mapping output with the value 1.

How can I achieve it?

Thanks

Former Member

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Report Inappropriate Content

02-09-2012
9:17 AM

Hi,

Check this link

https://picasaweb.google.com/bvramesh2006/SDN?authkey=Gv1sRgCP-dmdSu8ZvA5wE#5707050901322065970

> But the fixed value mapping has the value 1 for all the keys 001,002,012 and I need to compare the fixed mapping output with the value 1.

You are checking the values not only for one occurance (chekcing values for next occurancess 001, 002 & 012) so if you use Fixed value then you may use UDF.

Regards,

VR

Former Member

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Report Inappropriate Content

02-09-2012
9:28 AM

Hi Venkata,

Can you please provide me the UDF to achieve this?

```
E1EDK02-Qualf--Equals(001 and 002 and 012) createif--targetnode(1)
For second node
E1EDK02-Qualf--Equals(001 and 002) createif--targetnode(2)
For third node
E1EDK02-Qualf--Equals(012) createif--targetnode(3)
But the fixed value mapping has the value 1 for all the keys 001,002,012 and I need to compare the fixed mapping output with the value 1.
```

Thanks

Former Member

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Report Inappropriate Content

02-09-2012
10:13 AM

Hi,

You need to write 3 udf for this, doing mapping is better than writing UDF.

For first node use this code //These 3 are queue type UDF and input parameter is inputStr

int count=0

for(int i=0; i<inputStr.length; i++)

{

if(inputStr<i>.equals(001))

count ++;

if(inputStr<i>.equals(002))

count ++;

if(inputStr<i>.equals(012))

count ++;

}

if(count==3) result.addValue("");

else result.addValue(ResultList.SUPPRESS);

For second node

int count=0

for(int i=0; i<inputStr.length; i++)

{

if((inputStr<i>.equals(001)) && (!(inputStr<i>.equals(012))))

count ++;

if((inputStr<i>.equals(002)) && (!(inputStr<i>.equals(012))))

count ++;

}

if(count==2) result.addValue("");

else result.addValue(ResultList.SUPPRESS);

For third node use 012 value (remove 001 & 002 conditions)

int count=0

for(int i=0; i<inputStr.length; i++)

{

if((inputStr<i>.equals(012)) && (!(inputStr<i>.equals(001))) && (!(inputStr<i>.equals(002))))

count ++;

}

if(count==1) result.addValue("");

else result.addValue(ResultList.SUPPRESS);

Regards,

VR

Former Member

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Report Inappropriate Content

02-09-2012
10:50 AM

Former Member

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Report Inappropriate Content

02-09-2012
10:55 AM

Ask a Question

Related Content

Top Q&A Solution Author

User | Count |
---|---|

82 | |

11 | |

7 | |

7 | |

7 | |

7 | |

6 | |

6 | |

5 | |

5 |

You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.