Friday, 11 December 2015

How to Upload and Download the Image or Photo in Oracle Apps Custom Form in R12 (EBS).

How to Upload the Image or Photo in Oracle Apps Custom Form in R12 (EBS).
First Create the Custom Table like

DROP TABLE APPS.XXEMPLOYEE CASCADE CONSTRAINTS PURGE;

CREATE TABLE APPS.XXEMPLOYEE
(
  EMPLOYEE_ID        NUMBER,
  EMPLOYEE_NAME      VARCHAR2(255 BYTE),
  PICTURE            BLOB,
  CREATED_BY         NUMBER,
  LAST_UPDATED_BY    NUMBER,
  LAST_UPDATE_LOGIN  NUMBER,
  CREATION_DATE      DATE,
  LAST_UPDATE_DATE   DATE
);

Then
Create the View Using the Oracle Apps Table for Store the Data in ..


CREATE OR REPLACE VIEW XXEMPLOYEE_V
(EMPLOYEE_ID, EMPLOYEE_NAME,EMP_PIC)
AS
SELECT employee_id, employee_name,
       (SELECT file_data
          FROM fnd_lobs
         WHERE file_id =
                  (SELECT media_id
                     FROM fnd_documents
                    WHERE document_id =
                                       (SELECT document_id
                                          FROM fnd_attached_documents
                                         WHERE pk1_value = xxe.employee_id
                                         AND   ENTITY_NAME = 'EMPLOYEE_ID'))) emp_pic
FROM xxemployee xxe
/

Before Enable Attachment file in Oracle apps Custom Form…
First You See the Attachment is Disable.


Use the VIEW to make the Data Block for Picture.
 


Then Set the Picture Property Pallet like that
 

 

Then Go to the Application Developer > Attachments > Document Categories



Then Create the Document Categories
XXEMPLOYEE_PHOTO_UPLOAD
 


Then Create the Document Entities.

Table Name : XXEMPLOYEE
Primery Key ID : EMPLOYEE_ID
 



Then Click on the Attachment Functions.
Select The Custom FORM Function Name here. In Which we enable the attachment.


Select Type : Form
Name : <Custom Form Function Name>
 



Then Click on the Categories Button To select The Above Category.
 



Then Click on the Block Button the Set the Block Setup.
 



Then Click on the Entities to set the Entities setup.

Employee Photo
 



Set the Primary Key Fields.



Save the data and then
Open the Custom Form
And Click on the Employee ID And Name and Type The ID and Name of the Employee.
Then Click on the Attachment Icon.
And Select The Category we already created above. (XXEMPLOYEE_PHOTO_UPLOAD),
Then Click on the Source TAB. It is open the window to Browse the file and select the file .
 



Choose the file and select the file which we want to upload in the EBS database.
 



Then Submit.
 



And Then Close Window.
 



Then Click on the Yes Button to Save the Data in Database.


Then Save the Custom Form.

When we open the Custom Form in Query Mode with the help of CTRL+F11 then when see the Output.


 






No comments:

Post a Comment

How to change Employee Number Generation from Manual to Automatic in Oracle HRMS (When attempting to apply for a job in iRecruitment)

When attempting to apply for a job in iRecruitment, the following error occurs: ERROR: You must enter an Application Number. Solution: How t...