Skip to Content

Setting Pre-Exit and post exit for standard iflow extension

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.

td6ktceaha.png (90.8 kB)
Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Posted on Jul 22, 2020 at 10:44 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 22, 2020 at 06:56 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.