-- Created on 24.04.2017 by A.KOBELEV
declare
-- Local variables here
i integer;
idavRep ttableforid;
svSel varchar2(30) := 'sel_pdm_sectiondoc';
idvSel number := btk_muSelAPI.FindByMnemoCode(svSel);
begin
-- Test statements here
select r.id
bulk collect
into idavRep
from btk_muRep r
where r.iddoc = idvSel
and r.idlevel = 1;
btk_muRepAPI.DeleteItemTbl(idavRep);
Btk_Muflatpkg.CopySelToFlatFull(idvSel);
end;