Skip to Content

HCI Custom Iflow for product characteristics from ECC/ Custom Function using groovy script

Aug 09, 2017 at 07:17 AM


avatar image
Former Member

Hi Experts

I have deployed a custom Iflow in HCI to fetch the product characteristic details from ECC via the message type CLFMAS in ECC.

In the Iflow earlier I was getting error "Exception: Error in message header mapping; agent class is CL_APFO_MATERIAL_REPLICATE_IPA". This was because we had not done any mapping for the message header ID and UUID fields.

Please note my main issue is message header mapping error for the custom Iflow.

To resolve this I tried using groovy script to create custom function but I'm not able to make this work. I'm getting a two sided box which is not giving any result.

I need a custom function for generating the ID and UUID as available in Standard mapping. Please standard mapping below:

It would be very helpful if anybody could help me with this issue.


Praveen Dwivedi

groovy1.jpg (57.6 kB)
groovy2.jpg (65.1 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Sharad Dixit
Aug 09, 2017 at 03:35 PM

Hi Praveen,

Error in "message header mapping agent class is CL_APFO_MATERIAL_REPLICATE_IPA" is due to a mismatch in RecipientParty & SenderParty coming in payload and values maintained in the communication system in C4C.

Any reason for changin messageID function?


Show 2 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Sharad

We are sending Idoc for Product characteristics CLFMAS alongwith MATMAS_CFS.

So in HCI, we created a custom Iflow and mapped the CLFMAS to standard product target. Now here we got error "Exception: Error in message header mapping; agent class is CL_APFO_MATERIAL_REPLICATE_IPA". The recipient party and sender party seems alright.

The ID and UUID in message header are generated via a custom function in standard iflows. I custom Iflow there is no custom function to do so. I hardcoded the ID and UUID and the above error was gone but it is not working properly. So I was guessing the error would be resolved if we generate the ID using a custom function.

If possible please let me know if you would be able to help directly/over skype, I'll message you my details. Basically I am trying to replicate material characteristics from ECC and I am guessing it is not ideal way which we are following CLFMAS.

Former Member

I have tried somethings with the iflow, because of which it is generating the two materials with same external ID. This is weird as external ID is supposed to be unique.

1. Two Idocs are getting triggered for CLFMAS and one Idoc for MATMAS_CFS

1 material created with MATMAS_CFS and 2nd material by CLFMAS. External ID is same.

Sriprasad Shivaram Bhat
Aug 18, 2017 at 05:42 AM

Hello Praveen,

You can just map a constant to your Custom function and just dont use it in Custom Function.

I guess by then there will not be any impact on the functionality you want to achieve.


Sriprasad Shivaram Bhat

10 |10000 characters needed characters left characters exceeded