Anda di halaman 1dari 2

method /NRX/IF_CHG_TRACK~CREATE_CP .

""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"""""""""""""$"$\SE:(1) Class /NRX/CL_CHG_TRACK, Interface /NRX/IF_CHG_TRACK, Me
thod CREATE_CP, Start
A
*$*$-Start: (1)--------------------------------------------------------------------------------$*$*
ENHANCEMENT 1 ZZNRX_ENHANCEMENT.
"active version
********************************************************************
*
********************************************
*
*
*
SHELL EP BLUEPRINT
*
*
*
*
Confidential and Proprietary
*
*
*
*
Copyright 2013 SHELL
*
*
*
*
All Rights Reserved
*
*
*
********************************************
*
********************************************************************
*------------------------------------------------------------------*
* Modification Log (Oldest to Latest)
*
*------------------------------------------------------------------*
* DD/MM/YYYY Programmer Correction Description
*
*------------------------------------------------------------------*
* 30/10/2013 MYHNGF
RT 55132
Implement codes provided by *
*
D16K9A3270 NRX to perform filtering
*
* 09/12/2013 MYJKOP
RT 55538
Addinng filter to avoid no *
*
of generated records
*
*------------------------------------------------------------------*
IF sy-uname EQ 'NRX_RFC'.
IF gv_obj_type EQ 'FLOC'
OR gv_obj_type EQ 'EQUI'
OR gv_obj_type EQ 'MPLA'
OR gv_obj_type EQ 'MPOS'.
EXIT.
ENDIF.
ELSEIF sy-uname EQ 'EW_BTCJOB'.
IF gv_obj_type EQ 'MPLA'
OR gv_obj_type EQ 'MPOS'
OR gv_obj_type EQ 'MPLN'.
"RT55538
EXIT.
ENDIF.
ENDIF.
ENDENHANCEMENT.
*$*$-End: (1)--------------------------------------------------------------------------------$*$*
DATA:
lt_obj_id
TYPE /nrx/obj_list_flag_t,
lp_obj_id
TYPE REF TO /nrx/obj_list_flag_s,
lp_activity_map
TYPE REF TO /nrx/activity_map,
lp_message_type
TYPE REF TO bdmsgtyp.
CHECK gv_activity CA gv_activities.
* Set the change indicator based on the activity.
READ TABLE gt_activity_map REFERENCE INTO lp_activity_map
WITH KEY code = gv_activity.
IF sy-subrc IS INITIAL.
gs_cp_data-cdchgid = lp_activity_map->value.
ELSE.
gs_cp_data-cdchgid = 'U'.
ENDIF.

IMPORT pt_obj_list_flag = lt_obj_id FROM MEMORY ID gc_memory_id.


READ TABLE lt_obj_id TRANSPORTING NO FIELDS
WITH KEY obj_id = gs_cp_data-cdobjid.
IF sy-subrc IS NOT INITIAL.
* Create a change pointer for each registered message type.
LOOP AT gt_message_types REFERENCE INTO lp_message_type.
go_chg_ptrs->set_message_type( lp_message_type->mestyp ).
go_chg_ptrs->add_cp_data( gs_cp_data ).
go_chg_ptrs->create( ).
ENDLOOP.
* Now add this ID to the master table so that we don't send it again.
APPEND INITIAL LINE TO lt_obj_id REFERENCE INTO lp_obj_id.
lp_obj_id->obj_type = gv_obj_type.
lp_obj_id->obj_id = gs_cp_data-cdobjid.
EXPORT pt_obj_list_flag = lt_obj_id TO MEMORY ID gc_memory_id.
CALL FUNCTION '/NRX/OBJ_LIST_FLAG_T_EXPORT' IN UPDATE TASK
EXPORTING
IV_MEMORY_ID
= gc_memory_id
IT_OBJ_LIST_FLAG
= lt_obj_id.
ENDIF.
endmethod.

Anda mungkin juga menyukai