cancel
Showing results for 
Search instead for 
Did you mean: 

How Do I BoObjectTypes - oPurchaseRequest work?

0 Kudos

I am trying to insert data into Purchase Request using DI API.

These are 2 lines from the beginning of a method im working on.

SAPbobsCOM.Documents oPR;

oPR = (SAPbobsCOM.Documents)ZSBO.oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oPurchaseRequest);

I can't seem to assign BoObjectTypes.oPurchaseReuqest to oPR.

I only get an errror saying "Can't find the definition of oPurchaseRequest in SAPbobsCOM.BoObjectTypes".

Please help. Thanks in advance.

Accepted Solutions (0)

Answers (3)

Answers (3)

edy_simon
Active Contributor
0 Kudos

In your project,

Are you referencing SAPBusinessOneSDK.dll or directly DI API?

If you reference direct to DI API, does it work?

0 Kudos

referencing SDK dll

0 Kudos

I am using version 8.8.0.0 of interop.SAPbobsCOM if that's what you meant by SBO version. Thanks.

0 Kudos

This is SAP B1 9.3 version

edy_simon
Active Contributor
0 Kudos

Hi Christine,

May I know which SBO version are you using?
I have no error with your code.


Regards

Edy