cancel
Showing results for 
Search instead for 
Did you mean: 

Send files from SAP to external system

kjyothiraditya
Participant
0 Kudos

Hi Experts,

Can you please suggest how to send documents like BDS attachments can be sent to external systems ?

Regards,

Jyothir Aditya

margaretk
Participant

Hello. Can you clarify your requirement? You can access BDS attachments through the CL_BDS_DOCUMENT_SET class. But then, you have various options to save the document to the frontend or to a url or attach to an email.

raghug
Active Contributor

It looks like you answered your own question?

Sandra_Rossi
Active Contributor

You can send anything via email, anything via webservice... (if not too big of course) What is your question? Extracting business object attachments, or sending emails? Can you give the real case, your question is too broad to be answered precisely.

Please use the Comment button, not Answer, or just edit your question; as SAP says: "Before answering You should only submit an answer when you are proposing a solution to the poster's problem."

kjyothiraditya
Participant
0 Kudos

Hi Raghu/Sandra,

Can you suggest/provide pseudocode on how it can be done using Webservice i.e., send documents via webservice.

Regards,

Jyothir Aditya

matt
Active Contributor

Can you search? The topic is well covered.

kjyothiraditya
Participant
0 Kudos

could anyone provide some guide/pointers please

margaretk
Participant

Unfortunately your question is not specific enough for a specific solution.

If you are running the program on the frontend, you can simply instantiate the I_OI_DOCUMENT_PROXY and use SAVE_DOCUMENT_TO_URL.

Or, you can call SAP BAPIs (or custom Function Modules or whatever) via RFC (using NW RFC Library for C/C++, JCo3 for Java or NCo3 for .NET). There is an excellent wiki that is specific to transferring DMS documents using this method. BDS documents would need different handling, but maybe you can use this article as a starting point.

https://wiki.scn.sap.com/wiki/display/PLM/Calling+DMS+BAPIs+from+external+RFC+clients+without+using+...

kjyothiraditya
Participant
0 Kudos

Hi Margaret,

The program will not be interactive but will be schedules as batch job/ webservice will be called . So it has to send files/documents when invoked.

SimoneMilesi
Active Contributor

jyothiraditya.k and what prevents you to adapt all the options you can find here or here or here or here ?

Are you expecting the full working code from us?

kjyothiraditya
Participant
0 Kudos

Hi,

I have to send it to a url. It has to be initiated from SAP.

kjyothiraditya
Participant
0 Kudos

Hi Experts,

Any suggestions on how to send files from SAP to external non-SAP systems. Right now i have GOS attachments of QM notifications and will have to send them to non-SAP system at regular intervals. I am using IDoc and sending the binary data in IDoc. But the IDoc is having large number of segemnts and the segment data is concatenated at PI and sent to external web service in XML.

The thing is we are having a huge processing time at PI side for files like 10MB.

Is there any better alternative approach to achieve the same. please advice.

Regards,

Jyothir Aditya

Sandra_Rossi
Active Contributor
0 Kudos

What kind of 10MB attachments is that?

How do you compress the attachments inside the IDoc? (is it possible to GZIP them and encode them in base64 - will the target system be able to decode them?)

kjyothiraditya
Participant
0 Kudos

Hi ,

They are word document with.doc extension usually and have some images in them. Testing with some huge file size.

I am placing the binary/hexadecimal content in segments, which the other system would combine to get back the file.

Didn't observe any major improvement with zipping(like observed around the 1 mb reduction).

Also encoding in base64 doesn't help much.

Because of huge segments, pi is getting overloaded and sometimes getting oom too.

Hi Jyothir,

I have similar requirement to send the GOS attachment of shipment to send to external system.we are sending data with POST method but failing to send the attachment. Did you achieve this, if so please do let me know how to proceed

Regards,

Khushboo

kjyothiraditya
Participant
0 Kudos

Hi no, bcos our system was on lower version and couldn't authenticate with available methods. If you are on higher version, it becomes easier, just Google.

Also see what is the maximum payload size.

Accepted Solutions (0)

Answers (2)

Answers (2)

karim_benakli_kb
Participant
0 Kudos

Hi,

it depends what is your external non SAP system...if the external system supports http(s) requests in the form of REST services, SOAP services or simply HTTP, then YAC can be a solution. It is able to automatically send attachments to any external solution also with SAP metadata if needed.

See www.znk.lu, info@znk.lu

Karim

kjyothiraditya
Participant
0 Kudos

I have searched, but they talk about FTP/ AL11. But I do not want it like that. It has to happen like in real time like webservice-proxy/rfc.

kjyothiraditya
Participant
0 Kudos

Hi simone.milesi, I was checking the feasibility and yes pointers like pseudo code.

Thanks it is clear as how to send the data in a web request, but my scenario is to send file along with data and do not clear picture on this. So seeking help.

SimoneMilesi
Active Contributor

A file is data....

  • read the file
  • Pass it to your webservice
  • send all

You are giving little slices of information, without telling us the exact scenario and which is the issue you are facing, we are wasting your and our time, shooting in the darkness in this way.

If you want help, work on the issue an explain it well and clearly.

kjyothiraditya
Participant
0 Kudos

i will have to send files from BDS attachments to salesforce. can you let me know how to achieve this ? As Salesforce is cloud based and files may be big, we may have some network issues or processing taking long time. Can you suggest the best way to transfer files ? As for Salesforce, it will be an endpoint, I am thinking of using a webservice. Please advise.

kjyothiraditya
Participant
0 Kudos

Any suggestions on how to send files from SAP to external non-SAP systems. Right now i have GOS attachments of QM notifications and will have to send them to non-SAP system at regular intervals. I am using IDoc and sending the binary data in IDoc. But the IDoc is having large number of segemnts and the segment data is concatenated at PI and sent to external web service in XML.

The thing is we are having a huge processing time at PI side for files like 10MB.

Is there any better alternative approach to achieve the same. please advice.

dhineshpanneer
Explorer
0 Kudos

Were you able to find a solution? I am looking for something similar.

Thanks

Dhinesh