Skip to Content
0
Former Member
Feb 13, 2009 at 12:28 PM

RVIVAUFT Program Enhancement - ERP 6.0

85 Views

Hi,

I have a requirement to enhance RVIVAUFT program to fill-in vbrp-aubel field value in ERP 6.0. Below is the code sequence in the program. Please note that my custom code is in ENHANCEMENT 3 ZES_RVIVAUFT.

...
...
SELECT * FROM vbrp
            WHERE  vbeln  EQ  sel_vbrk_tab-vbeln.
...
ENHANCEMENT-POINT RVIVAUFT_20 SPOTS ES_RVIVAUFT STATIC.
ENHANCEMENT 1  MGV_MATNR_LAMA_RVIVAUFT.    "active version
****** DI note 737418 for long material number **********************
        data: l_matnr_int TYPE materialid-matnr_int,
              l_matnr_ext TYPE materialid-matnr_ext,
              len type i.
ENDENHANCEMENT.

* prepare material number
            IF NOT vbrp-matnr IS INITIAL.
ENHANCEMENT-SECTION     RVIVAUFT_21 SPOTS ES_RVIVAUFT.
              CALL FUNCTION 'CONVERSION_EXIT_MATN1_OUTPUT'
                EXPORTING
                  input  = vbrp-matnr
                IMPORTING
                  output = vbrp-matnr.
END-ENHANCEMENT-SECTION.

ENHANCEMENT 2  MGV_MATNR_LAMA_RVIVAUFT.    "active version
*
*{   REPLACE        ALIK011534                                        1
*\              CALL FUNCTION 'CONVERSION_EXIT_MATN1_OUTPUT'
*\                EXPORTING
*\                  input  = vbrp-matnr
*\                IMPORTING
*\                  output = vbrp-matnr.
****** DI note 737418 for long material number **********************
              l_matnr_int = vbrp-matnr.

              CALL FUNCTION 'CONVERSION_EXIT_MATN1_OUTPUT'
                EXPORTING
                  input  = l_matnr_int
                IMPORTING
                  output = l_matnr_ext.
             len = strlen( l_matnr_ext ).
             if len le 18.
               vbrp-matnr = l_matnr_ext.
             endif.
ENDENHANCEMENT.


ENHANCEMENT 3  ZES_RVIVAUFT.    "active version
             IF vbrp-aubel IS INITIAL.
               vbrp-aubel = vbrp-vgbel.
               vbrp-aupos = vbrp-vgpos.
             ENDIF.
ENDENHANCEMENT.
....
ENDSELECT.

I added ENHANCEMENT 3 ZES_RVIVAUFT. But, SAP skips the ENHANCEMENT-SECTION RVIVAUFT_21 SPOTS ES_RVIVAUFT code after I added my Enhancement. I can put the same code in my Enhancement and make it work but I do not want to do that because if SAP changes their Enhancement, then the code in my Enhancement will never get updated! So, I want to add my code as an addition and not as a replacement.

Also, ENHANCEMENT 2 MGV_MATNR_LAMA_RVIVAUFT is not getting executed when I debug.

I was thinking of creating Enhancement using the ENHANCEMENT-POINT. But, the problem is..it is defined as STATIC. So, I am guessing I can do data declarations only in it.

Any help on the best way to achieve my requirement is appreciated!

Thanks.