2010 Nov 25 10:16 AM
Dear All,
I am creating a Program that will automatically create Data Elements & Domains in SAP & assign the same to a Package & Transport request No...Well I have been able to create & activate the data elements & domains using Standard SAP Function Modules, but I am looking for the Function Modules that can assign a Package & transport request no. to these data elements & domains....Can anyone tell how to achieve this requirement...
Dear All,
I am creating a Program that will automatically create Data Elements & Domains in SAP & assign the same to a Package & Transport request No...Well I have been able to create & activate the data elements & domains using Standard SAP Function Modules, but I am looking for the Function Modules that can assign a Package & transport request no. to these data elements & domains....Can anyone tell how to achieve this requirement...
2010 Nov 25 10:27 AM
There is function modules RPY_DOMAIN_INSERT and RPY_DATAELEMENT_INSERT that allow you to create new domains/data elements and assign them to a package and transport request at the same time. Maybe look into using these.
Don't forget to activate the objects e.g. via DDIF_DOMA_ACTIVATE and DDIF_DTEL_ACTIVATE.
Thomas
Edited by: Thomas Zloch on Nov 25, 2010 11:27 AM
2010 Nov 26 10:40 AM
Thanks...for the reply...I am getting a Short Dump on the use of the Function Module RPY_DOMAIN_INSERT...The Short Dump is
GETWA_NOT_ASSIGNED...
The line in which Short Dump is triggered is CONVERT1 'DTEL_INF' 'DD04L' 'DD04L_WA' 'W'. of the program LSIFDU07. Can you plz help me fix the short Dump...
2010 Dec 15 12:51 PM
Hi unknown underground coder,
ls_e071-pgmid = 'LIMU'.
ls_e071-object = 'FUNC'.
ls_e071-obj_name = ps_alv-funcname.
CALL FUNCTION 'TR_APPEND_TO_COMM'
EXPORTING
pi_korrnum = p_trkorr
wi_e071 = ls_e071
wi_simulation = p_test
* WI_SUPPRESS_KEY_CHECK = ' '
* TABLES
* WT_E071K =
EXCEPTIONS
no_authorization = 1
no_systemname = 2
no_systemtype = 3
tr_check_keysyntax_error = 4
tr_check_obj_error = 5
tr_enqueue_failed = 6
tr_ill_korrnum = 7
tr_key_without_header = 8
tr_lockmod_failed = 9
tr_lock_enqueue_failed = 10
tr_modif_only_in_modif_order = 11
tr_not_owner = 12
tr_no_append_of_corr_entry = 13
tr_no_append_of_c_member = 14
tr_no_shared_repairs = 15
tr_order_not_exist = 16
tr_order_released = 17
tr_order_update_error = 18
tr_repair_only_in_repair_order = 19
tr_wrong_order_type = 20
wrong_client = 21
OTHERS = 22
.Please adapt to your needs.
Regards,
Clemens
2010 Dec 15 1:26 PM
WELL MY CODE Fragment is:
CLEAR ls_e071.
ls_e071-trkorr = p_order.
ls_e071-pgmid = 'R3TR' .
ls_e071-object = 'DOMA'.
ls_e071-obj_name = w_upload-domname.
l_v_order = p_order.
*INSERTING THE TRANSPORT REQUEST
CALL FUNCTION 'TR_APPEND_TO_COMM'
EXPORTING
pi_korrnum = l_v_order
wi_e071 = ls_e071
EXCEPTIONS
no_authorization = 1
no_systemname = 2
no_systemtype = 3
tr_check_keysyntax_error = 4
tr_check_obj_error = 5
tr_enqueue_failed = 6
tr_ill_korrnum = 7
tr_key_without_header = 8
tr_lockmod_failed = 9
tr_lock_enqueue_failed = 10
tr_modif_only_in_modif_order = 11
tr_not_owner = 12
tr_no_append_of_corr_entry = 13
tr_no_append_of_c_member = 14
tr_no_shared_repairs = 15
tr_order_not_exist = 16
tr_order_released = 17
tr_order_update_error = 18
tr_repair_only_in_repair_order = 19
tr_wrong_order_type = 20
wrong_client = 21
OTHERS = 22.
But Here the Function Module is Failing where SY-SUBRC = 20 & raising the exception r_wrong_order_type ...
Please help as I am facing the same issue for some time now...
2010 Dec 15 1:35 PM
Hi,
may be you have to use a classified task, we used
FORM tr_request_choice CHANGING pv_trkorr TYPE trkorr.
TYPE-POOLS:
trwbo.
DATA:
ls_request TYPE trwbo_request_header.
CALL FUNCTION 'TR_REQUEST_CHOICE'
EXPORTING
* IV_SUPPRESS_DIALOG = ' '
* IV_REQUEST_TYPES =
* IV_CLI_DEP = ' '
* IV_REQUEST = ' '
* IT_E071 =
* IT_E071K =
* IV_LOCK_OBJECTS = ' '
iv_title = 'Choose request, Task will be found'
* IV_START_COLUMN = 3
* IV_START_ROW = 7
* IV_WITH_ERROR_LOG = 'X'
* IV_NO_OWNER_CHECK = ' '
IMPORTING
es_request = ls_request
EXCEPTIONS
invalid_request = 1
invalid_request_type = 2
user_not_owner = 3
no_objects_appended = 4
enqueue_error = 5
cancelled_by_user = 6
recursive_call = 7
OTHERS = 8
.
IF sy-subrc = 0.
SELECT trkorr
INTO pv_trkorr UP TO 1 ROWS
FROM e070
WHERE trfunction = 'S'
AND trstatus = 'D'
AND as4user = sy-uname
AND strkorr = ls_request-trkorr.
EXIT.
ENDSELECT."rkorr into pv_trkorr
ENDIF.
ENDFORM. " TR_REQUEST_CHOICE
Regards,
Clemens
Edited by: Clemens Li on Dec 15, 2010 2:36 PM