Skip to Content
Technical Articles
Author's profile photo Frank Riesner

SAP BW/4HANA write interface-enabled ADSO connected to a 3rd Party Tool

Dear SAP BW/4HANA enthusiasts!

With SAP BW/4HANA 2.0 (released in Q1.2019) the DataStore object (ADSO) has received a new  write interface which was introduced in Gordon Witzel´s earlier blog about Data Integration with SAP BW/4HANA 2.0 .
This new interface provides the possibility to integrate data into the ADSO inbound table without the need of the normal standard SAP BW/4HANA objects like Source System, DataSource, Transformation and Data Transfer Process. This way, it is possible to use tools such as SAP Data Services, SAP NetWeaver Process Integration, SAP Data Intelligence or SAP Cloud Platform Integration Suite to push the data into SAP BW/4HANA directly. See also more details in the SAP BW/4HANA application help.

This SAP BW/4HANA 2.0 feature provides a clear successor interface for the former source systems of SAP BW 7.5 called “Web Service”, “Data Services”, and “External System”:Source%20System%20Conversion%20from%20SAP%20BW%207.x%20to%20SAP%20BW/4HANA%202.0

SAP recommends leveraging the new write interface during conversion projects for sources which are connected to SAP BW 7.x on these obsolete source system types. There is no automated conversion path, but the manual steps are well documented in following SAP notes:

  • 2441826 – BW4SL – Web Service Source Systems
  • 2441836 – BW4SL – SAP Data Services and External System Source Systems

 

A fact not very widely known is, that the write interface is not limited to SAP solutions but can also be addressed by 3rd party tools (although stated differently in some sources in the past). In the following scenario we will describe how this can be accomplished based on the SEEBURGER Business Integration Suite (BIS):

In our recent project, the customer uses SEEBURGER BIS as its general strategic platform for integration requirements in its IT landscape. During a shell conversion project of their SAP BW 7.5 to SAP BW/4HANA 2.0, the former SEEBURGER BIS connection via the “Web Service” source system had to be redesigned in a way that it is able to address the new ADSO write interface of SAP BW/4HANA.

 

The following is a step-by-step guide to how this was achieved:

Step 1: In the SAP BW/4HANA Modeling Tools, create a new ADSO (here: technical name ZADSO) as “Standard DataStore Object” (or “Staging DataStore Object”). For these two types the modeling parameter “Write Interface-Enabled” is available to be switched on.Step%201%20-%20Modeling%20the%20ADSO

 

Step 2: After activation of this new ADSO, template URIs (Uniform Resource Identifiers) are generated in the Properties window.Generated%20URIs%20of%20the%20ADSO

These URIs have the following purpose:

Get Structure:

https://server:8443/sap/bw4/v1/push/dataStores/zadso

–> Get the JSON schema and get CSRF token

Get Sample Data:

https://server:8443/sap/bw4/v1/push/dataStores/zadso/sampleData{?records,seed}

–> Get sample data generated by the server

Send Data:

https://server:8443/sap/bw4/v1/push/dataStores/zadso/dataSend{?request,datapid}

–> Send data using the CSRF token

Open Request:

https://server:8443/sap/bw4/v1/push/dataStores/zadso/requests

–> Open request (TSN) and get CSRF token

Close Request:

https://server:8443/sap/bw4/v1/push/dataStores/zadso/requests/{request}/close{?error}

–> Close request (TSN)

 

Step 3: For sending data a CSRF token is needed, otherwise an error 403 HTTP Forbidden with message “CSRF token validation failed” will be returned. To get this token, an HTTP GET needs to be done on the Open-Request-URL with key “x-csrf-token” in the HTTP header. In the response, this key will be filled with the token. In the HTTP GET request, basic authentication needs to be set with a valid user and password.SEEBURGER%20BIS%20-%20BW/4HANA%20communication%3A%20GET%20DATA

SEEBURGER%20BIS%20-%20BW/4HANA%20communication%3A%20GET%20DATA%20%282%29

