565:
566: UPDATE fnd_attached_documents
567: SET PK1_VALUE=l_sip_id,
568: ENTITY_NAME='PER_SP_SUCCESSOR_IN_PLAN'
569: WHERE ENTITY_NAME='BEN_COPY_ENTITY_RESULTS_SCSR'
570: AND PK1_VALUE=j.copy_entity_result_id;
571: end if;
572:
573: END LOOP;
816: ,RESULT_TYPE_CD
817: ,OBJECT_VERSION_NUMBER
818: ,STATUS)
819: VALUES
820: (ben_copy_entity_results_s.nextval
821: ,i.plan_id
822: ,i.plan_type
823: ,i.plan_name
824: ,i.successee_id
866: ,'DISPLAY'
867: ,1
868: ,'W');
869:
870: select ben_copy_entity_results_s.currval into l_pl_cer_id from dual;
871: --- Now insert the SPP records
872: FOR j IN csr_successors(p_plan_id)
873: LOOP
874: INSERT INTO ben_copy_entity_results
942: ,OBJECT_VERSION_NUMBER
943: ,PARENT_ENTITY_RESULT_ID
944: )
945: VALUES
946: ( ben_copy_entity_results_s.nextval
947: ,j.successor_in_plan_id
948: ,j.plan_id
949: ,j.successor_id
950: ,j.potential