Tuesday, April 30, 2019

How to read/write/delete from/to DSO objects

Update: for the latest versions of SAP BW (7.5+) or BW4/HANA use dedicated APIs to work with aDSO object, See blogpost here: How to read/write/delete from/to aDSO objects

Sometimes it is needed to store data into DSO objects from ABAP. Either from BW’s transformation or for some reason from regular ABAP programs. Therefore some kind of API needed to be developed by SAP to allow this. There in classing (non BW4H) BW an several DSO types are available: standard/direct update/write optimized. The DSO type is needed to be considered and scenario of the DSO type shall be respected. Normally it makes no sense to write data to write optimized or standard DSO. Regular BW flows shall be used instead. The only DSO type is designed to be updated programically from custom code is Direct Update DSO. That’s why full API is only available for this type of the DSO.

 

DSO types                        methods of accessing

Standard    Open SQL SELECT / INSERT or UPDATE / BAPI_ODSO_READ_DATA_UC /SDRD_SEL_DELETION

Direct Update           Open SQL SELECT statement / BAPI_ODSO_READ_DATA_UC / RSDRI_ODSO_INSERT, RSDRI_ODSO_MODIFY_RFC, RSDRI_ODSO_UPDATE_RFC / RSDRI_ODSO_DELETE_RFC

Write-Optimized        Open SQL SELECT statement / BAPI_ODSO_READ_DATA_UC

 

Note that in earlier versions of BW the FM BAPI_ODSO_READ_DATA was available but it is obsolete (as of version NW2004s) and BAPI_ODSO_READ_DATA_UC should be use instead.

RSDRI* FM are also available as non RFC enabled ones.


More information:

DataStore Object APIs

APIs of the DataStore Object for Direct Update

No comments: