‎2007 Dec 28 5:47 AM
TR_DELETE_COMM_OBJECT_KEYS, how to use this function module i need to delete the objects in the transport request, but i am not shure how to pass the transport request to this function module
‎2007 Dec 28 6:03 AM
Hi Rocky,
Check the below code.In the first perform pass your object that you have to delete.
PERFORM get_object_entry USING iv_object
CHANGING ls_object_entry.
form get_object_entry using pv_object type c
changing ps_object_entry like e071.
data: lv_hide_object type ts_hide_object.
field-symbols: <ls_request> like line of gs_stack-requests.
clear ps_object_entry.
lv_hide_object = pv_object.
read table gs_stack-requests
assigning <ls_request>
with key h-trkorr = lv_hide_object-trkorr.
if sy-subrc = 0.
read table <ls_request>-objects
into ps_object_entry
with key as4pos = lv_hide_object-as4pos.
endif.
endform. " GET_OBJECT_ENTRY
PERFORM delete_object_entry USING ls_object_entry-trkorr
ls_object_entry-pgmid
ls_object_entry-object
ls_object_entry-obj_name
CHANGING ev_exit.
form delete_object_entry using pv_trkorr like e071-trkorr
pv_pgmid like e071-pgmid
pv_object like e071-object
pv_obj_name like e071-obj_name
changing pv_done type c.
data: ls_e071 like e071,
ls_request type trwbo_request,
ls_request_wd type strhi_request_wd,
lv_idx like sy-tabix.
read table gs_stack-requests into ls_request_wd
with key h-trkorr = pv_trkorr.
lv_idx = sy-tabix.
move-corresponding ls_request_wd to ls_request.
ls_e071-trkorr = pv_trkorr.
ls_e071-pgmid = pv_pgmid.
ls_e071-object = pv_object.
ls_e071-obj_name = pv_obj_name.
call function 'TR_DELETE_COMM_OBJECT_KEYS'
exporting
is_e071_delete = ls_e071
iv_dialog_flag = 'X'
changing
cs_request = ls_request
exceptions
others = 1.
if sy-subrc <> 0.
pv_done = ' '.
perform send_current_message using 'S'.
else.
pv_done = 'X'.
move-corresponding ls_request to ls_request_wd.
modify gs_stack-requests from ls_request_wd index lv_idx.
endif.
endform. " DELETE_OBJECT_ENTRY