SEEBURGER%20BIS%20-%20BW/4HANA%20communication%3A%20GET%20DATA%20%283%29%29

 

Step 4: Data can be sent to the inbound table of DataStore object ZADSO doing an HTTP POST on the Send-Data-URL with the JSON data as raw body and the CSRF token in the HTTP header. Basic authentication needs to be set as well. If the data is sent from another IP than the open request, the cookie from the Open-Request response needs to be in the HTTP Header,
e. g. Cookie =
sap-usercontext=sapclient=001;path=/;SAP_SESSIONID_BWP_001=Ui3914ArIMefp4pXhIjg9Z;path=/;

The response from SAP is empty.SEEBURGER%20BIS%20-%20BW/4HANA%20communication%3A%20SEND%20DATA

SEEBURGER%20BIS%20-%20BW/4HANA%20communication%3A%20SEND%20DATA%20%282%29

SEEBURGER%20BIS%20-%20BW/4HANA%20communication%3A%20SEND%20DATA%20%283%29

 

Final Step: After the data is sent successfully, a new request TSN is listed in the SAP BW/4HANA Cockpit app “Manage DataStore“. From this point onward, this request TSN and the related data behaves like any other request TSN in an ADSO inbound table. For example, you can activate it to provision it to other InfoProviders or consume it with a BW query.

If SEEBURGER BIS detects an error (e.g. wrong syntax in a DATE field), no request TSN is created until the error is corrected in the source system.Request%20TSNs%20in%20ADSO

 

Explicit Request Handling

By following the above steps no explicit request TSN is used in SAP BW/4HANA. This means, every Data-Send creates its own implicit request TSN. If there is the need to control the request TSN from outside, it needs to be opened explicitly to be able to obtain the request TSN.

To do so, after step 3 the Open-request-URL needs to be called again, this time with HTTP POST to receive the request TSN e. g. 20200721105757000003000.SEEBURGER%20BIS%20-%20BW/4HANA%20communication%20%282%29%3A%20POST

 

This request TSN and the corresponding data package IDs have then to be added to the Data-Send call as a parameter, e. g. …/zadso/dataSend?request=20200721105757000003000&datapid=1. This way several Data-Send calls can be done using the same request TSN.SEEBURGER%20BIS%20-%20BW/4HANA%20communication%20%282%29%3A%20SEND

 

At the end, the request TSN needs to be closed explicitly by calling HTTP POST on the Close-request-URL with the related CSRF token and request TSN, e. g. …/zadso/requests/20200721105757000003000/close.SEEBURGER%20BIS%20-%20BW/4HANA%20communication%20%282%29%3A%20CLOSE

So in summary, the steps are:

  1. GET   …/zadso/requests [Obtain CSRF token]
  2. POST …/zadso/requests [Open request and get TSN]
  3. POST …/dataSend?request=<TSN>&datapid=1 [Send the data several times, based on  increasing data package ID (x+1)]
  4. POST …/zadso/requests/<TSN>/close [Close request with TSN]

 

Additional technical details

  • To retrieve the JSON schema a plain HTTP GET can be performed on the Get-Structure-URL.
  • To generate sample data the Get-Sample-Data-URL can be called:
    GET …/zadso/sampleData?records=<number of records>&seed=<seed>
  • If the sent data is not correct, it is possible to close the request and mark it as Error. Use the CLOSE-Request-URL with parameter error=true to achieve this. The data is then excluded from the ADSO activation queue.
  • The data activation in the target ADSO can be triggered automatically by means of a Process Chain in ‘Streaming’ mode, which is executed when a Request in the inbound queue is closed and if the “streaming” Process Chain contains a Process Variant ‘Activate DSO Data’ specifying the DataStore name.“ See more details in my separate blog covering BW process chains in streaming mode.

 

Conclusion

