SELECT
  RTRIM(T7PLCD) AS t7plcd,
  RTRIM(T7PART) AS t7part,
  RTRIM(T7UNIT) AS t7unit,
  CASE WHEN T7DATE IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE T7DATE END AS t7date,
  T7TIME AS t7time,
  T7VOLL AS t7voll,
  T7PRIC AS t7pric,
  RTRIM(T7DISC) AS t7disc,
  RTRIM(T7DISF) AS t7disf,
  T7CPCT AS t7cpct,
  T7CRAT AS t7crat,
  RTRIM(T7F0CM) AS t7f0cm,
  RTRIM(T7FUT1) AS t7fut1,
  RTRIM(T7FUT2) AS t7fut2,
  RTRIM(T7FUT3) AS t7fut3,
  RTRIM(T7FUT4) AS t7fut4,
  RTRIM(T7FUT5) AS t7fut5,
  RTRIM(T7FUT6) AS t7fut6,
  RTRIM(T7FUT7) AS t7fut7,
  RTRIM(T7FUT8) AS t7fut8,
  RTRIM(T7FUT9) AS t7fut9
FROM LGDAT.IPRCCTO
WHERE T7DATE >= '{iprccto_wm}'
