on 02-27-2014 4:53 PM
Hello
I have Project GUID available in my program, now I need to get associated Template's description, pls. let me know how can I get associated template description by passing Project GUID?
Than you
Hi,
It's farely easy:
You get the instance of the CL_DPR_PROJECT_O class based on your Project GUID. And call the method ->GET_DATA_EXT importing ES_PROJECT_INT. This structure contains a component TEMPLATE_GUID (type DPR_TV_ENTITY_GUID). Use this to load an instance of class CL_DPR_PROJECT_T (Template), and then call method ->GET_DESCRIPTION( ).
If you don't know how to load a project instance, just copy-paste the following code:
data:
lv_convert_guid type dpr_tv_entity_guid.
lo_project ?= cl_dpr_api_services=>get_object_by_guid( iv_project_guid ).
if lo_project is initial.
lv_convert_guid = iv_project_guid.
cl_dpr_bapi_services=>load_objects_of_object_type(
exporting
iv_object_type = cl_dpr_co=>sc_ot_project
iv_object_guid = lv_convert_guid
iv_change_mode = cl_dpr_co=>sc_false ).
lo_project ?= cl_dpr_api_services=>get_object_by_guid( iv_project_guid ).
endif.
Preferably, put this code inside a method and use the more generic CL_DPR_PROJECT.
Hope this helps you!
Tudor
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
You can get description for template from cgpl_text by passing template GUID. However you have to first find out the template used to create operational project and then pass its GUID in cgpl_text. I am not sure if I understood the question right.
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
11 | |
6 | |
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.