on 06-08-2010 10:25 AM
HI experts:
I need some classes to create task in cproject 4.5 .
I used BAPI to create task ,but three are multiple transaction with DB , then pool performance.
I had asked this question to Simon who come from Germany sap company Headquarters , he advanced me to use class to create task,and this mechanism will reduce transaction with DB .
But I can not find suitable Class , other words , I need example to create task through class.
please help me .
yudong,
Unfortunately I can't give you the code example but I can give you the information so that you can write the code yourself.
1. Get instance of CL_DPR_APPL_OBJECT_MANAGER. Load phase using method LOAD_PHASES method.
2. Get the instance of phase class CL_DPR_PHASE from Load_phases method.
3. Get the instance of CL_DPR_TASKS by reading public instance attribute MR_TASKS of instance of CL_DPR_PHASE .
4. Use method ADD to add new task and get the instance of CL_DPR_TASK.
5. Use methods ( like SET_DATA_EXT) of CL_DPR_TASK to set the data of the task.
6. Use method IF_DPR_PROVIDER_TRANSACTION~DO_SAVE of CL_DPR_APPL_OBJECT_MANAGER.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Yudong,
The BAPI is the best way to create a task from external, thouhg it may take some CPU time.
I really donot recommend you to call the class to do it. Anyway if you want to do it, you can set the break-point of cl_dpr_task_o, method constructor. Create a task from web-ui and check, which other classes are involved. I do think, it is a complex and unstable way to do it.
Kind regards,
Zhenbo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
9 | |
7 | |
3 | |
2 | |
2 | |
2 | |
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.