biuan SAP® BUSINESS ONE SDK
API Documents
Documents Object

Description

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 to the document type as follows:

  • Documents(oInvoices) - OINV
  • Documents(oCorrectionInvoice) - OCSI
  • Documents(oCorrectionInvoiceReversal) - OCSV
  • Documents(oCreditNotes) - ORIN
  • Documents(oDeliveryNotes) - ODLN
  • Documents(oReturns) - ORDN
  • Documents(oOrders) - ORDR
  • Documents(oQuotations) - OQUT
  • Documents(oPurchaseInvoices) - OPCH
  • Documents(oCorrectionPurchaseInvoice) - OCPI
  • Documents(oCorrectionPurchaseInvoiceReversal) - OCPV
  • Documents(oPurchaseCreditNotes) - ORPC
  • Documents(oPurchaseDeliveryNotes) - OPDN
  • Documents(oPurchaseReturns) - ORPD
  • Documents(oPurchaseOrders) - OPOR
  • Documents(oPurchaseQuotations) - OPQT
  • Documents(oPurchaseRequests) - OPRQ
  • Documents(oInventoryGenEntry) - OIGN
  • Documents(oInventoryGenExit) - OIGE
  • Documents(oDrafts) - ODRF
  • Documents(oDownPaymentAP) - ODPO
  • Documents(oDownPaymentAR) - ODPI

Object Model

Remarks

Mandatory fields in SAP Business One: CardCode and ItemCode (from Document_Lines object).

To create a draft document (oDraft) also set the document object type (DocObjectCode).

To display the form in the application:

  • For OINV table, select Sales - A/R --> A/R Invoice.
  • For ORIN table, select Sales - A/R --> A/R Credit Memo.
  • For ODLN table, select Sales - A/R --> Delivery.
  • For ORDN table, select Sales - A/R --> Returns.
  • For ORDR table, select Sales - A/R --> Order.
  • For OQUT table, select Sales - A/R --> Quotation.
  • For OPCH table, select Purchasing - A/P --> A/P Invoice.
  • For ORPC table, select Purchasing - A/P --> A/P Credit Memo.
  • For OPDN table, select Purchasing - A/P --> Goods Receipt PO.
  • For ORPD table, select Purchasing - A/P --> Goods Returns.
  • For OPOR table, select Purchasing - A/P --> A/R Invoice.
  • For OPQT table, select Purchasing - A/P --> Purchase Quotation.
  • For OIGN table, select Inventory --> Inventory Transactions --> Goods Receipt.
    Or, in case of receipt from production, select Production --> Receipt from Production (see ProductionOrders).
  • For OIGE table, select Inventory --> Inventory Transactions --> Goods Issue.
    Or, in case of issue for production, select Production --> Issue for Production (see ProductionOrders).
  • For ODRF table, select Sales - A/R (or Purchasing - A/P) --> Document Draft. Set your selection criteria, and click OK.

Example

See Also

SAP® B1 DI-API C# definition

