‎2013 Aug 30 10:10 AM
Hi Experts,
How to activate a report program programmatically into a particular package and request id.
Thanks in advance.
‎2013 Oct 03 9:58 AM
Hi Riju,
Please check the following FM:
RS_RENAME_PROGRAM
With regards,
Ashish Kumar.
‎2013 Aug 30 10:30 AM
Hi,
I found this FM 'RS_WORKING_OBJECT_ACTIVATE'
you need to pass object type as 'REPS' and Object Name.
‎2013 Aug 30 11:16 AM
Hi Syed,
Thanks for the reply.
But I cant find any option to input the package name and request id.
‎2013 Aug 30 11:33 AM
Not sure about your actual requirement, but this FM activates any objects if Object Type and Object name is passed.
‎2013 Aug 30 12:11 PM
Hii Riju,
Go to table E071 in se 11
here type ur request task(not request id, exaple if ur request id is id59657 then ur request task will be id59658) because in request task data are store , u can also input extra field like objetc type and object name. programm Id,Object type are like R3TR DOMA for domain,
R3TR DTEL for data element,
R3TR PROG for programm
R3TR TABL for data base table
R3TR LDB for logical database,
R3TR VIEW for view
so and so
regards
Syed
‎2013 Aug 30 12:37 PM
Hi Riju,
Can you provide more information about your requirement ? Input -Process- Output ?
Regard's
Smruti
‎2013 Aug 30 1:01 PM
Hi Smruti,
My input is
1. Program Name (Newly created program, Not saved in any package/request)
2. Package Name
3. Request ID
Output:
Programmed should be activated in the corresponding package and request.
I hope it is more clear to you now.
Regards,
Riju.
‎2013 Sep 02 8:52 AM
Hi Riju,
As your main goal is to activate the program you can code a program to validate and then activate using the FM which i gave earlier.
‎2013 Sep 02 1:23 PM
Hi Riju,
Use "TR_EDIT_CHECK_OBJECTS_KEYS" to assign request id and package name to respective custom program , and for activation use program "RS_WORKING_OBJECT_ACTIVATE" .
TABLES : RS38L,TADIR,E071,E071K,KO200.
DATA : S_TADIR TYPE TADIR ,
S_E071 LIKE KO200 OCCURS 0 WITH HEADER LINE,
S_E071K LIKE E071K OCCURS 0 WITH HEADER LINE,
SE_ORDER LIKE E070-TRKORR ,
SE_TASK LIKE E070-TRKORR,
SE_OBJECTS_APPENDABLE LIKE TRPARI-S_CHECKED,
SV_ERRNUM LIKE TRPARI-TRERRNUMEC,
SV_OBJECT_UNLOCKED LIKE TRPARI-S_CHECKED ,
S_OBJECT LIKE DWINACTIV OCCURS 0 WITH HEADER LINE .
S_E071-TRKORR = 'xxxxxxxxx'. " Workbech Reqest ID
S_E071-AS4POS = '000000'. " Line item Number
S_E071-PGMID = 'R3TR'. "Program ID
S_E071-OBJECT = 'PROG'. "Object Type
S_E071-OBJ_NAME = 'Y001'. "Program Name
S_E071-LANG = 'EN'. "language
S_E071-DEVCLASS = 'ZABAP'. "package name
S_E071-OPERATION = 'I' . "Insert
APPEND S_E071 .
CLEAR S_E071 .
CALL FUNCTION 'TR_EDIT_CHECK_OBJECTS_KEYS'
EXPORTING
WI_ORDER = 'xxxxxxxx' " Workbench Request ID
WI_WITH_DIALOG = 'X'
WI_OBJ_CATEGOGY_MIX = 'X'
WI_SEND_MESSAGE = 'X'
IV_NO_SHOW_OPTION = ' '
IV_NO_STANDARD_EDITOR = ' '
IV_EXTERNALPS = ' '
IV_EXTERNALID = ' '
IV_NO_PS = ' '
IV_READ_ACTIVITY_FROM_MEMORY = 'X'
IV_APPEND_TO_ORDER = ' '
IV_INSERT_INTO_SBCSETS = 'X'
IV_OLD_CALL = ' '
IMPORTING
WE_ORDER = SE_ORDER
WE_TASK = SE_TASK
WE_OBJECTS_APPENDABLE = SE_OBJECTS_APPENDABLE
EV_ERRNUM = SV_ERRNUM
EV_OBJECT_UNLOCKED = SV_OBJECT_UNLOCKED
TABLES
WT_E071 = S_E071 .
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ELSE .
CALL FUNCTION 'RS_WORKING_OBJECT_ACTIVATE'
EXPORTING
OBJECT = 'REPS'
OBJ_NAME = 'Y001' " Program Name
ACTIVATE_ONLY_THIS_OBJECT = 'X'
TABLES
OBJECTS = S_OBJECT
.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ELSE.
WRITE:/ 'Successfully Object Activated '.
ENDIF.
ENDIF.
Regard's
Smruti
‎2013 Aug 30 2:04 PM
Hi Raju,
It is 3 step process,
Say for Example I Input objects as follow,
Program Name: ZCH_DEMO_2
Package Name: ZCH_DEMO
Request ID: D48K905165
Write the logic as follow,
1. Update table PROGDIR with your program name having set STATE = 'A'. (A-Active,I-Inactive).
2. Update TADIR with program name and package as shown below
3.Update E071 table as shown below
Hope it helps.
Regards,
KangArun
‎2013 Aug 30 3:24 PM
There has to be a better way than updating these important tables directly!!!
‎2013 Oct 03 9:58 AM
Hi Riju,
Please check the following FM:
RS_RENAME_PROGRAM
With regards,
Ashish Kumar.