Importing a CSV file into Customized JDE table

ramjde

RB
Hi,

I need to upload data from a csv file to a customized JDE table.
The issue is that though the path will be fixed the filename will not be fixed. The file name will have date appended to it eg.filename140709.csv.
However there will be only one file per day.

Can anyone please provide the approach to this issue.

Thanks.
 
You could Copy the file to a known filename say "/path/file.csv", then , I'm not sure I am correct, but I think you can use a table conversion to convert the CSV to a Jde Table.
 
hi Ramesh

You have to use the business functions

Open file

read line from flat file

close file


in your code.

Please see the earlier posts in the JDELIST or the Oracle knowledge garden regarding this.

how to use these BSFN in you report to read the contents of the file.

Also you can use processing option values to get the Path and the file name from the user and use it in your code.


regards
Jitender
 
You can also perform this by table conversion. Input will be the CSV file and output the name of the table you want to insert the data in. Map the fields accordingly to insert data correctly.
 
Hi,
Thanks for the input.

What I have done is , I created a report and using the processing option I am passing the path and the filename with the .csv extension. Then through the report I am calling a business function(B0500180) through with it copies and renames the file into a new folder. Later from the end section I am calling the table conversion which has the fixed path and the fixed file name same which i have used in the business function.

After the TC gets executed I am again using the same business function to copy the file from the new folder back to the old path and with the filename defined in the processing option. This I am doing as the business function deletes the original file after renaming.
 
Hi Ramesh Bokka,

I think there is no need to use a report for renaming the input CSV file name ,
You can do every thing on the Table Conversion


1)Create a processing option for the Table Conversion
2)In the “ Process Begin “ Event Call your Business Function B0500180 for renaming Processing Option Value as you did before call the Table Conversion in the UBE
3)Again Call B0500180 BDFN in “Process End”Event for Rollback the things .

Hope this will work for you.
 
Hi Siva,

Table conversion locks the file when it is in execution thus it is not possible to perform any operation when the tc is running. Thats why i have to use the report for renaming the file.
 
Back
Top