Thursday 12 August 2021

Rearrange one input according to other input field value in mapping groovy script in SAP CPI

Rearrange one input value according to other input field value inside message mapping. 


Groovy Script:

import com.sap.it.api.mapping.*;

def void customFunc(String[] Prod1, String[] Prod, String[] Cat, Output result,MappingContext context){

for(int i=0; i<Prod1.length; i++){

for(int j=0; j<Prod.length; j++){

if(Prod[j]==Prod1[i])

{
result.addValue(Cat[j])
}
}
result.addContextChange()
}
}




1 comment:

  1. Web improvement organization appears to be a wizardry that will make your site stand apart from your rivals. We are known for making incredible and proficient sites that will stand apart from the rest
    Travel Website Development
    TBO API Integration

    ReplyDelete