Business objective/ requirements:
Develop a report which validates master data (in our exampe: Material Master). The error validations are defined by user and could keep adding up and are highly-customizable. For eg: A Material in plant A with material type XX should have Profit center populated.
Analyzing the requirements & business needs, it was felt that error checks might get added or changed frequently. Standard reporting with hard coded checks would work but would need code changes very frequently.
Advantages / Features:
1) Validation routines are generated by reading configuration tables and do not need Tech / ABAP effort to add new checks.
2) Design can be extended to other master data related validations.
3) Fields can be extracted & added for display by configuration – no programming effort required for new fields.
4) Programming effort minimized – majority of the code is generated from validations created by business / users.
On a high-level:
Step 1) The design has a table to allow users to specify which fields in the table will be used for display and / or validations. (Note: The table is prepared with all the required table fields as table entries, for eg: all fiels from MARA, MARC, MBEW, MVKE for the required material master report)
Step 2) After selecting the fields on the step above, the users run the Structure generation program. This generates all the dictionary structures required for the report which extracts data & does the validation. The generation program generates structures for each table (like: MARA, MARC..) and one structure which contains all the fields selected (either for display / validation).
Step 3) The user then enters formulas for doing validations on the material master records.
Step 4) User will then run program to generate the validation routines.
Generated code looks like this:
Step 5) Run the report program. The program selects only fields that are required for display or validation (as defined in step 1), runs through the validation routines generated in step 4.
Further enhancements being worked on:
1) Making the tool more dynamic to write the data retrieval logic based on conditions and joins defined by user.
2) Extending it to any kind of master data.
Any comments on making this tool more helpful & robust will be highly appreciated.