cancel
Showing results for 
Search instead for 
Did you mean: 

DI API : create a Purchase-Request with Reference to a sales-order

Former Member
0 Kudos

Hi All,

     is it possible to create Purchase Request with reference to Sales-Order?

    

     I try to create but it show error code -10 and doesn't have error description.

     my code is below

oPRobject = DirectCast(Application.SBO_Application.Company.GetDICompany,SAPbobsCOM.Company).GetBusinessObject(SAPbobsCOM.BoObjectTypes.oPurchaseRequest)

                    oPRobject.DocDate = "07/29/2016"

                    oPRobject.TaxDate = "07/29/2016"

                    oPRobject.DocDueDate =  "07/29/2016"

                    oPRobject.RequriedDate =  "07/29/2016"

                  

                     oPRobject.Lines.SetCurrentLine(0)

                    oPRobject.Lines.ItemCode = "TestItem"

                    oPRobject.Lines.Quantity = 1

                    oPRobject.Lines.BaseType = 17

                    oPRobject.Lines.BaseEntry = docentry

                    oPRobject.Lines.BaseLine = linenum

                   oPRobject.Add()

     if i remove basetype,baseentry,baseline this code work fine.

     Anyone please help.

Thanks & Regard

Nut

Accepted Solutions (1)

Accepted Solutions (1)

edy_simon
Active Contributor
0 Kudos

Hi Nut,

AFAIK, linking a Sales Document to Purchase Document of any type is still not supported in DI API.


Regards

Edy

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Edy , Ankit

    Thanks for your Answer.

Regard

Nut

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

Unfortunately, this is a missing functionality to create a Purchase Order based on a Sales Order via DIAPI / DTW. Any of the wizards in SAP Business One is not exposed in DI API. I understand this may inconvenience you, however it is only possible to do this manually in SAP Business One application currently.


According to SAP Note 1028874 we would like to ask you to post your missing requirement in our SAP Business One IdeaPlace:

https://ideas.sap.com/SAPBusinessOne/


Kind regards,

ANKIT CHAUHAN

SAP Business One Global Support