Enterprise Resource Planning Blogs by SAP
Get insights and updates about cloud ERP and RISE with SAP, SAP S/4HANA and SAP S/4HANA Cloud, and more enterprise management capabilities with SAP blog posts.
cancel
Showing results for 
Search instead for 
Did you mean: 
ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert
717
E-Books is a legal requirement in Greece for the electronic reporting submission of accounting and invoicing records to the government revenue authorities (AADE).

In SAP Business One, settings are available on the Electronic Documents tab of Document Settings (follow path Administration → System Initialization → Document Settings → Electronic Documents tab) to enable and set up E-Books.

For more information, you can refer to SAP Note 2845264.

E-Books related object is made available in DI API via EBooksService object. Here is how to use the same:

  • Get E-Books by Mark:


SAPbobsCOM.CompanyService oCompanyService = oCompany.GetCompanyService();
SAPbobsCOM.EBooksService oEBooksService = (SAPbobsCOM.EBooksService)oCompanyService.GetBusinessService(SAPbobsCOM.ServiceTypes.EBooksService);
SAPbobsCOM.EBooksParams oEBooksParams = (SAPbobsCOM.EBooksParams)oEBooksService.GetDataInterface(SAPbobsCOM.EBooksServiceDataInterfaces.ebkEBooksParams);
oEBooksParams.MARK = "400001830589128";
SAPbobsCOM.EBooks oEBooks = (SAPbobsCOM.EBooks)oEBooksService.GetDataInterface(SAPbobsCOM.EBooksServiceDataInterfaces.ebkEBooks);
oEBooks = oEBooksService.GetByMark(oEBooksParams);


  • Link E-Books to A/P Invoice:


SAPbobsCOM.CompanyService oCompanyService = oCompany.GetCompanyService();
SAPbobsCOM.EBooksService oEBooksService = (SAPbobsCOM.EBooksService)oCompanyService.GetBusinessService(SAPbobsCOM.ServiceTypes.EBooksService);
SAPbobsCOM.EBooksParams oEBooksParams = (SAPbobsCOM.EBooksParams)oEBooksService.GetDataInterface(SAPbobsCOM.EBooksServiceDataInterfaces.ebkEBooksParams);
oEBooksParams.MARK = "400000018439504";
SAPbobsCOM.EBooks oEBooks = (SAPbobsCOM.EBooks)oEBooksService.GetDataInterface(SAPbobsCOM.EBooksServiceDataInterfaces.ebkEBooks);
oEBooks = oEBooksService.GetByMark(oEBooksParams);
oEBooks.LinkedDocType = 18;
oEBooks.LinkedDocEntry = 1;
oEBooks.IsNegativeMark = SAPbobsCOM.BoYesNoEnum.tNO;
oEBooksService.Update(oEBooks);


  • Update Expense Classification for E-Books:


SAPbobsCOM.CompanyService oCompanyService = oCompany.GetCompanyService();
SAPbobsCOM.EBooksService oEBooksService = (SAPbobsCOM.EBooksService)oCompanyService.GetBusinessService(SAPbobsCOM.ServiceTypes.EBooksService);
SAPbobsCOM.EBooksParams oEBooksParams = (SAPbobsCOM.EBooksParams)oEBooksService.GetDataInterface(SAPbobsCOM.EBooksServiceDataInterfaces.ebkEBooksParams);
SAPbobsCOM.EBooks oEBooks = (SAPbobsCOM.EBooks)oEBooksService.GetDataInterface(SAPbobsCOM.EBooksServiceDataInterfaces.ebkEBooks);
oEBooksParams.MARK = "400000018439826";
oEBooks = oEBooksService.GetByMark(oEBooksParams);
SAPbobsCOM.EBooksLine oEBooksLine = oEBooks.EBooksLines.Item(0);
oEBooksLine.ExpenseClassificationCategory = -8;
oEBooksLine.ExpenseClassificationType = -73;
oEBooksLine.VatClassificationCategory = -5;
oEBooksLine.VatClassificationType = -41;
oEBooksLine = oEBooks.EBooksLines.Item(1);
oEBooksLine.ExpenseClassificationCategory = -6;
oEBooksLine.ExpenseClassificationType = -57;
oEBooksLine.VatClassificationCategory = -1;
oEBooksLine.VatClassificationType = -22;
oEBooksService.Update(oEBooks);


  • Clear Link for E-Books:


SAPbobsCOM.CompanyService oCompanyService = oCompany.GetCompanyService();
SAPbobsCOM.EBooksService oEBooksService = (SAPbobsCOM.EBooksService)oCompanyService.GetBusinessService(SAPbobsCOM.ServiceTypes.EBooksService);
SAPbobsCOM.EBooksParams oEBooksParams = (SAPbobsCOM.EBooksParams)oEBooksService.GetDataInterface(SAPbobsCOM.EBooksServiceDataInterfaces.ebkEBooksParams);
SAPbobsCOM.EBooks oEBooks = (SAPbobsCOM.EBooks)oEBooksService.GetDataInterface(SAPbobsCOM.EBooksServiceDataInterfaces.ebkEBooks);
oEBooksParams.MARK = "400000018449707";
oEBooks = oEBooksService.GetByMark(oEBooksParams);
oEBooks.LinkedDocType = 0;
oEBooksService.Update(oEBooks);