cancel
Showing results for 
Search instead for 
Did you mean: 

SFTP sender to File receiver mapping of file names

Former Member
0 Kudos

My scenario is: sender channel = SFTP (Seeburger) transferring multiple PDF files to Receiver adapter File (NFS).

These PDF files need to have the same name as the original files from the sender (3rd party) system.

Because these files are being processed without an interface, I can't use UDF to help map the file names.

I've tried using Seeburger's localejbs/Seeburger/AttribMapper to map the names, as follows:

File (NFS) receiver channel config:

- ASMA boxes for 'Use Adapter-Specific Message Attributes' and 'File Name' are ticked

- Module localejbs/Seeburger/AttribMapper is on the first line in the module tab under processing sequence, with module key = AttributeMapper

- Under Module Configuration:

- Module Key = AttributeMapper

- Parameter Name = http://sap.com/xi/XI/System/File/FileName

- Parameter Value = @http://seeburger.com/xi/SFTP/dtSubject

(I haven't entered any attribute module config on the sender side)

This setup fails on the receiver side with the message 'Delivering the message to the application using connection File_http://sap.com/xi/XI/System failed, due to: com.sap.engine.interfaces.messaging.api.exception.RetryControlException: Channel stopped by administrative task.' (not very helpful!). All I can get from that is that it doesn't like my module configuration!

Can anyone help me understand the correct way to do the file name mapping for my specific scenario?

Regards,

Christine

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Christine ,

Please try below parameters in your SFTP module in the same sequence:

Processing Sequence:

localejbs/Seeburger/solution/sftp solutionid

localejbs/Seeburger/AttribMapper FileName

localejbs/ModuleProcessorExitBean exit

Module Configuration:

FileName http://seeburger.com/xi/common/dtSubject @http://sap.com/xi/XI/System/File/FileName

exit JNDIName deployedAdapters/SeeXISFTP/shareable/SeeXISFTP

Edited by: erabhishek1983 on Aug 17, 2011 3:18 PM

Former Member
0 Kudos

Hi erabhishek1983 - I just tried your setup suggestion and again no success.

Our Basis team believes that we may be missing the .sca file from Seeburger that allows use of their attribute mapper, which is surprising but might explain my problems! I am now waiting for Seeburger to help us with this. The .sca file is called SeeModuleCollectionPI.sca .

I'll update this post when I know more, just in case it helps others resolve similar problems.

Thanks to you both for your suggestions, they are very appreciated.

Christine

Former Member
0 Kudos

We've got this working at last!

The main problem was indeed the missing .sca file from Seeburger: SeeModuleCollectionPI.sca

Our Basis team deployed this file this morning. After a bit of fiddling around with the attribute mapping, my test files were transferred successfully with their original names.

The config I ended up with is just as described in another forum post for SFTP to FTP, but I'll repeat it in more detail here:

Sender channel

Parameters tab:

Adapter Type = SFTP (Seeburger)

(sender, transport & message protocol = SFTP)

Scheduler = x in all appropriate days, with interval = 1 (minimum allowed)

(rest here is specific to your environment, but I set filename to *.pdf to get all .pdf files from the sender)

Module tab

Processing Sequence

Number Module Name Type Module Key

1 localejbs/Seeburger/AttribMapper Local Enterprise Bean AttribMapper

2 localejbs/Seeburger/solution/sftp Local Enterprise Bean solutionid

3 localejbs/CallSapAdapter Local Enterprise Bean exit

Module Configuration

Module Key Parameter Name Parameter Value

AttribMapper http://sap.com/xi/XI/System/File/FileName @http://seeburger.com/xi/common/dtSubject

Receiver Channel

Parameters tab:

Adapter type = File

(receiver, with transport protocol File System (NFS), etc)

Target tab:

Target directory (set to your required PI server directory)

File Name Schema = * (can be anything, will be ignored)

Processing tab:

(your requirements-specific settings - mine were create, write directly, file type binary)

Advanced tab:

Under Adapter-Specific Message Attributes (ASMA):

tick the following:

Use Adapter-Specific Message Attributes

Fail If Adapter-Specific Message Attributes Missing

File Name

Modules tab:

Processing Sequence

Number Module Name Type Module Key

1 CallSapAdapter Local Enterprise Bean 0

(nothing under Module Configuration)

Thanks to those who kindly took the time to try and help me, your suggestions pointed me at the real problem.

Christine

Former Member
0 Kudos

Hello Basen,

In my case I am doing my scenario exactly opposite.....sender is NFS and receiver  is Seeburger SFTP can you please advise what configuration do i need to do. In sender and receiver channels. No ESR objects just ID

THank you,

Sing

Former Member
0 Kudos

Never mind Basen, I got it!

Thank you,

Deep

Answers (2)

Answers (2)

former_member854360
Active Contributor
0 Kudos

Hi check in runtimeworkbench whether the receiver channel is stopped or not?

Former Member
0 Kudos

Hello Debashish - I am testing it with a program that starts and then stops the sender channel after 2 minutes, and can see that both channels are in stopped status afterwards in the runtime workbench.

The full receiver side audit log looks like this:

2011-08-16 11:08:07 Information SEEBURGER/SFTP: Received message for inbound processing!

2011-08-16 11:08:07 Information SEEBURGER/SFTP: Found channel and binding.

2011-08-16 11:08:07 Information The application tries to send an XI message asynchronously using connection SFTP_http://seeburger.com/xi.

2011-08-16 11:08:07 Information Trying to put the message into the send queue.

2011-08-16 11:08:07 Information Message successfully put into the queue.

2011-08-16 11:08:07 Information The application sent the message asynchronously using connection SFTP_http://seeburger.com/xi. Returning to application.

2011-08-16 11:08:07 Information SEEBURGER/SFTP: Initiated inbound message into XI system!

2011-08-16 11:08:07 Information The message was successfully retrieved from the send queue.

2011-08-16 11:08:07 Information The message status was set to DLNG.

2011-08-16 11:08:07 Information The message was successfully transmitted to endpoint http://squeeze.ncl.ac.uk:8000/sap/xi/engine?type=entry using connection SFTP_http://seeburger.com/xi.

2011-08-16 11:08:07 Information The message was successfully received by the messaging system. Protocol: XI URL: http://squeeze:50000/MessagingSystem/receive/AFW/XI Credential (User): <blanked out>

2011-08-16 11:08:07 Information Using connection File_http://sap.com/xi/XI/System. Trying to put the message into the receive queue.

2011-08-16 11:08:07 Information Message successfully put into the queue.

2011-08-16 11:08:07 Information The message was successfully retrieved from the receive queue.

2011-08-16 11:08:07 Information The message status was set to DLNG.

2011-08-16 11:08:07 Information The message was marked to be retried once the receiver channel gets started

2011-08-16 11:08:07 Error Delivering the message to the application using connection File_http://sap.com/xi/XI/System failed, due to: com.sap.engine.interfaces.messaging.api.exception.RetryControlException: Channel stopped by administrative task..

2011-08-16 11:08:07 Error The message status was set to NDLV.

former_member854360
Active Contributor
0 Kudos

Hi ,

First keep both the sender and receiver channel as started status and also disable the programs whch starts and stops the channel.

Then do a an end to end test to check the Module confirugtion behaviour.

Currentlt error you are getting is not related to module config . Its because of stopped channel.

Former Member
0 Kudos

Hi again.

I've made a change (set the flag on the receiver channel ASMA to fail if adapter-specific message attributes are missing) and then tried as you suggested, starting and stopping the channels manually.

The real error is this:

2011-08-17 08:55:31 Error Adapter Framework caught exception: Object not found in lookup of AttribMapper.

2011-08-17 08:55:31 Error Delivering the message to the application using connection File_http://sap.com/xi/XI/System failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.engine.services.jndi.persistent.exceptions.NameNotFoundException: Object not found in lookup of AttribMapper..

So it seems that something in my attribute mapping is not correct, but I can't spot what it is.

To repeat, my attribute mapping on the File (NFS) receiver channel is:

Processing Sequence

1 localejbs/Seeburger/AttribMapper Local Enterprise Bean AttributeMapper

2 localejbs/CallSapAdapter Local Enterprise Bean 0

3 localejbs/ModuleProcessorExitBean Local Enterprise Bean exit

(not sure if I needed the exit bean but it doesn't seem to make any difference if it is there or not)

The CallSapAdapter is there because that's what is shown in the Seeburger documentation for a scenario that is the reverse of mine (file to SFTP), but again I'm not really sure if it belongs there.

Module Configuration

AttributeMapper http://sap.com/xi/XI/System/File/FileName @http://seeburger.com/xi/SFTP/dtSubject

... to try and map the imcoming file names via my SFTP sender channel to the file names to be created on the PI server.

Does anyone out there use a scenario similar to mine (SFTP sender to File NFS receiver) with file name mapping without an interface (and thus no operational mapping), and can you tell me what you did to get it to work?

Thanks very much,

Christine

Edited by: Christine Basken on Aug 17, 2011 10:16 AM

former_member854360
Active Contributor
0 Kudos

Hi,

Try to check the dtsubject in sender SFTP chaneel as ASMA properties.

Former Member
0 Kudos

There are no ASMA settings available in the Seeburger SFTP adapter, unfortunately. Thanks for the idea, though.

former_member854360
Active Contributor
0 Kudos

Hi,

another Idea

It will work as per seeburger attribmapper doc.

In sender SFTP adapter itself use attribmapper

write the

AttributeMapper http://sap.com/xi/XI/System/File/FileName @http://seeburger.com/xi/SFTP/dtSubject

And test.

And in Receiver check the FileName as ASMA properties.

Former Member
0 Kudos

No joy on that - it fails on the sender side with an error referencing the localejbs/Seeburger/AttribMapper module. Not a very helpful message, as usual: Error during processing local bean: localejbs/Seeburger/AttribMapper .

I had already tried all kinds of variations on setting up the attributes on the sender side and it always failed in a similar way.

I am waiting for our Basis team to verify that we've got the .sca file required to use Seeburger's modules, just in case that is causing the problems. Once that is confirmed, I am thinking of creating a request on Seeburger's site asking for their help. If I get any answers there I'll post them.

Thanks very much Debashish for all the helpful suggestions. If you think of anything else I'll happily try it out.

Christine

Former Member
0 Kudos

I forgot to mention that my receiver channel also has an entry in for module CallSapAdapter (on the second line after the AttribMapper module.