How to insert the data into the BW ADSO on the BW on Hana and BW4HANA ? The easy way is just to use the official function module delivered by SAP

Example ADSO:

Example code:

REPORT zadsoamdp.

DATA: lt_data TYPE STANDARD TABLE OF /bic/aadsoamdp2,
      lt_msg  TYPE rs_t_msg.

APPEND VALUE #( field1 = '1' field2 = '2'  ) TO lt_data.

CALL FUNCTION 'RSDSO_DU_WRITE_API'
  EXPORTING
    i_adsonm            = 'ADSOAMDP'
    it_data             = lt_data
  IMPORTING
    et_msg              = lt_msg
  EXCEPTIONS
    write_failed        = 1
    datastore_not_found = 2
    OTHERS              = 3.
IF sy-subrc <> 0.
  MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.

cl_demo_output=>display(
  EXPORTING
    data = lt_msg
).