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
1,173
ImportDeterminationService in SAP Business One DI API enables you to add, update, get and delete Import Determination data in Electronic Documents Import Setup window.

It is a part of the Electronic Document Import Wizard. The Electronic Document Import Wizard provides dedicated functionality for importing electronic documents to the system.

In SAP Business One, you can access it using Main Menu → Purchasing - A/P → Electronic Documents Import Wizard.

Below are some samples which you might find useful when using ImportDeterminationService in SAP Business One DI API:

  • Add a new Import Determination:


SAPbobsCOM.CompanyService oCompanyService = oCompany.GetCompanyService();
ImportDeterminationService oImportDeterminationService = oCompanyService.GetBusinessService(SAPbobsCOM.ServiceTypes.ImportDeterminationService);
ImportDetermination oImportDetermination = oImportDeterminationService.GetDataInterface(ImportDeterminationServiceDataInterfaces.idsImportDetermination);
oImportDetermination.Code = ElectronicDocProtocolCodeStrEnum.edpcs_PEPPOL;
oImportDetermination.LineNumber = 4;
oImportDetermination.ObjectType = ((int)BoObjectTypes.oPurchaseCreditNotes).ToString();
oImportDetermination.ObjectTypeXPath = "?object_type_xpath";
oImportDetermination.FieldType = ImportFieldTypeEnum.iftFederalTaxID;
oImportDetermination.FieldTypeXPath = "field_type_xpath";
oImportDetermination.ImportFormat = -12; //eDoc PEPPOL - Credit Note Import (System);
oImportDetermination.DefaultDigitalSeries = 72;
oImportDeterminationService.AddDetermination(oImportDetermination);


  • Update an existing Import Determination:


SAPbobsCOM.CompanyService oCompanyService = oCompany.GetCompanyService();
ImportDeterminationService oImportDeterminationService = oCompanyService.GetBusinessService(SAPbobsCOM.ServiceTypes.ImportDeterminationService);
ImportDeterminationParams oImportDeterminationParams = oImportDeterminationService.GetDataInterface(ImportDeterminationServiceDataInterfaces.idsImportDeterminationParams);
oImportDeterminationParams.Code = ElectronicDocProtocolCodeStrEnum.edpcs_PEPPOL;
oImportDeterminationParams.AbsEntry = 9;
ImportDetermination oImportDetermination = oImportDeterminationService.GetDetermination(oImportDeterminationParams);
oImportDetermination.FieldType = ImportFieldTypeEnum.iftUnifiedFederalTaxID;
oImportDeterminationService.UpdateDetermination(oImportDetermination);


  • Retrieve all available Import Determinations:


SAPbobsCOM.CompanyService oCompanyService = oCompany.GetCompanyService();
ImportDeterminationService oImportDeterminationService = oCompanyService.GetBusinessService(SAPbobsCOM.ServiceTypes.ImportDeterminationService);
ImportDeterminationsParams oImportDeterminationsParams = oImportDeterminationService.GetDataInterface(ImportDeterminationServiceDataInterfaces.idsImportDeterminationsParams);
ImportDeterminationsCollection oImportDeterminations = (ImportDeterminationsCollection)oImportDeterminationService.GetDeterminations(oImportDeterminationsParams);

for (int i = 0; i < oImportDeterminations.Count; ++i)
{
var ImportDetermination = oImportDeterminations.Item(i);
var AbsEntry = ImportDetermination.AbsEntry;
var Code = ImportDetermination.Code;
var LineNumber = ImportDetermination.LineNumber;
var ObjectType = ImportDetermination.ObjectType;
var ObjectTypeXPath = ImportDetermination.ObjectTypeXPath;
var FieldType = ImportDetermination.FieldType;
var FieldTypeXPath = ImportDetermination.FieldTypeXPath;
var ImportFormat = ImportDetermination.ImportFormat;
var DefaultDigitalSeries = ImportDetermination.DefaultDigitalSeries;
}


  • Delete an Import Determination:


SAPbobsCOM.CompanyService oCompanyService = oCompany.GetCompanyService();
ImportDeterminationService oImportDeterminationService = oCompanyService.GetBusinessService(SAPbobsCOM.ServiceTypes.ImportDeterminationService);
ImportDeterminationParams oImportDeterminationParams = oImportDeterminationService.GetDataInterface(ImportDeterminationServiceDataInterfaces.idsImportDeterminationParams);
oImportDeterminationParams.Code = ElectronicDocProtocolCodeStrEnum.edpcs_PEPPOL;
oImportDeterminationParams.AbsEntry = 9;
ImportDetermination oImportDetermination = oImportDeterminationService.GetDetermination(oImportDeterminationParams);
oImportDeterminationService.DeleteDetermination(oImportDeterminationParams);
3 Comments