on 04-18-2016 3:57 AM
Hello,
RELATIONSSHIPs (predecessor / successor) are not copying when we COPY a task, say, task_1 has a processor under relationships tab and when user want to copy this task_1 into a new task (task_2), almost all the attributes are copying but the task_1's relationships are not copying into task_2, pl. let us know how can make relationships also will be copied into newly creating task for COPY button/function
Thank you
Any help pl.?
Thank you
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you.
Then can I go ahead & achieve this requirement by calling the BAPI_BUS2175_RELATION_ADD, BAPI_CPROJECTS_COMMIT_WORK in the CL_DPR_DEMO_SUBSYSTEM class (I mean custom class of this subsystem, say ZCL_DPR_DEMO_SUBSYSTEM) because as you know this subsystem will trigger just before the data base standard SAP's commit work statement
Pl. let us know is it safe / suggestible using these 2 BAPIs (incl. COMMIT WORK BAPI) in the subsystem class?
Regards
Hi,
you can do this with a Z-Subsystem. First of all you should use BAPI_BUS2172_LOAD with the project GUID and change-mode enabled (X). Then call BAPI_BUS2175_RELATION_ADD.
With the BAPI_CPROJECTS_COMMIT_WORK inside of Subsystems you should be very careful. If you use this within your Z-subsystem the BAPI_CPROJECTS_COMMIT_WORK (save-process) interrupts a running save process. cProjects does the COMMIT by itself, after all subsystems are processed. You can have a look to this COMMIT in CL_DPR_TRANSACTION_MANAGER/EXECUTE_SAVE.
Moreover with BAPI_CPROJECTS_COMMIT_WORK the method INITIALIZE_AFTER_SAVE (Z-subsystem and SAP-subsystems) is executed too early, resulting in initializing some data (inconsistencies, dumps).
To say it the short way: You should not call BAPI_CPROJECTS_COMMIT_WORK in your Z-subsystem, the COMMIT is done by cProjects-Standard.
br,
Peter
Hi,
it depends on your implementation logic, but PREPARE_TO_SAVE (doing stuff like getting details) or SAVE is a good starting point. INITIALIZE_AFTER_SAVE is too late.
PREPARE_TO_SAVE has the advantage, that you can implement the logic and react on data inconsistencies before SAVE does the DB update process.
br,
Peter
Message was edited by: Hans-Peter Baier
User | Count |
---|---|
8 | |
4 | |
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.