4-SAP-Additional Tab For Vendors In BP (Business Partner) Transaction - Part IV


...Previous (Part III)

Step 12: Next, navigate to Business Partner->Control->Events->Business Data Toolset.  Three events (function modules) needs to be created respectively for events ISDAT, XCHNG, DSAVB.

·       ISDAT Event - Read Data (Owner Application) (FM : ZMM_LFA1_EVENT_ISDAT)
·       XCHNG Event - Check whether data was changed (FM: ZMM_LFA1_EVENT_XCHNG)
·       DSAVB Event - Collect Data (in Owner Applications) (FM: ZMM_LFA1_EVENT_DSAVB)

Important note: Create a structure 'ZSMM_LFA1_S001' with all the custom fields that you have created in used in FM 'CVIV_BUPA_LFA1_COLLECT'.

Create all the three FM’s in the same function group as created earlier.

FUNCTION zmm_lfa1_event_isdat.
*"----------------------------------------------------------------------
*"*"Local Interface:
*"----------------------------------------------------------------------

  CALL FUNCTION 'CVIV_BUPA_LFA1_GET'
    IMPORTING
      e_lfa1 = gs_lfa1.

  lfa1-zzforeign_vend = gs_lfa1-zzforeign_vend.
  lfa1-zzcertificate  = gs_lfa1-zzcertificate.
  lfa1-zzvalid_from   = gs_lfa1-zzvalid_from.
  lfa1-zzvalid_to     = gs_lfa1-zzvalid_to.

ENDFUNCTION.


FUNCTION zmm_lfa1_event_xchng.
*"----------------------------------------------------------------------
*"*"Local Interface:
*"  EXPORTING
*"     REFERENCE(E_XCHNG) TYPE  BOOLE_D
*"----------------------------------------------------------------------

  IF gs_lfa1-zzforeign_vend NE lfa1-zzforeign_vend.
    e_xchng = 'X'.
  ENDIF.

  IF gs_lfa1-zzcertificate NE lfa1-zzcertificate.
    e_xchng = 'X'.
  ENDIF.

  IF gs_lfa1-zzvalid_from NE lfa1-zzvalid_from.
    e_xchng = 'X'.
  ENDIF.

  IF gs_lfa1-zzvalid_to NE lfa1-zzvalid_to.
    e_xchng = 'X'.
  ENDIF.

ENDFUNCTION.


FUNCTION zmm_lfa1_event_dsavb.
*"----------------------------------------------------------------------
*"*"Local Interface:
*"----------------------------------------------------------------------
  DATA : ls_lfa1 TYPE lfa1.
  ls_lfa1 = lfa1.
  MOVE-CORRESPONDING gs_lfa1 TO lfa1.
  lfa1-zzforeign_vend = ls_lfa1-zzforeign_vend.
  lfa1-zzcertificate  = ls_lfa1-zzcertificate.
  lfa1-zzvalid_from   = ls_lfa1-zzvalid_from.
  lfa1-zzvalid_to     = ls_lfa1-zzvalid_to.

  CALL FUNCTION 'CVIV_BUPA_LFA1_COLLECT'
    EXPORTING
      i_subname = 'ZSMM_LFA1_S001'
      i_lfa1    = lfa1.

ENDFUNCTION.



Now go back to Events. Select XCHNG event and double click on Event-> Function Modules and maintain the function module ZMM_LFA1_EVENT_XCHNG as shown below.



Repeat the same steps for DSAVB event and maintain function module ZMM_LFA1_EVENT_DSAVB as shown below.


That’s the end of all steps required to add additional tab in Business partner (Vendors). Now you will be able to see and maintain data in the additional tab as shown below.


...Previo        us (Part III)