Class Methods
Class Methods
method IF_RSPLS_LOGGING_ON_SAVE~LOG_DEFINED.
r_log_defined = rs_c_true.
endmethod.
Method : IF_RSPLS_LOGGING_ON_SAVE~LOG_STRUCTURE
method IF_RSPLS_LOGGING_ON_SAVE~LOG_STRUCTURE.
** Here we need to update our InfoObject names which would be used for
logging
constants:
c_iobjnm_user type RSIOBJNM value 'ZUSERNM',
c_iobjnm_time type RSIOBJNM value '0TIME',
c_iobjnm_date type RSIOBJNM value '0DATE',
c_iobjnm_saveid type RSIOBJNM value 'ZSAVEID'.
** Plan Cube and Audit DSO Information.
case i_infocube_name.
when '<REAL_TIME_CUBE>'.
l_dsonm = '<DSO_NAME>'.
endcase.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY
NUMBER SY-MSGNO WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
e_structure_name = l_struc_name.
clear e_t_map.
* also name, date, time, saveid, and requid come from the proposal
l_s_map-iobj_name = l_s_iobj-infoobject.
if l_s_return is initial.
l_s_map-field_name = l_s_details-fieldnm.
endif.
endloop.
if sy-subrc is initial.
l_s_map-iobj_name = l_s_map_proposal-iobj_name.
if l_s_return is initial.
l_s_map-field_name = l_s_details-fieldnm.
append l_s_map to e_t_map.
endif.
endif.
* get the date
if l_s_return is initial.
l_s_map-field_name = l_s_details-fieldnm.
append l_s_map to e_t_map.
endif.
endif.
if sy-subrc is initial.
l_s_map-iobj_name = l_s_map_proposal-iobj_name.
EXPORTING
VERSION = RS_C_OBJVERS-ACTIVE
INFOOBJECT = c_iobjnm_time
IMPORTING
DETAILS = l_s_details
RETURN = l_s_return.
if l_s_return is initial.
l_s_map-field_name = l_s_details-fieldnm.
append l_s_map to e_t_map.
endif.
endif.
* get the save id
if sy-subrc is initial.
l_s_map-iobj_name = l_s_map_proposal-iobj_name.
EXPORTING
VERSION = RS_C_OBJVERS-ACTIVE
INFOOBJECT = c_iobjnm_saveid
IMPORTING
DETAILS = l_s_details
RETURN = l_s_return.
if l_s_return is initial.
l_s_map-field_name = l_s_details-fieldnm.
append l_s_map to e_t_map.
endif.
endif.
endmethod.
Method : IF_RSPLS_LOGGING_ON_SAVE~LOG_WRITE
method IF_RSPLS_LOGGING_ON_SAVE~LOG_WRITE.
*the log table has the same structure as the active table of DSO
case i_infocube_name.
when '<REAL_TIME_CUBE>'.
l_dsonm = '<DSO_NAME>'.
endcase.
CALL FUNCTION 'RSDRI_ODSO_INSERT'
EXPORTING
I_ODSOBJECT = l_dsonm
I_T_INSERT = i_t_logging_data
* IMPORTING
* E_RECORDS =
EXCEPTIONS
DATA_TARGET_NOT_ODS = 1
ODS_TYPE_NOT_TRANSACTIONAL = 2
ACTIVE_TABLE_NAME_NOT_FOUND = 3
RECORD_KEY_ALREADY_EXISTS = 4
ARRAY_INSERT_FAILED = 5
INTERNAL_ERROR = 6
OTHERS = 7 .
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE sy-msgty NUMBER SY-MSGNO WITH SY-MSGV1 SY-
MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
endmethod.
Method: IF_RSPLS_LOGGING_ON_SAVE~LOG_DEFINED_DB
method IF_RSPLS_LOGGING_ON_SAVE~LOG_DEFINED_DB.
e_log_defined_DB = rs_c_false.
endmethod.
Method : IF_RSPLS_LOGGING_ON_SAVE~LOG_WRITE_DB
method IF_RSPLS_LOGGING_ON_SAVE~LOG_WRITE_DB.
endmethod.