cancel
Showing results for 
Search instead for 
Did you mean: 

Proxy <- > Mutliple files on to SFTP

Former Member
0 Kudos

I have a reqt, where data is coming from Proxy and Then I have to split it into 10 Different files and then post on to SFTP Server.

I am planning to build  only one integration scenario with the use of multi mapping with split feature and then Interface determination with "maintain order at runtime" feature in ICO. to maintain the sequence.

Now challange is either interface should generate either all 10 files or it should not generate even a single file in SFTP ? is it possible ?

what other challanges you see in this scenario

all 10 files has different file name

Accepted Solutions (1)

Accepted Solutions (1)

anupam_ghosh2
Active Contributor
0 Kudos

Hi Prabhat,

                  If the scenario is split into two ico's

in first ico

proxy to file (NFS)

--- Java mapping in scenario1 will split file into 10 files. The mapping also checks (before split), if splitting the source file will generate 10 different files or not, by counting the segments present in payload.  In case the mapping finds splitting original file into 10 is not possible, it will not create any files in the output. Mapping will not fail but files will not be written to target NFS folder.

The mapping writes the   files directly to nfs folder and the receiver channel is used only for archiving purpose

second ico

-----------------

File(NFS)--------------->SFTP

The sender channel reads the file based on Processing Sequence by date. That is the oldest file is read first in eoio mode (QOS). In case files are there they are transfered to sftp server.

This is just a suggestion, just shared my thoughts.

Regards

Anupam

Answers (4)

Answers (4)

GauravKant
Contributor
0 Kudos

Hi Prabhat,

You can try UDF as well for this.

Regards,

Gaurav

Former Member
0 Kudos

Kindly Explain Gaurav, How UDF can be used here ?

Former Member
0 Kudos

I have another Idea. Please confirm if this looks more reliable . But I think this will take more development time because i am making seprate seprate Interface.

Interface 1 : Personal Information.

ABAP Report Will Push Data to PI Outbound Proxy

Then SAP will also maintain/host a table where we will push data(  SentDate,  Type of Data(Personal Info), Data Sent to PI Flag , FTP Received Flag.

E.g 2016-09-01, PersonalInformation, Y, Blank

-->

PI will have multi Mapping with two receiver. ( FTP and SAP-InboundProxy) - Maintain order at runtime

---->> 1. PI will change XML into Pipe Delimited file on SFTP Server.

---->> 2. PI will send XML message(  Notification ) to  SAP-InboundProxy. (Here we are sending back the "SFTP Received Flag" to SAP )

Finally at SAP we will have a reconcilled Report with followng data

E.g 2016-09-01, PersonalInformation, Y, Y

Similarly for Other Data E.g Employment , Address, Work Agreement, National ID I will make similar interfaces and maintain same table for notification...e.t.c.

Regards

PS

Former Member
0 Kudos

My Exact Source Structure is something like this from Proxy for thee files.

Employment you see there are no delta changes happened for any employee - Hence structure has no values in Employment tag. hence no file generation required for this Employment

Now I have to generate 2 Files out of It ---- One  for Person fields and Other for Address fields.

<Root>

<Person>

     <PersonItem>

          <EID>10001</EID>

          <FName>Alex</Fname>

     </PersonItem>

     <PersonItem>

          <EID>10002</EID>

          <FName>Satish</Fname>

     </PersonItem>

</Person>

</Employment>

<Address>

     <AddressItem>

          <EID>19001</EID>

          <FLine>Bugroshov Street<FLine>

          <Pincode>1201</Pincode>

          <Country>IL</Country>

     </AddressItem>

     <AddressItem>

          <EID>12221</EID>

          <FLine>Jason Villa<FLine>

          <Pincode>120001</Pincode>

          <Country>DK</Country>

     </AddressItem>

<Address>

</Root>

manoj_khavatkopp
Active Contributor
0 Kudos

You can use the multimapping here where in one message you create only records for "Person" and in second message you can create records for Address. below is the reference

Br,

Manoj

anupam_ghosh2
Active Contributor
0 Kudos

Hi Parbhat,

                 I would still suggest the same previous solution. Please can you post one xml where you have employment details as well.

Regards

Anupam

former_member190293
Active Contributor
0 Kudos

Hi Parbhat!

Just another thought:

You could try to set EOIO mode in Proxy sender and in split mapping build the right messages sequense. So you'll have EOIO mode at receiver side.

Regards, Evgeniy.