cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping issue

Former Member
0 Kudos

Hi sdn

Looking for a java udf or some mapping logic for below

It is a IDOC to file scenario.Need to create a target segment conditionally.

SOURCE : IDOC

E1EDP01

TDID 690456

E1EDP01

TDID 000012

E1EDP01

TDID 690489

In the above source structure E1EDP01 is an IDOC segment which is repeating in nature and TDID is a field which has the above mentioned values.

TARGET : FILE

P01 : Repeating segment within the target file structure.

P01

Field 1

Field 2

P01

Field 1

Field 2

In the above scenario 2 target segments will be created.

I want 2 target segments by comparing value from a source field. If TDID=6904... then dont create target P01 segment.Basically if TDID starts with 6904 then dont create target segment P01

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

samiullah_qureshi
Active Contributor
0 Kudos

Hi,

Use substring function for the field TDID with parameter 0 and 3. And compare its output with 6904 usind string equalS function. Give its output to createIf and map it with P01.

Regards,

Sami.

Former Member
0 Kudos

hello

just modifying my requirement a little : just had mistyped before

SOURCE : IDOC

E1EDP01

TDID 690456

E1EDP01

TDID 000012

E1EDP01

TDID 690489

In the above source structure E1EDP01 is an IDOC segment which is repeating in nature and TDID is a field which has the above mentioned values.

TARGET : FILE

P01 : Repeating segment within the target file structure.

P01

Field 1

Field 2

In the above scenario 1 target segment will be created.

I want 1 target segments by comparing value from a source field. If TDID=6904... then dont create target P01 segment.Basically if TDID starts with 6904 then dont create target segment P01

Thanks

samiullah_qureshi
Active Contributor
0 Kudos

Hello,

If I am not wrong you want to create P01 as many time as E1EDP01 if your TDID is not starting with 6904 then you can do it as follows:-

Use substring function for the field TDID with parameter 0 and 3. And compare its output with constant 6904 using string equalS function. Give its output a boolean function Not . Give output of this Not to createIf and map it with P01.

Regards,

Sami.

Former Member
0 Kudos

Tried both the logic mentioned in the thread but does not work.

Former Member
0 Kudos

Hello sdn

any suggestions if anyone has faced this issue before?

thanks

Former Member
0 Kudos

Hi

In previous thread i had provided a logic. Use Create if with that logic and set correct contexts then i think it should work.

Show the source and target structure for this we will be able to solve.

Thanks

Gaurav

Former Member
0 Kudos

Hi sdn

i tried with createif also and it does not work. I already provided the structures in this thread also.

SOURCE : IDOC

E1EDP01

TDID 690456

E1EDP01

TDID 000012

E1EDP01

TDID 690489

Target :File

P01 : segment

Name1

Address1

......

LOGIC : IF TDID = 6904....then dont create P01 segment

Thanks

Edited by: Guest1 guest on Nov 10, 2008 11:00 PM

Edited by: Guest1 guest on Nov 10, 2008 11:02 PM

Edited by: Guest1 guest on Nov 10, 2008 11:02 PM

Former Member
0 Kudos

Hi

I have tested it work fine for me

TDID (Context parent of E1EDP01) ->Substring(0.4) -> equalS( Constant 6904) -> Not -> Createif -> P01

TDID -> Field

Try it and let me know

Thanks

Gaurav

Edited by: Gaurav Bhargava on Nov 11, 2008 4:10 AM

Former Member
0 Kudos

Hi Gaurav

I tried same mapping logic ,it did not work for me.

i understand your logic looks correct though.

Thanks

Former Member
0 Kudos

Hi

Dont know the exact problem in this

For me it worked

http://www.flickr.com/photos/32274480@N06/3020795720/

Thanks

Gaurav

Former Member
0 Kudos

Hi Gaurav

Your screenshot loks good.

Please send screenshot of how you achieved this ?

Thanks

Former Member
Former Member
0 Kudos

Thanks ,it works.

Problem was with some other field while mapping that segment.

Will award the points.

Answers (1)

Answers (1)

sunil_singh13
Active Contributor
0 Kudos

Hi,

This requirment can be achieved using Graphical mapping.

Read starting 4 char i.e 6904

Take a constant and insert the value 6904

compare above 2.

select ifWithoutElse From boolean and in property keeps = true.

and after the comparison result use not from boolean.

Take care of context while mapping

2. You can achive the same using createif also.

Thanks

Sunil Singh