cancel
Showing results for 
Search instead for 
Did you mean: 

File attachment archiving while Error

Former Member
0 Kudos

Hello Experts,

I have a complicated scenario to present to you. I hope you can help and guide me with it.

There are 3 folder locations on a FTP server : 'Work' , 'Archive' and 'Attachments'.

Files will be deposited to 'Work' folder. Let us consider <file_idoc> and <file_attachment>. Immediately, two processes have to be performed by PI.

Process 1 : Both files will have to be moved to 'Archive' folder with the same file names.

Process 2 : <file_idoc> has to be mapped to a IDOC structure and the data should be passed onto the SAP-ERP system. However, if SXMB_MONI shows a success flag, the respective attachment WITH A TIMESTAMP has to be moved to the 'Attachments' folder.

Summary : In the end, I would expect to see

1) IF the IDOC is successful in SXMBMONI,_

a) The 'Attachments' folder will hold the <file_attachment> with a TIMESTAMP.

b) SAP-ERP would receive the IDOC data

c) Both the files, <file_idoc> and <file_attachment> will be in 'Archive' folder.

2) IF the IDOC is NOT successful in SXMBMONI,_

a) Both the files, <file_idoc> and <file_attachment> will be in 'Archive' folder.

So far, I have created one config. scenario to process the IDOC part (working fine). I also have another config. scenario which is a file pick-and-deposit scenario. It picks the <file_attachment> and deposits it in 'Attachments' folder with a TIMESTAMP attached. However, I am not able to link all the scenarios together.

I think BPM implementation in PI is the way to go forward. It would be great if you could guide me on how to develop this solution in PI-BPM. An overall high level design would be helpful. Any web-blogs and resources will be appreciated.

Thanks in advance for all the guidance.

Regards,

Freddy.

Accepted Solutions (0)

Answers (1)

Answers (1)

udo_martens
Active Contributor
0 Kudos

Hi Freddy,

you create two scenarios, both pick up a file, archive it (idoc and attachment) and send it to ONE BP. You need a unique identifier inside the messages to correlate them.

Next the IDoc message will be send requesting an acknowledgment. You have to build a normal branch and an exception branch to implement that. In case of success you have to send the attachment. Dynamic filename shouldnt be a problem (open a new thread if it is).

Regards,

Udo

Former Member
0 Kudos

Hi Udo,

Thanks for your quick response. It helps.

Anyway, there will be only one <file_idoc> and multiple <file_attachments> in the 'Work' folder at anytime. I just need to deposit all the files to 'Archive' folder. I also need to process the IDOC in PI, see the response in SXMB_MONI and pass the attachments to 'Attachments' folder if IDOC is successful.

I don't think there is a need for a unique identifier inside the messages as I will be all of them irrespective.

I already have one scenario to process the IDOC file solely. I also have another scenario to pick the attachment files from 'Work' folder and deposit it to 'Attachments' folder with a TIMESTAMP.

Can you please suggest how I could build on the present situation to achieve the required result ?

Thanks,

Freddy.

udo_martens
Active Contributor
0 Kudos

Hi Freddy,

>Can you please suggest how I could build on the present situation to achieve the required result ?

Do you ususally read answers before you write? I just explained the scenario...

>Anyway, there will be only one <file_idoc> and multiple <file_attachments> in the 'Work' folder at anytime

Makes is a little bit more complexe (receiver step in a loop i a fork). But you can receive the messages in one BP and stop the receive steps by a timeout.

>I don't think there is a need for a unique identifier inside the messages as I will be all of them irrespective.

You need it because otherwise you cant correlate the message to one BP

Regards,

Udo

Former Member
0 Kudos

Hi Udo,

Thanks for your replies, they were useful.

As I have mentioned earlier, I already have a scenario to pick and deposit <file_attachments>. However, the issue is that this scenario does not have any ESR objects as I have by-passed ESR. The scenario just picks and deposits the file at the specified location without any mapping.

I am having some trouble while creating the Message Types. I think I am required to create 3 abstract service interfaces for BPM. For eg. -

1) SIAA_REQ - Abstract and Asynchronous SI referring to the request message type

2) SIAA_REQ_RESP - Abstract and Synchronous SI referring to both request and response message types

3) SIAA_RESP - Abstract and Asynchronous SI referring to the response message type

*My request message type will be the IDOC message type. But what will be my response message type from SXMB_MONI ? I will send a message to SXMB_MONI and if I DON'T get an exception, I will

activate another scenario and send the <file_attachments> to a specific location.*

My understanding is that I should use these message types to create the respective service interfaces and use them while creating my Integration Process in BP Editor.

Please correct me if my approach is wrong.

Thanks,

Freddy.

Edited by: Freddy Ng on Feb 11, 2011 12:34 PM