on 02-18-2013 11:22 AM
Hello All,
I am trying to find out which class or F.Modules are being used to create the object link between the project and the DMS documents at the path Project management->project ->object links. The objective is to create a custom program to create these links using data from excel file.
FM 'RPM_OBJ_LINK_SAVE_DB' seems relevant but it is not being called when i m creating a link manually through business client.
Any help would be great.
Thanks
Have you tried?
RPM_CREATE_OBJ_LINK
/RPM/SAVE_CHANGES
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the reply. I had already tried that .
And here is the complete code which successfully link the document to the project.
once the excel file data is available in the lt_excl then just simply paste this code and the link creation should work. In this case the excel file should have 5 fields, projectnumber and the four fields about the document.
LOOP AT lt_excl INTO ls_excl.
SELECT SINGLE guid
FROM dpr_project
INTO lv_guid16
WHERE project_id = ls_excl-prid.
lr_obj_mgr = cl_dpr_appl_object_manager=>get_instance( ).
lr_obj_mgr->load_application_objects(
EXPORTING
iv_guid = lv_guid16
* IMPORTING
* ET_APPLICATION_OBJECTS = ET_APPLICATION_OBJECTS
* ET_LOCKED_APPLICATION_OBJECTS = ET_LOCKED_APPLICATION_OBJECTS
).
*lr_obj_mgr->get_project( IV_GUID = lv_guid16 ).
lr_common = lr_obj_mgr->get_application_object( iv_guid = lv_guid16
).
lr_project_o ?= lr_common.
lr_project_o->get_data_ext(
IMPORTING
es_project_chg = ls_project_chg
es_project_ext = ls_attributes_ext
es_project_int = ls_project_int
).
lv_prjguid = ls_project_int-guid.
******* identification key creation
lv_str = ls_excl-docno.
CONCATENATE ls_excl-doctyp ls_excl-docpart ls_excl-docver INTO lv_tempstr.
lv_str+25(8) = lv_tempstr.
* beispiel '800000050 ACD00000', 33 stellig
******
lv_objlink-object_type_key = '0DOCUMENT'.
lv_objlink-identification = lv_str.
lv_objlink-description = ''.
lv_objupd-object_type_key = 'X'.
lv_objupd-identification = 'X'.
lv_objupd-description = ''.
CALL FUNCTION 'BAPI_BUS2172_OBLINK_ADD'
EXPORTING
project_definition_guid = lv_prjguid
is_object_link = lv_objlink
is_object_link_upd = lv_objupd
TABLES
return = lt_ret.
CALL FUNCTION 'BAPI_CPROJECTS_COMMIT_WORK'
TABLES
return = lt_ret.
clear: lt_ret,lv_objlink,lv_prjguid,lv_str,lv_tempstr,ls_excl,ls_project_int,lr_project_o,lr_common.
clear: lv_guid16,lr_obj_mgr.
ENDLOOP.
declaratiions as follows.
DATA: lv_guid16 TYPE dpr_tv_entity_guid,
lr_obj_mgr TYPE REF TO cl_dpr_appl_object_manager,
lr_common TYPE REF TO if_dpr_common,
lr_project_o TYPE REF TO cl_dpr_project_o,
ls_project_chg TYPE dpr_ts_project_chg,
ls_project_int TYPE dpr_ts_project_int,
ls_attributes_ext TYPE dpr_ts_project_ext.
DATA: lv_prjguid TYPE dpr_tv_bapi_guid_project,
lv_objlink TYPE bapi_ts_object_link,
lv_objupd TYPE bapi_ts_object_link_upd,
lt_ret TYPE STANDARD TABLE OF bapiret2.
DATA: lt_raw TYPE truxs_t_text_data,
lt_excl TYPE STANDARD TABLE OF t_pr2doc,
ls_excl TYPE t_pr2doc,
lv_str(33) TYPE c,
lv_tempstr TYPE string.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
10 | |
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.