Database selection to get business workspaces links (referenced SAP IDs).
SELECT ty.BUSINESS_OBJECT_TYPE, li.ID_BO, li.DataID FROM OTSAPXECM_WKSP_LINKS li INNER JOIN OTSAP_BO_TYPES ty ON ty.ID_BO_TYPE = li.ID_BO_TYPE WHERE li.DataID = <bws_dataid>
Get Workspace SAP IDs by DataID
Database selection to get business workspaces with metadata.
SELECT b.DataID, b.Name, md.ValStr as UserID FROM DTree b INNER JOIN DTreeAncestors a ON a.AncestorID = <parentfolder> AND a.DataID = b.DataID INNER JOIN LLAttrData md ON md.DefID = <categoryid> AND md.AttrID = <attrid> AND md.ID = b.DataID AND md.VerNum = b.VersionNum WHERE b.SubType = 848
Get Workspaces with Metadata
Database selection to get documents inside a specific folder of the business workspaces.
SELECT f.DataID, f.Name, d.DataID, d.Name FROM DTreeAncestors af INNER JOIN DTree f ON f.DataID = af.DataID INNER JOIN DTreeAncestors ad ON f.DataID = ad.AncestorID INNER JOIN DTree d ON d.DataID = ad.DataID WHERE af.AncestorID = <parentfolder> AND f.Name = '<name of folder>' AND f.SubType = 0 AND d.SubType = 144
Get all Documents inside a specific Folder.
Database selection to get documents inside a specific folder of the business workspaces.
SELECT mt.ValStr AS CountryOfWork, m.ValStr AS UserID, b.DataID AS BWSID, d.DataID AS DocID, d.Name AS DocName, v.MimeType FROM DTreeAncestors a INNER JOIN DTree b ON b.DataID = a.DataID AND b.SubType = 848 INNER JOIN DTree d ON d.OwnerID = b.DataID AND d.SubType = 144 INNER JOIN DVersData v ON v.VersionID = d.DataID AND v.Version = d.VersionNum INNER JOIN LLAttrData m ON m.DefID = <categoryid 1> AND m.AttrID = <attrid 1> AND m.ID = b.DataID AND m.VerNum = b.VersionNum INNER JOIN LLAttrData mt ON mt.DefID = <categoryid 2> AND mt.AttrID = <attrid 2> AND mt.ID = b.DataID AND mt.VerNum = b.VersionNum WHERE a.AncestorID = <parentfolder> AND mt.ValStr = 'Switzerland'
Get all Documents inside Worspaces filterd by Metadata.
Database selection to get SAP related business workspaces.
SELECT ty.BUSINESS_OBJECT_TYPE, li.ID_BO, li.DataID FROM OTSAPXECM_WKSP_LINKS li INNER JOIN OTSAP_BO_TYPES ty ON ty.ID_BO_TYPE = li.ID_BO_TYPE WHERE li.DataID = "bws_dataid"
Get all SAP relations for a specific business workspace.