Absent Member.. RsmARSLN Absent Member..
Absent Member..
358 views

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

Jump to solution

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.

0 Likes
1 Solution

Accepted Solutions
Erik Cole Acclaimed Contributor.
Acclaimed Contributor.

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

Jump to solution

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
     );

2 Replies
Erik Cole Acclaimed Contributor.
Acclaimed Contributor.

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

Jump to solution

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
     );

Absent Member.. RsmARSLN Absent Member..
Absent Member..

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

Jump to solution

Hi Erik,

 

Thanks a lot. It is working.

 

Have Good day.

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.