cancel
Showing results for 
Search instead for 
Did you mean: 

File/FTP to ABAP Proxy (file as attachment)

Former Member
0 Kudos

I have the following scenario: File/FTP -> XI -> ABAP Proxy but not the normal case. What I need is the picked file as attachment and the file name. I hope this is possible.

I have found the following blogs:

/people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14

/people/michal.krawczyk2/blog/2006/04/19/xi-rfc-or-abap-proxy-abap-proxies-with-attachments

I have no idea where I have to start. How I should define the sender and receiver message interface? How I have to configure the sender file/ftp adapter?

I'm using PI 7.1 SP 7.

Accepted Solutions (0)

Answers (1)

Answers (1)

prateek
Active Contributor
0 Kudos

Yes, this is possible.

In the sender channel, use additional parameters in advanced tab to use file attachment. The type of message structure could be any dummy one. (If you don't really want any other structure to be passed).

Receiver side configuration could be as per the second blog.

Regards,

Prateek

Former Member
0 Kudos

Thanks for the quick answer. That's exactly the way I have tried it. But what is the parameter I have to set in "Advanced mode".

I can't find a list of possible parameters.

http://help.sap.com/saphelp_nwpi71/helpdata/en/44/655453b48a4ddfe10000000a1553f7/content.htm

https://websmp230.sap-ag.de/sap(bD1kZSZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=801926

Edited by: Gil Ritter on Feb 3, 2009 4:15 PM

Former Member
0 Kudos

I am not sure if you can send file as attachment using FTP. However it works definitely with NFS File adapter:

If you have selected the transport protocol File System (NFS) (NON FTP) and have set the Additional Files(s) indicator, you can enter the additional files that are to be included in the XI message as attachments.

Enter a name for each additional file in the File List. You can choose any name. Separate the names of the additional files with a comma (<Additional file1,additional file2, ...,additional fileN>).

Jayson

Former Member
0 Kudos

Yes, I have found a lot of examples for this (file to mail with attachment scenarios) but I have to use ftp.

udo_martens
Active Contributor
0 Kudos

Hi Gil,

this is in the standard not possible with ftp. You need to pick up the 2 files binary to a folder on PI (2 messages), where you could run your planned scenario.

Regards,

Udo

Former Member
0 Kudos

Hi Udo.

Thanks for your answer but I have only one file. Does it mean that I have to create a ftp to file (PI file system) and a file to abap scenario? Isn't it not a little bit strange?

Regards.

Gil

udo_martens
Active Contributor
0 Kudos

Hi Gil,

>Does it mean that I have to create a ftp to file (PI file system) and a file to abap scenario? Isn't it not a little bit strange?

Yes...

Regards,

Udo

Former Member
0 Kudos

At the moment I have the following problem. I always get an error during mapping the request message. This is the error message:

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>

- <!-- Mapping der Request-Message

-->

- <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">

<SAP:Category>Application</SAP:Category>

<SAP:Code area="MAPPING">EXCEPTION_DURING_EXECUTE</SAP:Code>

<SAP:P1>com/sap/xi/tf/_MT_SCANFILE_to_MT_SAP_SCANFILE_</SAP:P1>

<SAP:P2>com.sap.aii.utilxi.misc.api.BaseRuntimeException:</SAP:P2>

<SAP:P3>Fatal Error: com.sap.engine.lib.xml.parser.ParserE</SAP:P3>

<SAP:P4>xception: XMLParser: No data allowed here: (hex) ~</SAP:P4>

<SAP:AdditionalText />

<SAP:Stack>Während des Anwendungs-Mappings com/sap/xi/tf/_MT_SCANFILE_to_MT_SAP_SCANFILE_ ist eine RuntimeException aufgetreten. com.sap.aii.utilxi.misc.api.BaseRuntimeException:Fatal Error: com.sap.engine.lib.xml.parser.ParserException: XMLParser: No data allowed here: (hex) ~</SAP:Stack>

<SAP:Retry>M</SAP:Retry>

</SAP:Error>

And if I use transaction sxmb_moni I see that the payload MainDocument is my pdf document and I can read it.

MG%PDF-1.3

%âãÏÓ

2 0 obj

/WinAnsiEncoding

endobj

3 0 obj

<<

%Devtype POST2 Font COURIER normal Lang DE

/Type /Font

/Subtype /Type1

/BaseFont /Courier

/Name /F001

/Encoding 2 0 R

>>

endobj

4 0 obj

<<

/Length 5 0 R

u2026.

I believe there is still an error at my communication channel configuration of the ftp sender adapter.

udo_martens
Active Contributor
0 Kudos

Hi Gil,

>I believe there is still an error at my communication channel configuration of the ftp sender adapter.

Aeh no, otherwise the message wouldnt reach the IS

>I see that the payload MainDocument is my pdf document and I can read it

An pdf document cant be mapped by a XML to XML mapping service. You picked up the pdf as message (or you used payload swatch bean), but you need to pick up XML with pdf attachment. As i told you it could lead to some difficulties if you want to use ftp AND attachment. By the way there is no possibility to push a binary stream to ABAP proxy, you need a attachment.

Regards,

Udo

Former Member
0 Kudos

In a first step I have changed the receiver agreement. Now I'm using a file adapter at the receiving side too. And I have removed the operations mapping. Now I'm not getting any error.

But have a look at Michals blog:

/people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14

Obviously he is using a message mapping in a similar scenario to get the file name and to map it to a xml node. What is the trick?