cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping error

Former Member
0 Kudos

Hi All.

I have the following error

RuntimeException in Message-Mapping transformation: Runtime exception during processing target field mapping /ACC_DOCUMENT01/IDOC/E1BPACGL09. The message is: Cannot cast to boolean.

Requirement : The applicable VAT codes are 0S (0% VAT rate) or S1 (17.5% vat rate).

In E1BPACGL09 there is one filed Vat type . i have written UDF for that as

if(a.equals("S1"))

return "17.5"; (Here i need to get in % ex 17.5%)

else if(a.equals("OS"))

return "0"; (Here i need to get in % ex 0%)

else

return "";

Thanks in advance

Sai

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

I'm facing a similar problem coudl you tell me how to do the UDF for an Idoc?

stefan_grube
Active Contributor
0 Kudos

Instead of a UDF use function FixValues.

Answers (2)

Answers (2)

stefan_grube
Active Contributor
0 Kudos

I don't think that there is an issue in the UDF.

Check what you have assigned to E1BPACGL09

When there is an if statement or a creatif statement, then you must not assign a value direct to it.

you can only assign equal or exists to it.

Former Member
0 Kudos

If "%" is creating a problem from the output of the UDF then what you can do is, just conactenate it after all required mapping steps (may be just before mapping to target field).