2

I have almost 4 months learning/working in SAP. I've done several reports and enhancements all along this time but recently I began to work in a requirement which is related to Mobile Data Entry or RF and it basically consists to add the EAN and some other data to the dynpro 2502.

I made a copy of the dynpro 2502 in program SAPLLMOB into SAPLXLRF 9502, related the user exit MWMRF502 and programmed the basic functionality of it but it is not working as I expected because this exit is very limited and it only lets me import and export a small group of data and is difficult to perform exactly as the standard.

I've been searching all over internet and a lot of people make their own implementations and other just simply change the standard. I don't know how to make my own implementation cause I don't understand all the process within and the alternative of changing the standard code would be better for performance and time spent in development but as I quoted I would have to change the standard code and that's something I would like to do only if there's no other option.

But the question is ¿Is it OK to change the standard? ¿How often is the the standard code changed in SAP implementations? ¿What would be the better alternative?

Thanks in advance.

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
Nelson Miranda
  • 5,484
  • 5
  • 33
  • 54
  • 1
    Possible duplicate of [SAP R/3 package code modification](https://stackoverflow.com/questions/136726/sap-r-3-package-code-modification) – Sandra Rossi Oct 05 '19 at 14:34

3 Answers3

3

Always make sure that there's absolutely no other way to implement the functionality you need. If you're sure about that, then either write your own implementation from scratch, or simply change SAP's code. Just don't copy SAP's programs to the customer namespace, because I can guarantee you that that'll turn into a maintenance nightmare. You'll have to decide yourself whether the size of the change is worth the time building your own implementation, or changing SAP's.

If you decide to change SAP's code, keep in mind that all changes will pop up for review when the system is upgraded, which will take time to evaluate and adjust to the new SAP code.

René
  • 2,912
  • 1
  • 28
  • 46
  • I would amend this to say - cloning SAP program is OK if you're talking about something simple like a report. Cloning a data entry program is far more dangerous from a maintenance perspective. – Bryan Cain Jan 18 '12 at 17:01
  • 3
    Cloning is allmost never the correct approach. Patches, enhancement packs and upgrades will not be applied to your cloned objects, resulting in them to start to behave differently from the SAP standard, without the benefit of being able to use SAP tools like SPAU to find what have/should have changed. – Esti Jan 18 '12 at 20:56
3

You are asking the right sort of questions and it is good that you are not just plowing ahead without thinking about the consequences of what you are doing. Keep researching!

As far as changing the SAP standard goes, you generally do not want to copy an object to change it. For screens SAP quite often creates a user-exit with a sub-screen that can be modified by the customer. For Web-Dynpro you can use enhancement points and/or bADI's to extend the functionality.

Try to look for one of the following:

  • A SAP BAdI in the area that you want to change (transaction SE18),
  • a user-exit allowing you to change the necessary screen(s) (transaction SMOD),
  • explicit enhancement points within the functionality,
  • one of the implicit enhancement points in functionality

There are a lot of documentation on sdn.sap.com as well as within the SAP help regarding the topics above.

If none of are available, you may have no other choice but to modify (repair) the SAP standard objects. In order to be able to change the SAP standard you need to register the object(s) that you have to change on SAP OSS and get a repair key that the system needs to allow you to make changes. Always ensure that the SAP Modification Assistant is switched on when making changes, this will make your life a lot easier when you patch or upgrade your system.

If at all possible try to find an experienced ABAP programmer to help you with this.

Also see this question regarding changing SAP standard code:

Edit: Thomas Weiss on SDN has a helpful blog series on the enhancement and switch framework.

Suncatcher
  • 10,355
  • 10
  • 52
  • 90
Esti
  • 3,677
  • 8
  • 35
  • 57
  • Hi, thanks for the reply, SAP lets me create implicit enhancement for this, however it requires a key (which I entered) and now I could also modify the dynpro. If I continue and change all I need with implicit enhacements and modifying the dynpro, would this be considered as changing the standard? ¿Would be supported by SAP? – Nelson Miranda Jan 19 '12 at 16:34
  • 1
    According to the most recent maintencance agreement with SAP they actually have to support your entire system, even if you've made changes. However it is always best to keep your changes as isolated as possible. Changing the Screen will still be considered changing the standard, but as long as you use modification assistant, it is generally not a problem to upgrade later. Implicit enchancement points are supported by SAP, I believe they have a way to turn it off when troubleshooting if needed. Still, use it as sparingly as possible. – Esti Jan 19 '12 at 19:23
  • As an additional clarification: Did you need the key in order to change the screen, or to add the implicit enhancement point? Implicit enhancment points should be there already, thus requiring no repair key. – Esti Jan 19 '12 at 19:57
  • SAP asked me to enter a key when I tried to modify the screen. – Nelson Miranda Jan 19 '12 at 20:34
0

Your options are, from most to least desirable:

  1. Check the documentation of the application on help.sap.com for possible extensibility scenarios. There are many ways how SAP intends for you to customize their applications through various kinds of event architectures. Unfortunately any attempts by the various departments at SAP to agree on one event architecture and then stick to it failed. So you have user exits, BTEs, FQEVENTS, BAdIs, explicit enhancement spots and many more. If you want to know what's used by the application you need to change, RTM.
  2. Use an implicit enhancement spot. Enhancements are a great way to modify standard software in ways SAP did not anticipate, because they are easy to disable and usually pretty stable during upgrades (use the transaction SPAU_ENH after an upgrade to confirm that your enhancements still make sense in the new version of the program). You will find implicit enhancement spots at the beginning and end of every include and every kind of subroutine, which allows you to inject arbitrary ABAP code in these locations.
  3. But sometimes there just is no implicit enhancement spot where you need it to be. In that case you can copy the whole program into the customer-namespace and modify it. This gives you the freedom to do whatever you want with the program while still retaining the original program as a possible fall-back. It is usually a good idea to use as many components from the original program as possible, by including its includes or calling FORMs from the original program via PERFORM formname IN PROGRAM originalprogram. The main problem with this method is that after a new release, your program might no longer behave as expected. You will have to look at the new version of the program and see if there are any changes you need to port to your version. And there is nothing in the SAP standard that assists you with this maintenance task. So you are responsible to keep a list of all your copies of standard programs.
  4. Just modify the program directly. But this is really a last-resort option for programs that are too complex to copy into the customer-namespace. The problem with this is that it means SAP will no longer offer you support for that program. If you post a ticket about that program on launchpad.support.sap.com, and they find out you modified the program, they will assume it's your own fault and close the ticket. But fortunately, when you upgrade your system, you have the transaction SPAU that will help you to merge your changes with the new versions of the modified SAP programs.
Philipp
  • 67,764
  • 9
  • 118
  • 153