cancel
Showing results for 
Search instead for 
Did you mean: 

.PDF file transfer(SAP XI ) along with file name to SAP R3

Former Member
0 Kudos

I would like to transfer a .PDF file along with its file name to target system.I need to have target structure like,

<Target>

<field1>

<Field2>

/Target>

Field1should be mapped to file name( i can do this by using dynamic configuration and a UDF).

Field 2 should me mapped to .PDF imae (.ie) i need tp pass the whole image to one target field

How can i do this.

Please suggest.

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi, Rajesh:

Check the slides below, the solution is much simpler

How to Handle Unstructured Contentu200F

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/482aae19-0301-0010-3485-8efd6188...

Regards.

Liang

Former Member
0 Kudos

Hi Ryan,Hi Liang

Thanks a lot for your web blog and presentation.I am going to implement the same.Thanks again

Thanks Rajesh

Former Member
0 Kudos

Hi as mentioned by you the structure is

<Target>

<field1>

<Field2>

</Target>

Field 1 Contains The dynamic File name UDF

Just make This File name which is sent Thru Source side as "Filename.PDF" to be passed to the target end

For example If the File name is XYZ

Field 1 has XYZ--

Pass The Field 2 as "XYZ.pdf" (i.e. File name Followed By .pdf as extension(Field1.pdf))

Former Member
0 Kudos

Sainath,

Please correct me if I am wrong.

If we pass XYZ.pdf (file name with extension ) to field2,it will have the whole PDF image with it.So the outpout would be,

<Target>

<Field1>XYZ</Field1>

<Field2>XYZ.pdf</Field2>( should have the whole PDF image)

</Target>

Thanks

Rajesh.S

Ryan-Crosby
Active Contributor
0 Kudos

What format are you outputting the .PDF file to? I did a scenario similar to this and was going to put together a blog for it. It was a .JPG file, but I set it up to work with any binary file format if you can accept XSTRING on the receiver side. I accomplished it using a java mapping, let me know if you're interested in seeing a blog for it.

Ryan

Edited by: Ryan Crosby on Feb 23, 2009 8:41 PM

Former Member
0 Kudos

Hello Ryan Crosby,

I would like to send the same format to SAP (.ie) .PDF image itself along with file name.Would you please explian?

Ryan-Crosby
Active Contributor
0 Kudos

For instance the first few characters in my binary file are encoded in base64 binary i.e. "ÿØÿà" but I convert it to a hexadecimal string which I then pass to a function module within my ABAP proxy. The equivalent hexadecimal string would be "FFD8FFE0", and then I set the value of an XSTRING within my ABAP proxy to the value passed in.

Ryan

Ryan-Crosby
Active Contributor
0 Kudos

Hi Rajesh,

Try out this weblog that I just setup: /people/ryan.crosby/blog/2009/02/27/file-xi-proxy-scenario--moving-binary-files-with-accompanying-filename-attribute-in-converted-xstring-format

Ryan

Edited by: Ryan Crosby on Feb 28, 2009 5:22 AM

Former Member
0 Kudos

Hello Rajesh,

Use ASMA - Adapter-Specific Message Attributes in sender channel. You can read whole pdf file as image. Create a target message type with two fields.In mapping do 1:1 for first field. For second field create an UDF to retreive source file name and use the code as given in attached link.

___http://help.sap.com/saphelp_nw04/helpdata/en/43/03612cdecc6e76e10000000a422035/frameset.htm__

Hope it will helps.

Cheers

Veera

Former Member
0 Kudos

Hi Veera,

I have implemented the UDF for getting file name by using ASMA.and i mapped to the target field also.

i can see the file name in SXMB_MONI(Dynamic Configuration).

But mapping is failed due to XML parser error as it is not converting .PDF image into XML and it could not map into target side

Former Member
0 Kudos

Try out by making the File name as filename.pdf in field 2....

Former Member
0 Kudos

Hi Sainath,

Would you please explain in detail?

Former Member
0 Kudos

This will sort out your Problem

/people/sap.user72/blog/2005/07/31/xi-read-data-from-pdf-file-in-sender-adapter

BR

Sainath

Edited by: Sainath Chutke on Jan 21, 2009 4:25 PM

Former Member
0 Kudos

Thanks for your quick reply...

I have gone through the blog already.

But i don want to read the File as mentioned in the blog ..it would be simple file trasnfer along with one extra field.

IF it is without mapping,we can transfer the file only. i need mapping object for sending file name to target field

I would like to pass the whole image into one field..i don wanna read the PDF file.

Please suggest