on 04-17-2009 2:27 PM
Hi Experts,
is there any standard function module available to get phase and task information for a particular project-id?
output should be in the format of phase-id, phase-desc, task-id, task-desc, st date , end date and the resource assigned to particular task.
or if there is no standard FM, can anyone guide me the flow , how can I get the details.
-thanking you
Praveen
Hi
Check this FM:
BAPI_BUS2172_GET_SUBOBJECTS
Pass on the GUID of Project and it will give you all subobjects inclusing
Role, Task, phase etc.
You can have filter based on Object type (PPO for Phase) and like wise..
In addition, you can try DPR_GET_GUID_BY_ID_FROM_DB to get GUID from Project number
Niranjan
Let me know if it works
Points welcome if useful
Edited by: Niranjan Dandekar on Apr 20, 2009 1:54 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Niranjan,
Thanks for providing the information.
when I excute the BAPI, it gives me Phase-id and description. resource details and the object type. but I couldn't find the object type as " TTO".
Under Phase I've tasks defined and for those tasks I have assigned the resources.
how to get the task information for a phase and the corresponding resource details.
Please let me know.
regrads,
Praveen
Hi
try
BAPI_BUS2172_GET_TREE
this will give TTO data and phase data
But the subobject should give you most of it..
As per help:
The system supports the following subobject types:
Object Type Object
PPO Phase
TPO Task
CPO Checklist
RAG Checklist reference
OAG Object link
DAG Document
FAG Collaboration
MTG Project role
BP Business partner as project role staffing
PLH Placeholder as project role staffing
EBP External resource as project role staffing
DPP Project for program
Niranjan
Points welcome if useful
Edited by: Niranjan Dandekar on Apr 20, 2009 2:49 PM
Hi,
Thank you.
BAPI_BUS2172_GET_TREE will give the phase and task information.
But my requirement is, I need to display/get the resource information for the particular task.
this is only pending, if i get the resouce information against the task, this will fulfill my rquirement.
plz help.
regards,
Praveen
Hi. if i understood your problem ..... this is the solution:
if you have a project id you can get the project guid with this report:
REPORT Z_PROJECT_GUID_GET.
*tables CFX_SUBSCRIPTION.
*data wa_CFX_SUBSCRIPTION like CFX_SUBSCRIPTION.
*
*select single * from CFX_SUBSCRIPTION into wa_CFX_SUBSCRIPTION
* where
* user_id = 'DIAPWRITER'.
**if sy-subrc = 0.
* delete CFX_SUBSCRIPTION from wa_CFX_SUBSCRIPTION.
*endif.
tables: dpr_project, BAPI_TS_GUID.
DATA: es_project_definition_detail TYPE bapi_ts_project_def_detail,
et_name TYPE TABLE OF bapi_ts_name,
es_name TYPE bapi_ts_name,
et_status TYPE TABLE OF bapi_ts_status,
wa_proj_used_day TYPE zday_cproj,
wa_project_day TYPE zused_day_cproj,
es_status TYPE bapi_ts_status.
data wa_dpr_project type dpr_project.
data iv_project_guid TYPE BAPI_TS_GUID-PROJECT_DEFINITION_GUID.
DATA: return TYPE bapirettab.
select-options proj_id for dpr_project-project_id.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR proj_id-LOW .
PERFORM SH_proj_id using 'PROJ_ID-LOW'.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR proj_id-HIGH .
PERFORM SH_proj_id using 'PROJ_ID-HIGH'.
START-OF-SELECTION.
select single *
from dpr_project
into wa_dpr_project
where PROJECT_ID in proj_id.
move wa_dpr_project-GUID to iv_project_guid.
CALL FUNCTION 'BAPI_BUS2172_GET_DETAIL'
EXPORTING
project_definition_guid = iv_project_guid
IMPORTING
es_project_definition_detail = es_project_definition_detail
TABLES
et_name = et_name
et_status = et_status
return = return.
write iv_project_guid.
FORM SH_proj_id_low.
TYPES :
BEGIN OF st_sh,
PROJECT_ID TYPE DPR_TV_PROJECT_ID,
END OF st_sh,
tt_sh type table of st_sh.
DATA :
it_sh TYPE tt_sh.
select PROJECT_ID
FROM DPR_PROJECT
INTO CORRESPONDING FIELDS OF TABLE IT_SH.
* " creiamo il SH dai valori della tabella
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'PROJECT_ID' " deve essere maiuscolo !!
DYNPPROG = sy-cprog
DYNPNR = sy-dynnr
DYNPROFIELD = 'PROJ_ID-LOW' "definito sopra
VALUE_ORG = 'S'
TABLES
VALUE_TAB = it_sh
" RETURN_TAB = it_return
.
ENDFORM.
FORM SH_proj_id using p_string type HELP_INFO-DYNPROFLD.
TYPES :
BEGIN OF st_sh,
PROJECT_ID TYPE DPR_TV_PROJECT_ID,
END OF st_sh,
tt_sh type table of st_sh.
DATA :
it_sh TYPE tt_sh.
select PROJECT_ID
FROM DPR_PROJECT
INTO CORRESPONDING FIELDS OF TABLE IT_SH.
* " creiamo il SH dai valori della tabella
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'PROJECT_ID' " deve essere maiuscolo !!
DYNPPROG = sy-cprog
DYNPNR = sy-dynnr
DYNPROFIELD = p_string "definito sopra
VALUE_ORG = 'S'
TABLES
VALUE_TAB = it_sh
" RETURN_TAB = it_return
.
ENDFORM.
Then you can call the function already suggested: BAPI_BUS2172_GET_TREE. The input parameter will be your project guid and the output will be like this:
001 DPO 6919B6B00FD27A4FB4ECFB1704F4CAA2 New project Definition
002 PPO 6379E064CE9FE04C9BD8825E642C7F39 RdS micro analisi
003 TTO CD26FEFBCC25AF4798D28945DA28DBDF Analisi e stima micro sviluppo
002 PPO E7759D3C9D61B64C85D42F96E0F8C16B RdS micro svilupo
003 TTO D3E2F9A236F395478FD8A0C05AA39882 Accettazione stima
003 TTO 8A9B4B9998DDB34E8484D88728EDCA1A Esecuzione attivita'
003 TTO F218656A1D65834396D0A76B4A1DAD8F User test
003 TTO 3F3FB2FEDE8EBC418CE87F575868E3F9 Chiusura Rds
Once you have got your project tree, you can have a single task/phase full information by the function modules BAPI_BUS2173_GET_DETAIL (phase detail) or BAPI_BUS2175_GET_DETAIL (task detail).
regards,
Fabrizio Gemma
HI Fabrizio,
thank you.
I followed the steps given by you.
the program will give me project Gui-id, the gui-id I will pass it to the function module BAPI_BUS2172_GET_TREE to get the project tree structure, from there I will select the task type as " TTO" and the task Gui-id to the function-module BAPI_BUS2175_GET_DETAIL.
then I will get the below shown-output:
ROLEASSIGNMENT_GUID DE184E338D9FCCF1A40E001A645016DC
ROLE_GUID DE184E1348792BF1A40E001A645016DC
SHADOW_ROLE_GUID DE184E2C1CAC03F1A40E001A645016DC
WORK_EFFORT 8.75
WORK_UNIT H
WORK_ISOCODE_UNIT
BEGIN_DATE 02.03.2009
END_DATE 14.03.2009
CALCULATED_BEGIN 23.03.2009
CALCULATED_END 24.03.2009
from this how do find-out the resource name. is there any link between role_guiid and resource name.
Please help/suggest.
regards,
Praveen
Hi .
For each project there are many possible roles (each one associated to a specified guid), and for each role you can staff a person: the person staffed for that role will be linked to the selected role guid.
Furthermore: for each part of the project (phase, task, ...) i can decide which role (one of the roles previously defined for the entire project) is the "responsible role" for that part of the project.
An example:
1)
I've a project with two possible different roles: "Analist" and "Leader".
if i call the function module "BAPI_BUS2172_GET_SUBOBJECTS" i can get the following result:
PPT 867A0DCA563D834CA4890850AAB7824A RdS micro analisi
PPT E7B48A8A20273E4CAFE9E19F7EFF581B RdS micro svilupo
DAG 4D6F85FA5C18A44F954053BC2C6315B2 Livello 1: cartella generata
MTG 4B52158DA6CABD46AECE4F35BBBD1D60 Analist
MTG 50FCE90CAB224345A7333FCFD61259E1 Leader
where "MTG" lines are associated to roles, "PPT" to phases and "DAG" is a document folder.
2)
Then i staffed two people, one for each role:
- "yyy xxx" is the user (USERID="USER01", FIRSTNAME="yyy", LASTNAME="xxx") i staffed for the "Analist" role
-
3)
I associated the first role (Analist) as "responsible role" to the first phase of such a project: if i call the funtion module "BAPI_BUS2173_GET_DETAIL" for the above mentioned phase, i can se the role name, the role guid and the name of the staffed user:
ES_PHASE_DETAIL
PHASE_NUMBER 1000000195
PHASE_TYPE 000000000000001
PHASE_TYPE_TEXT Analisi
PREDECESSOR_PHASE_NUMBER
PREDECESSOR_PHASE_GUID
SUCCESSOR_PHASE_NUMBER 200000000000000000252008
SUCCESSOR_PHASE_GUID 32FC4D11C403E342AF7E2A19734050C2
RESPONSIBLE_ROLE Analist
RESPONSIBLE_ROLE_GUID 432E2F43EC787C4181E550B2F7631515
RESPONSIBLE_NAME yyy xxxi
4) Hint:
if you want to staff a user for a selected role via function module you can use this code:
clear : IV_PROJECTROLE_GUID, IS_STAFFINGLINK, IS_STAFFINGLINK_X.
IV_PROJECTROLE_GUID = IV_PHASE_DETAIL-RESPONSIBLE_ROLE_GUID.
IS_STAFFINGLINK-PARTNER_GUID = iv_bp_guid.
IS_STAFFINGLINK_X-PARTNER_GUID = 'X'.
CALL FUNCTION 'BAPI_BUS2177_STAFFING_ADD'
EXPORTING
PROJECTROLE_GUID = IV_PROJECTROLE_GUID
IS_STAFFINGLINK = IS_STAFFINGLINK
IS_STAFFINGLINK_X = IS_STAFFINGLINK_X
* IV_IGNORE_WFMCORE = CL_DPR_CO=>SC_FALSE
* IMPORTING
* EV_STAFFINGLINK_GUID =
TABLES
* IT_COMMENT =
RETURN = return
Where IV_PROJECTROLE_GUID is the role guid, iv_bp_guid is the business partner guid associated to the user you want to staff for the selected role.
regards,
fabrizio gemma
Edited by: fabrizio gemma on Apr 21, 2009 10:03 AM
This message was moderated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Praveen,
Instead of going to FM, there is a standard functionality available in cProjects called "evaluation"..
You can configure your evaluation layout and the evaluation criteria, and based on your scenario you can build the output.
Hope this will serve your query. Need any futher information, please go through the following link.
http://help.sap.com/saphelp_ppm450sp04/helpdata/en/43/054880bbe822f5e10000000a1553f7/frameset.htm
Regards,
Nishit Jani
Award Points for useful Information.
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.