Skip to Content
avatar image
Former Member

Add object to a transport request by program

Hello.

I need to add objects to a transport request by program( well, to a transport task, in fact). I have used FM 'TR_REQUEST_CHOICE', but it adds objects directly to request, no to task, and when I try releasing the task, it gets an error, because task is no classified.

I have tried to with FM 'TR_APPEND_TO_COMM_OBJS_KEYS' and 'TR_INSERT_REQUEST_WITH_TASKS' but these don't work, or perhaps I don't know how use them.

Please, do somebody know a way to add objects to a transport task by program?

Thanks a lot.

Marta.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

7 Answers

  • Best Answer
    avatar image
    Former Member
    May 24, 2013 at 11:29 AM

    Hi all.

    Finally I have solved my problema with function 'TRINT_MODIFY_COMM'. We can see how it works in program TH_TKANL.

    It's wonderful to have so much help.

    Thanks a lot!!!!!!

    Marta.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 24, 2013 at 10:48 AM

    This one worked for me:

    TRINT_CORR_INSERT

    Add comment
    10|10000 characters needed characters exceeded

  • May 24, 2013 at 08:33 AM

    Maybe Function Module TR_REQUEST_MODIFY with action = UPDT will do the job for you.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Peter.

      Sorry. I don't know where write objects to add in request in this Function Module. Could you say to me what parameter I can use to pass the objects?

      Thanks a lot.

      Marta.

  • May 24, 2013 at 08:55 AM

    Have you checked TR_OBJECTS_INSERT?

    Also refer the discussion http://scn.sap.com/thread/2110587

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Vinit.

      Please, could you say to me how I should fill this function? I'm trying working with it but I can't get it.

      Thanks a lot.

      Marta.

  • avatar image
    Former Member
    May 24, 2013 at 09:05 AM

    Hi,

    Use standard program RSTXTRAN this will be suitable for your requirement.

    Thanks,

    Ashok.c

    Add comment
    10|10000 characters needed characters exceeded

  • May 24, 2013 at 10:17 AM

    Hi,

    Try the following :

    gs_authorlist-task_owner = <ID_USRNAME>.

    APPEND gs_authorlist to gt_authorlist.

    gs_authorlist-task_owner = <ID_USRNAME>'.

    APPEND gs_authorlist to gt_authorlist.

    CALL FUNCTION 'IW_C_CREATE_TRANSPORT_REQUEST'

    EXPORTING

    DESCRIPTION = <DESCRIPTION>

    TRANSPORT_KIND = 'K'

    LANGU = sy-langu

    IMPORTING

    COMMFILE = var_req_no

    EXCEPTIONS

    LANGUAGE_MISSING = 1

    NUMBER_RANGE_FULL = 2

    UNALLOWED_TRFUNCTION = 3

    NO_AUTHORIZATION = 4

    CREATE_TRANSPORT_ERROR = 5

    OTHERS = 6

    .

    IF SY-SUBRC <> 0.

    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

    ENDIF.

    CALL FUNCTION 'BAPI_CTREQUEST_CREATE_TASKS'

    EXPORTING

    REQUESTID = var_req_no

    * IMPORTING

    * RETURN =

    TABLES

    AUTHORLIST = gt_authorlist

    TASK_LIST = gt_task_list

    .

    Cheers,

    Arindam

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 24, 2013 at 11:11 AM

    You can also use this FM

    RS_CORR_INSERT

    Add comment
    10|10000 characters needed characters exceeded