cancel
Showing results for 
Search instead for 
Did you mean: 

SAP BTP(CPI) - Groovy Method with Multiple Input Parameters

frandev
Explorer
0 Kudos

Hi,

I am using a Groovy script to map a field from source to target using the Message Mapping component in SAP BTP(CPI).

Is there a limitation, that I am not aware of, related to the number of input parameters I am allowed to use? When my method includes more than 1 input parameter, the mapping does not work. No value is returned.

However, when I remove the additional parameters, and keep only one, the method works as expected.

I have attached a file with the Groovy method that I am using. groovy-method.txt

Appreciate the help, thanks.

Accepted Solutions (1)

Accepted Solutions (1)

frandev
Explorer
0 Kudos

The issue was related to the XML simulation file, not the Groovy method itself.

Answers (1)

Answers (1)

Ryan-Crosby
Active Contributor
0 Kudos

Hi Francisco,

Your Groovy script is referencing an undefined/unknown token called termination in your else if statements.

Regards,

Ryan Crosby

frandev
Explorer
0 Kudos

Hi Ryan

Please find an updated Groovy script attached. That's not the issue - I only forgot to update the method before the initial upload.

Ryan-Crosby
Active Contributor
0 Kudos

fdevilliers134 - What is your method input?

frandev
Explorer
0 Kudos

Type: Single-digit string value, End: Date, Data: Date

Ryan-Crosby
Active Contributor
0 Kudos

fdevilliers_134 - I mean the actual values you are testing with... the payload.

frandev
Explorer
0 Kudos

No longer needed, but thanks Ryan.