"
Etiqueta > enhancements
Supported by

Implicit enhancements in data structures

We have all used implicit enhancements to add code to the beginning or end of a standard function, form or method. But you may not know that it can also be used to add fields to data structures, whether they’re declared as TYPES or directly as DATA.

Ler o resto do artigo! »

Fix bug in SAP standard using an implicit enhancement

You just found a bug in a standard FORM (or FM or METHDO):


FORM EQUAL_VALUE CHANGING W_DATE TYPE SYDATUM.
  W_DATE = SY-DATUM - 1.
ENDFORM.

You report the error to SAP but you know it will take them several days, weeks or months to publish a correction. And you need it corrected right now.

You decide to act.

So you use the implicit enhancement at the start of the FORM to replace the standard code with your own (just until the correction arrives, of course):


FORM EQUAL_VALUE CHANGING W_DATE TYPE SYDATUM.
ENHANCEMENT...
* While the SAP standard says: W_DATE = SY-DATUM - 1.
  W_DATE = SY-DATUM - 2.
  EXIT. "salta fora
ENDENHANCEMENT
W_DATE = SY-DATUM - 1.
ENDFORM.

I know, it’s not elegant. But you just solved your urgent problem.

Thank you Pierre Ameye for the tip.

Thank you Sherri Lynn Wood for the photo.

Greetings from Abapinho.

Good program to find user-exits

Every now and then we’ll be looking for user-exits and BADIs, BTEs and the like. SAP doesn’t help. But programs appear here and there, almost always called Z_USEREXIT, which help with this unappreciated search. Recently I learned of another one. I share it here because it is the best I have ever seen:

http://wiki.sdn.sap.com/wiki/display/Snippets/Find+User-exits,+BADIs,+BTEs,+Etc+by+TCode+or+Program

Thanks to Bruno Esperança for the tip.
And thank you rverscha for the photo.

Greetings from Abapinho.

Implementing private methods in BADIs

A little while ago I had an idea as eccentric as it was amazing that today I have decided to share here, namely, how to create private methods in BADI classes.

Let me explain.

Ler o resto do artigo! »


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