cancel
Showing results for 
Search instead for 
Did you mean: 

How to move original file to another folder?

Former Member
0 Kudos

Hi,

We have a scenario about file to RFC and go back to File. We can do this without BPM.

But the problem is we have to get status from RFC response and then to move original file into the other folder.

For example file sender cc get file from C:\temp\in folder and send to RFC. RFC response status. If the RFC status is OK, then the original file has to move into c:\temp\ok. If the RFC status is Fail, then the original file has to move into c:\temp\fail.

Anyone have idea about this?

Accepted Solutions (1)

Accepted Solutions (1)

former_member200962
Active Contributor
0 Kudos

Use of BPM is not necessary!

For example file sender cc get file from C:\temp\in folder and send to RFC. RFC response status. If the RFC status is OK, 
then the original file has to move into c:\temp\ok. If the RFC status is Fail, then the original file has to move into c:\temp\fail.

make use of RequestResponseBean as shown in this wiki: [https://wiki.sdn.sap.com/wiki/display/XI/File-RFC-File(WithoutBPM)|https://wiki.sdn.sap.com/wiki/display/XI/File-RFC-File(WithoutBPM)]

Now when you create a response mapping program from RFC to File you need to implement Dynamic Configuration

The input to Dynamic Configuration UDF wil be the status field (OK/ Fail)

Then your UDF will have a if-else block which will evaluate what is the response sent by RFC.

Accordingly the FilePath attribute should be populated......in receiver file CC check the ASMA checkbox and under that check the Directory one.

This will ensure that depending on the RFC response the corresponding filepath is selected......BPM not needed.

Regards,

Abhishek.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Abhishek,

I have tried the wiki, File to RFC to File (without BPM). But my question is RFC-response is not the original file content, file-request is. So if I implement Dynamic Configuration in UDF on response mapping. The receiver file adapter can only get the response message file, not the original request file. How can I get the original file and move it?

Regards,

Sander

former_member200962
Active Contributor
0 Kudos

If you need contents from the original file also then you have to use BPM....no other option!

Regards,

Abhishek.

Former Member
0 Kudos

Hi,

We can do this without BPM.

I am not too sure whether this can be done without BPM, but with BPM this is easy to achieve.

Any specific reason for not using BPM?

Regards,

Neetesh