CL_DPR_DEMO_SUBSYSTEM - Demo Implementation for Customer-Specific Subsystem
RFUMSV00 - Advance Return for Tax on Sales/Purchases CPI1466 during BackupThis documentation is copyright by SAP AG.
Function
This class is a demo implementation of the IF_DPR_APPL_PLUG_IN_SUBSYSTEM interface to establish a customer-specific subsystem.
It is used in connection with the UI demo in the cProjects IMG node Global Enhancementsto Project Elements -> Show Additional Tab Page in cProjects - seethe WD component DPR_CUST_EXT_INTF_DEMO. However, the class can also serve as a template for a subsystem with no connection to the UI independently of the example above.
The database table is DPR_DEMO. It contains the customer-specific non-CI field DATA1 ('CustomerDate1' in the UI mentioned above) in addition to the key fields CLIENT and GUID.
The methods from the interface IF_DPR_APPL_PLUG_IN_SUBSYSTEM have the following meaning:
GET_INSTANCE - Supplies the singleton with reference to the interface IF_DPR_APPL_PLUG_IN_SUBSYSTEM.
FREE - Discards the customer-specific changes recorded so far and deactivates the event handler ON_OBJECT_DELETED for all instances.
HAS_CHANGES - If customer-specific changes exist, it returns TRUE, otherwise it returns FALSE.
PREPARE_TO_SAVE - Checks the customer-specific changes recorded so far.
SAVE - Transfers the customer-specific changes recorded so far to one or more tables as required and transfers them to a corresponding update-enabled customer-specific function module via
CALL FUNCTION '...' IN UPDATE TASK
This demo implementation uses the update module DPR_DEMO_SAVE.
INITIALIZE_AFTER_SAVE - Discards the customer-specific changes recorded so far and the table that is transferred to the update.
The methods of IF_DPR_APPL_BOOTSTRAP_MEMBER allow more actions for more complicated subjects that do not normally exist:
LOAD - Allows data to be loaded that is specifically required in subsystem handling.
FREE - Allows additional release of data from LOAD.
INITIALIZE - Allows initialization of data from LOAD.
GET_SEQUENCE_PLACE - Definition of a LOAD sequence for different bootstrap members if, for example, the data of Bootstrap Member1 has to be loaded before the data of Bootstrap Member2 due to dependencies.
The attributes without any relation to the interface have the following meaning:
SR_INSTANCE - Private singleton of the demo subsystem
MT_CUSTOM_DATA - Private buffer table for managing the customer-defined data including update indicators.Its content is used in the methods FREE, HAS_CHANGES, PREPARE_TO_SAVE, SAVE, and INITIALIZE_AFTER_SAVE named above.
SC_INS, SC_CHG und SC_DEL - Private constants for identifying the update indicator 'I' (Insert), 'C' (Change), and 'D' (Delete).
The methods without any relation to the interface have the following meaning:
GET_INSTANCE - Manages and returns the singleton SR_INSTANCE
CONSTRUCTOR - Activates the event handler ON_OBJECT_DELETED for all instances.
ON_OBJECT_DELETED - Event handler for all instances of the class CL_DPR_ENTITY, event IF_DPR_COMMON~DELETED. Handles the relevant customer-defined data entry in MT_CUSTOM_DATA when an application object is deleted.
The event handler is activated for all instances in the CONSTRUCTOR and is deactivated in the method IF_DPR_APPL_PLUG_IN_SUBSYSTEM~FREE.
INIT_CUSTOM_DATA - Initializes the buffer table MT_CUSTOM_DATA for a project element when the user navigates to his or her customer-specific tab for the first time.
SELECT_CUSTOM_DATA - Selection of customer-defined data for a project element from the table DPR_DEMO.
GET_CUSTOM_DATA - Reads the customer-specific data for a project element from MT_CUSTOM_DATA.
SET_CUSTOM_DATA - A method called from the UI for updating the (changed) customer-specific data for a project element in MT_CUSTOM_DATA.
DELETE_CUSTOM_DATA - A data record that already exists in the database that contains customer-defined data for a project element is marked for deletion (when saving) in the buffer table MT_CUSTOM_DATA.
INVALID_CUSTOM_DATA - Deletes the customer-defined data entry for a project element from the buffer table MT_CUSTOM_DATA.
Background: A project element was created in the current session, customer-defined data was entered(the update indicator UPD in MT_CUSTOM_DATA is SC_INS) and the project element was deleted again straightaway. In this case, the buffer record must be deleted instead of setting UPD = SC_DEL because otherwise the system tries to delete a non-existent record from the database table DPR_DEMO during the update.
Other customer-specific methods can also be implemented here.
The methods from the subsystem are used at particular points in time in the system. The list below refersonly to the logic in the back-end. Additional UI-relevant aspects are considered in the documentation for the UI enhancement.
- Starting the cProjects application
- All valid cProjects data and settings are loaded.
- All SAP and customer-specific subsystems are instantiated via IF_DPR_APPL_PLUG_IN_SUBSYSTEM~GET_INSTANCE and registered.
- Saving the current view
- All cProjects data is searched for changes. The method IF_DPR_APPL_PLUG_IN_SUBSYSTEM~HAS_CHANGES is called for this purpose for all SAP and customer-specific subsystems.
- If at least one change exists, all changed cProjects data is checked and prepared for the update. Themethod IF_DPR_APPL_PLUG_IN_SUBSYSTEM~PREPARE_TO_SAVE is called for this purpose for all SAP and customer-specific subsystems.
- If all checks ran correctly, all changed cProjects data is transferred to the update by calling theupdate function module IN UPDATE TASK. The method IF_DPR_APPL_PLUG_IN_SUBSYSTEM~SAVE is called for this purpose for all SAP and customer-specific subsystems.
- The back-end carries out a COMMIT WORK and the update LUW is started.
- If the update LUW has finished, all changed cProjects data is reset, that is, all changes that haveaccumulated since the last time the data was saved are initialized. The method IF_DPR_APPL_PLUG_IN_SUBSYSTEM~INITIALIZE_AFTER_SAVE is called for this purpose for all SAP and customer-specific subsystems.
- The user is still in the application
- Exiting the current view
- All cProjects data is searched for changes. The method IF_DPR_APPL_PLUG_IN_SUBSYSTEM~HAS_CHANGES is called for this purpose for all SAP and customer-defined subsystems.
- If at least one change exists, the confirmation prompt is processed and the action is either canceled, the update is started (2b) ff), or the system exits the application (3c)).
- All changed cProjects data is reset, that is the changes that have accumulated since the user last savedare initialized. The method IF_DPR_APPL_PLUG_IN_SUBSYSTEM~FREE is called for this purpose for all SAP and customer-specific subsystems.
Addresses (Business Address Services) General Data in Customer Master
This documentation is copyright by SAP AG.
Length: 7334 Date: 20120526 Time: 141026 triton ( 223 ms )






