Skip to Content

How can we show custom datasources under LBWE?

Feb 08, 2017 at 09:59 AM


avatar image

Hello gurus,

We need your expert advice...we currently have custom fields (eg. ZZAUDAT) and campaign ID which are not showing delta when there are any changes in ERP.

We have updated MCVBAK with the fields using append and not .INCLUDE, but looking at lbwe the fields are still not showing. I noticed that those which were added by the previous consultants to VBAK are seen in LBWE but understand this would be risky given it's an SAP SD table.

Can you please advise?

1) how to update ZZAUDAT in LBWE if we've already included in MCVBAK?

Steps we plan to follow:

We have already verified ROOSOURCE and it shows the correct details as per blog below:

2) is it advisable to update TMCEXCFS? what are the possible impact?

3) if we do update VBAK directly as advised below as last option, what are watchouts needed?

We are avoiding creating a generic datasource because it would again require initialization which we don't have time for. we are ok with just updating future transactions with the delta changes for the following fields.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Shanthi Bhaskar Feb 08, 2017 at 08:47 PM

Hi Kenneth,

I had fallowed the same link few years back, and I could able to succeed in triggering the delta, I had enhanced MC* and then wrote the user exit as shown below.

*&                         Declaration
TYPES: BEGIN OF lty_deltafields,
       ebeln TYPE ekpo-ebeln,
       ebelp TYPE ekpo-ebelp,
       revlv TYPE ekpo-revlv,
       emlif TYPE ekpo-emlif,
       END OF lty_deltafields.

DATA: lt_deltafields TYPE STANDARD TABLE OF lty_deltafields,
      ls_deltafields TYPE lty_deltafields,
      lv_ebeln TYPE ekpo-ebeln,
      lv_ebelp TYPE ekpo-ebelp,
      old_val(50) TYPE c.

               <fs_revlv> TYPE ekpo-revlv,
               <fs_emlif> TYPE ekpo-emlif,
               <fs_ebeln> TYPE ekpo-ebeln,
               <fs_ebelp> TYPE ekpo-ebelp,
               <fs_fieldname> TYPE ANY,
               <fs_workarea> TYPE ANY.

*&                       Main Program

IF zeitp = 'MA'.   "MA : Purchase order

  "Processing Before Image record
                                                  WHERE ebeln = xmcekpo-ebeln.

  IF sy-subrc NE 0.
    "Do Nothing.

  IF xmcekpo-supkz = 2.
    " Reading the Transaction data from ME22N
    MOVE '(SAPLEINS)T_EKPO[]' TO old_val.
    ASSIGN (old_val) TO <fs>.

    LOOP AT <fs> ASSIGNING <fs_workarea>.

      ASSIGN COMPONENT 'REVLV' OF STRUCTURE <fs_workarea> TO <fs_revlv>.
      xmcekpo-zzrevlv = <fs_revlv>.

      ASSIGN COMPONENT 'EMLIF' OF STRUCTURE <fs_workarea> TO <fs_emlif>.
      xmcekpo-zzemlif = <fs_emlif>.

      ASSIGN COMPONENT 'EBELN' OF STRUCTURE <fs_workarea> TO <fs_ebeln>.
      lv_ebeln = <fs_ebeln>.

      ASSIGN COMPONENT 'EBELP' OF STRUCTURE <fs_workarea> TO <fs_ebelp>.
      lv_ebelp = <fs_ebelp>.

      " Modifying the After Image Record
      MODIFY xmcekpo TRANSPORTING zzrevlv zzemlif WHERE  ebeln = lv_ebeln
                                                  AND    ebelp = lv_ebelp
                                                          AND   supkz = 2.

      READ TABLE LT_DELTAFIELDS INTO ls_deltafields with key ebeln = lv_ebeln
                                                             ebelp = lv_ebelp.
      if sy-subrc eq 0.
        xmcekpo-zzrevlv = ls_deltafields-revlv.
        xmcekpo-zzemlif = ls_deltafields-emlif.
      " Modifying the Before Image Record so that ROCANCEL field is filled with X
      MODIFY xmcekpo TRANSPORTING zzrevlv zzemlif WHERE  ebeln = lv_ebeln
                                                  AND    ebelp = lv_ebelp
                                                  AND    supkz = 1.

      CLEAR: ls_deltafields, lv_ebeln, lv_ebelp.

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hello Shanti,

Thanks for the swift response! To clarify, after updating mcvbak and updating the user exit,the fields showed in lbwe?