Warm tip: This article is reproduced from stackoverflow.com, please click
abap sap

How to add a whole package to transport request by code?

发布于 2020-04-23 14:36:46

My task is to do all these steps programmatically:

  • Create a new transport request, I managed to do this with TR_INSERT_REQUEST_WITH_TASKS
  • Add package content to the newly created transport, this is the part I am stuck in.
  • Release the transport, I managed to do this with TR_RELEASE_REQUEST

My problem is that I can manually add the package to the transport request via transaction SE03 and then release it with FM TR_RELEASE_REQUEST, but that is not the goal, everything from step 1 to 3 has to happen in one program execution if anyone can guide me how to do step 2 it would be very helpful, thanks in advance.

Questioner
Mick
Viewed
53
Sandra Rossi 2020-02-10 22:55

In your program, you must :

  • First get the list of objects which belong to the package, via the table TADIR (object in columns PGMID, OBJECT, OBJ_NAME, and package in column DEVCLASS)
  • And add these objects to the task or transport request via the non-released function modules TRINT_APPEND_COMM or TR_APPEND_TO_COMM_OBJS_KEYS.