Supported by

Add parameters to standard methods and functions

We are all aware of SAP implicit enhancements which allow you to add code to the top or bottom of any block of standard code (methods, functions, etc). We’ve all used it to make a change to a BAPI or other standard piece of code.

But only recently did I find that you can also use these implicit enhancements to add parameters to standard methods and functions.

While you’re in any parameter tab of SE37 or SE24 press the enhancement button (the spiral, the most beautiful SAP icon). You’ll get a dialog box asking for the enhancement name. Give it a name or choose an existing one and now you’re free to add whatever parameters you like. Look what I did:


Notice the new column on the right identifying to which enhancement the parameter belongs to.

The first thing that came to mind was adding missing parameters to a BADI buth then I remembered that, since a BADI is always invoked by standard code this would also have to be changed. Oh well.

And now off you go to add your own parameters to as many standard functions as you can.

Thank you Pierre Ameye for the tip.

Photo: James Marvin Phelps via Visual hunt / CC BY-NC

Greetings from Abapinho.

2 comentários a “Add parameters to standard methods and functions”

  1. Fred Diz:

    Mas, se o parâmetro for opcional não seria necessário corrigir os códigos-fontes standard que chamariam as funções, correto? No seu exemplo, eu não teria que corrigir todas as chamadas de KNA1_SINGLE_READ, adicionando o parametro ZNUNO?

  2. Nuno Godinho Diz:

    Fred, não é preciso corrigir nada porque os parâmetros criados desta forma são obrigatoriamente opcionais (como podes ver o parâmetro ZNUNO está criado como opcional).

Deixe um comentário

About Abapinho
Abapinho runs on WordPress
Articles (RSS) e Comments (RSS).