‎2011 Mar 02 11:11 AM
Hi Friends,
i am getting an error, when i am uploading a file. This is because of File Path is more that 1024 char's.
I am using Method FILE_OPEN_DIALOG.
File name size is 1024.
FILENAME CHAR 1024 0 File name
Can you please tell me the ulternate solution for uploading a large file path ( more that 1024 char) files.
Thanks in advance.
Rgards,
Kumar.
‎2011 Mar 02 11:27 AM
Hi Nivas,
try FM 'TMP_GUI_FILE_OPEN_DIALOG' This Function Module alows us to Select a file in Runtime.
Ex
DATA: RETURN TYPE I.
call Function 'TMP_GUI_FILE_OPEN_DIALOG'.
EXPORTING
WINDOW_TITLE = 'FLAT FILE SELECTION'
IMPORTING
RC = RETURN
FILE_TABLE = IT_FNAM.
Regards,
Murthy.
‎2011 Mar 02 11:42 AM
Hi Kumar,
no idea in SAP,
but in Windows OS you can connect a directory as a net drive in Windows Explorer.
If you are using Windows, you can connect a path
SERVER\Directory_1\...\Directory_n
to a free single drive char, e.g. "W".
So you can access files with W:. instead of the long term. Maybe it help you!
Regards,
Klaus
‎2011 Mar 02 11:57 AM
best method for this would be: copy it to your desktop or a particular drive. then upload it from there.. easy solution
‎2011 Mar 02 1:52 PM
store the file on apps server or server that can be reached from SAP and where SAP has open/read permissions, and use OPEN DATASET, READ..., CLOSE.... see ABAP help for these keywords if you're not familiar with reading from a server... you can handle very, very long record lengths with this methodology.
‎2011 Mar 02 2:12 PM
Hi
Try calling function module 'F4_FILENAME' under ABAP event AT SELECTION-SCREEN OUTPUT ON VALUE REQUEST FOR <p_name>.
Try doing where used list on the function module and you should get many examples in the system.
Regards,
Rupesh