Reputation: 67
I'm in an attempt to provide an automatized way for removal of customer package ( and all it's objects ). For that purpose, I'm using FM's for creation of transport order - TRINT_INSERT_NEW_COMM , adding the objects - TRINT_INSERT_COMM and releasing the transport order - TRINT_RELEASE_REQUEST.
Preparation step is extracting from TADIR all objects where devclass is the desired object. Afterwards looping the entries from TADIR and based on the object type i'm adding them in suitable internal tables for E071K and E071 in simple CASE-WHEN.
CASE <ls_tadir>-object.
WHEN 'TABU'.
ls_e071k-trkorr = gv_trkorr.
ls_e071k-pgmid = <ls_tadir>-pgmid.
ls_e071k-object = 'TABU'.
ls_e071k-objname = <ls_tadir>-obj_name.
ls_e071k-as4pos = '000001'.
ls_e071k-mastertype = 'TABU'.
ls_e071k-mastername = <ls_tadir>-obj_name.
ls_e071k-tabkey = '*'.
ls_e071k-objfunc = 'D'.
APPEND ls_e071k TO lt_e071k.
lv_count = ls_e071-as4pos + 1.
ls_e071-trkorr = gv_trkorr.
ls_e071-as4pos = '000001'.
ls_e071-pgmid = <ls_tadir>-pgmid.
ls_e071-object = 'TABU'.
ls_e071-obj_name = <ls_tadir>-obj_name.
ls_e071-objfunc = 'D'.
APPEND ls_e071 TO lt_e071.
WHEN 'TABL'.
ls_e071k-trkorr = gv_trkorr.
ls_e071k-pgmid = <ls_tadir>-pgmid.
ls_e071k-object = 'TABL'.
ls_e071k-objname = <ls_tadir>-obj_name.
ls_e071k-as4pos = '000001'.
ls_e071k-mastertype = 'TABL'.
ls_e071k-mastername = <ls_tadir>-obj_name.
ls_e071k-tabkey = '*'.
ls_e071k-objfunc = 'D'.
APPEND ls_e071k TO lt_e071k.
lv_count = ls_e071-as4pos + 1.
ls_e071-trkorr = gv_trkorr.
ls_e071-as4pos = '000001'.
ls_e071-pgmid = <ls_tadir>-pgmid.
ls_e071-object = 'TABL'.
ls_e071-obj_name = <ls_tadir>-obj_name.
ls_e071-objfunc = 'D'.
APPEND ls_e071 TO lt_e071.
WHEN OTHERS.
lv_count = ls_e071-as4pos + 1.
ls_e071-trkorr = gv_trkorr.
ls_e071-as4pos = lv_count.
ls_e071-pgmid = <ls_tadir>-pgmid.
ls_e071-object = <ls_tadir>-object.
ls_e071-obj_name = <ls_tadir>-obj_name.
ls_e071-objfunc = 'D'.
APPEND ls_e071 TO lt_e071.
ENDCASE.
An important parameter is OBJFUNC to specify it as a D - Deletion. ( Maybe i'm wrong )
Here is the overview in E071 table. It looks like deletion should be performed.
As it is imported into the target system where uninstallation should occur, nothing happens against those objects.
Any ideas?
Upvotes: 1
Views: 840
Reputation: 2565
I don't think that's the way it works anymore, I believe OBJFUNC is obsolete. A few (many)versions ago, the process for deleting objects through transports changed. Instead of setting the action to Delete in the transport the transport system checks if an object exists during release, if it does not exist in the source system it will also be deleted in the target system. So, in your scenario, you will have to delete the objects in the source system for the transport to also delete it in the target system.
Upvotes: 0