Skip to end of metadata
Go to start of metadata

Some code snippets are of particular interest when carrying out technical analysis of issues which occur in Project Management (e.g. when trying to find out the reason why a certain error message is being raised). Knowing where to place the right breakpoint can greatly increase the speed and efficiency of such analysis.


The purpose of this page is to document some of the most important coding areas where breakpoints can be placed for analysing issues in Project Management. When editing this page, please ensure to maintain the information in a structured manner (the purpose is to be able to place the right breakpoint for the specific issue which is being analysed).

On this page you can find information concerning:

ACL Authorizations

CATS Integration

CGPL Hierarchy

Creating a Note for an Object

DMS documents

Find a Switch

Forms (i.e. Status Reports, Approval Documents)

Graphic View / Gantt

Debugging Tips and Tricks (PRO)#Messages

Navigate from Project Management Project to Portfolio Item

Object Links

Reading usersettings

Reconciliation and comparison of versions

Debugging Tips and Tricks (PRO)#Resources

XML-File Integration (Import/Export)


Messages
  • Information/Warning/Error messages which are raised in Project Management are typically written to the CGPL application log. If this is the case, you can find out where a message is being raised by placing a breakpoint in the "Add" methods of class CL_CGPL_APPLICATION_LOG (i.e. MESSAGE_ADD, MESSAGE_ADD_FREE_TEXT, MSG_ADD, OBJECT_MESSAGE_ADD).
  • Sometimes it helps to place a breakpoint where messages are added to the message handler of the API (you can then work your way up the debugger call stack to find out where the message was raised). This happens in class CL_DPR_API_MESSAGE_HANDLER, e.g. method ADD_MESSAGE_INTERNAL.
  • The source of messages coming from the DFM (synchronization) framework will need to be sought within the DFM call. You can refer to class CL_INM_DFM_OBJECT_INTEGRATION (e.g. methods DO_ATTRIBUTES_SYNC, DO_AUTH_SYNC, DO_STATUS_SYNC) for the starting point of the DFM calls.


CGPL Hierarchy

The following breakpoint can be used to see which CGPL entries are posted to the backend when saving a project (e.g. in case you have recurring hierarchy inconsistencies and wish to see which entries are inserted/updated/deleted in the CGPL_HIERARCHY table upon saving):

CL_CGPL_PERSISTENCY
METHOD          / SAVE
CALL FUNCTION 'CGPL_PROJECT_POST' IN UPDATE TASK
    TABLES
     .....

ACL Authorizations

Issue with Access Control List (frontend) authorizations can be debugged by placing breakpoints in the methods of classes CL_DPR_AUTHORIZATION_SERVICES. Also class CL_ACO_USERS can be useful (e.g. method AUTH_CHECK_4_SUPER_USER is where the system checks if the user has an ACO_SUPER authorization).


CATS Integration

The CATS worklist for Project Management projects is populated in form READ_WORKLIST_CPRO of include LCATSFZC (on the ERP system). At the following coding-part the RFC-call to the PPM-system is done to select the datas:

Main Program     SAPLCATS
Source code of   LCATSFZC
FORM READ_WORKLIST_CPRO
       * Get worklist for cProjects
         CALL FUNCTION 'DPR_API_CATS_WORKLIST' DESTINATION lt_receivers


Table lt_worklist contains the datas from PPM-system.
The datas of table lt_worklist can be changed with Exit EXIT_SAPLCATS_001 or BAdI CATS_WORKLIST_ADDIN.

For analyze it´s also possible to start SE37 with function module DPR_API_CATS_WORKLIST in PPM-system to check the seleted datas.


 Package: DEVELOPMENT_PROJECTS_CATS

Function group: DPR_API_CATS
DPR_API_CATS_WORKLIST
DPR_API_CATS_CONF_UPDATE


DMS documents
  • Links to SAP DMS documents are saved as object links to a DMS (target) system. This is done in class CL_DPR_OLR3_EASYDMS method IF_DPR_OBL_PROXY~SAVE_OBJECT_LINKS.
  • On the DMS target system, the link is saved in class CL_DEF_IM_OLR3_DMS method IF_EX_OLR3_DMS~UPDATE_OBJECT_LINK


Forms (i.e. Status Reports, Approval Documents)

