API Documents / Get By Key


Retrieves and sets the values of the object's properties by the object's absolute key from the Company database.

If serial numbers and batch numbers are set to the specified Document object lines, the returned object will contain references to these child objects.


Visual Basic
Public Function GetByKey( _
   ByVal AbsEntry As Long _
) As Boolean



For all types of documents, use the document entry key (DocEntry property).

Note: For Receipt for Production and Issue from Production documents (based on production orders) prior to release 2007, use the document number (DocNum property). Starting from release 2007 use the document entry key (DocEntry property).

Return Type

If the specified object is found, the method returns True and the properties of the object will be filled with object's data.

If the specified object is not found, the method returns False and the properties of the object remain unchanged.


To use this method you must specify the object key.

You can also use this method to find whether or not there is an object related to the key you specify.

If you do not know the object key, you can use the DataBrowser object to retreive an object using more complex queries.

See Also

Related information

Documents Documents Object· Table: OIGE OIGN
Documents is a business object that represents the header data of documents in the Marketing Documents and Receipts module and the Inventory and Production module of SAP Business One application. The source table for each document is according...

SAP® Business One is the trademark(s) or registered trademark(s) of SAP AG in Germany and in several other countries. Contact
This website is not affiliated with, maintained, authorized, endorsed or sponsored by SAP AG or any of its affiliates