Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding Implicit Enhancement

deepak_dhamat
Active Contributor
0 Kudos
371

Hi,

I have created Implicit enhancement   for  TCODE : MD62 .

In that  we  are changing planned requirment  , during that  we are updating customer field

  i.e we have added  one zzcustomer field  in PBIM Standard table  . so we are  updating that zzcustomer field  using  iMPLICIT ENHANCEMENT

in Include which i am implimenting Implicit Enhancement  is  LM60EF0B

FORM BELEG_SICHERN USING  P_SYNC P_COMMIT

                   CHANGING SUBRC.

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$\SE:(1) Form BELEG_SICHERN, Start                                                                                                                         A

*$*$-Start: (1)---------------------------------------------------------------------------------$*$*

ENHANCEMENT ZGET_PBIM.    "active version

*



    types  begin of w_pbim  .

           include STRUCTURE pbim  .

  types  :   end of w_pbim  .



  DATA : IT_XPBPT  TYPE STANDARD TABLE OF PBPT WITH HEADER LINE .

*  DATA : IT_XPBET TYPE STANDARD TABLE OF  XPBET WITH HEADER LINE .

  data   : it_pbim  type STANDARD TABLE OF w_pbim WITH HEADER LINE .



      IT_XPBPT[] = XPBPT[] .





   DELETE  IT_XPBPT  WHERE UPDKZ <> 'U' .



  select * from pbim

    into   CORRESPONDING FIELDS OF TABLE it_pbim

    for ALL ENTRIES IN IT_XPBPT

    where zzcustomer is not null

          and werks  = IT_XPBPT-werks

          and MATNR  = IT_XPBPT-matNR

          and pbdnr it_xpbpt-pbdnr .







ENDENHANCEMENT.

*$*$-End:   (1)---------------------------------------------------------------------------------$*$*



  SUBRC = 0.



  CALL FUNCTION 'REQUIREMENTS_SAVE'

       EXPORTING

            ESYNCRON = P_SYNC

            ECOMMIT  = P_COMMIT

       EXCEPTIONS

            OTHERS   = 1.

  IF SY-SUBRC NE 0.

    SUBRC = 4.

  ENDIF.

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$\SE:(2) Form BELEG_SICHERN, End                                                                                                                           A

*$*$-Start: (2)---------------------------------------------------------------------------------$*$*

ENHANCEMENT ZUPDATE_PBIM.    "active version



  if sy-tcode = 'MD62' .



data wa_pbim like  it_pbim  .





  loop at it_pbim into wa_pbim .



  update pbim

      set   zzcustomer = wa_pbim-zzcustomer

      where MATNR    wa_pbim-matnr

        and WERKS    wa_pbim-werks

        and BEDAE    = wa_pbim-bedae

        and VERSB    = wa_pbim-versb  .





clear wa_pbim  .



ENDLOOP.

*

if sy-subrc = 0 .

**

commit work .

*

endif.



ENDIF.



REFRESH IT_XPBPT[].

CLEAR   IT_XPBPT.



REFRESH  IT_PBIM  .

CLEAR IT_PBIM  .

ENDENHANCEMENT.

*$*$-End:   (2)---------------------------------------------------------------------------------$*$*

ENDFORM.                               " BELEG_SICHERN

MY problem is  :  THis code works fine  in Debug Mode   , but when i remove debug mode  this Implicit enhancement  does not get triggered  .

regards

Deepak.

1 ACCEPTED SOLUTION

deepak_dhamat
Active Contributor
0 Kudos
245

Hi,

Problem  is   solved .

By using 


wait up to 3 SECONDS.

Before updating PBIM table  .

1 REPLY 1

deepak_dhamat
Active Contributor
0 Kudos
246

Hi,

Problem  is   solved .

By using 


wait up to 3 SECONDS.

Before updating PBIM table  .