I have decided to write this blog after I saw there are various queries getting raised like how to enhance VF04 or VFX3 etc standard reports. Most of the time requirement is to add some more fields in selection screen and then displaying some more fields in output.
The idea is to show here that SAP has provided us with so much flexibility now days in most of the cases. There is almost no need to create a Z copy of standard report. In earlier version I do agree sometimes there were no options except Z copy but now after SAP has introduced the enhancement framework there is almost no need to make a Z copy of standard one leaving a few which depends on case to case basis.
Note: Please note that this blog provide a simple roadmap of how to handle such requirements not the exact solution. We will be talking here more about approach. Also note that this approach will not be successful always but in many of the cases it will be. I am not trying to rule out the possibility of doing it through BADI’s also if they are available please use them.
So let’s say our requirement is to add fields in a standard SAP report ABC as an example. Then in output also add some fields. I will like to divide this task into small small steps and take them one by one.
- Add fields in Selection Screen
If you just look into the report source code most of the time you will SAP has provided us ENHANCEMENT-POINTS in selection screen declaration. You can use them to add fields to the screen by creating there implementation. Simple way to add fields
- Validate Selection screen fields.
Again so many enhancement points are provided or you can search for an implicit one depending on the need.
- Add Logic to Process the data for our requirement
SAP standard now a days has provided lot enhancement points to modify the processing for the same so choose any and implement it.
- Modify the output display
Most of the time SAP is using standard database structure to display output. You can simply create an append structure and add your fields to it. In case field catalog is getting made using REUSE_ALV_FIELDCATALOG_MERGE then no need to worry else a simple place where this is filled you just to do an implicit if now new option is there.