cancel
Showing results for 
Search instead for 
Did you mean: 

cProjects 4.0: How to get all tasks of a project by code

matthias_fischer
Explorer
0 Kudos

Does anyone know how to get all tasks of a project by code.

I've checked the BAPI's BAPI_BUS2172* and a lot of methods and attributes

of the classes CL_DPR* but I did not found a single method or function

which delivers all tasks in one or a few steps.

One possibilty could be to parse all attributes MR_PHASES, MR_TASKS and so

on beginning with the project down to the tasks.

Any better ideas?

Kind regards MaFi

Accepted Solutions (1)

Accepted Solutions (1)

former_member189058
Active Contributor
0 Kudos

Hi Matthias,

I wonder how you checked all methods of BAPI_BUS2172*. Didn't you find <b>BAPI_BUS2172_GET_TREE</b>. This function requires the project GUID (I guess you mean the same when you say project by code)

It gives as output a tree containing all objects under that project. All tasks belong to the object type TTO. In fact you also get the heirarchy of the tasks if you check the field 'LEVEL' in the tree.

If by project code, you mean project number, I will give a function that reads the project number and returns the project GUID.

<b>DPR_GET_GUID_BY_ID_FROM_DB</b>

You need to specify the project number in the field IV_NUMBER and 'DPO' in the field IV_OBJECT_TYPE.

Pl Note the following object types:

DPO - Project Definition

PPO - Phase

TTO - Task

Regards,

Reema.

Message was edited by:

Reema Shahbazkar

In case this doesnot solve your problem, pl elaborate what you want a bit clearly and if it does, pl award appropriate points to me. Thank You.

Message was edited by:

Reema Shahbazkar

matthias_fischer
Explorer
0 Kudos

Thanks Reema,

my problem was solved.

Answers (0)