Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

FUnction Module to create development request automatically

Former Member
0 Likes
1,927

I have a requirement that as soon i enter user name in my Z application i'm able to create a ABAP development request(which is created either from se10 or se01).

Is there any function module to do this.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,241

I wish to add more user to same request.This function module allows to create a development request.

9 REPLIES 9
Read only

Former Member
0 Likes
1,241

Hi.

Launch se30 transaction to analyze work of se01 transaction

with restrictions to measure only function modules.

So, then you will be able to see whole chain of called function modules during

creating change request.

Read only

Former Member
0 Likes
1,241

Try this

IW_C_CREATE_TRANSPORT_REQUEST

Regards

Sathar

Read only

Former Member
0 Likes
1,241

Hi Dude,

Go through this FM

AFX_GF_CTS_REQUEST_GENERATE

Read only

keerthy_k
Product and Topic Expert
Product and Topic Expert
0 Likes
1,241

Hi See the code below..It works..

PARAMETERS: P_DESCRIPTION(30) type E07T-AS4TEXT,

P_TRANSPORT_KIND type TRFUNCTION,

P_LANGU type SY-LANGU.

CALL FUNCTION 'IW_C_CREATE_TRANSPORT_REQUEST'

EXPORTING

DESCRIPTION = P_DESCRIPTION

TRANSPORT_KIND = P_TRANSPORT_KIND

LANGU = P_LANGU

IMPORTING

COMMFILE = P_COMMFILE

EXCEPTIONS

LANGUAGE_MISSING = 1

NUMBER_RANGE_FULL = 2

UNALLOWED_TRFUNCTION = 3

NO_AUTHORIZATION = 4

CREATE_TRANSPORT_ERROR = 5

OTHERS = 6.

where P_TRANSPORT_KIND can be 'K' for Workbench Request and 'W' Customizing Request and 'T' for Transport of Copies.

Hope this will help u.

keerthi.

Read only

Former Member
0 Likes
1,242

I wish to add more user to same request.This function module allows to create a development request.

Read only

0 Likes
1,241

Hi

You can use FM 'IW_C_CREATE_TRANSPORT_REQUEST' to create a Transport request and FM 'BAPI_CTREQUEST_CREATE_TASKS' to add Tasks to that for different users. The sample code is given. Hope this will help you.

data: gv_req_no TYPE e070-trkorr,
      gt_authorlist  TYPE TABLE OF bapiscts12,
      gs_authorlist  TYPE bapiscts12,
      gt_task_list  TYPE TABLE OF bapiscts07.

gs_authorlist-task_owner = 'INABBDEVAS'.
APPEND gs_authorlist to gt_authorlist.

gs_authorlist-task_owner = 'INABBDEVNPR'.
APPEND gs_authorlist to gt_authorlist.


CALL FUNCTION 'IW_C_CREATE_TRANSPORT_REQUEST'
  EXPORTING
   DESCRIPTION                  = 'Test'
   TRANSPORT_KIND               = 'K'
   LANGU                        = sy-langu
 IMPORTING
   COMMFILE                     = gv_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        = gv_req_no
* IMPORTING
*   RETURN           =
  TABLES
    AUTHORLIST       = gt_authorlist
    TASK_LIST        = gt_task_list
          .

Regards

Sathar

Read only

0 Likes
1,241

Hi Sathar,

How to insert record into a request.

For Eg. I hv created 'Z' table which I m using in a BAdi to insert some data, now I wants to create a Transport request for that perticular record.

Plz. update

Read only

0 Likes
1,241

Hi,

it_e071-trkorr     = l_task.
  it_e071-pgmid      = 'R3TR'.
  it_e071-object     = 'TABU'.
  it_e071-obj_name   = 'ZTABLE'.
  it_e071-objfunc    = 'K'.
  APPEND it_e071.
  CLEAR it_e071k.
  it_e071k-trkorr     = l_task.
  it_e071k-pgmid      = 'R3TR'.
  it_e071k-object     = 'TABU'.
  it_e071k-objname   = 'ZTABLE'.
  it_e071k-mastertype = 'TABU'.
  it_e071k-mastername = 'ZTABLE'.
  it_e071k-objfunc    = ' '.
  MOVE ZTABLE-KEY TO it_e071k-tabkey.
  APPEND it_e071k.

  CALL FUNCTION 'TR_APPEND_TO_COMM_OBJS_KEYS'
    EXPORTING
      wi_trkorr                      = l_task
    TABLES
      wt_e071                        = it_e071
      wt_e071k                       = it_e071k.

Hope that helps.

Read only

Former Member
0 Likes
1,241

Hi Abhut,

Have a look at these function modules:

BM_TRANSPORT_INSERT

TRINT_INSERT_NEW_COMM

TRINT_MODIFY_COMM

TRINT_ORDER_CHOICE

TRINT_APPEND_TO_COMM_ARRAYS

Hope it helps

Regrds

Mansi

Edited by: MANSI ASNANI on Mar 6, 2009 5:50 AM