Skip to Content

While working with SAP BWonHANA we came to the point to delete requests from an Advanced DSO using a program. Unfortunately there is no funtion module like RSSM_PROCESS_REQUDEL_ODSO for classic DSO.

So I spend some nice time with the ABAP Debugger and found a solution:

PARAMETERS: p_adsonm TYPE rsoadsonm.

DATA: ls_tlogo       TYPE rstran_s_tlogo,
      lt_tlogo_tabl  TYPE rsdso_t_data_tlogo_tabl,
      lr_task_param  TYPE REF TO cl_rsdso_data_task_param,
      lr_task_caller TYPE REF TO cl_rsdso_data_task_caller.

"fill TLOGO structure
ls_tlogo-tlogo = 'ADSO'.
ls_tlogo-objnm = p_adsonm.

"create instance of cl_rsdso_data_request_list
DATA(lr_request_list) = cl_rsdso_data_request_list=>create(
  i_s_tlogo   = ls_tlogo ).

"refresh list
lr_request_list->refresh( ).

"get list of all requests in XREF format
DATA(lt_request_xref) = lr_request_list->get_t_request_xref( ).

"do some stuff to determine relevant requests


"create another instance of cl_rsdso_data_request_list with XREF list
"why this?
"I cannot create lr_request_list with i_task_type = 'DELETE' and
"execute the method "refresh". But without i_task_type = 'DELETE'
"the method "start" of lr_task return with a dump...
"So, lets do this twice..
lr_request_list = cl_rsdso_data_request_list=>create(
  i_s_tlogo   = ls_tlogo
  i_task_type = 'DELETE'
  i_t_request_xref = lt_request_xref ).

"create task for deletion
DATA(lr_task) = cl_rsdso_data_task=>create(
  i_s_tlogo = ls_tlogo
  i_type = 'DELETE'
  i_t_tlogo_tabl = lt_tlogo_tabl
  i_r_request_list = lr_request_list
  i_r_param = lr_task_param
  i_r_caller = lr_task_caller ).

"start deletion
lr_task->start( ).

"get status
DATA(lv_status) = lr_task->get_status( ).
"get log
DATA(l_r_log)  = lr_task->get_r_log( ).

"write messages
LOOP AT l_r_log->get_t_msg( ) ASSIGNING FIELD-SYMBOL(<f_s_msg>).
  "WHERE msgty = 'X' OR msgty = 'A' OR msgty = 'E' OR msgty = 'W'.
  DATA ls_msg TYPE rspc_s_msg.

  MOVE-CORRESPONDING <f_s_msg> TO ls_msg.
  MESSAGE ID ls_msg-msgid TYPE ls_msg-msgty NUMBER ls_msg-msgno
  WITH ls_msg-msgv1 ls_msg-msgv2 ls_msg-msgv3 ls_msg-msgv4.


Maybe there is another way to get rid of the second instance of cl_rsdso_data_request_list. If you find a way, please tell me 🙂


Please let me know if I’ve missed anything or something is incorrect.

Hope it helps!

Thanks 🙂

To report this post you need to login first.


You must be Logged on to comment or reply to a post.

  1. Former Member

    Hi, you need to delete the change log of a classic DSO? For that there is a standard step in process chains, no need to use a program.

  2. Former Member


    Hi Phillip,

    I was exactly looking for such this solution. Thank you for giving a solution.

    But I have a issue.. when I tried to use your code as is.. I face few errors in data definition itself. I am in Version BW 7.4 SP15. Which version is your code in?

  3. Philipp Peters Post author

    Hi Meyyappan,
    we are on BW 7.5 SP05. Maybe you can adjust the code for your release without losing functionality?

    Best regards

  4. Baljinder Sidhu

    Hi All,


    We are using BW 7.5 SP07 and i am able to simply right click the provider and delete data, which removes the request. Must have been functionality added post SP05 perhaps?





    1. Philipp Peters Post author

      Hi Loed,

      take a look at the comment “do some stuff to determine relevant requests”. Otherwise the program will delete all requests, right.



      1. Loed Despuig

        Hi Philipp,

        Can you provide a sample code to delete specific request?

        Also, I’m planning to make the request to be entered as PARAMETER so I can use it in PRODUCTION to delete specific request.

        Thanks a lot.


        1. Philipp Peters Post author

          Hi Loed,

          in internal table lt_request_xref are all request of this ADSO. So you only have to delete from this tablet he requests  you want to keep. All other requests will be deleted.

          Best regards



Leave a Reply