Create vendor using BAPI
Create vendor using BAPI
CALL FUNCTION 'VENDOR_INSERT' "in update task
EXPORTING
i_lfa1
= i_lfa1 "Vendor Master: General data:- address,country etc
i_lfb1
= i_lfb1 "Vendor Master: Company data accounting information
i_lfm1
= i_lfm1 "Vendor Master: Purchasing Data (Purchasing organiz
ation)
TABLES
t_xlfas
= t_xlfas
t_xlfb5
= t_xlfb5
t_xlfbk
= t_xlfbk "Bank details
t_xlfza
= t_xlfza
T_XKNVK
= T_XKNVK
.
IF sy-subrc = 0.
COMMIT WORK.
*Vendor is created
ELSE.
* Error while creating vendor
ENDIF.
http://sapmatrix.blogspot.in/2011/12/sample-alv-report-with-hotspot.html