10-06-2008 8:24 PM
Hello friends,
I am able to open a directory and write data to it.
However when I go to AL11 and find for it am unable to see the file.
In debug mode I see the SY-subrc = 0.
OPEN DATASET p_apmap1 FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
Where Else should I see the file.
Thanks,
Ster.
10-06-2008 8:33 PM
Hello,
A couple of questions.
Is the directory that you are writing defined in AL11?
Did you CLOSE DATASET?
Can you open the file that you wrote?
Regards
Greg Kern
10-06-2008 8:33 PM
Hello,
A couple of questions.
Is the directory that you are writing defined in AL11?
Did you CLOSE DATASET?
Can you open the file that you wrote?
Regards
Greg Kern
10-06-2008 8:53 PM
Thanks,
I can close the file.
I am trying to read the file using a difrent program and it reads as well.
But when I see in AL11, I am unable to locate the file.
Any Idea if the file stores some where else.
Ster
10-06-2008 9:08 PM
Hello,
Is the directory(or even the parent of the directory) that you are writing defined/listed in AL11?
Or do you create the directory with your program?
You may need to configure AL11 to read the directory that you are writing to.( or have Basis configure it for you ).
Regards
Greg Kern
10-07-2008 4:36 AM
Hello,
Try using this FM
Change i_path to whichever directory you are writing to
you should be able to see the file then
data: lv_opath like dxfields-longpath.
data: ev_server_name like btctgtsrvr-srvname,
server_name like msxxlist-name.
call 'C_SAPGPARAM'
id 'NAME' field 'rdisp/myname'
id 'VALUE' field ev_server_name.
if sy-subrc <> 0.
clear ev_server_name.
endif.
move ev_server_name to server_name.
call function 'F4_DXFILENAME_TOPRECURSION'
exporting
i_location_flag = 'X'
i_server = server_name
i_path = 'D:\'
* FILEMASK = '*.*'
* FILEOPERATION = 'R'
importing
* O_LOCATION_FLAG =
* O_SERVER =
o_path = lv_opath
* ABEND_FLAG =
EXCEPTIONS
RFC_ERROR = 1
ERROR_WITH_GUI = 2
OTHERS = 3
.
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
10-07-2008 5:13 AM
Hi,
Use this FM
If you have multiple application sever best use this FM
CALL FUNCTION 'DX_FILE_WRITE'
EXPORTING
filename = target_filename
server = target_server
pc = space
TABLES
data_tab = lt_data_fix
EXCEPTIONS
OTHERS = 4.
Thanks,
Durai.V
Edited by: Durai V on Oct 7, 2008 6:14 AM
10-07-2008 5:17 AM
hi use the transaction CG3z to move the file from presentation server to application server, instead of doing code for that , u can use this