-- #New 26.01.2021/J.Fes Viessmann get SAP DIRNO SAP_DIRNO
-- #Doc: IR 5166945/003 -> Vi_Fertigungsdokument --> PUID: 'gucRBaSVF60QyC'
-- #Doc: siehe OneNote: 2020-31-Mawera-Mig-TC-to-ARAS --> 02-Project-Tech --> 10.4 - TC - Metadaten Abfrage IR SAP_DirNo
SELECT  
 DsExt.PSAP_DIRNO,
 DsExt.PSAP_DIRPART,
 DsExt.PSAP_DIRTYPE,
 DsExt.PSAP_DIRVERSION
From 
 infodba.PDATASET pd
 Left Join  infodba.PREF_LIST_0 rl ON (rl.puid = pd.puid)
 Inner Join infodba.PFORM pf       ON (pf.puid = rl.PVALU_0)
 Left Join  infodba.PE2S_DATASETEXTENSION DsExt ON (DsExt.puid = pf.RDATA_FILEU)
where pd.PUID = :para_DsPuid


