cancel
Showing results for 
Search instead for 
Did you mean: 

Setting Pre-Exit and post exit for standard iflow extension

0 Kudos

Hi experts!

I have a little time with CPI UI and im having troubles with an iflow extension.

I'm working with standard iflow "Replicate Sales Order and Sales Quote from SAP Business Suite"

I have to modify a message, when currency code is "COL", it must be replace by "COP".

In another post, someone suggest me to extend the iflow because is the correct way to not lose the updates in standard iflow.

In pre-exit I dont need to change anythig so I used standard mapping "ERP_COD_CustomerOrderReplication_Preprocessing"

that uses wsdl "COD_REPLICATE_SALES_ORDER01" in input as in ouput. as shown in attached image

Theres an error when pass to the standard mapping.

"Exception:[com.sap.aii.mappingtool.tf7.rt.BehaviorInvocationException: Too many values in second queue in function useOneAsMany. It must have over all contexts the same number of values as third queue.] in class com.sap.aii.mappingtool.flib7.NodeFunctions method useOneAsMany[[Ljava.lang.String;@660c93eb,"

So I have following doubs, hope You can help me.

  1. What am I doing wrong??
  2. Can I just let a line between stard and end in custom pre exit iflow?
  3. How can I do the post exit iflow to change the field currency code?

Regards.

Accepted Solutions (0)

Answers (2)

Answers (2)

MortenWittrock
Active Contributor

Hi Rodrigo

The message format in the Process_Post_Processing process is different, so you can't just copy the message mapping from the main process to your extension flow. Take a look at the Bundle Message step. It creates a new payload, which contains the original IDoc payload as well as the message mapping output.

So this is the format the mapping in your extension flow should expect. Since you only need to update a single element, I'd write a simple XSLT stylesheet to do so. If you post an example of the input, I'll help you write it.

Regards,

Morten

0 Kudos

Hi, offcourse, here is and XML extracted from IDOC.

Just click the link to see the Example of XML from idoc generated in SAP ERP

thanks

Regards.

Rodrigo

MortenWittrock
Active Contributor
0 Kudos

Hi luis.naranjo

What I need for the mapping is the XML format inside the extension flow, not the IDoc XML. You can, for instance, create a passthrough flow, turn on tracing and fetch the message from the log.

Regards,

Morten

former_member666312
Active Participant
0 Kudos

Hi,

This looks like the issue with the payload when using with the Use one as many.

Please check this

https://blogs.sap.com/2015/02/20/useoneasmany-in-sap-pi/

Thanks and Regards,

Vijay.