cancel
Showing results for 
Search instead for 
Did you mean: 

problem in mapping

Former Member
0 Kudos

Hi

My requirement is

on source side i have

empdata 1..unbounded

id 1..1

name 1..1

type 1..1

target side

empdata 1.. unbounded

X 1...1

mapping: if type=1 on the source side then corresponding empdata's shud be created for name and id

example:

7777

jaya

1

then target shud come as

empdata

7777

empdata

jaya

can anyone help me out please

Accepted Solutions (0)

Answers (5)

Answers (5)

justin_santhanam
Active Contributor
0 Kudos

Hema,

In addition to the above friends replies. You need two UDF in order to achieve ur results.

UDF 1 :[Cache: Queue, Input: type]

for(int j=0;j<type.length;j++)

{

if(type[j].equals("1"))

{

result.addValue("");

result.addValue("");

}

}

UDF 2: [Cache: Queue, Input:name,id, type]

for(int j=0;j<type.length;j++)

{

if(type[j].equals("1"))

{

result.addValue(name[j]);

result.addContextChange();

result.addValue(id[j]);

result.addContextChange();

}

else

{

result.addSuppress();

}

}

Mapping logic.

type[change context to one more higher level]----> UDF1 -


>empdata

name[change context],id[change context], type[change context]--->UDF2-->X

Hope it helps!!!. If you find difficulties in achieving the same,let us know.

Best regards,

raj.

Former Member
0 Kudos

hi

if type = 1 create target..

use createif node.

and for more examples,

refer the following link,

http://help.sap.com/saphelp_nw04/helpdata/en/d9/cea942ad920c31e10000000a1550b0/frameset.htm

Former Member
0 Kudos

Create a UDF as follows

1. Take Type,name,ID as input parameter

2. Take Empdata-X as output parameter

3. Take Catch as the UDF Type[not value or queue]

3 write the following logic

If Type = 1

result.addValue( Name)

result.addValue(ID)

then your problem will be solved

Best Regards,

Vijay

Former Member
0 Kudos

Hi ,

Please elaborate yr ques in detail ,as it seems to be vague to understand completely

Regards

prabhu_s2
Active Contributor
0 Kudos

if source type = 1 then map empdata to remove context -> splitbyvalue ->target

check if this works