SAP CUSTOM_VENDOR_SAVE Function Module for Allows the user to act after the vendor save









CUSTOM_VENDOR_SAVE is a standard custom vendor save SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Allows the user to act after the vendor save processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.


See here to view full function module documentation and code listing for custom vendor save FM, simply by entering the name CUSTOM_VENDOR_SAVE into the relevant SAP transaction such as SE37 or SE38.

Function Group: MASS_MNT_USER_EXIT
Program Name: SAPLMASS_MNT_USER_EXIT
Main Program:
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function CUSTOM_VENDOR_SAVE pattern details

In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.
CALL FUNCTION 'CUSTOM_VENDOR_SAVE'"Allows the user to act after the vendor save
EXPORTING
I_LFA1 = "Vendor Master (General Section)
I_LFM1 = "Vendor master record purchasing organization data
SAVE_LFM2 = "Says if save should be done
UPDATE_ME = "Says if Infrec and MARC records should be updated
T_X_LFM2 = "Change document structure; generated by RSSCD000
T_Y_LFM2 = "Change document structure; generated by RSSCD000

CHANGING
TOTAL_EINE = "
TOTAL_MARC = "
LFM2_ERR = "Change document structure; generated by RSSCD000
ERR_MSG = "EHS: Application Log; Interface for APPL_LOG_WRITE_MESSAG
.



IMPORTING Parameters details for CUSTOM_VENDOR_SAVE

I_LFA1 - Vendor Master (General Section)

Data type: LFA1
Optional: No
Call by Reference: Yes

I_LFM1 - Vendor master record purchasing organization data

Data type: LFM1
Optional: No
Call by Reference: Yes

SAVE_LFM2 - Says if save should be done

Data type: FLAG
Optional: No
Call by Reference: Yes

UPDATE_ME - Says if Infrec and MARC records should be updated

Data type: FLAG
Optional: No
Call by Reference: Yes

T_X_LFM2 - Change document structure; generated by RSSCD000

Data type: FLFM2_TAB
Optional: No
Call by Reference: Yes

T_Y_LFM2 - Change document structure; generated by RSSCD000

Data type: FLFM2_TAB
Optional: No
Call by Reference: Yes

CHANGING Parameters details for CUSTOM_VENDOR_SAVE

TOTAL_EINE -

Data type: I
Optional: No
Call by Reference: Yes

TOTAL_MARC -

Data type: I
Optional: No
Call by Reference: Yes

LFM2_ERR - Change document structure; generated by RSSCD000

Data type: LFM2_TAB
Optional: No
Call by Reference: Yes

ERR_MSG - EHS: Application Log; Interface for APPL_LOG_WRITE_MESSAG

Data type: MASS_BALMI_TAB
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for CUSTOM_VENDOR_SAVE Function Module

The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.

DATA:
lv_i_lfa1  TYPE LFA1, "   
lv_total_eine  TYPE I, "   
lv_i_lfm1  TYPE LFM1, "   
lv_total_marc  TYPE I, "   
lv_lfm2_err  TYPE LFM2_TAB, "   
lv_save_lfm2  TYPE FLAG, "   
lv_err_msg  TYPE MASS_BALMI_TAB, "   
lv_update_me  TYPE FLAG, "   
lv_t_x_lfm2  TYPE FLFM2_TAB, "   
lv_t_y_lfm2  TYPE FLFM2_TAB. "   

  CALL FUNCTION 'CUSTOM_VENDOR_SAVE'  "Allows the user to act after the vendor save
    EXPORTING
         I_LFA1 = lv_i_lfa1
         I_LFM1 = lv_i_lfm1
         SAVE_LFM2 = lv_save_lfm2
         UPDATE_ME = lv_update_me
         T_X_LFM2 = lv_t_x_lfm2
         T_Y_LFM2 = lv_t_y_lfm2
    CHANGING
         TOTAL_EINE = lv_total_eine
         TOTAL_MARC = lv_total_marc
         LFM2_ERR = lv_lfm2_err
         ERR_MSG = lv_err_msg
. " CUSTOM_VENDOR_SAVE




ABAP code using 7.40 inline data declarations to call FM CUSTOM_VENDOR_SAVE

The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.

 
 
 
 
 
 
 
 
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!