2007 Jul 19 1:21 PM
Hi all,
Using the "OPEN DATASET", I am trying to create a file in a directory having spaces embedded in the name, e.g.
INTRANET.BARCAPINT.COM\DFS-EMEA\GROUP\GLB\FMCSGLB\WEALTH MANAGEMENT\WM REGION\SHARED\MANAGEMENT\SAP HR TEST\FSTEST.TXT where there is space between "Wealth" and "Management".
The problem I have is that only part of the directory up to "WEALTH" gets picked up(
INTRANET.BARCAPINT.COM\DFS-EMEA\GROUP\GLB\FMCSGLB\WEALTH) and the rest gets discarded. I want to use the full directory name, which in this case has spaces in between, to create files in.
How can I do this? Any ideas?
Regards,
Shabbar
Hi all,
Using the "OPEN DATASET", I am trying to create a file in a directory having spaces embedded in the name, e.g.
INTRANET.BARCAPINT.COM\DFS-EMEA\GROUP\GLB\FMCSGLB\WEALTH MANAGEMENT\WM REGION\SHARED\MANAGEMENT\SAP HR TEST\FSTEST.TXT where there is space between "Wealth" and "Management".
The problem I have is that only part of the directory up to "WEALTH" gets picked up(
INTRANET.BARCAPINT.COM\DFS-EMEA\GROUP\GLB\FMCSGLB\WEALTH) and the rest gets discarded. I want to use the full directory name, which in this case has spaces in between, to create files in.
How can I do this? Any ideas?
Regards,
Shabbar
2007 Jul 19 1:48 PM
Hi Ali,
Please do check again, if the directory avaliable in the server is with same name (WEALTH MANAGEMENT) as you have mentioned in the post..
Thanks and Regards,
Ram.
2007 Jul 19 1:50 PM
hi syntax is
reward if useful
OPEN DATASET p_file FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
*--- Display error messages if any.
IF sy-subrc NE 0.
MESSAGE e001(zsd_mes).
EXIT.
ELSE.
*---Data is downloaded to the application server file path
LOOP AT it_tab2 INTO wa_tab2.
TRANSFER wa_tab2 TO p_file.
ENDLOOP.
ENDIF.
*--Close the Application server file (Mandatory).
CLOSE DATASET p_file.
2007 Jul 19 1:52 PM
Is your variable (directory_name) used in statement
OPEN DATASET directory_nameis long enough to hold the path.
Try creating logical path from FILE transaction if path is too long to specify in
OPEN DATASETstatement
2007 Jul 19 1:52 PM
If you are running on a UNIX / LINUX based server, spaces are simply not permitted in file / dir names.
Spaces are a Windows / Mac "thing."
You will need to replace the blanks with underscores or something simliar if your OS does not permit spaces... and that appears to be the case here.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |