Skip to Content

Cloud Faxing from SAP

A (very) brief history of Fax

Although the fax has been around for more than 150 years now sending faxes still is a very widely used technology. That is an incredibly long period of time if you compare this to the product cycles of modern hardware. But the way to send a fax also was changed in the last decades. After connecting fax devices to your ERP systems it is now common practice to use a fax server instead.

As we are entering the cloud era the next step in evolution would be to replace the fax servers by fax services offered in the cloud.

cospace – a free telecommunications service in the cloud

One of these cloud-based service offerings is cospace. The reason why I choose cospace for my blog is not by chance but related to the fact that the service is offered by our parent company QSC AG. But I am sure that the showcased technique of connecting SAP to cloud-based services via an ABAP REST API can be used for other service providers as well.

So what free services are offered by cospace?

  • Send and receive a limited number of faxes (only within Germany)
  • Use a Multi-Voicebox for incoming calls
  • Arrange and manage dial-in conference calls
  • Use 5GB of secure cloud storage hosted in Germany

All cospace functions can be controlled by a REST API using JSON as a container for the serialized data. This gives us the possibility to use these services from external systems like SAP.

ABC – the ABAP Bridge to Cospace

Inspired by the terrific projects Twibap and CoDBap by Uwe Fetzer I created a prototype which enables you to send a fax from SAP Gui via cospace.

Because sending a fax covers only a tiny subset of all available cospace functions I uploaded my source code to Project ABC in SAP Code Exchange, hoping to find some coworkers that like to add some useful functions there.

Possible scenarios to realize would be for instance:

  • Replacing current fax hardware by the cloud fax service
  • Automatically link incoming faxes with business objects in SAP
  • Easily setting up conference calls with customers stored in SAP
  • Sharing file attachments with customers outside the corporate network

Back to cloud faxing now, how is it done?

Example

During the development of my prototype I did not invest too much time in the design of the UI. At least you can test the cloud faxing in a live scenario if you follow the installation steps described in project ABC.

After calling the transaction you enter your cospace credentials in SAP Gui. Then you are asked to upload a PDF file and enter a recipients fax number. After that the fax is prepared in the cloud and send to its recipient.

In SAP you will see a log with some technincal information about the whole sending process:

04 Log of sending fax from SAP.png

In the cospace web gui you can see the corresponding information about the fax:

05 Fax created via SAP as seen in Cospace Web Client.png

Under the Hood

Now what is happening behind the scenes?

The communication between SAP and cospace is managed by HTTP commands using interface IF_HTTP_CLIENT. Technically the following steps are executed:

  1. Read session id and load balancing server from cospace
  2. Authenticate on load balancing server with session id and user credentials
  3. Create a cospace Fax object
  4. Upload the PDF file
  5. Read the events from cospace until the uploaded PDF is converted
  6. Send the Fax object

Because all data is exchanged in JSON format the installation of the ABAP JSON Document Class (another great project of Uwe Fetzer) is a prerequisite for using ABC.

If you are ready now for a test of Cloud Faxing by yourself I invite you to download the sources available as SAPLink nuggets or to join the project.

5 Comments
You must be Logged on to comment or reply to a post.
  • Dear Mark,

    thank you for starting this great project on Code Exchange. The next step should be an integration into SCOT to support the standard way SAP handles Fax. Pies Harding had built a Perl script doing that already in 2004: Making SAPConnect-oids with Perl. Seems to be a good starting point. The drawback is that it seems that this can't be implemented in ABAP as the fixed RFC Function Module Names had to be used. Or do you know a way how the called Function Module Names could be Aliased?

    Best regards

    Gregor

    • Gregor,

      thank you very much for your feedback and for the tickets you created.

      SCOT integration is definitely an important scenario, I will put it on the list... I hope I can work it out soon, because holiday is already waiting and I will have no internet access for 3 weeks then 😉

  • Hi Mark,

      Are you familiar with any similar services for international organizations; For example, faxing to / from Tokyo, Singapore, London, Sydney etc ?

    • Martin,

      unfortunately I do not know a provider outside of Germany for this.

      You could get a commercial version of cospace which you can use for international calls I think but this would not be for free then.

      There are many fax service provider available around the world but I did not know what kind of API they offer.