cancel
Showing results for 
Search instead for 
Did you mean: 

File to File with two inbound messages

Former Member
0 Kudos

Hi Experts,

We are on SAP PI 7.3.1(AEX).

Here is my scenario:

It is file to file scenario, where source file is flat file(can be processed by fieldfixedlength in FCC).

Two messages need to be sent to receiver.

A)The same source file need to be sent as it is to receiver

B)Another inbound file need to be generated after mapping from source file.

Now in our case, for the (A), the scenario only works if we only use dummy objects in service interface and namespace and if we take dummy objects, then (B) will not work, as for (B), we need to have mapping to map fields from flat file to target file. Reason is that mapping can not be found based on dummy interface.

E.g.

Sender1 ->Dummyinterface->DummyNamespace

                    Receiver1->Dummyinterface->DummyNamespace.

This will work for (A), but for (B) it will not work, as we need  to do mapping to generate target file. It is not pass through interface.

We have to use Dummy objects-service interface(meaning no objects created in ESR), if we take service interface defined in ESR for pass through interface we receive below error:

"Transmitting the message to endpoint   using connection File_http://sap.com/xi/XI/System failed, due to: com.sap.aii.adapter.xi.routing.RoutingException: Unable to parse XML message payload to extract operation for receiver determinationorg.xml.sax.SAXParseException: Content is not allowed in prolog."

Any solution to achive above scenarios on SAP PI 7,3,1 (note we do not have Integration process or SAP BPM in place).

Thank you,

Divyesh

Accepted Solutions (1)

Accepted Solutions (1)

ambrish_mishra
Active Contributor
0 Kudos

Hi Divyesh,

If performance is not such a big concern and you can do away with pass through, the design can be simplified.

Read the source file, have 2 operations of the same inbound interface (pointing to same message type), for first one, do one to one mapping and for the other one, do transformation.

In Integration directory, have 2 interface determinations based on 2 receivers. This brings me to the question, are their 2 receivers or one ?

Ambrish

Answers (6)

Answers (6)

Former Member
0 Kudos

Thank you very much for your help and solution on this.

Finally, it resolved by creating FCC at sender file adpater and then using XSL mapping to convert back to text file and send for the <A> and for <B>  FCC input and mapping for target structure  and send it to receiver.

thanks again.

--Divyesh Vasani

Former Member
0 Kudos

Hello Divyesh

For your scenario (B) Have you considered using MessageTransformBean on the receiver channel? Alternatively, have to also considered creating a Java Module to do the transformation?

Regards

Vj

markangelo_dihiansan
Active Contributor
0 Kudos

Hello,

Two messages need to be sent to receiver.

A)The same source file need to be sent as it is to receiver

B)Another inbound file need to be generated after mapping from source file.

In your interface determination use two inbound interfaces, assuming there is only one receiver for the two messages:

1. one without the transformation (no operation mapping)

2. one with the transformation (has operation mapping)

Since you are converting via fcc do not use a dummy interface. Create your receiver agreements accordingly.

Hope this helps,

Mark

manigram
Active Participant
0 Kudos

Hi,

Create two interface

1) Passthroug interface

2) Actual interface with mapping

First one will pick the file and put it into target folder without mapping.

Second interface will do the mapping and put it into the required folder.

Regards,

Manigandan

diego_gabriel
Participant
0 Kudos

Hello,

You can just design your scenario to execute the mapping and generate the target file. So the (B) point is done.

Since the scenario is a File > File try to use the parameter Archive of your sender file adapter. Using it you can achieve your (A) point.

Regards,

Diego Gabriel

PeterJonker
Active Contributor
0 Kudos

Hi Diego,

The two files are different from each other.

Therefore I suggest you create two messages from the file (with two mappings and two service target interfaces) and in interface determination you call both mappings ( = both target interfaces).

I think this is not so difficult (almost standard) or am I misunderstanding the issue or missing something ?

PeterJonker
Active Contributor
0 Kudos

Can you not have two target interfaces defined with two source -target mappings and in interface determination (tab receiver interfaces) you add both mappings to the two target interfaces.