Need to Read Multiple text files from HTML client and write to F0911Z1

Samiulla Syed

Member
Hello friends,
I need to know a business function which will read data from multiple text files located in a folder on HTML client.After reading from each text file the file need to be cleared or deleted from the folder.

Looking forward to your earlest response
 
See attachment for some Flat File business functions; enjoy!
laugh.gif
 
Use B76B0220 to read the file (remember to close with B34A1010) and the delete/copy with B4700230.


Stefano
 
Hello Adrian Chimirel,
Thanks for your quick response.
There may be thousands of files in a folder and the file names are dynamic(i.e known at runtime only).If I use any of the business functions specified by you, I need to know the file name in advance.

I need a business function which can tell me the no.of files in a folder so that i can use a loop to read data from each of the file in a folder and delete the file.

Thanks
Syed Samiulla
 
Samiulla ,When you say HTML client you mean you are trying to upload flat file from a web client into JDE UBE?.
If this what you are looking for into f0911Z1 try to have alook at upload screen P0911z1 before you dive in.

Thanks,
Chan
 
Looking at you last post it seems you are trying to read a file from HTML client it would be a bit difficult. There is no function available for directory list you might have to built your own.
Chan
 
Can you tell me how all these files get created in your HTML client?
Or, is it not possible to have RECORDS written in a spreadsheet/database, instead of files created in a folder?
Or, a third party swre able to do this transformation for you.
 
Samiulla,

As Chandrakant Rana has pointed out there are difficulties reading a directory/file from the HTML client. The business functions in a JDE html application get executed on the enterprise server. you therefore have two options:

1) If you were able to make the directory with the (thousand?) files in it accessable to the enterprise server, then in your UBE (I have done something very similar to this):

- use the Execute External Program business function to run a script of some description to put the file names in a text file called data.txt or something similar.

- use the business functions previously referred to in this thread to read the data.txt and retrieve the file names in a loop.

- for each file use the same business functions to read the data from the files and process it.

2) Create a facility/function/application to upload the files to the enterprise server at run time. This will require user interaction. Post 123159 may be of assistance in doing this.

I hope the above is of some help.

My AUD 0.02.
 
Thanks Peter,
I will go with your first option.
Some how I have to make sure that these files are available to enterprise server.

Thanks with regards
Syed Samiulla
 
Doing this would require at the minimum an applet, or activex control for the upload. I believe Javascript is purposefully not allowed to read directory structures due to security issues. You can manually point at files, but it doesn't go searching through your computer automatically.

So, care to learn some java?
grin.gif
 
I'd rather write a BHO ;-) In fact, you can treat this post as an ad ;-)
 
How to read multiple files from a folder one by one and write in into the JDE table ???
 
Back
Top