2023 Oct 31 1:02 PM
Hi.
I am trying to get a list of user downloaded documents of the Content Server using the transaction RMPS_AUDIT.
However, I cannot find the object ID to be able to see the actual document.
There is a column which is quite similar to the OBJID, but it's not the same. I think it refers to the repository ID and not the document itself. I need to be able to retrieve the document ID from that log.
2024 Jan 05 8:23 AM
I found the way using SRM classes.
DATA(prot_record) = VALUE srmprotocol( ).
TRY.
DATA(srm_root) = CAST if_srm( cl_srm_root_factory=>create_root(
im_sps_id = 'SRM_RMS_CLIENTFRAME_WIN'
im_activate_poid_buffer = if_srm=>true
im_update_mode_poid_directory = if_srm=>db_update ) ).
DATA(poid_query) = srm_root->get_srm_service( )->get_poid_directory( )->get_poid_dir_query( ).
DATA(sp_poid) = poid_query->get_poid_by_id( im_area_id = CONV #( prot_record-area_id ) im_pdir_id = CONV #( prot_record-poid_id ) )->get_sp_poid( ).
DATA(document_id) = sp_poid[ id = 'DOC_ID' ]-value. " Concatenated DOCCLASS + OBJID
CATCH cx_srm_initialization cx_srm_registration_data cx_srm_poid cx_srm_poid_dir INTO DATA(exc).
MESSAGE exc->get_text( ) TYPE 'E'.
ENDTRY.
This way you can get the OBJID from the POID_ID of SRMPROTOCOL.
2024 Jan 05 8:23 AM
I found the way using SRM classes.
DATA(prot_record) = VALUE srmprotocol( ).
TRY.
DATA(srm_root) = CAST if_srm( cl_srm_root_factory=>create_root(
im_sps_id = 'SRM_RMS_CLIENTFRAME_WIN'
im_activate_poid_buffer = if_srm=>true
im_update_mode_poid_directory = if_srm=>db_update ) ).
DATA(poid_query) = srm_root->get_srm_service( )->get_poid_directory( )->get_poid_dir_query( ).
DATA(sp_poid) = poid_query->get_poid_by_id( im_area_id = CONV #( prot_record-area_id ) im_pdir_id = CONV #( prot_record-poid_id ) )->get_sp_poid( ).
DATA(document_id) = sp_poid[ id = 'DOC_ID' ]-value. " Concatenated DOCCLASS + OBJID
CATCH cx_srm_initialization cx_srm_registration_data cx_srm_poid cx_srm_poid_dir INTO DATA(exc).
MESSAGE exc->get_text( ) TYPE 'E'.
ENDTRY.
This way you can get the OBJID from the POID_ID of SRMPROTOCOL.