cancel
Showing results for 
Search instead for 
Did you mean: 

How to check if SAPbobsCOM.Documents object represents draft?

0 Kudos
1,316

Hi folks,

I get the draft invoice in this way:

SAPbobsCOM.Documents oDoc = Company.GetBusinessObject( SAPbobsCOM.BoObjectTypes.oDrafts );
oDoc.GetByKey( docEntry );

Now, I want to check if object oDoc represetns draft or regular document.

After method GetByKey() property DocObjectCodeEx (and DocObjectCode too) return value 13 (and oInvoice).

m_felicella
Participant
View Entire Topic
vitor_vieira
Explorer
0 Kudos

Hi Przemyslaw,

You might still get a false positive i.e. there is actually a draft with the same DocEntry for the same DocType.

If the Draft is found I would also check if the BP codes and DocNum's match. This should reduce the probability of getting false positives.

Regards,

VV