‎2006 Oct 11 7:31 PM
Hi,
I have a selection screen, In that i want to create a field, where for this field, if i press F4 windows pop up should come, where i can see the local hard disk file. From this i can go and click the file, then the complete path should come in the selection screen field.How should i do this. plz help, me it is very urgent.
Kumar
‎2006 Oct 11 8:05 PM
Hi Nitin,
Look at the link
http://www.sap-img.com/abap/download-to-excel-with-format-border-color-cell-etc.htm
Regards
Sudheer
‎2006 Oct 11 7:33 PM
‎2006 Oct 11 7:35 PM
‎2006 Oct 11 7:38 PM
Hi,
parameters: p_file1 like rlgrap-filename.
at selection-screen on value-request for p_file1.
data: l_file like ibipparms-path, "Local file for upload/download
l_repid like syst-cprog, "ABAP program, caller in external
"procedures
l_dynnr type syst-dynnr. "ABAP program, number of current
"screen
l_repid = sy-cprog.
l_dynnr = sy-dynnr.
move: filename to l_file.
call function 'F4_FILENAME'
exporting
program_name = l_repid
dynpro_number = l_dynnr
field_name = 'P_FIEL1'
importing
file_name = l_file.
move: l_file to filename.
tHANKS,
Ramakrishna
‎2006 Oct 11 7:45 PM
Thank you so much all.
I also has one more requiremt.
ON the output list, i need to download the list to a file locally. I have created a button on a appn toolbar.
If i click the button i should get the same pop up and if i give the name of the file, the list should be saved i that file in particular path.
Plz help me and make my object done.
thanks you all once again.
Kumar
‎2006 Oct 11 7:49 PM
Hi,
YOu can use FM DOWNLOAD function module. It shows the popup automatically,
Thanks,
Ramakrishna
‎2006 Oct 11 7:59 PM
No ramakrishna,
I think download is for the internal table data download.
but i want to download the list with one click.
do anybody has any links on this. previously this question may ask.
kindly tell me..
Kumar
‎2006 Oct 11 8:20 PM
Hi Nitin,
I think you can use CODE similar to below.
Check the function module SXMI_XMB_SYSLOG_READ for more details. It contains similar logic.
SUBMIT RSLG0000 LINE-SIZE 255
WITH TR_TERM EQ '*'
WITH TR_DATE EQ FROM_DATE
WITH TR_TIME EQ FROM_TIME
WITH TR_EDATE EQ TO_DATE
WITH TR_ETIME EQ TO_TIME
WITH TR_CPU EQ SERVER_NAME
WITH TR_PAGES EQ '003' " Begrenzung Anzahl Seiten
WITH TR_USER EQ LOOKING_FOR_USER
WITH NOCODEVC EQ 'X'
WITH NOCOTASK EQ 'X'
WITH NOCOMAND EQ 'X'
WITH NOCOTRAN EQ 'X'
WITH NOCOTERM EQ 'X'
EXPORTING LIST TO MEMORY
AND RETURN.
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
LISTOBJECT = LIST_IN_MEMORY
EXCEPTIONS
OTHERS = 99.
Thanks,
Ramakrishna
Message was edited by: Ramakrishna Prasad Ramisetti
‎2006 Oct 11 7:39 PM
Here is another way....
report zrich_0001.
data: ifiletable type filetable.
data: xfiletable like line of ifiletable.
data: rc type i.
parameters: p_file1 type localfile default'C:test.txt'.
at selection-screen on value-request for p_file1.
call method cl_gui_frontend_services=>file_open_dialog
EXPORTING
* WINDOW_TITLE =
* DEFAULT_EXTENSION =
* DEFAULT_FILENAME =
* FILE_FILTER =
INITIAL_DIRECTORY = 'C:'
* MULTISELECTION =
changing
file_table = ifiletable
rc = rc
* USER_ACTION =
EXCEPTIONS
FILE_OPEN_DIALOG_FAILED = 1
CNTL_ERROR = 2
ERROR_NO_GUI = 3
others = 4.
.
read table ifiletable into xfiletable index 1.
if sy-subrc = 0.
p_file1 = xfiletable-FILENAME.
endif.
Regards,
Rich Heilman
‎2006 Oct 11 8:05 PM
Hi Nitin,
Look at the link
http://www.sap-img.com/abap/download-to-excel-with-format-border-color-cell-etc.htm
Regards
Sudheer