Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Content Server: How to Get Object ID Using RMPS_AUDIT

javier_alonso
Participant
0 Kudos
276

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.

1 ACCEPTED SOLUTION

javier_alonso
Participant
0 Kudos
225

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.

1 REPLY 1

javier_alonso
Participant
0 Kudos
226

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.