public class DocumentsClass : IDocuments, Documents { public virtual string Address { get; set; } public virtual string Address2 { get; set; } public virtual SAPbobsCOM.AddressExtension AddressExtension { get; } public virtual string AgentCode { get; set; } public virtual int AnnualInvoiceDeclarationReference { get; set; } public virtual BoYesNoEnum ApplyCurrentVATRatesForDownPaymentsToDraw { get; set; } public virtual BoYesNoEnum ApplyTaxOnFirstInstallment { get; set; } public virtual BoYesNoEnum ArchiveNonremovableSalesQuotation { get; set; } public virtual DateTime AssetValueDate { get; set; } public virtual string ATDocumentType { get; set; } public virtual int AttachmentEntry { get; set; } public virtual string AuthorizationCode { get; set; } public virtual DocumentAuthorizationStatusEnum AuthorizationStatus { get; } public virtual double BaseAmount { get; } public virtual double BaseAmountFC { get; } public virtual double BaseAmountSC { get; } public virtual BoYesNoEnum BillOfExchangeReserved { get; } public virtual int BlanketAgreementNumber { get; set; } public virtual BoYesNoEnum BlockDunning { get; set; } public virtual string Box1099 { get; set; } public virtual string BPChannelCode { get; set; } public virtual int BPChannelContact { get; set; } public virtual int BPL_IDAssignedToInvoice { get; set; } public virtual string BPLName { get; } public virtual DataBrowser Browser { get; } public virtual DateTime CancelDate { get; set; } public virtual BoYesNoEnum Cancelled { get; } public virtual CancelStatusEnum CancelStatus { get; } public virtual string CardCode { get; set; } public virtual string CardName { get; set; } public virtual int CashDiscountDateOffset { get; set; } public virtual string CentralBankIndicator { get; set; } public virtual string CertificationNumber { get; } public virtual DateTime ClosingDate { get; set; } public virtual ClosingOptionEnum ClosingOption { get; set; } public virtual string ClosingRemarks { get; set; } public virtual string Comments { get; set; } public virtual BoYesNoEnum Confirmed { get; set; } public virtual int ContactPersonCode { get; set; } public virtual string ControlAccount { get; set; } public virtual BoYesNoEnum CreateOnlineQuotation { get; set; } public virtual DateTime CreationDate { get; } public virtual BoYesNoEnum DeferredTax { get; set; } public virtual double DiscountPercent { get; set; } public virtual string DocCurrency { get; set; } public virtual DateTime DocDate { get; set; } public virtual DateTime DocDueDate { get; set; } public virtual int DocEntry { get; } public virtual int DocNum { get; set; } public virtual BoObjectTypes DocObjectCode { get; set; } public virtual string DocObjectCodeEx { get; set; } public virtual double DocRate { get; set; } public virtual DateTime DocTime { get; set; } public virtual double DocTotal { get; set; } public virtual double DocTotalFc { get; set; } public virtual double DocTotalSys { get; } public virtual BoDocumentTypes DocType { get; set; } public virtual SAPbobsCOM.Document_ApprovalRequests Document_ApprovalRequests { get; } public virtual DocumentDeliveryTypeEnum DocumentDelivery { get; set; } public virtual int DocumentsOwner { get; set; } public virtual BoStatus DocumentStatus { get; } public virtual BoDocumentSubType DocumentSubType { get; set; } public virtual double DownPayment { get; set; } public virtual double DownPaymentAmount { get; set; } public virtual double DownPaymentAmountFC { get; set; } public virtual double DownPaymentAmountSC { get; set; } public virtual double DownPaymentPercentage { get; set; } public virtual BoSoStatus DownPaymentStatus { get; set; } public virtual SAPbobsCOM.DownPaymentsToDraw DownPaymentsToDraw { get; } public virtual DownPaymentTypeEnum DownPaymentType { get; set; } public virtual string EDocErrorCode { get; set; } public virtual string EDocErrorMessage { get; set; } public virtual int EDocExportFormat { get; set; } public virtual EDocGenerationTypeEnum EDocGenerationType { get; set; } public virtual string EDocNum { get; set; } public virtual int EDocSeries { get; set; } public virtual EDocStatusEnum EDocStatus { get; set; } public virtual string ElecCommMessage { get; } public virtual ElecCommStatusEnum ElecCommStatus { get; set; } public virtual DateTime EndDeliveryDate { get; set; } public virtual DateTime EndDeliveryTime { get; set; } public virtual string ETaxNumber { get; set; } public virtual int ETaxWebSite { get; set; } public virtual DateTime ExemptionValidityDateFrom { get; set; } public virtual DateTime ExemptionValidityDateTo { get; set; } public virtual DocumentsAdditionalExpenses Expenses { get; } public virtual string ExternalCorrectedDocNum { get; set; } public virtual int ExtraDays { get; set; } public virtual int ExtraMonth { get; set; } public virtual string FederalTaxID { get; set; } public virtual int FinancialPeriod { get; } public virtual string FiscalDocNum { get; set; } public virtual int FolioNumber { get; set; } public virtual int FolioNumberFrom { get; set; } public virtual int FolioNumberTo { get; set; } public virtual string FolioPrefixString { get; set; } public virtual int Form1099 { get; set; } public virtual BoYesNoEnum GroupHandWritten { get; set; } public virtual int GroupNumber { get; set; } public virtual int GroupSeries { get; set; } public virtual int GTSChecker { get; set; } public virtual int GTSPayee { get; set; } public virtual BoYesNoEnum HandWritten { get; set; } public virtual int ImportFileNum { get; set; } public virtual string Indicator { get; set; } public virtual Document_Installments Installments { get; } public virtual BoYesNoEnum InsuranceOperation347 { get; set; } public virtual BoInterimDocTypes InterimType { get; set; } public virtual int InternalCorrectedDocNum { get; set; } public virtual BoYesNoEnum IsAlteration { get; set; } public virtual BoYesNoEnum IsPayToBank { get; set; } public virtual string JournalMemo { get; set; } public virtual int LanguageCode { get; set; } public virtual FolioLetterEnum Letter { get; set; } public virtual Document_Lines Lines { get; } public virtual string ManualNumber { get; set; } public virtual BoYesNoEnum MaximumCashDiscount { get; set; } public virtual BoYesNoEnum NetProcedure { get; } public virtual int NextCorrectingDocument { get; } public virtual BoYesNoEnum NTSApproved { get; set; } public virtual string NTSApprovedNumber { get; set; } public virtual string NumAtCard { get; set; } public virtual int NumberOfInstallments { get; set; } public virtual BoYesNoEnum OpenForLandedCosts { get; set; } public virtual string OpeningRemarks { get; set; } public virtual DocumentPackages Packages { get; } public virtual BoYesNoEnum PartialSupply { get; set; } public virtual BoYesNoEnum PaymentBlock { get; set; } public virtual int PaymentBlockEntry { get; set; } public virtual int PaymentGroupCode { get; set; } public virtual string PaymentMethod { get; set; } public virtual string PaymentReference { get; set; } public virtual string PayToBankAccountNo { get; set; } public virtual string PayToBankBranch { get; set; } public virtual string PayToBankCode { get; set; } public virtual string PayToBankCountry { get; set; } public virtual string PayToCode { get; set; } public virtual string PeriodIndicator { get; } public virtual BoYesNoEnum Pick { get; set; } public virtual string PickRemark { get; set; } public virtual BoYesNoEnum PickStatus { get; } public virtual string PointOfIssueCode { get; set; } public virtual int POSCashierNumber { get; set; } public virtual int POSDailySummaryNo { get; set; } public virtual string POSEquipmentNumber { get; set; } public virtual string POSManufacturerSerialNumber { get; set; } public virtual int POSReceiptNo { get; set; } public virtual PrintStatusEnum Printed { get; set; } public virtual BoYesNoEnum PrintSEPADirect { get; set; } public virtual int PrivateKeyVersion { get; } public virtual string Project { get; set; } public virtual int Receiver { get; set; } public virtual string Reference1 { get; set; } public virtual string Reference2 { get; set; } public virtual int RelatedEntry { get; set; } public virtual int RelatedType { get; set; } public virtual int Releaser { get; set; } public virtual BoYesNoEnum RelevantToGTS { get; set; } public virtual BoYesNoEnum ReopenManuallyClosedOrCanceledDocument { get; set; } public virtual BoYesNoEnum ReopenOriginalDocument { get; set; } public virtual int ReqType { get; set; } public virtual string Requester { get; set; } public virtual int RequesterBranch { get; set; } public virtual int RequesterDepartment { get; set; } public virtual string RequesterEmail { get; set; } public virtual string RequesterName { get; set; } public virtual DateTime RequriedDate { get; set; } public virtual BoYesNoEnum Reserve { get; } public virtual BoYesNoEnum ReserveInvoice { get; set; } public virtual BoYesNoEnum ReuseDocumentNum { get; set; } public virtual BoYesNoEnum ReuseNotaFiscalNum { get; set; } public virtual BoYesNoEnum RevisionPo { get; set; } public virtual BoYesNoEnum Rounding { get; set; } public virtual double RoundingDiffAmount { get; set; } public virtual double RoundingDiffAmountFC { get; } public virtual double RoundingDiffAmountSC { get; } public virtual int SalesPersonCode { get; set; } public virtual int Segment { get; } public virtual BoYesNoEnum SendNotification { get; set; } public virtual int SequenceCode { get; set; } public virtual string SequenceModel { get; set; } public virtual int SequenceSerial { get; set; } public virtual int Series { get; set; } public virtual string SeriesString { get; set; } public virtual double ServiceGrossProfitPercent { get; set; } public virtual string ShipToCode { get; set; } public virtual BoYesNoEnum ShowSCN { get; set; } public virtual string SignatureDigest { get; } public virtual string SignatureInputMessage { get; } public virtual Document_SpecialLines SpecialLines { get; } public virtual DateTime SpecifiedClosingDate { get; set; } public virtual DateTime StartDeliveryDate { get; set; } public virtual DateTime StartDeliveryTime { get; set; } public virtual BoPayTermDueTypes StartFrom { get; set; } public virtual BoYesNoEnum Submitted { get; } public virtual string SubSeriesString { get; set; } public virtual BoDocSummaryTypes SummeryType { get; set; } public virtual string Supplier { get; set; } public virtual DateTime TaxDate { get; set; } public virtual string TaxExemptionLetterNum { get; set; } public virtual SAPbobsCOM.TaxExtension TaxExtension { get; } public virtual double TotalDiscount { get; } public virtual double TotalDiscountFC { get; } public virtual double TotalDiscountSC { get; } public virtual double TotalEqualizationTax { get; } public virtual double TotalEqualizationTaxFC { get; } public virtual double TotalEqualizationTaxSC { get; } public virtual string TrackingNumber { get; set; } public virtual int TransNum { get; } public virtual int TransportationCode { get; set; } public virtual DateTime UpdateDate { get; } public virtual BoYesNoEnum UseCorrectionVATGroup { get; set; } public virtual SAPbobsCOM.UserFields UserFields { get; } public virtual BoYesNoEnum UseShpdGoodsAct { get; set; } public virtual DateTime VatDate { get; set; } public virtual double VatPercent { get; set; } public virtual string VATRegNum { get; } public virtual double VatSum { get; } public virtual double VatSumFc { get; } public virtual double VatSumSys { get; } public virtual string VehiclePlate { get; set; } public virtual BoDocWhsUpdateTypes WareHouseUpdateType { get; set; } public virtual SAPbobsCOM.WithholdingTaxData WithholdingTaxData { get; } public virtual double WTAmount { get; } public virtual double WTAmountFC { get; } public virtual double WTAmountSC { get; } public virtual double WTApplied { get; } public virtual double WTAppliedFC { get; } public virtual double WTAppliedSC { get; } public virtual double WTExemptedAmount { get; } public virtual double WTExemptedAmountFC { get; } public virtual double WTExemptedAmountSC { get; } public virtual double WTNonSubjectAmount { get; } public virtual double WTNonSubjectAmountFC { get; } public virtual double WTNonSubjectAmountSC { get; } public extern DocumentsClass(); public virtual extern int Add(); public virtual extern int Cancel(); public virtual extern int Close(); public virtual extern Documents CreateCancellationDocument(); public virtual extern int GetApprovalTemplates(); public virtual extern string GetAsXML(); public virtual extern bool GetByKey(int AbsEntry); public virtual extern int HandleApprovalRequest(); public virtual extern int Remove(); public virtual extern int Reopen(); public virtual extern int SaveDraftToDocument(); public virtual extern void SaveToFile( string FileName); public virtual extern void SaveXML( ref string FileName); public virtual extern int Update(); public virtual extern int UpdateFromXML( string FileName); }

