495: c_audit_id := p_audit_id;
496:
497: select DDR_LOAD_SEQ.NEXTVAL
498: into c_map_id
499: from dual;
500:
501: RETURN c_map_id;
502: END IF; --}
503:
584: BEGIN
585: -- clean up the previous records
586: EXECUTE IMMEDIATE 'truncate table DDR.DDR_R_AOH_LVL_DTL drop storage';
587:
588: -- The logic detects individual branch in the tree:
589: -- 1. Read a row, if it is second row or more, we initialize previous level
590: -- 2. store the account level and code from current record
591: -- 3. if level has decreased, we write all previously accumulated accounts into one record
592: -- 4. clean up and start from current record to start traversing a new branch.