Skip to Content
Product Information

Customs Cargo Declaration (CCD) in SAP Business One DI API

According to Russia regulations, imported goods cannot be placed on the market until the shipment has been declared, duties and taxes have been paid, and the customs authorities have granted clearance. The declaration form used for all customs declarations is the Customs Cargo Declaration.

The customs authority assigns each custom cargo declaration a reference number used to register the declaration at the processing customs office. The clearance is confirmed when a special customs release stamp (“release permitted”) is placed on the customs cargo declaration.

How to use CCD in SAP Business One DI API:

  • Tracking CCD Information:

All information related to the Customs Cargo Declaration (CCD) is entered into the CCD
Tracking Note. To add a new CCD number, perform the following:

In the SAP Business One Main Menu, choose Purchasing – A/P → CCD Tracking Note.
The CCD Tracking Note window appears.

You can add the data to this window (having Direct Import option) using SAP Business One DI API as below:

SAPbobsCOM.CompanyService oCompanyService = oCompany.GetCompanyService();
SAPbobsCOM.TrackingNotesService oTrackingNotesService = (SAPbobsCOM.TrackingNotesService)oCompanyService.GetBusinessService(SAPbobsCOM.ServiceTypes.TrackingNotesService);
SAPbobsCOM.TrackingNote oTrackingNote = oTrackingNotesService.GetDataInterface(SAPbobsCOM.TrackingNotesServiceDataInterfaces.tnsTrackingNote);
oTrackingNote.CCDNumber = "01/120413/447";
oTrackingNote.Date = DateTime.Today;
oTrackingNote.IsDirectImport = SAPbobsCOM.BoYesNoEnum.tYES;
var TrackingNoteItemCollection = oTrackingNote.TrackingNoteItemCollection.Add();
TrackingNoteItemCollection.ItemCCDNumber = "005";
TrackingNoteItemCollection.ItemCode = "ITEM005";
TrackingNoteItemCollection.Quantity = 120;
TrackingNoteItemCollection.CountryOfOrigin = "AU";
TrackingNoteItemCollection.CustomsGroupCode = -1;
TrackingNoteItemCollection = oTrackingNote.TrackingNoteItemCollection.Add();
TrackingNoteItemCollection.ItemCCDNumber = "006";
TrackingNoteItemCollection.ItemCode = "ITEM006";
TrackingNoteItemCollection.Quantity = 130;
TrackingNoteItemCollection.CountryOfOrigin = "AU";
TrackingNoteItemCollection.CustomsGroupCode = -1;
var BrokersCollection = oTrackingNote.TrackingNoteBrokerCollection.Add();
BrokersCollection.BPCode = "C20000";
BrokersCollection.AgreementNumber = 1;
oTrackingNotesService.Add(oTrackingNote);
  • Update CCD Tracking Note Information using SAP Business One DI API:
SAPbobsCOM.TrackingNotesService oTrackingNotesService = (SAPbobsCOM.TrackingNotesService)oCompanyService.GetBusinessService(SAPbobsCOM.ServiceTypes.TrackingNotesService);
SAPbobsCOM.TrackingNote oTrackingNote = oTrackingNotesService.GetDataInterface(SAPbobsCOM.TrackingNotesServiceDataInterfaces.tnsTrackingNote);
var TrackingNoteParams = oTrackingNotesService.GetDataInterface(SAPbobsCOM.TrackingNotesServiceDataInterfaces.tnsTrackingNoteParams) as SAPbobsCOM.TrackingNoteParams;
TrackingNoteParams.TrackingNoteNumber = 6;
oTrackingNote = oTrackingNotesService.Get(TrackingNoteParams);
oTrackingNote.CustomsTerminal = "1234";
oTrackingNotesService.Update(oTrackingNote);
  • Once you have the data for the CCD Tracking Note (Direct Import), you can add Inventory Opening Balance along with the CCD Tracking Notes information using SAP Business One DI API as below:
