cancel
Showing results for 
Search instead for 
Did you mean: 

Exception:[java.lang.IllegalArgumentException: Cannot cast 02 to boolean]

Former Member
0 Kudos

Hi Friends,

I am facing a issue in mapping. My scenario is IDOC to JDBC.

I have done mapping in the give below way.

If segment1 and segment2 both exists and attyp(field of segment1) is equal to '00' or '01' then segment1 replicate into table.

I am facing a error while testing the mapping is:

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

Kindly suggest me on this.

Regards,

Narendra Goyal

Accepted Solutions (1)

Accepted Solutions (1)

stefan_grube
Active Contributor
0 Kudos

> equal to '00' or '01'

You have assigned constant('02') direct to or.

that is not possible.

You have to do something like this:

field - equals       \
constant(01)         or
field - equals       /
constant(02)

Edited by: Stefan Grube on Aug 31, 2010 3:53 PM

Answers (2)

Answers (2)

former_member241146
Active Participant
0 Kudos

Narendra.

You have to use EqualS function.

Equal is to boolean comparation (true/false or 0/1).

Regards.

Bruno

former_member182004
Contributor
0 Kudos

Hi Narendra,

What might be happening here is that you are using function "equal", that is a boolean function.

You have to use "equalS" function, that belongs to category String. That function compares two strings.

Regards,

Juan.

Former Member
0 Kudos

I used the function equalS

Former Member
0 Kudos

My Mapping in such a way:

01 attyp

\ \ segment1

or - equals \

/ \ then

02 and - if -> Table

segment1 - exists \ / else

and /

segmen2 - exists / some more condition

Former Member
0 Kudos

My Mapping in such a way:

01 attyp

\ \ segment1

or - equals \

/ \ then

02 and - if -> Table

segment1 - exists \ / else

and /

segmen2 - exists / some more condition

stefan_grube
Active Contributor
0 Kudos
01      
  \                    
   or   
  /                
02

This is not possible.

Former Member
0 Kudos

You have to use 2 equalS function.

attyp equalS 01

OR

attyp equalS 02