2007 Aug 10 11:33 AM
Hi ,
I can able to save comma delimited TEXT file in specified path but at the same time i want to open that automatically. For XCEL sheet I able to do using following function modules but not for TEX file.
Please help me...thanks in advance.
CALL FUNCTION 'REGISTRY_GET'
EXPORTING
key = 'protocol\StdFileEditing\Server'
section = 'ExcelWorkSheet'
IMPORTING
value = excel_command.
dw_file1 = file path.
CALL FUNCTION 'WS_EXECUTE'
EXPORTING
commandline = dw_file1
program = excel_command
EXCEPTIONS
frontend_error = 1
no_batch = 2
prog_not_found = 3
illegal_option = 4
OTHERS = 5.
Hi ,
I can able to save comma delimited TEXT file in specified path but at the same time i want to open that automatically. For XCEL sheet I able to do using following function modules but not for TEX file.
Please help me...thanks in advance.
CALL FUNCTION 'REGISTRY_GET'
EXPORTING
key = 'protocol\StdFileEditing\Server'
section = 'ExcelWorkSheet'
IMPORTING
value = excel_command.
dw_file1 = file path.
CALL FUNCTION 'WS_EXECUTE'
EXPORTING
commandline = dw_file1
program = excel_command
EXCEPTIONS
frontend_error = 1
no_batch = 2
prog_not_found = 3
illegal_option = 4
OTHERS = 5.
2007 Aug 10 1:57 PM
IN WS_EXECUTE,
pass the filepath in CommandLine and pass "EXCEL" to program. It will do the trick for you.
2007 Aug 10 2:06 PM
Hi Rama,
try this:
*
DATA: <b>DATEI TYPE STRING</b> value 'C:\TEST.XLS'.
*
CALL METHOD CL_GUI_FRONTEND_SERVICES=>EXECUTE
EXPORTING
DOCUMENT = DATEI.
Take your on value for DATEI.
Regards, Dieter
2007 Aug 13 2:12 PM
Hi ...I want to open TXT format file ....I used following FM's to open Xcel sheet...but i don't know what are the values should pass for "key" and "section"
in the FM "REGISTRY_GET" to open TXT format file.
CALL FUNCTION 'REGISTRY_GET'
EXPORTING
key = 'protocol\StdFileEditing\Server'
section = 'ExcelSheet'
IMPORTING
value = excel_command.
CONCATENATE '"' dw_file1 '"' INTO dw_file1.
CALL FUNCTION 'WS_EXECUTE'
EXPORTING
commandline = dw_file1
program = excel_command
EXCEPTIONS
frontend_error = 1
no_batch = 2
prog_not_found = 3
illegal_option = 4
OTHERS = 5.
Please help me how to open TXT format file
2007 Aug 10 2:07 PM
Hi rama,
1. Eg. there is a file
d:\abc.txt
and now u want to open directly with excel.
2. Just copy paste
3.
REPORT ABC.
CALL FUNCTION 'GUI_RUN'
EXPORTING
<b> COMMAND = 'EXCEL'
PARAMETER = 'D:\ABC.TXT'</b>
CD =
IMPORTING
RETURNCODE =
.
.
regards,
amit m.
2007 Aug 13 2:01 PM
Hi ...I want to open TXT format file ....I used following FM's to open Xcel sheet...but i don't know what are the values should pass for "key" and "section"
in the FM "REGISTRY_GET" to open TXT format file.
CALL FUNCTION 'REGISTRY_GET'
EXPORTING
key = 'protocol\StdFileEditing\Server'
section = 'ExcelSheet'
IMPORTING
value = excel_command.
CONCATENATE '"' dw_file1 '"' INTO dw_file1.
CALL FUNCTION 'WS_EXECUTE'
EXPORTING
commandline = dw_file1
program = excel_command
EXCEPTIONS
frontend_error = 1
no_batch = 2
prog_not_found = 3
illegal_option = 4
OTHERS = 5.
Please help me how to open TXT format file.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |