cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Function module RSDMD_API_DELETE does not delete

britta_leib2
Participant
227

Hello BI fans,

we use FM RSDMD_API_DELETE in a custom webdynpro to delete a single value of an infoobject. Of course the value is not used in any info provider (no transaction data).

The RC is always 0, but the value is not deleted.

CALL FUNCTION 'RSDMD_API_DELETE'
            EXPORTING
              i_iobjnm               = ‘HH_XX’

              i_t_data                 = lt_attr_neu

              i_flg_delete_all     = rs_c_true

              i_flg_delete_texts = rs_c_false.

LT_ATTR_NEU[1] (in the debugger)

RECORD_NO                                              1

IOBJNM                                            HH_XX

VALUE                                             value

A) If HH_XX is a compounded infoobject the VALUE field is concatenated (1st compound field, 2nd compound field, value).

-> RC is always 0, but nothing is deleted

B) If HH_XX is a non compounded infoobject the VALUE field is only the value.

-> RC is always 0, but nothing is deleted.

I have also tried with COMMIT WORK after CALL FUNCTION and RC=0, but it makes no difference.

And the worst thing: when I pass a non-existent value to the FM the RC is 0 too! Crazy!

Unfortunately the FM has no exceptions and the documentation doesn’t explain the meaning of the export parameters.

The 4 export parameters in the debugger of the FM RSDMD_API_DELETE (before ENDFUNCTION):

L_RESULT                                       6

L_T_SIDVAL_USED                        [0x2(12)]Initial Standard Table

E_COUNT_USE                               0

L_T_PROTOCO                                [0x13(654)]Initial Standard Table

The included FM RSDMD_DEL_MASTER_DATA explains the export parameter e_result in his documentation (these should be constants):

RSDMD_C_ALL_DELETED                      0

RSDMD_C_PARTS_DELETED                  1

RSDMD_C_BG_STARTED                         2

RSDMD_C_NONE_DELETED                  4

RSDMD_C_NONE_DELETEABLE          

RSDMD_C_ERROR                                    5

But what means the return value 6?

If I don't pass the paramter i_flg_delete_texts L_RESULT=0, but nothin has been deleted.

 

Does anyone have experience using this FM? I don’t find a note according this problem.

The release is SAP BW/4HANA 2023, DW4CORE 4000006

 

Thanks and best wishes, Britta

Accepted Solutions (0)

Answers (1)

Answers (1)

roland_szajko
Product and Topic Expert
Product and Topic Expert

Hi Britta

According the type group RSDMD, e_result = 6 is rsdmd_c_no_data_but_go_on:

CONSTANTS:
  rsdmd_c_all_deleted       TYPE VALUE 0,
  rsdmd_c_parts_deleted     TYPE VALUE 1,
  rsdmd_c_bg_started        TYPE VALUE 2,
  rsdmd_c_no_data           TYPE VALUE 3,
  rsdmd_c_none_deleted      TYPE VALUE 4,
  rsdmd_c_error             TYPE VALUE 5,
  rsdmd_c_no_data_but_go_on TYPE VALUE 6

which most probably means, that with the given value there is nothing to be deleted.

I would suggest to debug the deletion. Internally the program RSDMDD_DELETE_KERNEL is called by RSDMDD_DELETE_MASTER_DATA to do the actual deletion. 

br

Roland

britta_leib2
Participant
0 Likes
Hello Roland, many thanks for the tip regarding the report RSDMDD_DELETE_KERNEL, which is located deep within FM. I have debugged the report extensively and do not understand why the SAP Function module deletes the text data record but not the master data record. This forces the e_return = 6 (rsdmd_c_no_data_but_go_on). I have a single record of an InfoObject I want to delete (masterdata with text, no use). I have checked with report RSDMDD_DELETE_BATCH in simulation mode and the application log shows there is no use. In the FORM routine initial_check the master data record is read correctly from variable l_r_table (/BIC/PHM_XX), the field-symbol <f_t_data> is assigned correctly with the master data record to be deleted. Variable l_lines =1 and will reduced to 0 (line 1079) and then in line 1082/1083 (IF l_lines < 1) the variable l_attr_data_exists is set to rs_c_false which is the reason that g_delete_needed is set to rs_c_false and message RSDMD/106 is written to the application log (no master data for characteristic). The same happens with the sid data record -> l_siddata_exists = rs_c_false After the FM RSDMD_API_DELETE is finished with rc=0 (e_return=6) the text data record is deleted, but the master data record still exists in table (/BIC/PHM_XX). If there is no solution I will try to use FM RSSEM_DEL_MASTER_DATA instead of FM RSDMD_API_DELETE. Hope it will work under BW4/HANA. Best regards, Britta
britta_leib2
Participant
Hello Roland, I have the solution now: the parameter i_flg_delete_all (for fm RSDMD_API_DELETE) must be passed with the value false or omitted entirely (default is false). You don't necessarily have to understand the logic behind this when you simply want to delete everything related to the characteristic value. Best regards, Britta
roland_szajko
Product and Topic Expert
Product and Topic Expert
0 Likes
That is an interesting finding. I will also do some tests.