METHOD if_rspls_ds_methods~is_protected. * infrastructure needed by the buffer: DATA: l_s_mesg TYPE if_rspls_cr_types=>tn_t_mesg, l_command(10) TYPE c. FIELD-SYMBOLS: TYPE HASHED TABLE, TYPE ANY. * Check the memory id * Should the data slice be checked? IMPORT command TO l_command FROM MEMORY ID 'DATA_SLICE_LOCK'. IF l_command = 'UNLOCK'. e_noinput = rs_c_false. EXIT. ENDIF. * Proceed only if the data slice should be checked. e_noinput = rs_c_false. CLEAR e_t_mesg. * use the buffer? * o_use_buffer is switched on by default in the constructor IF o_use_buffer = rs_c_true. * yes: ASSIGN o_r_th_buf->* TO . ASSIGN o_r_s_buf->* TO . = i_s_data. READ TABLE INTO FROM . IF sy-subrc <> 0. * record with result not yet buffered: implement your algorithm * for the dataslice here: e.g. call a method that returns the * fields e_noinput and e_s_mesg CALL METHOD my_dataslice EXPORTING i_s_data = i_s_data IMPORTING e_t_mesg = l_s_mesg e_noinput = o_r_protected->*. INSERT INTO TABLE . ENDIF. e_noinput = o_r_protected->*."fix pointer to -protected IF e_noinput = rs_c_true AND e_t_mesg IS SUPPLIED. * o_r_s_mesg is a pointer to '_S_MESG' in the buffer workarea e_t_mesg[] = l_s_mesg[]. ENDIF. ELSE. * no, do not use the buffer, call a method that returns the * fields e_noinput and e_s_mesg CALL METHOD my_dataslice EXPORTING i_s_data = i_s_data IMPORTING e_t_mesg = l_s_mesg e_noinput = e_noinput. e_t_mesg[] = l_s_mesg[]. ENDIF. ENDMETHOD.