05-17-2012 9:37 PM
I am working with program RM07MLBS (Display Warehouse Stocks for Material)
Is there a way to deactive an enhancement section? I need to replace this SELECT statement with one of my own. Any help is greatly appreciated on how to accomplish this.
ENHANCEMENT-SECTION EHP604_RM07MLBS_20 SPOTS ES_RM07MLBS .
SELECT mspr~matnr mspr~werks lgort charg mspr~sobkz mspr~pspnr
prlab prins prspe prein kzbws
INTO (collector-matnr, collector-werks, collector-lgort,
collector-charg, collector-sobkz,
collector-pspnr,
collector-labst, collector-insme, collector-speme,
collector-einme, collector-kzbws)
FROM mspr INNER JOIN mssq
ON mspr~matnr = mssq~matnr
AND mspr~werks = mssq~werks
AND mspr~sobkz = mssq~sobkz
AND mspr~pspnr = mssq~pspnr
FOR ALL ENTRIES IN t_mat
WHERE mspr~matnr = t_mat-matnr
AND mspr~werks = t_mat-werks
AND mspr~lgort IN lgort
AND mspr~charg IN charg.
PERFORM f2000_collect_collector.
ENDSELECT.
END-ENHANCEMENT-SECTION.
05-17-2012 10:28 PM
Hi Megan,
You can create/implement enhancement to replace SELECT statement.
To do that, check this: http://wiki.sdn.sap.com/wiki/display/ABAP/The+new+Enhancement+Framework+and+the+new+kernel-based+BAd...
05-17-2012 11:15 PM
Hello Megan,
One enhancement section can have exactly one active implementation. And the code inside that of the enhancement section will be replaced/substituted by a source code plug-in as soon as one is provided.
First you need to click on "Enhance" option in the File MenuBar and then you must "Create Enhancement".
Regards,
Shyam
05-18-2012 2:25 PM
I am able to create an Implicit Enhancement Point. But the code will be after this SELECT statement. I want to replace this SELECT statement. So this won't work.
05-18-2012 11:15 AM
Hi,
If you want to Deactivate your Enhancement Section.
Right Click on Enhancement Section name--->Enhancements--->Undo option.
05-18-2012 2:23 PM
This is a standard SAP program RM07MLBS and the Enhancement Spot is ES_RM07MLBS. It will not allow me to Undo Option. The error message returned is
05-18-2012 11:32 AM
Hello go to se19 and delete after you undo the changes.
Thanks
Vijay
05-18-2012 11:53 AM
05-18-2012 12:23 PM
Hi Megan,
In order to deactivate the enhancement, just go to report and press Enhance ( shift+ F4) button on Application tool bar and then just place cursor on Enhancement which you want to deactivate , right click and follow the path Enhancement Immplimentation -> Undo implimentation .
Now activate your report.
Best Regards,
Sachin
05-18-2012 2:24 PM
I am unable to Undo Implementation. Please take a look at program RM07MLBS, line 1424. This is a enhancement section provided by SAP.
05-23-2012 2:55 PM
Hi Megan
As Tuncay said you can replace the enhancement section by implementing an enhancement for this section.
If you right click on the enhancement line
ENHANCEMENT-SECTION EHP604_RM07MLBS_20 SPOTS ES_RM07MLBS and create an enhancement implementation, the source code within the enhancement section will be copied to a block that can be edited - and when you activate the enhancement, your own code will replace the SAP standard code. Your code block will be visible in the code right after the END-ENHANCEMENT-SECTION command.
However as Subrahmanya said, you can have exactly only one active implementation of an enhancement section and in this case you may experience that SAP already have implemented the enhancement in the industry solution /CWM/ and in this case you may have a conflict, but only if this industry solution is active in your system. You will see this if the lines after END-ENHANCEMENT-SECTION is similar to this:
*$*$-Start: EHP604_RM07MLBS_20------------------------------------------------------------------$*$*
ENHANCEMENT 20 /CWM/APPL_MM_RM07MLBS_EHP4. "active version
In this case you can not replace the enhancement, but maybe you can implement some code that will remove or modify the collector tabel.
Even if you have a conflict, I'm sure some work-around will be possible.