Class CL_DPR_FORM_MANAGER contains methods which you can use to debug issue occurring with forms in Project Management. E.g. in CL_DPR_FORM_MANAGER method FINALIZE the system reads which forms are active for a certain project type.


Graphic View / Gantt

The methods of class CL_DPR_UI_LOG_GANTT can be used to debug issues with the graphic view. E.g. method GET_GANTT_DATA fetches all the Gantt data prior to calling the transformation to convert this data from ABAP to XML.


  • CL_DPR_OLR3_METHODS method SEARCH_OBJECTS is processed when searching for objects for the creation of new object links.
  • CL_DPR_UI_LOG_OBJLINKS method GET_OBJECT_LINKS fetches all existing object links for an object, this method is processed when accessing the Object Links tab.
  • CL_DPR_API_SERVICES method OBL_GET_APPLICATION_URL constructs the URLs for the object links (used for navigating to these objects when clicking on the link).
  • Navigation to the "Service" which has been clicked: Webdynpro DPR_OBJLINKS,  COMPONENTCONTROLLER, Method ON_CALL_SERVICE.                
    Class CL_APB_LPD_START_APPL_NWBC_3, Method START_URL.
    BAdI BADI_APB_LPD_MODIFY_URL_PARAMS can be used to modify the URL Parameter.


Resources
  • If you want to check if structural authorizations for HR search are active or not on a system for the current user, you can place a breakpoint in class CL_PRP_AUTHORIZATION_SERVICES method HAS_PROFILE.
  • CL_DPR_UI_LOG_PROJECT_DETAIL method GET_BUPA_INFO is processed to fetch the resource details for a given resource GUID, e.g. to populate field "Responsible" for a project or task.


Creating a Note for an Object

CL_DPR_ENTITY
IF_DPR_ENTITY~SET_NOTE


CL_DPR_ENTITY
FINALIZE_NOTES

*/Feed all notes to SET_LONG_TEXT method
  TRY.
      CALL METHOD cl_dpr_entity_services=>set_long_text      
...


CL_DPR_ENTITY_SERVICES
SET_LONG_TEXT


Reading usersettings

The usersettings are read in class CL_DPR_LOG_PROJECT_STRUCTURE, method GET_USER_SETTINGS.

Report DPR_CHANGE_USER_SETTINGS can be used to set the usersettings in the backend.


Find a Switch
Function Module

To find a switch which can influence the systembehaviour you can set a breakpoint in function module RPM_GET_SETTINGS_VALUE. The parameters iv_area and iv_name are providing the information concerning the switch.

Tables

The values of the switch (area/name) are stored in table RPM_SET_VAL. In table RPM_SET_NAME you can find the description of the switch.


Reconciliation and comparison of versions 

In class CL_DPR_UI_LOG_VRSN_COMPARE, method GET_COMPARISON_STRUCTURE the table with the Source and Target Elements for comparison is created.

The comparison itself is done in class CL_DPR_VERSION_COMP_SERVICES, method COMPARE_OBJECTS.

Webdynpro: DPR_VERSION_COMPARE

Information concerning the datas which are relevant for reconciliation are available in SAP Note 1532307.


XML-File Integration (Import/Export) 
Import from XML-File to Project

For the import of a project from XML-File to Project Management class CL_DPR_API_COMPOUND_SERVICES with method IMPORT_FROM_XML is called.

In class CL_DPR_XML2CPR you can find further detailed methods as CREATE_PROJECT_FROM_XML, ...


If the Target Object is "Updated" or a "Simulation version is created" depends on the setting in project-type. See Section "Project Integration" in the details of the projecttype.

The check for this parameter is done at:
   Webdynpro: INM_TRANSFER
   COMPONENTCONTROLLER
   PROCESS_IM_PROJECT


Export Project to XML-File

For the export of a project to a XML-File the class CL_DPR_API_COMPOUND_SERVICES with method EXPORT_TO_XML is called where the XML-file is generated at:

CL_DPR_XML_GENERATOR, method GENERATE_XML_FILE.


Navigate from Project Management Project to Portfolio Item

When a Project Management Project is created based on a Portfolio Item - it´s possible to navigate directly with button "Item" from Project to Item. Then a breakpoint can be set at: CL_DPR_LOG_PROJECT_STRUCTURE
LAUNCH_ITEM


Further tips and tricks:

Back

  • No labels

1 Comment

  1. thank you - we want more of this !(smile)