Skip to Content
Author's profile photo Nabheet Madan

Z Copy of a Standard SAP report..Do we really need to?

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.

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Naimesh Patel
      Naimesh Patel
      Hello Nabheet,

      What you have demonstrated here would ONLY work if SAP has provided Explicit Enhancement Points. There are tons of reports, which were not upgraded by SAP to include the Explicit Enhancement Points.

      You would argue that, we can use Implicit Enhancement. I agree that we can use Implicit Enh., if the code is wrapped in the FM, Subroutine, Methods (no need to mention the OO ABAP when talking about the old school programs) or Includes. Majority of times, SAP didn't care to put the Selection Screen in any wrapper, which makes it impossible to enhance using Implicit Enhancements. If you are not able to enhance your Selection Screen, then there is no point of performing remaining steps - data selection & display as they are irrelevant.

      We still have to wait till SAP upgrades all OLD programs to certain points where you can plug-&-play. Till the time, you might need to copy the std program and modify based on your needs.

      Naimesh Patel

      Author's profile photo Nabheet Madan
      Nabheet Madan
      Blog Post Author
      Thanks Naimesh for your feedback. I do agree with you that is why i have mentioned this will not work always. Idea was based on observing 2-3 tcodes like VF03 and VFX3. Thanks for your feedback. Nabheet
      Author's profile photo Naimesh Patel
      Naimesh Patel
      Hello Nabheet,

      I know that you mentioned:
      > 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..
      On a contrary the mentioned approach would only work when enhancement capabilities are available - which are not yet many.

      Naimesh Patel

      Author's profile photo Nabheet Madan
      Nabheet Madan
      Blog Post Author
      Totally justified...but found in few so thought of blogging about one of the way. Thanks man


      Author's profile photo Former Member
      Former Member
      This matter has been discussed over and over again. Personally, I don' t agree on the necessity of copying standard programs. Doing a copy just for sake of introducing another selection screen parameter is imho like taking a sledgehammer to crack a nut.

      What about modifications. Simply modify the standard with an enhancement spot - this approach has been demonstrated many times and proven quite useful.

      As long as you have a modification, you're at least aware of leaving standard programs processing logic. With Z-copies of complete programs - and in the systems i' ve worked there were uncountable of them - you completele loose touch with sap standard, which you pay a fortune for.

      Z-programs, Z-forms, Z here, Z there, one Z necessitates another - and one completely forgets about the sums you pay SAP for maintaining their programs.

      Old school approaches like Z-copies have made lots of SAP systems unmaintainable - and upgrade even more painful as if there would have been modifications carried out.

      Modifications are, of course, the harder way - with lots of internal procedures to justify them. Z-copies neither track attention nor disturb anybody immediatly, but they' ll break your neck sooner or later.

      Author's profile photo Graham Robinson
      Graham Robinson
      Hi Nabheet,

      thanks for blogging about this.

      While it is true that many of the old SAP programs do not have enhancement points defined that is no excuse for not looking for them.

      ABAPers should always look for suitable enhancement spots, BADIs, etc. before resorting to creating Z objects.

      Graham Robbo

      Author's profile photo Nabheet Madan
      Nabheet Madan
      Blog Post Author
      Thanks Grahamfoe your encouraging words. That is what the idea was of it.
      Author's profile photo Former Member
      Former Member

      Yes Nabheet, Thanks for bringing this BLOG upfront.

      • Just to add this is just one way of Approaching to this Enhancement,that we have come across is the Concept of BTE business transactions Events ( FIBF ) or VOFM routines.So far so we had involved ourselves into :

                     Function exits , menu exits or screen exits.

      • But some how now as in we Dive deep into the pool of SAP-SCN there are certain tasks which are now easily approachable by BTE's for e.g:

                          Trigger IDOC Using BTE on Material_Change

                          Validation and BTE in SAP_FICO, what we do with Substitutions and                     validations.

      • Enhancements in Standard WEB dynpro Componenets by means of PRE,POST and Overwrite exits.

      So true, there are miles to go ...Hopefully will try to publish them soon................

      Author's profile photo Former Member
      Former Member

      Cloning SAP programs and whacking and hacking the code is, IMHO, usually an indication of an inexperienced programmer.  But, that said, sometimes a report just won't do what the user needs.  In those cases, rather than copy the SAP program and try to change it, I believe that the better approach is to review the SAP report program in question, noting usable function modules, methods, tables, etc., and write, simply and precisely, what the business requires. 

      Before jumping into adding enhancements to an SAP report program, I would suggest a search for SAP Notes on the subject.  In some cases, SAP has provided a way to add fields to a report, an example of which is SAP Note 350068, regarding addition of fields to report transaction VA05.  If there's nothing there, then the whole arsenal of tools available to modify the behavior or results of a program are indeed a possible solution.

      Author's profile photo Madhu Vadlamani
      Madhu Vadlamani

      Hi Nabheet,

      Good idea.I agree with you.I feel this ia good approach.If sap provides a standard methods it is better to use this.This wont create any issue in case of upgrade.


      Madhu. 🙂

      Author's profile photo nilesh shrivastava
      nilesh shrivastava

      hi nabheet,

      Its a good idea that make change if possible. i am new. how to open that screen. supose i have to add these fields to get ob and cl balance in gl account.



      thanks and regards

      Author's profile photo Andrea Olivieri
      Andrea Olivieri

      Good one Nabheet,

      I noticed only now your nice blog, a practical example of how the developers might avoid creating clones using the enhancement-points.

      I created a link to your blog in The Attack of the Clones - Episode 2.