Skip to Content
author's profile photo Former Member
Former Member

Cannot cast to Boolean error

Hi

I am working in a multimapping in PI 7.1. I have two Idocs at target side. I used this logic to create the IDocs

If FieldA equalsS constant XY or YZ, then MT_Sender is IDoc one

I used Boolean Or, Text function equalsS, if without else also

My requirement is like that if a particular field in Source file has XY or YZ, Ist IDoc should be created.

However I get this error in Message Mapping test tab, that

FunctionException: Cannot cast 'XY' to boolean] in class com.sap.aii.mappingtool.flib7.Bool method or[XY, YZ, com.sap.aii.mappingtool.tf7.rt.Context@111644f0] com.sap.aii.utilxi.misc.api.BaseRuntimeException: Exception:[com.sap.aii.mappingtool.tf7.FunctionException: Cannot cast 'XY' to boolean] in class com.sap.aii.mappingtool.flib7.Bool method or[XY,YZ, com.sap.aii.mappingtool.tf7.rt.Context@111644f0]

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    Posted on May 14, 2014 at 12:47 PM

    Hi Radhika,

    Please use the mapping as attached. Please change the context of FieldAB to Its Message Type Node(MT_Sender).

    Please let me know If this doesn't work.

    Thanks

    Jyothi A


    map.jpg (13.5 kB)
    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 14, 2014 at 12:43 PM

    Hi Radhika,

    There are 2 equal Functions. Please see attached screenshots. You are probally using the wrong one.

    Regards,

    Jannus


    02.PNG (2.7 kB)
    01.PNG (4.7 kB)
    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on May 14, 2014 at 12:15 PM

    Hi,

    use String equal function instead of Boolean function, i think you used boolean function that is the reason showing error as XY is not a Boolean value. So use string equal function to compare the string.

    Regards,

    Manigandan

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on May 14, 2014 at 12:01 PM

    HI Radhka,

    To the OR boolean function are arriving not boolean values, are you using it after the equalS function?, could you share you mapping?

    Regards.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.