Application Development 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: 

Adding fields to Vendor Master not saving.

0 Kudos
328

I'm currently trying to add some custom fields to the Vendor Master using this guide here.

https://blogs.sap.com/2012/11/27/adding-customer-fields-in-vendor-master/

Fields show up fine but I seem to be having accessing the fields from the Badi Implementations? After clicking the new tab the fields show up, but it doesn't populate the fields based on what's in the vendor table LFA-1. Same goes for saving data, if I go to save it doesn't seem to save the data to LFA-1. Ideas on what might be wrong? If I try to reference the checkbox (WA_ISO) it can not see the fields. Am I missing something?

SET Method

method IF_EX_VENDOR_ADD_DATA_CS~SET_DATA.
  CALL FUNCTION 'Z_SET_COMPLIANCE_VENDOR'
    EXPORTING
      iv_ZISO = I_LFA1-ZISO_14001.
endmethod.<br>

SET Function

FUNCTION Z_SET_COMPLIANCE_VENDOR.
*"----------------------------------------------------------------------
*"*"Local Interface:
*"  IMPORTING
*"     REFERENCE(IV_ZISO) TYPE  LFA1-ZISO_14001
*"----------------------------------------------------------------------

  LFA1-ZISO_14001 = IV_ZISO.  "set here

ENDFUNCTION.<br>

Get Method

method IF_EX_VENDOR_ADD_DATA_CS~GET_DATA.
  DATA: lv_ZISO TYPE LFA1-ZISO_14001.

  CALL FUNCTION 'Z_GET_COMPLIANCE_VENDOR'
  IMPORTING
  ev_ZISO = lv_ZISO.

  S_LFA1-ZISO_14001 = lv_ZISO.

endmethod.<br>

Get Function

FUNCTION Z_GET_COMPLIANCE_VENDOR.
*"----------------------------------------------------------------------
*"*"Local Interface:
*"  EXPORTING
*"     REFERENCE(EV_ZISO) TYPE  LFA1-ZISO_14001
*"----------------------------------------------------------------------
ev_ZISO = LFA1-ZISO_14001.  "set here
ENDFUNCTION.<br>
2 REPLIES 2

thkolz
Contributor
0 Kudos
251

Did you also implement method GET_TAXI_SCREEN?

And are your dynpro fields called the same as IF_EX_VENDOR_ADD_DATA_CS~GET_DATA?

0 Kudos
251

Here is my Get Taxi Screen.

method IF_EX_VENDOR_ADD_DATA_CS~GET_TAXI_SCREEN.
  IF flt_val = 'ZC'
    AND i_taxi_fcode = 'ZMM_ZC'.
    e_screen = '9000'.
    e_program = 'SAPLZMM_ZC'.
    e_headerscreen_layout = ''.
  ENDIF.
endmethod.