offdataai
SAP · data model template

SAP Global Trade Services (GTS) data model

Normalized replica of SAP GTS: master data (business partner, country, legal regulation, self-referencing HS commodity code, denied-party list); customs declaration header → item with commodity classification and duty, product classification and FTA preference determination; and compliance objects — SPL screening audit results, embargo checks, and export licenses with value/quantity depreciation. The commodity-code hierarchy is a self-reference (plain key, no FK) to avoid a cycle.

SAP Global Trade Services (GTS, /SAPSLL/) modeled as a normalized (3NF) source-table replica: Compliance Management (Sanctioned Party List screening of business partners against OFAC/EU/UN denied-party lists, embargo checks, and export/legal-control licenses) and Customs Management (import/export customs declarations with commodity HS/tariff classification, customs value and duty, plus free-trade-agreement preference determination). Surrogate keys are warehouse-generated while GTS business keys (customs document, commodity code, license number, partner) are preserved; partner names and screening matches are PII; built for OFAC / C-TPAT trade-compliance auditability. It is a normalized (3NF) relational model that mirrors the source system, suited to operational databases and to landing source data faithfully.

3NFSAPOFACC-TPAT
12
tables
107
columns
15
relationships
4
PII columns

Opening the template creates a project with the ERD, platform-native DDL, a dbt project and documentation already generated (recommended platform: PostgreSQL). Edit it in plain English or on the canvas, then ship it to any supported warehouse.

Subject areas

customscompliance_screeninglegal_controlmaster_data

Design decisions

  • SPL screening modeled as an append-only audit result table

    OFAC/EU/UN sanctioned-party screening must keep every screening event (match status, score, matched term, release decision) for audit; a dedicated spl_screening_result table per partner-per-list preserves that trail rather than overwriting a partner status flag.

  • Self-referencing HS commodity-code hierarchy

    Customs tariff (HS) codes form a multi-level hierarchy; modeling the parent as a plain key column (not an FK) gives drill-up classification while avoiding the self-loop the validator rejects as a circular FK.

  • Customs declaration header → item with duty at the item grain

    Duty and customs value are determined per commodity line, so a header (customs_document) → item (customs_document_item) split keyed by the GTS declaration number and item number mirrors the source and supports duty and statistical-value reporting.

  • License value/quantity depreciation tracked on the license record

    Export licenses authorize a limited value/quantity that depletes as goods ship; carrying value_limit/value_used and quantity_limit/quantity_used on the license enables utilization and expiry monitoring.

  • Preference determination separated from classification

    Free-trade-agreement preference qualification depends on rules of origin and vendor declarations independent of the base HS classification, so it is its own table linked to commodity code and the preference regulation.

Tables in the SAP Global Trade Services (GTS) model

Every table with its grain, columns, types and keys. PK marks a primary key, BK a business key and PII a column classified as personal data, which gets a masking strategy by default.

Tables (7)

customs_document

Grain: one row per import/export customs declaration (header)

GTS customs declaration header (import or export).

ColumnTypeKeys
customs_document_keybigintPK
customs_doc_idvarcharBK
directionvarchar
business_partner_keybigint
legal_regulation_keybigint
country_destination_keybigint
country_dispatch_codevarchar
customs_officevarchar
declaration_datedate
declaration_statusvarchar
total_customs_valuedecimal
currencyvarchar
mode_of_transportvarchar

customs_document_item

Grain: one row per customs declaration item (customs_doc_id, item_number)

GTS customs declaration item carrying commodity classification and duty.

ColumnTypeKeys
customs_document_item_keybigintPK
customs_doc_idvarcharBK
item_numbervarcharBK
customs_document_keybigint
commodity_code_keybigint
product_numbervarchar
item_quantitydecimal
customs_valuedecimal
statistical_valuedecimal
duty_amountdecimal
country_of_originvarchar
currencyvarchar

product_classification

Grain: one row per product-to-commodity-code classification

GTS product classification — assigns products to customs commodity codes.

ColumnTypeKeys
product_classification_keybigintPK
classification_idvarcharBK
product_numbervarcharBK
commodity_code_keybigint
classification_statusvarchar
valid_fromdate
classified_byvarchar
numbering_schemevarchar

preference_determination

Grain: one row per free-trade-agreement preference determination

GTS preference determination for free-trade-agreement duty savings.

