Skip to content
SAP Reference

VT01N

Create S/4HANA status: Active

Create Shipment

Boilerplate SQL

Databricks SQL

Starting point for querying the tables behind this transaction. Set your Unity Catalog location and filter values below — they’re substituted into the SQL and the copy button.

Query parameters

4 parameters not filled: <catalog>, <schema>, <MANDT>, <TKNUM>

-- ============================================================
-- T-Code : VT01N Create Shipment
-- Purpose: Create Shipment — auto-generated boilerplate from tcode-table-map
-- Grain  : One row per VTTK joined to VTTP, VTTS, VTSP, VTPA
-- Tables : VTTK, VTTP, VTTS, VTSP, VTPA
-- Notes  : Auto-generated skeleton. Add MAKT/T001W/LFA1/KNA1 enrichment joins as needed for the business question. Set catalog/schema to your Unity Catalog location; fill remaining placeholders (<...>) for your tenant.
-- ============================================================
SELECT
  h.MANDT   AS "Client",
  h.TKNUM   AS "Shipment Number",
  l.TPNUM   AS "Item Number in the Shipment",
  v.TSNUM   AS "Stage Number in Transport",
  vt.TSNUM  AS "Stage Number in Transport",
  vt.TPNUM  AS "Item Number in the Shipment",
  vtp.VBELN AS "Shipment Number",
  vtp.POSNR AS "Item number of the SD document",
  vtp.PARVW AS "Partner Function"
FROM <catalog>.<schema>.vttk h
LEFT JOIN <catalog>.<schema>.vttp l
  ON l.MANDT = h.MANDT
 AND l.TKNUM = h.TKNUM
LEFT JOIN <catalog>.<schema>.vtts v
  ON v.MANDT = h.MANDT
 AND v.TKNUM = h.TKNUM
LEFT JOIN <catalog>.<schema>.vtsp vt
  ON vt.MANDT = h.MANDT
 AND vt.TKNUM = h.TKNUM
LEFT JOIN <catalog>.<schema>.vtpa vtp
  ON vtp.MANDT = h.MANDT
WHERE
  h.MANDT = '<MANDT>'
  AND h.TKNUM = '<TKNUM>'
ORDER BY h.TKNUM;

Tables Used by This Transaction

How these tables connect. Nodes are clickable.

Join details

  • VTTKVTTPheader item · 1:N
    ON vttk.TKNUM = vttp.TKNUM
  • VTTKVTTSheader item · 1:N
    ON vttk.TKNUM = vtts.TKNUM
  • VTTSVTSPheader item · 1:N
    ON vtts.TKNUM = vtsp.TKNUM