SAPbobsCOM.InventoryOpeningBalancesService oInventoryOpeningBalancesService = oCompany.GetCompanyService().GetBusinessService(SAPbobsCOM.ServiceTypes.InventoryOpeningBalancesService);
SAPbobsCOM.InventoryOpeningBalance oInventoryOpeningBalance = (SAPbobsCOM.InventoryOpeningBalance)oInventoryOpeningBalancesService.GetDataInterface(SAPbobsCOM.InventoryOpeningBalancesServiceDataInterfaces.iobsInventoryOpeningBalance);
SAPbobsCOM.InventoryOpeningBalanceLine oInventoryOpeningBalanceLine;
SAPbobsCOM.InventoryOpeningBalanceCCDNumber oInventoryOpeningBalanceCCDNumber;
SAPbobsCOM.InventoryOpeningBalanceBatchNumber oInventoryOpeningBalanceBatchNumber;
oInventoryOpeningBalance.DocumentDate = DateTime.Today;
oInventoryOpeningBalance.PostingDate = DateTime.Today;
oInventoryOpeningBalanceLine = oInventoryOpeningBalance.InventoryOpeningBalanceLines.Add();
oInventoryOpeningBalanceLine.ItemCode = "ITEM004";
oInventoryOpeningBalanceLine.WarehouseCode = "04";
oInventoryOpeningBalanceLine.OpeningBalance = 100;
oInventoryOpeningBalanceLine.Price = 10;
oInventoryOpeningBalanceLine.OpenInventoryAccount = "0010301";
oInventoryOpeningBalanceLine.BinEntry = 1;
oInventoryOpeningBalanceBatchNumber = (SAPbobsCOM.InventoryOpeningBalanceBatchNumber)oInventoryOpeningBalanceLine.InventoryOpeningBalanceBatchNumbers.Add();
oInventoryOpeningBalanceBatchNumber.BatchNumber = "BT-004";
oInventoryOpeningBalanceBatchNumber.AddmisionDate = DateTime.Today;
oInventoryOpeningBalanceBatchNumber.ExpiryDate = DateTime.Today.AddYears(1);
oInventoryOpeningBalanceBatchNumber.Quantity = 100;
oInventoryOpeningBalanceCCDNumber = (SAPbobsCOM.InventoryOpeningBalanceCCDNumber)oInventoryOpeningBalanceLine.InventoryOpeningBalanceCCDNumbers.Add();
oInventoryOpeningBalanceCCDNumber.CCDNumber = "01/120413/446";
oInventoryOpeningBalanceCCDNumber.CountryOfOrigin = "AU";
oInventoryOpeningBalanceCCDNumber.Quantity = 100;
oInventoryOpeningBalanceCCDNumber.TrackingNote = 3;
oInventoryOpeningBalanceCCDNumber.TrackingNoteLine = 1;
oInventoryOpeningBalancesService.Add(oInventoryOpeningBalance);
  • Create an A/P Invoice With Indirect CCD Tracking Note Information:
SAPbobsCOM.Documents oAPInvoice = (SAPbobsCOM.Documents)oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oPurchaseInvoices);
oAPInvoice.DocDate = DateTime.Today;
oAPInvoice.DocDueDate = DateTime.Today;
oAPInvoice.CardCode = "V10000";
oAPInvoice.Lines.ItemCode = "IMP001";
oAPInvoice.Lines.Quantity = 1;
oAPInvoice.Lines.UnitPrice = 10;
oAPInvoice.Lines.CCDNumbers.CCDNumber = "16/16/16/1";
oAPInvoice.Lines.CCDNumbers.CountryOfOrigin = "AU";
oAPInvoice.Lines.CCDNumbers.Quantity = 1;
int A = oAPInvoice.Add();

Note:

  • Indirect CCD Tracking Note cannot be created using SAP Business One DI API. However, it will be created automatically while creating an A/P Invoice using DI API.
Be the first to leave a comment
You must be Logged on to comment or reply to a post.