Here you go

Tuesday, February 23, 2016

Configure YUM unitlity to resolve dependencies of RPMs


YUM Configuration


How to configure Yum utility to resolve dependencies of RPMs. (RED HAT 5.x or 6.x)


Configuration:

Perform all tasks using root user:

1. Install createrepo utility


    Install following rpms if already not installed from root user.

        #rpm -ivh deltarpm-3.5-0.5.20090913git.el6.ppc64.rpm
        #rpm -ivh python-deltarpm-3.5-0.5.20090913git.el6.ppc64.rpm
        #rpm -ivh createrepo-0.9.8-4.el6.noarch.rpm

    OR If you are unable to find them then:

          rpm -ivh yum-* --nodeps --force
          rpm -ivh createrepo-* --nodeps --force


2. Copy all Packages from Linux DVD to local directory

    For Example
    #mkdir -R /redhat/packages

    and copy all packages from dvd to above directory
     and also copy the folder RPM-GPG-KEY-redhat-release to the above     directory.

3. Copy also repomd.xml from cd to the above directory.

4. Now Create repository with createrepo utility.

    #createrepo -g repomd.xml /redhat/packages

5. Create repository file for yum
     
     remove all ".repo" files from /etc/yum.repos.d/
     and create a new file :
    
        touch red_hat6.repo
      and write the following text in the file :

    #vi /etc/yum.repos.d/red_hat6.repo

    [REDHAT_REPO]
    name=Red_Hat6
    baseurl=file:///redhat/packages
    enabled=1
    gpgkey=file:///redhat/packages/RPM-GPG-KEY-redhat-release
   
6. run command 

    #yum clean all


Now you can install any package with following command and it will resolve dependancies automatically.

    #yum install /redhat/packages/

Wednesday, February 17, 2016

Update / Create Employee Proposed Salary



Table :




You can upload employee salary by using following procedure:



DECLARE

LB_INV_NEXT_SAL_DATE_WARNING    BOOLEAN;
LB_PROPOSED_SALARY_WARNING      BOOLEAN;
LB_APPROVED_WARNING             BOOLEAN;
LB_PAYROLL_WARNING              BOOLEAN;
LN_PAY_PROPOSAL_ID              NUMBER;
LN_OBJECT_VERSION_NUMBER        NUMBER;

LV_ERROR_DESC                   VARCHAR2(500);

CURSOR C_EMP IS

    SELECT
        *
    FROM
        MJ_EMPLOYEE_SALARY_LOAD_TEMP
    WHERE
        PROCESS_FLAG    =   'N'
        AND ASSIGNMENT_ID = 8106;
   
    
   
BEGIN

    FOR I IN C_EMP LOOP

        DBMS_OUTPUT.PUT_LINE(' Processing Assignment Id : ' || I.ASSIGNMENT_ID);

        BEGIN

            HR_MAINTAIN_PROPOSAL_API.CRE_OR_UPD_SALARY_PROPOSAL
            (   
                -- INPUT DATA ELEMENTS

                 P_BUSINESS_GROUP_ID            =>  81, --FND_PROFILE.VALUE('PER_BUSINESS_GROUP_ID'),
                 P_ASSIGNMENT_ID                =>  I.ASSIGNMENT_ID,
                 P_CHANGE_DATE                  =>  I.EFFECTIVE_DATE,
                 P_PROPOSED_SALARY_N            =>  I.ACTUAL_SALARY,
                 P_APPROVED                     =>  'Y',
                 -- OUTPUT DATA ELEMENTS
                 -- --------------------------------
                 P_PAY_PROPOSAL_ID              => LN_PAY_PROPOSAL_ID,
                 P_OBJECT_VERSION_NUMBER        => LN_OBJECT_VERSION_NUMBER,  
                 P_INV_NEXT_SAL_DATE_WARNING    => LB_INV_NEXT_SAL_DATE_WARNING,
                 P_PROPOSED_SALARY_WARNING      => LB_PROPOSED_SALARY_WARNING,
                 P_APPROVED_WARNING             => LB_APPROVED_WARNING,
                 P_PAYROLL_WARNING              => LB_PAYROLL_WARNING
            );
            
           
            UPDATE
                MJ_EMPLOYEE_SALARY_LOAD_TEMP
            SET
                PROCESS_FLAG    =   'Y',
                STATUS          =   'S',
                REMARKS         =   'Uploaded'
            WHERE
                ASSIGNMENT_ID = I.ASSIGNMENT_ID;      
           
            COMMIT;
           
        EXCEPTION WHEN OTHERS THEN


            LV_ERROR_DESC   :=  SUBSTR(SQLERRM,1,480);
           

            UPDATE
                MJ_EMPLOYEE_SALARY_LOAD_TEMP
            SET
                PROCESS_FLAG    =   'N',
                STATUS          =   'E',
                REMARKS         =   'Error Occurred : '
            WHERE
                ASSIGNMENT_ID   = I.ASSIGNMENT_ID;      
           
            COMMIT;

      
         DBMS_OUTPUT.PUT_LINE ('Error occurred :' ||  SQLERRM);

        END ;




    END LOOP;
 

EXCEPTION
       WHEN OTHERS THEN

DBMS_OUTPUT.PUT_LINE ('Error occurred : ' || SQLERRM);
   
END;