Hi,
As seen ubove, the best solution is to use class VMD_EI_API. check it in se24
I used it to create vendors and it works wonderfully.
This really acts like a BAPI.
If I remember well, you have to initialize the vendor with method INITIALIZE.
Fill your structure IS_MASTER_DATA, it contains every data you need to update.
HEADER Types VMDS_EI_HEADER => Contains the vendor number
CENTRAL_DATA Types VMDS_EI_CENTRAL_DATA => Contains most of the vendor data (LFA1)
COMPANY_DATA Types VMDS_EI_VMD_COMPANY = > Contains most of the compagny data (LFB1)
PURCHASING_DATA Types VMDS_EI_VMD_PURCHASING => Contains most of the purchasing organization data (LFM1)
If you use specific fields, you simply need to had it to the includes.
Then call method MAINTAIN_BAPI with them.