F4 help to give desktop path for retrieving file name
Hi Guys,
I want a big help from u people, I worked on module pool programming and in that i had written some BDC also in that. Now my concern is i need to give F4 help path for the user to goto Desktop and pick the file from his PC.He will goto transaction and then only he can run the Report.
Now i had tried this
at selection-screen on value-request for p_filename.
v_mask = ',Tab Delimited (.txt),.txt.'.
CALL FUNCTION 'WS_FILENAME_GET'
EXPORTING
DEF_FILENAME = ' '
DEF_PATH = ' '
MASK = v_mask
TITLE = ' '
IMPORTING
FILENAME = p_filename
EXCEPTIONS
INV_WINSYS = 1
NO_BATCH = 2
SELECTION_CANCEL = 3
SELECTION_ERROR = 4
OTHERS = 5.
but in at selection screen i need to give parameters or select-options... which is not there as u know bcoz its a module pool programming.....
Can u pls help me out its urgent!!!!!!!!
Rewards will be definite....
Hi Abdul,
Refer demo program DEMO_DYNPRO_F4_HELP_MODULE in SE38.
Check Flow Logic by double clicking on the screen 100.
PROCESS BEFORE OUTPUT.
MODULE INIT.
PROCESS AFTER INPUT.
MODULE CANCEL AT EXIT-COMMAND.
PROCESS ON VALUE-REQUEST.
FIELD CARRIER MODULE VALUE_CARRIER.
FIELD CONNECTION MODULE VALUE_CONNECTION.
<b>Reward points if it helps.</b>
Regards,
Amit Mishra
Message was edited by: Amit Mishra
Similar Messages
-
F4 Help to get the path for a File source directory
There are numerous function modules for browsing a particular file in desktop and getting the file path (including the fine name) , like F4_FILENAME , KD_GET_FILENAME_ON_F4 , WS_FILENAME_GET etc. But can anyone tell me how to fetch only the directory path to the field were the F4 help is given. Actually the filename has to come in some other field in the selection screen. Is there separate funtion modules for these OR will changing parameters in the above function modules work?
Pls Help....
Also are there function modules for providing F4 help for getting the path to a file in application directory?Try this method CL_GUI_FRONTEND_SERVICES.
It is a Global CLASS which is having different methods for different purposes
see the documentation of it and use the methods of it
see
CL CL_GUI_FRONTEND_SERVICES
Short Text
Frontend Services
Functionality
The class CL_GUI_FRONTEND_SERVICES contains static methods for the following areas:
File functions
Directory functions
Registry
Environment
Write to / read from clipboard
Upload / download files
Execute programs / open documents
Query functions, such as Windows directory, Windows version, and so on
Standard dialogs (open, save, directory selection)
Example
Determine the temp directory on your PC:
DATA: TEMP_DIR TYPE STRING.
CALL METHOD CL_GUI_FRONTEND_SERVICES=>GET_TEMP_DIRECTORY
CHANGING
TEMP_DIR = TEMP_DIR
EXCEPTIONS
CNTL_ERROR = 1
ERROR_NO_GUI = 2.
IF SY-SUBRC 0.
Error handling
ENDIF.
flush to send previous call to frontend
CALL METHOD CL_GUI_CFW=>FLUSH
EXCEPTIONS
CNTL_SYSTEM_ERROR = 1
CNTL_ERROR = 2
OTHERS = 3.
IF SY-SUBRC 0.
Error handling
ENDIF.
WRITE: / 'Temporary directory is:', TEMP_DIR.
Notes
The class CL_GUI_FRONTEND_SERVICES is based on the Control Framework. See the documentation for more information, in particular on CL_GUI_CFW=>FLUSH which must be called after many CL_GUI_FRONTEND_SERVICES methods.
Migration Information
The old file transfer model was based on function modules of the function group GRAP. The old features have been replaced by the class CL_GUI_FRONTEND_SERVICES. The following list contains the old function modules (italic) and the new methods (bold) that replace them:
CLPB_EXPORT
CLIPBOARD_EXPORT
CLPB_IMPORT
CLIPBOARD_IMPORT
DOWNLOAD
GUI_DOWNLOAD, dialog replaced by FILE_SAVE_DIALOG
PROFILE_GET
No replacement, use REGISTRY_* methods instead
PROFILE_SET
No replacement, use REGISTRY_* methods instead
REGISTRY_GET
REGISTRY_GET_VALUE, REGISTRY_GET_DWORD_VALUE
REGISTRY_SET
REGISTRY_SET_VALUE, REGISTRY_SET_DWORD_VALUE
UPLOAD
GUI_UPLOAD, dialog replaced by FILE_OPEN_DIALOG
WS_DDE
Obsolete: This function is no longer supported.
SET_DOWNLOAD_AUTHORITY
Obsolete: This function is no longer supported.
WS_DOWNLOAD
GUI_DOWNLOAD
WS_DOWNLOAD_WAN
Obsolete: This function is no longer supported.
WS_EXCEL
Obsolete: This function is no longer supported.
WS_EXECUTE
EXECUTE
WS_FILENAME_GET
FILE_SAVE_DIALOG, FILE_OPEN_DIALOG
WS_FILE_ATTRIB
FILE_SET_ATTRIBUTES, FILE_GET_ATTRIBUTES
WS_FILE_COPY
FILE_COPY
WS_FILE_DELETE
FILE_DELETE
WS_MSG
Obsolete: This function is no longer supported.
WS_QUERY
CD (current directory)
DIRECTORY_GET_CURRENT
EN (read/write environment)
ENVIRONMENT_GET_VARIABLE
ENVIRONMENT_SET_VARIABLE
FL (determine file length)
FILE_GET_SIZE
FE (check if file exists)
FILE_EXIST
DE (check if directory exists)
DIRECTORY_EXIST
WS (determine Windows system)
GET_PLATFORM
OS (operating system)
GET_PLATFORM
WS_UPLDL_PATH
Obsolete: This function is no longer supported.
WS_UPLOAD
GUI_UPLOAD
WS_VOLUME_GET
Obsolete: This function is no longer supported.
Reward points if useful. -
I want to get desktop path for client user using webutil
oracle database 11g
oracle forms 10 g
client windows
i want to get desktop path for client user using webutil
as i want to save file in this pathTo get the user's path to their Desktop is a two step process. First, you have to echo the %USERPROFILE% to a output file and secondly, read the directory from the output file in to Forms. The code would look similar to the following:
/* When-Button-Pressed trigger */
DECLARE
v_temp_path VARCHAR2(250);
v_temp_file VARCHAR2(12) := 'webutil.log';
f_file Client_Text_IO.File_Type;
BEGIN
Client_Host('cmd /c echo %USERPROFILE%\Desktop > c:\'||v_temp_file);
f_file := Client_Text_Io.FOpen('c:\'||v_temp_file, 'R');
Client_Text_Io.Get_Line(f_file,v_temp_path);
Client_Text_Io.FClose(f_file);
b_dummy := WebUtil_File.Delete_File('C:\'||v_temp_file);
--At this point, you have the path stored in the v_temp_path variable.
--You can assign this variable to a block item or reference it directly in your code.
END;
When you reference the value of the v_temp_path, don't forget to wrap the value in double-quotes (" ") becuase the path will have spaces. Since your plan is to write a file to the user's desktop, your call to FOPEN will look like this:
f_file := Client_Text_Io.FOpen('"'||v_temp_file||'"','W');
Hope this helps,
Craig... -
How to create search path for the file on the desktop..
hello experts..
I have used gui_upload module to upload the data from flatfile to the internal table, in that how can i create search path for the file selection in the selection screen, also please help me the code to update the ztable.
thanksHI
If iam not wrong you want to select a file from a location that you don't know so if this is ur problem then use the function module
F4_FILENAME
this FM helps to locate and select the desired file from the system.
Sample code that you can check is
How to get windows filename
PARAMETERS: lv_file LIKE rlgrap-filename.
Method 1
CALL FUNCTION u2019KD_GET_FILENAME_ON_F4u2019
EXPORTING
MASK = u2019,.txt,.*u2019
STATIC = u2019Xu2019
CHANGING
FILE_NAME = LV_FILE.
Method 2
CALL FUNCTION u2019F4_FILENAMEu2019
EXPORTING
program_name = syst-cprog
dynpro_number = syst-dynnr
field_name = u2019 u2019
IMPORTING
file_name = LV_FILE.
Regards
Pavan -
:-) How can we change the default file path for Bank file ( dmee ) ?
Hi All,
We encounter a problem.
Electronic bank file ( created after a F110 run ) are created, in an automatic way to the DIR_TEMP directory. ( On the SAP server )
How can we change the default file path for Bank files ( dmee ) ?
We'd like to specify another path.
Thx for your help.
ErwanHello,
Make sure that you have created the directory in transaction code AL11 with the help of basis consultants.
You can link your PC directory to the application server.
You can maintain the path whether your file needs to get saved in OBPM4 against your DMEE structure example GB_BACS etc.
If you do not maintain any path in OBPM4, then the file gets saved to temporary directory. If you give the directory path name in OBPM4, then the file gets saved to that directory with numbers 0001, 0002, 0003 etc till it reaches 9999 and reset from the beginning.
If you give the path as well as file name as ABCD, then the file gets generated to that directory folder with ABCD0001, ABCD0002, ABCD0003 etc. till it reaches ABCD9999 and reset from the beginning.
Hope this solves your problem.
Regards,
Ravi -
Invalid Path for target file, check if connector is deployed correctly
Hi all,
I've got a tricky problem over here: we are using OMB scripts for generating simple extract mappings that just copy data from an oracle source table to a flat file on a directory. Up untill now ( with version 11.1 ) this did not pose any troubles, but now we are using 11.2 for the first time and we don't get the mappings to execute. Generating, validating and deploying all works fine, only executing fails with the error: "Invalid Path for target file, check if connector is deployed correctly". It ends to rapidly, so I'm assuming the problem lies in the repository and not on the database itself.
I'm pretty sure all locations are defined as needed, flat file operator in the mapping has correct location, the flat file module has the same location,...
I tried almost everything: recreate oracle module, recreate flat file module, unregister and recreate db location, unregister and recreate dir location, recreate mapping and flat file, export/import...
The strange thing is, I was able to execute a mapping once. Although it ended with an error (due to a function in the mapping), it created the file correctly. After that I needed to update the directory path of the target location and from then on, I always got the error above, and I don't see a good reason.
Any suggestions??
Tnx,
MichelThat error is displayed when the generated code fails to execute with one of the following database errors;
UTL_FILE.INVALID_PATH
UTL_FILE.INVALID_OPERATION
UTL_FILE.INVALID_FILEHANDLE
So its worth checking the generated code for that map and searching for the code around UTL_FILE.FOPEN and seeing what the path and the file name in the code are. Maybe the file is created with permissions such that it can be created but not then re-written and its an OS permissions thing (such as UMASK settings).
Cheers
David -
INVALID PATH FOR TARGET FILE - 11g
I had several mappings that's need to run almost all of my mappings got this same error,
OWB Owner: owb_rpo_ev04
User Owner: owb_rpu_ev04
h2. "INVALID PATH FOR TARGET FILE, CHECK IF CONNECTOR IS DEPLOYED CORRECTLY"
-Flat File Location has been indicated
-Locations has been deployed
-Files Location has been deployed
-Physical Location has been created
Two mappings is working prefectly without any error, but to several mappings the one with Flat Files Location are the one with the error when executing. I already grant permission owb_rpu_ev04 to UTL_FILE. I even create a synonym for UTL_FILE the i can used "ECT_FILE"
Files are in FTP,
h2. partial script
OUTPUT_FILE ECT_FILE.file_type;
FILENAME VARCHAR2(50);
FILEPATH VARCHAR2(50);
email_subject VARCHAR2(200);
email_body_hdr VARCHAR2(10000);
crlf VARCHAR2(2) := chr(13)||chr(10);
OWB_FAILURE_RUN EXCEPTION;
PRAGMA EXCEPTION_INIT (OWB_FAILURE_RUN,-20000);
PROCEDURE CHK_EXECUTION (EXEC_FLAG IN NUMBER) AS
BEGIN
IF EXEC_FLAG = 3 OR EXEC_FLAG = 4 THEN
RAISE OWB_FAILURE_RUN;
END IF;
END;
BEGIN
FILEPATH := 'ECTDM_EV04_OUTFILE_DIR';
-- ECTBusiness.csv
ECT_RUN_BATCH_MAP1 ( 'PLSQL', 'ECTDM_IN_M_BUSINESS_L1', 'OWB_RPU_EV04_LOCATION', 'ERROR_DETAILS', 0, EXEC_FLAG, 'A','DM');
CHK_EXECUTION (EXEC_FLAG);
Edited by: ellenore on Apr 26, 2012 5:52 AM
Edited by: ellenore on Apr 26, 2012 6:03 AMThat error is displayed when the generated code fails to execute with one of the following database errors;
UTL_FILE.INVALID_PATH
UTL_FILE.INVALID_OPERATION
UTL_FILE.INVALID_FILEHANDLE
So its worth checking the generated code for that map and searching for the code around UTL_FILE.FOPEN and seeing what the path and the file name in the code are. Maybe the file is created with permissions such that it can be created but not then re-written and its an OS permissions thing (such as UMASK settings).
Cheers
David -
The specified file or folder name is too long,the url path for all files and folders
The specified file or folder name is too long,the url path for all files and folders must be 260 character or less
can we increase this limit?
MCTS,ITILHi,
As I understand, you want to increase the length of URL path in SharePoint 2010.
Per my knowledge, this limit cannot be increased. SharePoint limits URL length because all relative URL links are stored in the clear forms on the SharePoint content DB and often this links are used as primary keys to link one table with another. Fields
which are used to store these links (for instance tp_DirName from the AllUserData table) allow storing only 256 characters.
There are several ways that you can resolve or mitigate URL length problems in the SharePoint Server 2010 environment. The following list provides suggestions:
1. Upgrade all the end-user browsers to Internet Explorer 8, which has a longer URL length limit.
2. Use shorter names for sites, folders, and documents and control the depth of the site and folder structures to reduce the lengths of URLs.
3. If possible or allowed, use ASCII names for sites, folders, and documents. This will avoid situations where the URL will be lengthened by being encoded.
4. To reduce the risk that the SharePoint Server 2010 end-users will encounter problems because of URL length limitations, we recommend that you apply the following effective limits in the deployment:
256 Unicode (UTF-16) Code units - the effective file path length limitation, including a domain/server name
128 Unicode (UTF-16) Code units - the path component length limitation
More reference:
http://technet.microsoft.com/en-us/library/ff919564(v=office.14).aspx
http://sharepointknowledgebase.blogspot.in/2013/04/url-path-length-restrictions-in.html#.VKJN53BJA
Best regards,
Sara Fan -
Framemaker uses <$filename> for short file name, can we edit this to change appearance? We do not want the short file name of long filename to include the .fm extension can this be removed or modified to make this happen? In compiling our books it would be helpful to not have this extension appear as it then requires us to create extra files without them.
See: System Variables
-
Sender file adapter - Can I use *.xml for the file name
Hi Gurus,
I have some interfaces where I need to pick the file from a directory. The name of the file will have Data<i>time stamp</i> as the naming convention. Can I use *.xml to pick up my files from this directory?
The help.sap.com documentation says that we can use this naming convention.
<b>
● File Name
Specify the name of the file that you want to process. The name can contain placeholders (*, ? (placeholders for exactly one character)) so that you can select a list of files for processing.
</b>
I tried using *.xml for my file name in the communication channel, XI is not picking up this file.
Please let me know if you have the solution.
Thanks
KalyanMurthy,
Thanks for the reply.
I am using GuildFTP tool as my FTP server. In this tool, all the permissions were given for the file to pick up.
The status of the file is good.
Where in the file adapter configuration I have to select 'Read-only'?
The file adapter is working perfect with the exact name of the file.
Thanks
Kalyan -
Individual report path with defined file name from the report settings in Testsand 2012
Hi,
I have following task:
I want to test stand 2012 in each sequence to change the path of the report file. But the naming of the file is to be maintained as these settings can be made from TestStand into the report (DisplayName + _Report_ [<FileDate>] [<FileTime>] <unique>. <File Extension). I can not find now, however, the / callback parameter on which the components are assembled path and file in TestStand.
While I can read about the callback "GetReportFilePath" the path and file name, and with the expression: Parameters.ReportFilePath = "c: \ \ electro \ \ SHARE \ \ test protocols \ \ Test Logs \ \" change the path, but the file name will no longer be formed from the settings of TestStand.
I have the suspicion that I'm just not accreting at the right place. Can someone please give me a hint?
greeting Michael
Greetings MichaelSee Oracle Metalink,
..Oracle Portal Technical Forum,
....Subject: PORTAL - uploading files (file attachments) with file names.
This message thread outlines javascript code that automatically captures the filename during an upload. -
Ask for the file name when printing on XP x64
I have just installed my CS3 on Windows XP x64. Installation was successful and all is working fine. But there are few things which are working differently and I can not find any way to fix it.
One of the problems I have is that I can not have it so that I will be asked for the name of the PDF file created. It simply goes through and allocates name of the file used for printing. It happens for all applications i.e. Word, Excel, InDesign, Corel. In my automatic processes I realy need to be prompted for the file name / location. Is it possible to modify some settings to have it under XP x64 ??? I hope it is.
Thanks for advise.
TonyI would like to add few details which may help to find the source of the problem.
When I will select Adobe PDF as a printer, then click on Properties and select
Prompt for Adobe PDF filename
in Adobe PDF Output Folder then printing starts and will not progress at all. If I will change the Adobe PDF Output Folder to local it prints OK but is not asking for the file name / destination.
How I can have it printing and asking for the file name / destination ? Or maybe on XP x64 it is not possible at all ?
Regards,
Tony -
# Question
When I open the "Save Page As" window, the drop-down box for the file name shows files that were saved long ago. This is not cleared by any "clear history" function that I can find. How do I clear this?Hello.
I believe this is a Windows related issue, since it's the windows Save File manager we're talking about here (right?). You should contact Microsoft for help on that one, I believe. You'd expect to be able to delete the entries by simply tapping ''Delete'' on your keyboard when they are focused (that's how it goes for deleting specific form autocomplete entries in Firefox), but I haven't tried that.
I'm sorry I can't be of more help. -
Getting complete full path of a file name
Greetings Java developer!
I am having a problem in my JSF program to get a complete full path of a file name if I runs it using a browser other than IE.
Here is the code I used to retrieve the complete full path of a fine name in my program.
UploadedFile uploadedFile =
fileUpload1.getUploadedFile();
String uploadedFileName =
uploadedFile.getOriginalName();
note: fileUpload1 is a UI component of sun.rave.web.ui.model.
The expected result would be i.e.:
C:\\abc\file.txt or /abc/file.txt
It works in the IE browser, but does NOT in Mozilla, Firefox, and Netscape. Is anyone have a clue to resolve this problem? Please advice.
Thanks!
jsfNewbie
Message was edited by:
jsfNewbieHi,
The tutorial on file upload
http://developers.sun.com/jscreator/learning/tutorials/2/file_upload.html
has been updated to include this information. Pasting the relevant code from the tutorial:
public String uploadFileButton_action() {
UploadedFile uploadedFile = fileUpload1.getUploadedFile();
String uploadedFileName = uploadedFile.getOriginalName();
// Some browsers return complete path name, some don't
// Make sure we only have the file name
// First, try forward slash
int index = uploadedFileName.lastIndexOf('/');
String justFileName;
if ( index >= 0) {
justFileName = uploadedFileName.substring( index + 1 );
} else {
// Try backslash
index = uploadedFileName.lastIndexOf('\\');
if (index >= 0) {
justFileName = uploadedFileName.substring( index + 1 );
} else {
// No forward or back slashes
justFileName = uploadedFileName;
} -
Variable subsitution for target file names
Hi All,
I am using variable subsitution for dynamic file names. I am using the multimapping for multiple files in the target.So i coluld not able to use the dynamic configuration for file names. Now i want to replace all the spaces in the filename to underscore.
For example
My payload filed value "file name in the target file".
Now my filename "file_name_in_the_target_file".
How to achieve this using Variable subsitution.
Regards,
Ramalakshmi.GUse replaceString Function.
file name
Constant (" ") --> replaceString -------> TargetField
Constant ("_")
Regards
Ramesh
Maybe you are looking for
-
HOWTO: Startup/Shutdown Sounds in Openbox
In this tutorial, I will show you how to add startup and shutdown sounds with Openbox, a light-weight window manager. In theory, this should work with any window manager that uses a startup script (or, if you use the startx command, .xinitrc could be
-
Kernel Panic problem - Please please help!!
Hi there, I've been having issues with this for some time now - Macbook Pro crashing/black screening with the only option being to power off and reboot. My last error Report came up as follows: Interval Since Last Panic Report: 1047 sec Panics Sinc
-
Lenovo U400 windows 7 home premium Bit disables easycam
I am having trouble opening up the easycam program. The integrated camera works, I know because I can skype with it, but I cannot open up the easycam program just to take pictures. It's recognized in device manager and I've un-installed/installed mul
-
I just purchaed a used 2009 24" Imac. The guy I bought it from had purchased it as a refurb from an apple store. He was not a 'mac guy' so didn't know much about using it, hence did not do a factory restore before selling it to me. I followed the ins
-
Wifi keeps disconnecting on MacBook Pro
While my ipad, iphone, and apple tv maintain a consistent wifi connection, my macbook pro has recently been disconnecting every few minutes. Has anyone experienced a simlar issue or have any ideas on a fix? The network is password protected and doe