‎2007 Oct 03 7:57 PM
Hi,
I am working in ECC6 and in program SAPMF02K, SAP defined an Enhancement-Section in Form CHECK_REPRUE.
ENHANCEMENT-SECTION CHECK_REPRUE_01 SPOTS ES_MF02KFMC INCLUDE BOUND.
IF ( LFM1-XERSY = 'X' OR
LFM1-XNBWY = 'X' OR " RR 11.11.99
LFM1-XERSR = 'X' ) AND
LFM1-WEBRE IS INITIAL.
MESSAGE W146(WY).
Automatische WE-Abrechnung erfordert auch WE-bezogene Rechnungsprüfu
ENDIF.
END-ENHANCEMENT-SECTION.
They also created and enhancement for this enchancement section:
ENHANCEMENT 2 DIMP_GENERAL_MF02KFMC. "active version
IF ( LFM1-XERSY = 'X' OR
LFM1-XNBWY = 'X' OR " RR 11.11.99
LFM1-XERSR = 'X' ) AND
LFM1-WEBRE IS INITIAL.
MESSAGE W146(WY).
Automatische WE-Abrechnung erfordert auch WE-bezogene Rechnungsprüfu
ENDIF.
ENDENHANCEMENT.
Our business has decided that they do not want this warning message to display, so I created a replacement of the SAP enchancement by right clicking on the SAP supplied enhancement, choosing Enhancement Implementation->Replace. I then inserted my replacement code saved and pressed activate enhancement.
ENHANCEMENT 1 ZZ_ES_REPRUE01. "active version "replacing DIMP_GENERAL_MF02KFMC
IF ( LFM1-XERSY = 'X' OR
LFM1-XNBWY = 'X' OR " RR 11.11.99
LFM1-XERSR = 'X' ) AND
LFM1-WEBRE IS INITIAL.
MESSAGE W146(WY).
Automatische WE-Abrechnung erfordert auch WE-bezogene Rechnungsprüfu
ENDIF.
ENDENHANCEMENT.
Everything activated fine, but when I run the program I still get the warning. I stepped through it in debug and my replacement enhancement does not seem to have replaced the SAP code. I already read all 5 blogs that Thomas Weiss wrote about Enhancement Framework, the help files, and the other PDFs that are listed on
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/webcontent/uuid/2342e1f3-0b01-0010-a186-fdd40...
Am I missing something? I was wondering about if I need to set a switch in SFW1 or the other switch framework transactions, but nothing seems evident. Please let me know if I am missing something.
Thanks in advance,
Gregg
PS. As I noted, I already read the documents, blogs, and help files listed above, so please do not post a reponse listing those as answers since I have already read them.
‎2007 Oct 04 1:37 PM
I fixed my issue but I wanted to let others know the solution.
After messing around with this for a long time, I double clicked on the enhancement ID of the SAP supplied enhancement that I was trying to replace which was DIMP_GENERAL_MF02KFMC (Enhancement definition line is shown below).
ENHANCEMENT 2 DIMP_GENERAL_MF02KFMC
When I looked in the properties tab for this enhancement, I noticed that it was switched off. The switch was DIMP_GENERAL. I went to SFW1 to see what all was included in this switch, but I decided that I did not was to turn this switch on. So then I removed my enhancement that I replaced the SAP supplied enhancement and created an new enhancement. This time I created it directly from the enhancement-point and saved and activated. When I ran it, my enhancement code was executed.
So the learning here is do not try to replace an existing enhancement unless you have confirmed that it is actually switched on. If the existing enhancement is not switched on, create your enhancement directly for the enhancement-section instead of replacing the existing enhancement.
Good luck to all.
Gregg