Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Creating Vendor using VMD_EI_API not possible

Hi,

We are developing a portal application so users can create vendors in a more friendly way.

Some users submit the request through the portal, the request is then validated using a workflow in ERP, and if accepted, using VMD_EI_API we create the vendor.

We are facing two issues, related to each other: after the approver approve the vendor, we use the VMD_EI_API class to create the vendor, the immediately return from this call is success (not true), the workflow approver stays confident everything worked fine, but later receive a message from the system with an error saying it was not possible to insert into table LFM1, and the work item already disappeared.

After analyzing the class VMD_EI_API, we found that the class uses BAPI VENDOR_CREATE in update task, meaning the creation process is not synchronous, the error is not explicit about the cause and is not also possible to recover the work item in order to correct the problem and retry.

Thanks

John

Former Member
Former Member replied

Hi John,

there is no BAPI to maintain vendors. Therefore, BAPI VENDOR_CREATE does not exists. I guess you talked about VENDOR_INSERT which is an update task function module.

Yes it is true the updates are done in update task.

You may have a look at the following statements, this may help with your current trouble.

  • COMMIT WORK AND WAIT

  • SET UPDATE TASK LOCAL

An other remark, if VENDOR_INSERT is failing on LFA1, this usually means that an other records is already existing for the same key (LIFNR)

Hope this helped

BR

Alain

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question