cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping assistance

Former Member
0 Kudos

Hi All,

I have a requirement,

This is teh requirement for mapping,

I have to populate a segment and its fields according to a value comming in inbound side,

for eg if the x segement has value A and B then populate the complete segment .

anybody has any suggestions..

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

You know satish, I have used the text equals , i think its not getting stuck in if else queue, anyways did u see my previous post with the requirement, please check and see if you can put any light on to the solution

Former Member
0 Kudos

HI Ravi,

Can you put remove context before the target and see.

Also please tell how you are mapping.

Regards,

---Satish

Former Member
0 Kudos

Ravi ... can you pen down your mapping logic for that segment?

Former Member
0 Kudos

logic is a simple one before it was just one to one map ,

Now i tried with the logic below

if status_code = X1 or AB then populate then map Delivery_Update to E1EDL20

Former Member
0 Kudos

try like this:

if

status code equals to X1 or

status code equals to AB

then

Delivery_Update ---> remove context --> e1edl20.

Regards,

---Satish

Former Member
0 Kudos

Ravi,

>

if status_code = X1 or AB then populate then map Delivery_Update to E1EDL20

You have to put the condition "createIf" after you use the "if-else". So, if the condition is true,then only it will create the segment E1EDL20.

Is Delivery_Update the source node / segment?

Former Member
0 Kudos

delivery_update is a node.... and I will give a try what you guys have mentioned...please have a an eye on this thread..just give me a moment

Former Member
0 Kudos

no guys still not working,

I tried this logic

If Status code =(text) X1 or(boolean) AB then map Delivery_update (createif) mapped to E1EDL20 (target)

and also tried remove context, please advice

Former Member
0 Kudos

Open your mapping for this field and do a right click on e1edl20 and click on display queue? What are you seeing there put here.

Regards,

---Satish

Former Member
0 Kudos

RuntimeException in Message-Mapping transformation: Exception:[java.lang.IllegalArgumentException: Cannot cast X1 to boolean] in class com.sap.aii.mappingtool.flib3.Bool method or[X1, AB, com.sap.aii.mappingtool.tf3.rt.Context@7b29b561]

Former Member
0 Kudos

Ravi,

Dont put X1 directly to boolean OR function. Please do like this:

status_code --> equalsTo (Text) which is input1 to this funciton

constant --> X1

status_code --> equalsTo (Text) which is input1 to this funciton

constant --> AB

Give the above two to OR boolean function. Then give the output of OR function to input of IF function and then in else give Delivery_Update and the output give to target. This should work. I tested this and I cannot give you screen shot because of some restriciton at my clients place. If this doesnot work then please do right click and display queue on target and let us know what you see.

Definitely you are doing somehting wrong in mapping this field.

Regards,

---Saish

Former Member
0 Kudos

hey thanks for that update, that resolved the issue of boolean but its still not sufficing the original issue i had , not getting the segments for only X1 and AB its populating everything

queue has exceuted sycessfull at the receiver

Former Member
0 Kudos

Hi Ravi,

Can you send me the screen shot of what you mapped to my id, so that I can take a peak and let you know?

Regards,

---Satish

**********

Please read the Forum's Rules of Engagement,

i.e.,

[/thread/117188 [original link is broken];

and refrain from using email correspondence as the main objective of the Forums is to share knowledge.

SDN PI/XI Forum Moderator*

**********

Edited by: Kenny Scott on Sep 9, 2009 2:59 PM

Former Member
0 Kudos

Hi Ravi,

Can you send me the screen shot of what you mapped to my id, so that I can take a peak and let you know?

Regards,

---Satish

Former Member
0 Kudos

HI guys sorry I come at this hour, I satish I have sent the screen shot to your email can you check,thanks

Former Member
0 Kudos

can anybody assist me with this issue???

Former Member
0 Kudos

hey satish thanks for the email , I just replied please check

Former Member
0 Kudos

thank you guys for assisting!!!!!!!!!!!!!!!!!

Answers (7)

Answers (7)

Former Member
0 Kudos

RuntimeException in Message-Mapping transformation: Exception:java.lang.IllegalArgumentException: Cannot cast X1 to boolean in class com.sap.aii.mappingtool.flib3.Bool method orX1, AB, com.sap.aii.mappingtool.tf3.rt.Context@7b29b561

Former Member
0 Kudos

ok the inbound and outbound DT are as follows:

Inbound

MT_........

Record....

Delivery.....

..........

..................

Status_Code

............

...........

============================================

outbound

ZDEL.........

IDOC

Begin

EDI_DC 40

E1EDL20

Segment

-


-


-


-


-


ZNAEDELVRY_HDR

ZNAE_STATUS_CODE

================================

The inbound status code is mapped to this ZNAE_Status_Code

Now inbound is has X1,X2,X3 and AB as status code, now I have to populate only segments which has X1, AB

hope this shld be clear now

Former Member
0 Kudos

thanks again, you know what I have tried that , you cant do that operation on the segment right, anyways i tried that too, Iam getting error "X1 Cannot cast to boolean" , advice me thanks

Former Member
0 Kudos

Hi Ravi,

It seems somethign wrong you are doing in mapping like you are trying to compare with boolean. Instead compare with equalsto in text function. I think you are using equal in booolean. So change that it should work. Else give the condition of how you are mapping here. somebody will help you here.

Regards,

---Saish

Former Member
0 Kudos

hey thanks guys for the replies,

you know i have tried tha above sugesstion it din work out..

the scenario is like this...

We have sender as file system and receiver is an ECC (IDOC) it has one of the field value as X1,X2,X2 and AB .

now after mapping is done its populating all the fields absolutely fine, now we have an latest requirement wherein we have to populate IDOC just based on input values X1 and AB ( for now its populating for all values).

so it has to basically truncate segments for X2 and X3 i.e other tha X1 and AB....

Former Member
0 Kudos

>

so it has to basically truncate segments for X2 and X3 i.e other tha X1 and AB....

I don't think you have to truncate the segments. You have to restrict the segments from getting created, based on the values of that incoming field.

So, put in a condition on the segment and check for the value of X1 and AB. If condition fails, then don't create the segment.

Regards,

Neetesh

Former Member
0 Kudos

Hi Ravi,

Use the "If-else" condition for the segment. If the condition is true, then only segment will be created.

Regards,

Neetesh

Former Member
0 Kudos

Hi Ravi,

You can define the conditions with the standard functions. Map like this:

If --> source value --> equals A or equals B (take constants one for each and map with OR) --> createif --> target segment.

So you will have the target segment when the input has any of the value. If you dont have any of the value then you will not have this segment.

Regards,

---Satish

Former Member
0 Kudos

Hi ravi,

This is a very simple requirement. Please search various blogs and threads on SDN. You will be easily able to do it.

Search for Mapping in Blogs.

If you want more help paste your source xml and target xml sample, Forum will help you.

Inder