Reputation: 1
I'm currently working on a project aimed at creating a generic mapping in SAP CPI. My input consists of a configuration JSON file that maps the source to the destination. Here's an example:
source : destination
{ "field_src_1": "field_dest_1",
"field_src_2": {
"Type": "Expression",
"Format": "concat",
"Source_Fields": [field_dest_2,field_dest_3],
"Destination_Fields": "field_src_2"
}
"field_src_3":{
"Type": "Expression",
"Format": "split",
"Source_Fields": [field_src_3], //the source_field is the field on which the expression will be executed
"Destination_Fields":[field_dest_3,field_dest_4] //to split the value in field_src_3 into fields field_dest_3 and field_dest_4
}
}
It's crucial that the solution isn't hardcoded. Regardless of the source, it should be mapped to the destination as specified in the configuration file. This approach ensures that the mapping remains flexible and can handle any JSON file for execution.
I've successfully generated XSLT code using a Groovy script. However, I'm facing challenges integrating the generated XSLT mapping code within the XSLT mapping component in SAP CPI.
Any assistance on this matter would be greatly appreciated.
I'm striving to develop a non-hardcoded mapping solution in SAP CPI utilizing a configuration JSON file, and while I've successfully generated dynamic XSLT code with a Groovy script, I'm now seeking assistance to seamlessly integrate this code into the XSLT mapping component of SAP CPI.
Upvotes: 0
Views: 183