The community will be in read-only from Tuesday 11:59pm (PST) to Wednesday 7:30am (PST)
The community will be in read-only from Tuesday 11:59pm (PST) to Wednesday 7:30am (PST)
Project and Portfolio Management Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Insert Or Delete user in Resource Pool with use sql script.

SOLVED
Go to solution
Highlighted
RsmARSLN
Occasional Contributor

Insert Or Delete user in Resource Pool with use sql script.

Hi,

 

I want to resource add or delete in resource pool with use sql script. Is it impossible?. I have added resource in RSC_RP_DISTRIBUTION_ENTRIES table but this is not working. Can I add record other table?

 

 

Thanks a lot.

2 REPLIES
Erik Cole
Honored Contributor
Solution

Re: Insert Or Delete user in Resource Pool with use sql script.

Hi...it's possible, but you also have to insert in KNTA_PENDING_ROLLUPS too so it will recalculate the pool capacity. Here is an example snippet:

        insert into RSC_RP_DISTRIBUTION_ENTRIES
        (
            RP_DISTRIBUTION_ENTRY_ID
          , VERSION
          , START_TIME
          , DISTRIBUTION_PERCENT
          , RESOURCE_POOL_ID
          , RESOURCE_ID
          , CREATED_BY
          , CREATION_DATE
          , LAST_UPDATED_BY
          , LAST_UPDATE_DATE
          , RESOURCE_DIST_SEQ
        ) VALUES
        (
           RSC_RP_DISTRIBUTION_ENTRIES_S.nextval
         , 0 -- Version
         , to_date(substr(l_START_DATE,1,10), 'YYYY-MM-DD')
         , 100
         , l_pool_id
         , l_resource_id
         , 1
         , l_date
         , 1
         , l_date
         , 0
        );
       
     insert into knta_pending_rollups
     (   CREATED_BY
       , CREATION_DATE
       , LAST_UPDATED_BY
       , LAST_UPDATE_DATE
       , PENDING_ROLLUP_ID
       , PERIOD_ID
       , RESOURCE_USER_ID
       , SOURCE_ENTITY_ID
       , SOURCE_ENTITY_PRIMARY_KEY
       , TARGET_ENTITY_ID
       , TARGET_ENTITY_PRIMARY_KEY
     ) values
     (    1
        , l_date
        , 1
        , l_date
        , KNTA_PENDING_ROLLUPS_S.nextval
        , NULL -- Period ID
        , l_resource_id
        , 410 -- Resource
        , l_resource_id
        , 405 -- Resource Pool
        , l_pool_id
     );

RsmARSLN
Occasional Contributor

Re: Insert Or Delete user in Resource Pool with use sql script.

Hi Erik,

 

Thanks a lot. It is working.

 

Have Good day.

//Add this to "OnDomLoad" event