# Türkiye Inward Processing Authorization (DİİB) Tracking and Closure Program

> A custom program that matches raw materials imported duty-free under an inward processing authorization (DİİB) with the exports made under the same authorization, per certificate, and shows committed and realized quantities, the remaining export obligation and the certificate deadline. When the certificate is closed, the required import and export lists are prepared as a form.

- Type: Program, Custom development, Form
- Module: SD
- Estimated effort: L (10–15 working days)
- Localization: TR
- Last updated: 2026-11-17
- URL: https://nekuhub.com/en/programs/turkey-inward-processing-authorization-diib-tracking-and-closure/


## Localization and legal basis: Türkiye

- Legal basis: The Inward Processing Regime Decision and Export Communiqué No. 2006/12 on the Inward Processing Regime; Customs Law No. 4458.
- The closure application is made through the Ministry of Trade system; the program prepares the import and export lists the application is based on.

## Why is the standard not enough?

MB51 lists imported raw material receipts and VF05 lists export invoices separately; neither links the movements to the authorization certificate or shows the remaining obligation against the committed quantity and the certificate deadline. Tracking is usually done in Excel files per certificate, and a shortfall in exports is not noticed until closure. The program produces the balance per certificate and the closure list from SAP data.

### Closest standard alternatives

- MB51: Lists imported raw material receipts; does not link them to the certificate and its commitment.
- VF05: Lists export invoices; does not show the remaining export obligation per certificate.

## Tables used

| Table | Role | Access | Join | System |
|---|---|---|---|---|
| EKKO | Import purchase orders under the certificate | Read | - | ECC + S/4 |
| EKBE | Realized goods receipt quantities of imported raw material | Read | EKBE-EBELN = EKKO-EBELN AND EKBE-VGABE = '1' | ECC + S/4 |
| VBRK | Export invoices under the certificate | Read | - | ECC + S/4 |
| VBRP | Exported materials and quantities | Read | VBRP-VBELN = VBRK-VBELN | ECC + S/4 |
| MARC | Customs tariff number (GTİP) | Read | MARC-MATNR = VBRP-MATNR AND MARC-WERKS = VBRP-WERKS | ECC + S/4 |
| STXH | Certificate number in the order and invoice header text | Read / write | STXH-TDOBJECT IN ('EKKO','VBBK') AND STXH-TDNAME = belge no | ECC + S/4 |

## BAPIs and functions used

- READ_TEXT: Reads the certificate number from the order and invoice text
- SAVE_TEXT: Writes the certificate number into the text of the export invoice assigned to the certificate
- SSF_FUNCTION_MODULE_NAME: Calls the closure list form

## Selection screen parameters

| Parameter | Description | Type | Reference field | Required |
|---|---|---|---|---|
| S_DIIB | Authorization certificate number | Range / multiple | - | Yes |
| P_FILE | Commitment lines file (on first run) | Single value | - | No |
| S_BUKRS | Company code | Range / multiple | VBRK-BUKRS | Yes |
| P_CLOSE | Create closure lists | Checkbox | - | No |

## Input file columns

| Column | Target field | Required |
|---|---|---|
| Certificate no. | Certificate number issued by the Ministry of Trade | Yes |
| Line type | Import or export | Yes |
| Material | VBRP-MATNR | No |
| Customs tariff no. | MARC-STAWN | Yes |
| Committed quantity | Quantity permitted or committed in the certificate | Yes |
| Unit | Unit of measure in the certificate | No |
| Deadline | End of validity of the certificate | Yes |

## Result list columns

| Column | Source |
|---|---|
| Certificate no. | Calculated: Certificate number from the commitment line |
| Line type | Calculated: Import or export |
| Material | VBRP-MATNR |
| Customs tariff no. | MARC-STAWN |
| Committed quantity | Calculated: Quantity on the commitment line |
| Realized quantity | Calculated: For imports Σ EKBE-MENGE (goods receipts), for exports Σ VBRP-FKIMG |
| Remaining quantity | Calculated: Committed quantity − realized quantity |
| Fulfilment % | Calculated: Realized / committed × 100 |
| Days to deadline | Calculated: Deadline − today |
| Status | Calculated: In progress, at risk (deadline near and short), completed or closed |

## How does the program work?

1. The commitment lines of the certificate (certificate no., import/export line, material or customs tariff number, committed quantity, value, deadline) are read from Excel or taken from the previous run.
2. Imports: purchase orders whose header text (STXH, READ_TEXT) holds the certificate number are found in EKKO; the realized import quantity comes from goods receipts in EKBE.
3. Exports: export invoices whose header text holds the certificate number are read from VBRK and exported quantities from VBRP. Export invoices without the text are assigned to a certificate by user selection, and the number is written to the invoice text with SAVE_TEXT.
4. The customs tariff number (GTİP) comes from MARC; matching to the commitment line is by material or tariff number.
5. The fulfilment rate, remaining quantity and days to the deadline are calculated per line; certificates close to the deadline with missing exports are flagged.
6. When closure is selected, the import and export lists are created as a form (PDF) and exported to Excel.

## Authorization objects

- V_VBRK_VKO: Billing display authorization by sales organization
- M_BEST_EKO: Purchase order display authorization by purchasing organization

## Frequently asked questions

### Where is the certificate number kept in SAP?

In the default setup the number is kept in the header text of the purchase order and the export invoice, so it can be used without adding a field. If the company uses another field (e.g. order reference or batch characteristic), the reading logic is adapted to it during installation.

### Is the conversion ratio of raw material into the export product considered?

Because the commitment lines of the certificate give import and export quantities separately, the program tracks each line with its own quantity. If needed, the raw material content of exported products can also be calculated from BOM component quantities as an extra column.

---
Let us build this program for your system: https://nekuhub.com/en/request-a-quote/?report=tr-inward-processing-diib