In SAP BW/4HANA 2.0, the write interface-enabled DataStore object provides the interface of choice for sources of data which were connected to SAP BW 7.x via source system types “Web Service”, “Data Services”, and “External System”. As these types have been decommissioned in SAP BW/4HANA, a manual conversion is required as documented in the two SAP notes mentioned at the beginning.

The example described in this blog showed, that also 3rd party tools like SEEBURGER BIS can be leveraged to provision data to SAP BW/4HANA this way. In our customer project this resulted in following benefits:

  • The SEEBURGER platform was already connected and integrated to several source systems, and it manages and secures access to a broad range of SAP and non-SAP data sources. No changes were required in this infrastructure.
  • This relieved SAP BW/4HANA developers from tasks that are not explicitly in their focus, such as managing and maintaining source systems of different types, managing the data quality and data transfer processing and monitoring.
  • Based on the new write interface, integration of SAP BW/4HANA into the customer environment is fast and easy. Existing connections could be reused in one-step, reducing integration time and cost.
  • Thanks to the new ADSO write interface and the capabilities of the SEEBURGER platform, the customer was able to execute and to achieve these objectives.

Assigned tags

      21 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Dirk O
      Dirk O

      Hello Frank,

      thank you for sharing. I really appreciate level of the provided details by you and the provided function as such, well done. Hope to see more such articles, soon. ?

      Best regards,

      Dirk

      Author's profile photo Anil Kumar
      Anil Kumar

      Hi Frank,

      Thanks for sharing, this will definitely help me since I have a similar requirement. Well Done ?. 

      Regards,

      Anil.

      Author's profile photo Shruti Purohit
      Shruti Purohit

      Hi Frank,

      Very well explained and useful blog. Appreciated 🙂

       

      Regards,

      Shruti

      Author's profile photo Jonathan Ma
      Jonathan Ma

      Thanks for the blog. Is there a way to activate the request TSN automatically? Since this isn't a process chain, I tried and activate the direct update but then I lost the option of activating the "write interface".

      Please advise.

      Author's profile photo Frank Riesner
      Frank Riesner
      Blog Post Author

      Dear Jonathan, 
      please see my updated answer below.
      KR Frank

      Author's profile photo Joerg Boeke
      Joerg Boeke

      Hi Frank,

      just a quick question cause we do use the old WebService integration in Process chain

      E.G. a specific user uploads data ( for correction purpose e.g. Masterdata) and if the package/data is fine the MD activation will be triggered via upload in old fashioned PSA

       

      Is there a new Process chain variant available or planned, to detect the new Write interface functionality like data is being pushed into ADSO==> trigger the further upload to target ADSO?

      Author's profile photo Frank Riesner
      Frank Riesner
      Blog Post Author

      Hi,
      please see my answer below.
      KR Frank

      Author's profile photo Frank Riesner
      Frank Riesner
      Blog Post Author

      Hi Jonathan, hi Jörg!

      I checked this detail again with some SAP colleagues and good news is that there is actually a way to achieve this: The data activation in the target ADSO can be triggered automatically by means of a Process Chain in ‘Streaming’ mode, which is executed when a Request in the inbound queue is closed and if the “streaming” Process Chain contains a Process Variant ‘Activate DSO Data’ specifying the DataStore name.“ See more details in my separate blog covering BW process chains in streaming mode (part D).

       

      Regards Frank

      Author's profile photo Jens Schwendemann
      Jens Schwendemann

      This might be a stupid question but we are evaluating integrating IBP via CPI-DS and wondered if ADSO might be a way to read data from the BW/4 system, so BW/4 is the source.

      Is that possible (from an ADSO API POV) and (by the chance that someone here knows by accident) CPI-DS support this as REST or the like datat store connection?

      Many thanks and kind regards

      Jens

      Author's profile photo Frank Riesner
      Frank Riesner
      Blog Post Author

      Dear Jens,

      there are two ways in general to extract BW data:

      1. Open Hub: Data is pushed from BW e.g. via process chain into a file or DB table (local or external DB)
      2. ODP: Data is pulled from external sources like BW, DataServices, HANA SDI or OData. I think the last option is the one most interesting for you if I get your question right.
        Please check further details here in the SAP help:
        https://help.sap.com/viewer/107a6e8a38b74ede94c833ca3b7b6f51/2.0.4/en-US/11853413cf124dde91925284133c007d.html

      Regards,

      Frank

      Author's profile photo Mohamed Glid
      Mohamed Glid

      While using a ADSO with the option "write interface enabled" in the "general" preferences of the ADSO, with this option set the rest services for push into this ADSO are generated. Using this rest service we push the data from our SAP PO system into ADSO.

      What I need to know is where I can find detailed error logs in case that the push from SAP PO via rest service into the ADSO is failing .  In this case there is no request created in ADSO  and in SAP PO there is only a very general error message "Send not successful. Internal server error".

      Author's profile photo Ednan MASOVIC
      Ednan MASOVIC

      we have the same challenge

      any suggestions would be highly appreciated

      Author's profile photo Frank Riesner
      Frank Riesner
      Blog Post Author

      Hi Ednan,

      please consider SAP note "2907345 - Push aDSO: Aborted processes changed to status Finished"

      or open an incident on component BW4-DM-ADSO

      Regards - Frank

      Author's profile photo Ednan MASOVIC
      Ednan MASOVIC

      Hi Frank,

      thanks a lot for the replay but the S-Note is not applicable as we are already on SP08 (SAPK-20008INDW4CORE).

      When receiving data from SAP PO the BW-System’s response in case of data format errors is sent as plain text. These messages can be found when sending faulty data with POSTMAN.

      Our PO team is struggling to get these messages. So the question is: Is there a way of receiving these error messages in SAP PO?

      Thanks and regards,

      Ednan

      Author's profile photo Viren Devi
      Viren Devi

      Hello Frank,

      Will SAP create same API feature in SAP 7.5 on HANA so that external apps can write into Direct update ADSO?

      Thank you.

      Author's profile photo Frank Riesner
      Frank Riesner
      Blog Post Author

      Dear Devi,

      the ADSO write-interface is only available for BW/4HANA and there are no plans to downport this feature. Sorry. Most probably will have to leverage the existing APIs for classic DSOs as long as you are on BW 7.5

      KR Frank

      Author's profile photo Viren Devi
      Viren Devi

      Thats is bit unfortunate as clients generally prefer to use B4HANA compatible objects . In our case we will have to use Classic DSO's to be written from middleware tool. Thank you for the information and great blog.

      Author's profile photo Frank Riesner
      Frank Riesner
      Blog Post Author

      Hi Devi,

      here is the documentation of the ADSO APIs in SAP BW/4HANA.
      https://help.sap.com/viewer/107a6e8a38b74ede94c833ca3b7b6f51/2.0.9/en-US/72e16c936fb94cffb71ce90edd5f8f8e.html

      Maybe those are available in your BW 7.5 release as well? At least worth to take a little time to check before you go for classic InfoProviders.

      KR Frank

       

      Author's profile photo Viren Devi
      Viren Devi

      Hello Frank,

      This is true. We did find API's in 7.5 as well. Appearently work same way.   Thank you.

      Author's profile photo Rajni Chellani
      Rajni Chellani

      Hi Frank,

       

      I have the same requirement and followed all the steps but still receiving X-CSRF Token Validation Failed error.

      Could you please help me what is missing? I have attached all the snapshots in below blog.

       

      https://answers.sap.com/questions/13464600/x-csrf-token-validation-failed-when-save-data-in-b.html

       

      thanks

      Author's profile photo Frank Riesner
      Frank Riesner
      Blog Post Author

      Hi Rajni,

      there not enough details provided for me to be able to assess what is wrong.

      Please check this blog, which describes CPI integration in detail:https://blogs.sap.com/2019/08/23/sap-cloud-platform-integration-cpi-to-push-data-into-sap-bw4hana/

      or open an incident on component BW4-DM-ADSO

      Regards - Frank