Related information


Documents Additional Expenses DocumentsAdditionalExpenses Object
DocumentsAdditionalExpenses is a child object of Documents object and represents the documents of additional expenses in the Marketing Documents module. The source table for each document is according to the document type as follows: INV3, RIN3,...
   Parent: Documents Documents Object· Table: OIGE OIGN

Document Lines Document_Lines Object· Table: IGE1 IGN1
Document_Lines is a child object of Documents object and represents the line entries of a document in the Marketing Documents and Receipts module and the Inventory and Production module. The source table for each document is according to the...
   Parent: Documents Documents Object· Table: OIGE OIGN

Document Installments Document_Installments Object
A child object of Documents object representing the installments feature in marketing documents. Source tables:  INV6, OPCH6.
   Parent: Documents Documents Object· Table: OIGE OIGN

Document Packages DocumentPackages Object
This object holds a collection of packaging types you can attach to items in Delivery or A/R Invoice documents. Access this object via Documents.Packages property. Source tables: DLN7, DLN8, INV7, INV8.
   Parent: Documents Documents Object· Table: OIGE OIGN

Document Approval Requests Document_ApprovalRequests Object· Table: OWDDV
Documents_ApprovalRequests is a child object of the Documents object. You can set the remarks field of the approval request. Source table: OWDDV.
   Parent: Documents Documents Object· Table: OIGE OIGN

Tax Extension TaxExtension Object· Table: IGE12 IGN12
TaxExtension is a child object of the Documents object. It stores fiscal IDs of marketing documents. Every marketing document has a set of fiscal IDs. The TaxExtension object is applicable for cluster B (country-specific for Brazil and...
   Parent: Documents Documents Object· Table: OIGE OIGN

Address Extension AddressExtension Object· Table: INV12 IGE12 IGN12
The Bill To and Ship To address for a marketing document. Source table: INV12
   Parent: Documents Documents Object· Table: OIGE OIGN


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