Browse for a File

Silvano

Member
We would like to use the "browse" functionality which enable the user to select a file name. I have found a BSFN (B9600415) that does it, but this BSFN is for client only and it works on a fat client. I made a copy of it and made it for server/client. We deployed the copied BSFN to the web server, but it does not work on the web. Again, it does work on a fat client, but not in the web. Has anybody tried this before? Any highlights?
 
Here is the answer I got from Oracle:
"When you are on a html client, most of B BSFN will be executed on your enterprise or logic server. Thus, all of BSFNs which use the Windows API are client only in the case the enterprise or logic server is non-Intel (non-Windows OS) platform. All of pages/forms you see "Browse" to select a file name use the Active X control and these pages/forms are not written using the FDA."
"...you are trying to use the BSFN, which is executed on the Application Server, not on the JAS server or your local machine. The "Browse" button on the page/form is created specifically for a html client using the Active X control, not by using the FDA or BSFN."
 
Is there any other BSFN to use the Browse function?wat u did ?
thanx in advance
 
There is another BSFN - B9800005 'File Path Search', which is also only for client. I made a copy of this BSFN too and made it client/server, but it did not work on the web as either.
According to Oracle, there is not a way to browse for a file using an Open Dialog window on the web. The ones they have on the web, for example, when you use the "Import/Export to Excel" funcionality, are based on Active X controls, and you can't do that using the FDA (Form Design Aid).
The solution we used (not happy with) is to have a default path using a Processing Option template attached to the application, and the user needs to enter the file name in an edit field.
I am still researching to see if there is another way to accomplish the browse window. If I get to it, I will post it here
smile.gif
 
Silvano... I am still waiting.. Every day in the last 16 years I have been checking this topic.
 
Hi CB,

Kindly do not check from now on ( just kidding)... :)

I guess, there is no way to do it from the JDE scope.
 
It has been the best part of a year since I retired, but I think there may be a way to build a browser for files. I don't have access to a JDE system now either, so what I say is from memory. That being said here is a possibility.

There is a business function which will execute an OS command. You could use it to create a text file listing the file names (and/or subdirectories) in a specific directory. There is another business function which will allow the reading of a text file, line by line. This could be used to populate a grid with the the file/subdirectory names. Then when the user selects a row, the appropriate action can be taken.
 
The idea is a dead end. It is too insecure to allow a user to go browsing around on an enterprise server especially as it will be with the security of the server kernel process.

Think of another way outside of JDE to find a file eg using windows explorer and then place the file in a shared folder that a JDE bsfn or orchestration can access.
 
Hi CB,

Kindly do not check from now on ( just kidding)... :)

I guess, there is no way to do it from the JDE scope.

Hi Rauf,

in a different post I did mentioned two standard JDE BSFNs able to read a folder contents through APIs jdeOpendir / readdir / jdeClosedir:

B7400015 / B76B525

With a similar C piece of code I built my own "general purpose BSFN" loading folder contents into cache: as a consequence I'm indeed able to browse files into a folder with a simple grid showing cache records.

Reason for such a kind of BSFNs on functional perspective: sometimes you may need to read files (like XML response from Tax Authority) where you cannot know filename in advance.

The only issue I did experience, which is the reason for my previous post, was on Linux server with mounted drives.

Kind regards,

Carlo
 
Your server would need the windows folder added to it for sure yes. But I do this kind of stuff often.
Here's how I do it


CheckForFile(B0500725.CheckForFile)
VA evt_Integer01 [INT01] <- nReturnCode [INT01]
VA evt_FileAddress_CMDS [CMDS] -> szFullFileName [MMFN] ( constructed // string etc where file is meant to live)
1 = found

Also this maybe good


Use the wildcard as follows: C:\TEST\*.TXT
Check folder location and format on the server

C:\TEST\*.TXT


If VA frm_GenericLongFilePtr_GENLNG [GENLNG] is equal to "0"
FindFirstFileMatchingWildcard(B9600471.FindFirstFileMatchingWildcard)
| VA frm_GenericLongFilePtr_GENLNG [GENLNG] <> hFile [CDHNDL]
| FC Path_PTH [PTH] -> szTargetDirectory [CDCPATH]
| FC Record for A/P Bank Tape - EnterpriseOne [APTA] <- szFileName [CDCDES]
00008 End If

FindNextFileMatchingWildcard(B9600471.FindNextFileMatchingWildcard)

VA frm_GenericLongFilePtr_GENLNG [GENLNG] <> hFile [CDHNDL]
FC Record for A/P Bank Tape - EnterpriseOne [APTA] <- szFileName [CDCDES]
 
Last edited:
Hi, teams,
Can anyone please guide where this logic wants to write in which event?


Use the wildcard as follows: C:\TEST\*.TXT
Check folder location and format on the server

C:\TEST\*.TXT


If VA frm_GenericLongFilePtr_GENLNG [GENLNG] is equal to "0"
FindFirstFileMatchingWildcard(B9600471.FindFirstFileMatchingWildcard)
| VA frm_GenericLongFilePtr_GENLNG [GENLNG] <> hFile [CDHNDL]
| FC Path_PTH [PTH] -> szTargetDirectory [CDCPATH]
| FC Record for A/P Bank Tape - EnterpriseOne [APTA] <- szFileName [CDCDES]
00008 End If

FindNextFileMatchingWildcard(B9600471.FindNextFileMatchingWildcard)

VA frm_GenericLongFilePtr_GENLNG [GENLNG] <> hFile [CDHNDL]
FC Record for A/P Bank Tape - EnterpriseOne [APTA] <- szFileName [CDCDES]
 
I use web client fastpath DB to access DATABROWSE application which enables me to browse for tables on enterprise server (IBMi on Power)
 
Back
Top