ColumnTypeKeys
preference_determination_keybigintPK
preference_idvarcharBK
commodity_code_keybigint
legal_regulation_keybigint
agreement_namevarchar
preference_statusvarchar
valid_fromdate
rule_of_originvarchar
vendor_declaration_statusvarchar

spl_screening_result

Grain: one row per sanctioned-party-list screening result

GTS SPL screening audit trail (OFAC / EU / UN denied-party screening).

ColumnTypeKeys
spl_screening_result_keybigintPK
screening_idvarcharBK
business_partner_keybigint
denied_party_list_keybigint
screened_object_typevarchar
screened_datetimestamp
match_statusvarchar
match_scoredecimal
matched_namevarcharPII
decisionvarchar
decided_byvarcharPII
is_blockedboolean

embargo_check

Grain: one row per embargo / country compliance check

GTS embargo/country check against legal regulations.

ColumnTypeKeys
embargo_check_keybigintPK
check_idvarcharBK
customs_document_keybigint
country_keybigint
legal_regulation_keybigint
check_resultvarchar
check_datetimestamp
is_embargoedboolean

license

Grain: one row per export license / legal-control license

GTS export/legal-control license with value & quantity depreciation.

ColumnTypeKeys
license_keybigintPK
license_idvarcharBK
license_numbervarcharBK
legal_regulation_keybigint
business_partner_keybigint
license_typevarchar
valid_fromdate
valid_todate
value_limitdecimal
value_useddecimal
quantity_limitdecimal
quantity_useddecimal
currencyvarchar
license_statusvarchar

Lookup tables (5)

business_partner

Grain: one row per GTS business partner (customer / vendor / carrier)

SAP GTS business partner (replicated from feeder system BP / KNA1 / LFA1).

ColumnTypeKeys
business_partner_keybigintPK
partnervarcharBK
name1varcharPII
partner_typevarchar
countryvarchar
cityvarcharPII

country

Grain: one row per country / customs territory

GTS country / customs-territory check table.

ColumnTypeKeys
country_keybigintPK
country_codevarcharBK
country_namevarchar
regionvarchar
is_embargoedboolean
trade_blockvarchar

legal_regulation

Grain: one row per legal regulation

GTS legal regulation — the basis for compliance, customs and preference checks.

ColumnTypeKeys
legal_regulation_keybigintPK
regulationvarcharBK
descriptionvarchar
regulation_typevarchar
regulating_countryvarchar

commodity_code

Grain: one row per customs commodity (HS / tariff) code

GTS commodity code (HS/tariff) master with a self-referencing hierarchy.

ColumnTypeKeys
commodity_code_keybigintPK
commodity_codevarcharBK
descriptionvarchar
code_hierarchy_levelsmallint
parent_commodity_keybigint
duty_ratedecimal
statistical_unitvarchar
numbering_schemevarchar

denied_party_list

Grain: one row per sanctioned/denied party list version

GTS sanctioned-party list master used for SPL screening.

ColumnTypeKeys
denied_party_list_keybigintPK
list_idvarcharBK
list_namevarchar
list_sourcevarchar
list_versionvarchar
effective_datedate

Relationships

Each relationship is a foreign key on the first table referencing the second.

  • customs_document.business_partner_key → business_partner (many-to-one)
  • customs_document.legal_regulation_key → legal_regulation (many-to-one)
  • customs_document.country_destination_key → country (many-to-one)
  • customs_document_item.customs_document_key → customs_document (many-to-one)
  • customs_document_item.commodity_code_key → commodity_code (many-to-one)
  • product_classification.commodity_code_key → commodity_code (many-to-one)
  • preference_determination.commodity_code_key → commodity_code (many-to-one)
  • preference_determination.legal_regulation_key → legal_regulation (many-to-one)
  • spl_screening_result.business_partner_key → business_partner (many-to-one)
  • spl_screening_result.denied_party_list_key → denied_party_list (many-to-one)
  • embargo_check.customs_document_key → customs_document (many-to-one)
  • embargo_check.country_key → country (many-to-one)
  • embargo_check.legal_regulation_key → legal_regulation (many-to-one)
  • license.legal_regulation_key → legal_regulation (many-to-one)
  • license.business_partner_key → business_partner (many-to-one)

Related templates

All templates →
Start for $1

From requirements to AI-ready context, in one platform.

Describe your business in a conversation, start from a template or connect your own database. Your first model is ready in minutes.

Get startedBook a demo

Plans from $1/month · cancel any time