Showing results for 
Search instead for 
Did you mean: 

Calling from ABAP to non-SAP application, returning a result

Former Member
0 Kudos

I'd like to write a simple batch SAP job that loops through some table entries, passes a few fields of information to an external, non-SAP application, which returns a value to be used in further ABAP processing.

I think Synchronous RFC is the answer.  In reading SAP Help, setting up the Destination and making the call does not look too difficult.  However, I'd like to find some more 'complete" sample code that shows an example of the called program.  I'm not sure what type of programs can be called.  For instance, can the called program be VB Script?

More details:  The information I need is in our document management system.  I'd like to pass values (obtained from SAP documents/table) to the DMS, have it perform a search and return an image ID number.  Once I have the image ID number, I will populate SAP table TOA01 and create an ArchiveLink (attachment) from the SAP document to the image stored in the non-SAP system.

Over in the DMS, I have an object model to help me write the code to perform the search.  I think my options for programming that external program are VB Script, Java and C# (and I'm not proficient in any of them).  Thus far, I have not been able to find any examples of calling those types of programs from SAP.

I wonder if the SAP BC415 training class covers this.  If so, I might try to get into that (or hook up with someone who has taken it).

Thank you for any suggestions.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Russ,

If I understand you correctly, you have some data in SAP related to some documents in your external DMS, but not yet linked; and you are trying to program a solution to link the two and plan to use Archivelink as the linking mechanism?

What DMS are you using?  It must be Archivelink compliant if you are planning to use the Archivelink 'Store Business Object' scenario for creating attachments to SAP data.  You would also need to configure Archivelink within SAP with a content repository pointing to your DMS system and document types that link to the SAP business (data) object.

One such method I can think of is to write a web service that runs on the DMS server that accepts the parameters from SAP and returns the document identifer.  Then within SAP, write an ABAP program that calls the web service passing the parameters from the SAP tables and returns the document identifier.  I would also recommend using the standard SAP function modules to create the link inside SAP instead of writing directly to the TOA01 table.

Former Member
0 Kudos

Yes, Mark.  Exactly right.  Thanks very much for your response.

Our DMS is PaperWise.  It is not formally Archivelink compliant, but we have successfully connected the two.  We have Archivelink configured and we have many instances of SAP documents with Archivelink attachments to images stored in PaperWise.

I like your suggestion, but I have not created a web service before, so I am not sure where to start.  Perhaps I can find someone in my company to do that (or perhaps hire PaperWise to do that for us).  In what language would the web service be written?  Is there somewhere I can go to see sample code of SAP calling a web service?

Thanks again for your reply.  Much appreciated.

Former Member
0 Kudos

The web service could be written in any .Net language as a starter.  If you have a .Net developer in your company they should be able to help you out.  I guess the other piece is that this web service must be able to interrogate the PaperWise DMS to perform the search, either by accessing a PaperWise API if they have it, or accessing the underlying database.

On the SAP side, setting up a web service and then calling it in ABAP is fairly straight forward, I did that recently myself.  There are a few guides out there, but this is the one I used:

However I used transaction LPCONFIG rather than SOAMANAGER to create the logical port.

Good luck!