Here we create a form and add the button (File Location) and when the button is pressed, you will select a file such as ''Danish_Attandance.csv'' from your PC. When the file has been uploaded to the table, you can view the data in the following block by clicking the button (View).
First Make the CSV file for
Upload in the Custom Form.
Step 2:
Make CTL File for Upload the Csv file
data into the Table.
Step 3:
Create Custom Table (XX_TIME_ATTENDANCE_DATA_LOAD)
for Store the Csv File Data.
CREATE SEQUENCE RKCM_UPLOAD_S
MINVALUE 1
MAXVALUE 999999999999999999999999999
START WITH 1
INCREMENT BY 1
CACHE 20;
Copy the XXCUS_PAY_EMP_ATTAN_CTL.ctl
file to the <bin> folder of the Custom_Top.
/a01/appltest/RMCTEST/fs1/EBSapps/appl/xxrmc/12.0.0/bin
Make a Concurrent Program to Upload the
CSV Data to STG Table.
Navigation >> Application
Developer >> Concurrent >> Executable
XXCUS_PAY_EMP_ATTAN_CTL
Navigation
>> Application Developer >> Concurrent >> Program
Step 5:
Make a custom form to upload csv File from
oracle Custom forms and then show the data into the Block.
In File_Location Button : Here we call
the Bowser to Select the Csv file from the PC (Our Location Machine).
We have create a Program Units Procedure “file_attached”
Here
Point 1 :
Here we are set the Path of the Csv
File.
Here
Point 2 :
Here we are call the Database Procedure (WRITE_BLOB_TO_FILE_DH.prc)
to Write Blob file to the Server Path. (Means Populate the CSV file to the
Oracle Server at the respective Path)
/a01/oratest/RMCTEST/12.1.0/appsutil/outbound/RMCTEST_dev5
ORA-29280: invalid
directory path using directory in SQL
Run the Script :
SELECT *
FROM V$PARAMETER
WHERE NAME = 'utl_file_dir'
Take the Value as a Path upto
(,) of any Path to store the BLOB File in the Server.
Here
Point 3 :
Here we call the Concurrent Program of
the CTL File to Store the Data From CSV to STG Table.
Step 6:
After Click on the Upload Button a
concurrent program is submitted and a Request ID is generated.
If the Program RUN successfully then
Data is inserted into the Table “XXCUS_PAY_ATTAN_DOC_UPLOAD”.
GO_BLOCK
('XX_TIME_ATTENDANCE_DATA_LOAD');
clear_block(no_commit);
EXECUTE_QUERY;
Save
the Form.
Place it to the AU_TOP and Then Compile
the form.
Register the Form and Attached to the
Menu.
Step 7:
When we open the Employee Attendance Upload
Form
When we click on the File Location
Button. Then One popup is open
In the java HTML Page to Upload the
File.
Here Point 1 : Click on the Browse
Button to select the File from the Local Machine (PC or Laptop).
Here Point 2 : Then Click on the Submit
Button to Save the File.
After Submit the message is coming and
CLOSED the “GFM Upload” Tab.
Go the Custom Form and Click on the Yes
Button.
File name is shown in the Text Box
(Which CSV file we want to upload into the Below Block)
When we click on the Upload Button Then
a concurrent program is fire and give the popup with Request Id.
If
the Program is Run Successfully then click on the View Button to See the Data
in the below Block.
Thanks You
No comments:
Post a Comment