Updating Master data using Query
Business Scenario :
Most of the time it is necessary for the business users to maintain Master data in the BI system. It might not always be the case that all the users have enough technical background to logon to the BI system to perform the master data updates. Thus it is necessary for an easy solution through which we empower the users with the option to update master data.
Solution Overview :
Master Data can be updated in the BI system in an indirect way by using the Bex Queries. The Solution approach is as follows:
- Create a Query on the Master data that needs to be Updated (The Master Data must be enabled as an infoprovider under its Masterdata/texts Property)
- Create a text variable for Updating the key part of the Master data and one text variable each for any attributes that need to be updated all of type Ready for Input
- Create a Customer Exit Variable type text Variable.
- Use these variables in the Query where ever required ( can be used in the Query title or in Keyfigure / Structure descriptions)
- In the i_step = 2 Customer Exit logic of the Customer Exit variable, read the Input ready variables. Pass on the values to the standard function module RSDMD_WRITE_ATTRIBUTES_TEXTS to update the master data.
- call the function module RSDMD_MD_ACTIVATE to activate the master data.
- When ever the Query is Executed, the Input Ready Text variables are shown in the Selection screen of the Query.
- Once Filled in and we click OK, the customer Exit variable invokes the code written to update the masterdata thus updating it.
Step by Step Approach :
1. User Inputs the New Master data for Market in text variable.
2. The user Executes the Query
3. The Query Execution triggers the Customer Exit variable in the Query
4. The Customer Exit variable invokes the ABAP logic used in the Customer Exit in cmod enhancements for Customer Exit Variables
5. The Function Modules RSDMD_WRITE_ATTRIBUTES_TEXTS and RSDMD_MD_ACTIVATE used in the logic will update the master data with the values Input in the Selection screen