Download file from AL11 into CSV to load MD into BPC
Hi All
I have an issue in downloading file from AL11 which is in the form of CSV.
1) I have exported the masterdata for Costcenter using a Open hub.
2) The file is residing at the app server AL11 in the form of CSV.
3) I want to down load the file into CSV and upload that file into BPC NW for my costcenter diemension.
When i am downloading the file from AL11 , the total records are merged into one row, i cannot download same as it is available in AL11.
I have followed the HOW TO GUIED : HOW TO AUTOMATE MD LOADING IN BPC nw.
I m unable to get the file properly on to my PC.
could you please help me .
AK
You should open your file in AL11, then clicking 'List' then 'Save' you'll be able to download your file. There will be some header lines indeed.
You'd better use an open hub with your local client as destination if you need the file.
Similar Messages
-
About "Upload and download files from ADF into blob type colum."
hi
Using JDeveloper 10.1.3.3.0 I have tried the example available for download from this blog post by Jakub Pawlowski:
"Upload and download files from ADF into blob type colum."
at http://kuba.zilp.pl/?id=1
First a thank you to Jakub for this interesting example.
I have a question about a PDF file that I uploaded using the example.
The file has a size of 10445518 bytes.
After I upload that file, the blob column has a value with a size of 10445516 bytes, 2 bytes less.
SQL> select file_name, dbms_lob.getlength(stored_file) from blob_table;
FILE_NAME
DBMS_LOB.GETLENGTH(STORED_FILE)
ADF-DeveloperGuide-4GL-B25947_01.pdf
10445516If I download that file using the example, it has the same size as the blob value, 10445516 bytes.
If I open the downloaded file, using Adobe Reader 8.1.1, it first shows this message:
"The file is damaged but is being repaired."
After that, there is not problem using the PDF file in Adobe Reader.
I have tried this with both Internet Explorer 6 and Firefox 2.0.0.11.
I have also tried this with other (smaller) files, and those upload and download correctly.
question:
Why are those 2 bytes lost during upload?
many thanks
Jan VerveckenHi!
I can only post you my code that works for me and as I said I had same problems but can't remember what solved them. My code:
public void fileUploaded(ValueChangeEvent event)
FacesContext fc = FacesContext.getCurrentInstance();
UploadedFile file = (UploadedFile) event.getNewValue();
if (file != null && file.getLength() > 0)
// here I have some messages written and a call to the method on AM to save the uploaded file to the DB
private BlobDomain newBlobDomainForInputStream(InputStream in)
throws SQLException, IOException
BlobDomain loBlob = new BlobDomain();
OutputStream out = loBlob.getBinaryOutputStream();
writeInputStreamToWriter(in, out);
in.close();
out.close();
return loBlob;
private static void writeInputStreamToWriter(InputStream in,
OutputStream out)
throws IOException
byte[] buffer = new byte[8192];
int charsRead = 0;
while ((charsRead = in.read(buffer, 0, 8192)) != -1)
out.write(buffer, 0, charsRead);
* Launch the upload - see fileUploaded() for actual upload handling.
* @return null navigation event - we stay on this page
public String UploadButton_action()
if (this.getMyInputFile().getValue() == null)
FacesContext context = FacesContext.getCurrentInstance();
FacesMessage message =
new FacesMessage(FacesMessage.SEVERITY_WARN, JSFUtils.getStringFromBundle("fileupload.emptyfielderror"),
null);
context.addMessage(this.getMyInputFile().getId(), message);
return null;
* Setter for inputFile UI Component.
* @param inputFile inputFile UI component
public void setMyInputFile(CoreInputFile inputFile)
this.myInputFile = inputFile;
* Getter for inputFile UI Component.
* @return inputFile UI component
public CoreInputFile getMyInputFile()
return myInputFile;
}fileUploaded is a valueChangeListener on inputFile and UploadButton_action is as the name says the action for upload button.
Hope this helps. If not, than your problem is probably not the same as mine was, although the message about file corrupted was the same.
Next thing you can check in this case is if your file exceeds max file upload size. I don't know the exact default value, but if the file is too long I think this upload logic will upload only a part of the file and save it to the DB which can also lead to the same file corrupted error.
You can set the max upload value in web.xml like this:
<context-param>
<!-- Maximum memory per request (in bytes) -->
<param-name>oracle.adf.view.faces.UPLOAD_MAX_MEMORY</param-name>
<!-- Use 5000K -->
<param-value>5120000</param-value>
</context-param>
<context-param>
<!-- Maximum disk space per request (in bytes) -->
<param-name>oracle.adf.view.faces.UPLOAD_MAX_DISK_SPACE</param-name>
<!-- Use 10,000K -->
<param-value>15360000</param-value>
</context-param> -
Download File from DMS into WD ABAP gives junk data
Hi Experts ,
I want to achieve following functionality in WD ABAP.
User should be able to upload and download any file ( in any fromat ) , to / form document management server.
Since user can upload / download any file so I am using a file download UI , which would open any file in a new window.
I have searched about this in SDN ([ link |https://wiki.sdn.sap.com/wiki/display/Snippets/WDA%20Retrieve%20Data%20from%20DMS%20server]) and I have created a FM which gives me Xstring corresponding to the file in the DMS system.
then I pass this Xstring data to my context 'DATACONTENT' which is bound to file download UI (data property). But When I execute this application I am getting junk data in the new window. Please correct me where I am making a mistake.
following is the code in FM which in turn passes v_xstring ( of type xstring ) to WD ABAP . Then I bind this value to context
'DATACONTENT'.
wd_context->set_attribute( name = 'DATACONTENT' value = V_XSTRING ).
FUNCTION ZTESTING_EP.
""Local Interface:
*" IMPORTING
*" VALUE(DOCUMENTTYPE) LIKE BAPI_DOC_AUX-DOCTYPE DEFAULT 'IVF'
*" VALUE(DOCUMENTNUMBER) LIKE BAPI_DOC_AUX-DOCNUMBER DEFAULT 1
*" VALUE(DOCUMENTPART) LIKE BAPI_DOC_AUX-DOCPART DEFAULT 000
*" VALUE(DOCUMENTVERSION) LIKE BAPI_DOC_AUX-DOCVERSION DEFAULT 00
*" EXPORTING
*" VALUE(C) LIKE BAPIEMPLB-RETURN
*" VALUE(V_XSTRING) TYPE XSTRING
*" VALUE(RETURN) TYPE BAPIRET2
data: ls_docfiles type bapi_doc_files2,
ls_dms type dms_doc_files,
lt_docfiles type standard table of bapi_doc_files2.
select single * from dms_doc_files
into ls_dms
where "Retrieve file
MOVE '0000000000000000000000001' to DOCUMENTNUMBER .
MOVE '000' to DOCUMENTPART .
MOVE '00' to DOCUMENTVERSION .
if sy-subrc = 0.
ls_docfiles-documenttype = DOCUMENTTYPE.
ls_docfiles-documentnumber = DOCUMENTNUMBER .
ls_docfiles-documentpart = DOCUMENTPART .
ls_docfiles-documentversion = DOCUMENTVERSION.
endif.
call function 'BAPI_DOCUMENT_CHECKOUTVIEW2'
exporting
documenttype = ls_docfiles-documenttype
documentnumber = ls_docfiles-documentnumber
documentpart = ls_docfiles-documentpart
documentversion = ls_docfiles-documentversion
documentfile = ls_docfiles
getstructure = '1'
getcomponents = 'X'
getheader = 'X'
pf_ftp_dest = 'SAPFTPA'
IMPORTING
return = return
tables
documentfiles = lt_docfiles.
MOVE return to return.
data: i_bin type standard table of sdokcntbin,
i_info type standard table of scms_acinf,
v_info type scms_acinf,
v_id type sdok_phid,
v_cat type sdok_stcat.
if sy-subrc = 0.
loop at lt_docfiles into ls_docfiles.
v_id = ls_docfiles-docfile.
v_cat = ls_docfiles-storagecategory.
call function 'SCMS_DOC_READ'
exporting
stor_cat = v_cat
doc_id = v_id
phio_id = ls_docfiles-file_id
tables
access_info = i_info
content_bin = i_bin
exceptions
bad_storage_type = 1
bad_request = 2
unauthorized = 3
comp_not_found = 4
not_found = 5
forbidden = 6
conflict = 7
internal_server_error = 8
error_http = 9
error_signature = 10
error_config = 11
error_format = 12
error_parameter = 13
error = 14
others = 15
endloop.
if sy-subrc <> 0.
else.
data: v_xstring type xstring.
read table i_info into v_info index 1.
call function 'SCMS_BINARY_TO_XSTRING'
exporting
input_length = v_info-comp_size
importing
buffer = v_xstring
tables
binary_tab = i_bin
exceptions
failed = 1
others = 2
if sy-subrc <> 0.
endif.
endif.
endif.
ENDFUNCTION.
Thanks in advance
AbhayHi Abhay,
I have used the belwo method to achive the same:
1) Call funtion 'CVAPI_DOC_GETDETAIL' to get the document details.This function module returns PT_FILES tables parameter
2) Loop at PT_FILES and call the 'CV120_GET_MIME_TYPE' funtion by passing DAPPL of PT_FILES to get the mime type.
3)call function 'CVAPI_DOC_CHECKOUTVIEW' by passing PT_FILES values form above retrived to the function module in this step
4)Loop at the content and convert to XSTRING using SCMS_XSTRING_TO_BINARY
After getting the XSTRING,MIMETYPE use ATTACH_FILE_FOR_RESPONSE method of CL_WD_RUNTIME_SERVICES to download the file
Sample Code:
CALL FUNCTION 'CVAPI_DOC_GETDETAIL'
EXPORTING
pf_dokar = ls_draw-dokar
pf_doknr = iv_documentnumber
pf_dokvr = ls_draw-dokvr
pf_doktl = ls_draw-doktl
pf_read_drat = abap_true
IMPORTING
psx_draw = ls_draw
TABLES
pt_drat = et_drat
pt_files = et_files
EXCEPTIONS
not_found = 1
no_auth = 2
error = 3
OTHERS = 4.
ENDIF.
IF et_files IS NOT INITIAL.
LOOP AT et_files INTO ls_files.
CALL FUNCTION 'CV120_GET_MIME_TYPE'
EXPORTING
pf_dappl = ls_files-dappl
* PF_FILE =
IMPORTING
pfx_mimetype = lv_mimetype.
CLEAR lt_files_checkout.
CLEAR lt_content.
ls_files_checkout-description = ls_files-description.
ls_files_checkout-lo_objid = ls_files-lo_objid.
ls_files_checkout-ph_objid = ls_files-ph_objid.
APPEND ls_files_checkout TO lt_files_checkout.
CALL FUNCTION 'CVAPI_DOC_CHECKOUTVIEW'
EXPORTING
pf_dokar = ls_draw-dokar
pf_doknr = iv_documentnumber
pf_dokvr = ls_draw-dokvr
pf_doktl = ls_draw-doktl
pf_content_provide = gc_content_provide
* PS_API_CONTROL =
* PF_STD_URL = 'X'
IMPORTING
psx_message = ls_message
psx_draw = ls_draw
TABLES
pt_files = lt_files_checkout
* PTX_COMPONENTS =
ptx_content = lt_content.
IF ls_message CA gc_error_a.
ev_fail = abap_true.
ELSE.
CLEAR lt_xdata.
CLEAR ls_bindata.
*Data into String
LOOP AT lt_content INTO ls_content.
lv_size = ls_content-orln.
ls_xdata-line = ls_content-orblk.
APPEND ls_xdata TO lt_xdata.
ENDLOOP.
* -- Convert XData to Xstring
CALL FUNCTION 'SCMS_BINARY_TO_XSTRING'
EXPORTING
input_length = lv_size
IMPORTING
buffer = ls_bindata
TABLES
binary_tab = lt_xdata
EXCEPTIONS
failed = 1
OTHERS = 2.
IF sy-subrc NE 0.
ev_fail = abap_true.
ELSE.
ls_file_list-filename = ls_files-description.
ls_file_list-mimetype = lv_mimetype.
ls_file_list-content = ls_bindata.
ls_file_list-application_id = ls_files-lo_objid.
ls_file_list-file_id = ls_files-ph_objid.
APPEND ls_file_list TO et_file_list.
ENDIF.
ENDIF.
ENDLOOP.
ENDIF.
Regards,
Madhu -
Upload and download files from ADF into blob type colum
i have a question about Kuba's example ( http://kuba.zilp.pl/?id=1# )
after you have upload the word documents, and when u click on the downoad button that document is open... i want to know if it is possibile that afer you have download the document, you make some changes on it and then to save these changes on the database? any idea if this can be done? Thanks in advance :)If you download the entire application from that link, the create.sql file is included in the \DBModel\model\zilp\testcase\dbmodel folder
It's a rather complicated matter in my opinion. Download the app, open it in JDev and use debug-mode to go through it step by step, so you can try to understand everything that happens.
Good luck :) -
Double quotes missing in CSV file but exist in text file from AL11
Hi I am sending a file to AL11 with one of the fields having double quotes Like "field value" . When i download into Text file i am seeing the quotes but not when download as CSV file from Al11. Any SAP notes for this . If i add multiple quotes ' """" ' to have in csv I am seeing more quotes in text file which is not accepted . Please reply if anyone worked on this before . Thanks Kamesh
The CSV file also has the quotes (check in notepad), but when opened in MS Excel, Excel has a feature to ignore double quotes and consider the comma inside the quotes as part of field, not as a field separator.
-
How to download a file from AL11 inot Excel format without collapse the col
Hi,
Please suggest how to download a file from AL11 to Excel sheet.currenlty all field are merging into single column.I writing this file via using DATASET.
Regards
RickyHi,
Try this code,
==============================================
TYPES : BEGIN OF ty_emp,
empno(2) TYPE c,
empid(10) TYPE c,
empname(3) TYPE c,
END OF ty_emp.
DATA : it_emp TYPE TABLE OF ty_emp,
wa_emp TYPE ty_emp.
DATA : pbk TYPE string.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS : p_file TYPE rlgrap-filename.
PARAMETERS : p_asfile TYPE rlgrap-filename.
SELECTION-SCREEN END OF BLOCK b1.
pbk = p_file.
OPEN DATASET p_asfile FOR INPUT IN TEXT MODE ENCODING DEFAULT.
DO.
READ DATASET p_asfile INTO wa_emp.
IF sy-subrc <> 0.
EXIT.
ENDIF.
APPEND wa_emp TO it_emp.
ENDDO.
CLOSE DATASET p_asfile.
Filling the already created file with download PS radiobutton
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE =
filename = pbk
FILETYPE = 'ASC'
append = 'X'
write_field_separator = ' '
HEADER = '00'
TRUNC_TRAILING_BLANKS = ' '
WRITE_LF = 'X'
COL_SELECT = ' '
COL_SELECT_MASK = ' '
DAT_MODE = ' '
IMPORTING
FILELENGTH =
TABLES
data_tab = it_emp
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6
HEADER_NOT_ALLOWED = 7
SEPARATOR_NOT_ALLOWED = 8
FILESIZE_NOT_ALLOWED = 9
HEADER_TOO_LONG = 10
DP_ERROR_CREATE = 11
DP_ERROR_SEND = 12
DP_ERROR_WRITE = 13
UNKNOWN_DP_ERROR = 14
ACCESS_DENIED = 15
DP_OUT_OF_MEMORY = 16
DISK_FULL = 17
DP_TIMEOUT = 18
FILE_NOT_FOUND = 19
DATAPROVIDER_EXCEPTION = 20
CONTROL_FLUSH_ERROR = 21
OTHERS = 22
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
==============================================
Regards,
Krrishna -
Issuse in Uploading a .CSV file from AL11 to Database table.
Hi All,
I have a .CSV file (UTF-8 format) which contains Chinese Characters.
I uploaded the file to AL11 and it shows that all teh data is correct in AL11.
Now i am using a program to Read file from AL11 and update a ztable but some of the characters are
modified and some are getting saved as junk characters.
Kindly let me know what can be done.
Regards,
JoseJose,
The issue is pretty much clear. Ask the IT team to change the regional settings for languages. Normally we don't have
access to Korean, Traditional chinese....etc.
You might be getting characters/symbols as ?? ##. Go ahead and change the regional setting.
This will solve your issue. -
How to download file from application server
Hi Experts,
I developed report and execute in background mode. for this i used Open dataset transfer and close dataset . i got the requried output . But in this case user want downloaded file on presentation server so can anyone tell me How to download file from application server?
i know it is possible through Tcode CG3Y. but i want code in program.This code will download a file to your Client package by package, so it will also work for huge files.
*& Report ZBI_DOWNLOAD_APPSERVER_FILE
REPORT zbi_download_appserver_file.
PARAMETERS: lv_as_fn TYPE sapb-sappfad
DEFAULT '/usr/sap/WBP/DVEBMGS00/work/ZBSPL_R01.CSV'.
PARAMETERS: lv_cl_fn TYPE string
DEFAULT 'C:\Users\atsvioli\Desktop\Budget Backups\ZBSPL_R01.CSV'.
START-OF-SELECTION.
CONSTANTS blocksize TYPE i VALUE 524287.
CONSTANTS packagesize TYPE i VALUE 8.
TYPES ty_datablock(blocksize) TYPE x.
DATA lv_fil TYPE epsf-epsfilnam.
DATA lv_dir TYPE epsf-epsdirnam.
DATA ls_data TYPE ty_datablock.
DATA lt_data TYPE STANDARD TABLE OF ty_datablock.
DATA lv_block_len TYPE i.
DATA lv_package_len TYPE i.
DATA lv_subrc TYPE sy-subrc.
DATA lv_msgv1 LIKE sy-msgv1.
DATA lv_processed_so_far TYPE p.
DATA lv_append TYPE c.
DATA lv_status TYPE string.
DATA lv_filesize TYPE p.
DATA lv_percent TYPE i.
"Determine size
SPLIT lv_as_fn AT '/' INTO lv_dir lv_fil.
CALL FUNCTION 'EPS_GET_FILE_ATTRIBUTES'
EXPORTING
file_name = lv_fil
dir_name = lv_dir
IMPORTING
file_size_long = lv_filesize.
"Open the file on application server
OPEN DATASET lv_as_fn FOR INPUT IN BINARY MODE MESSAGE lv_msgv1.
IF sy-subrc <> 0.
MESSAGE e048(cms) WITH lv_as_fn lv_msgv1 RAISING file_read_error.
EXIT.
ENDIF.
lv_processed_so_far = 0.
DO.
REFRESH lt_data.
lv_package_len = 0.
DO packagesize TIMES.
CLEAR ls_data.
CLEAR lv_block_len.
READ DATASET lv_as_fn INTO ls_data MAXIMUM LENGTH blocksize LENGTH lv_block_len.
lv_subrc = sy-subrc.
IF lv_block_len > 0.
lv_package_len = lv_package_len + lv_block_len.
APPEND ls_data TO lt_data.
ENDIF.
"End of file
IF lv_subrc <> 0.
EXIT.
ENDIF.
ENDDO.
IF lv_package_len > 0.
"Put file to client
IF lv_processed_so_far = 0.
lv_append = ' '.
ELSE.
lv_append = 'X'.
ENDIF.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
bin_filesize = lv_package_len
filename = lv_cl_fn
filetype = 'BIN'
append = lv_append
show_transfer_status = abap_false
TABLES
data_tab = lt_data.
lv_processed_so_far = lv_processed_so_far + lv_package_len.
"Status display
lv_percent = lv_processed_so_far * 100 / lv_filesize.
lv_status = |{ lv_percent }% - { lv_processed_so_far } bytes downloaded of { lv_filesize }|.
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING "percentage = lv_percent - will make it fash
text = lv_status.
ENDIF.
"End of file
IF lv_subrc <> 0.
EXIT.
ENDIF.
ENDDO.
"Close the file on application server
CLOSE DATASET lv_as_fn. -
Downloading file from application server to presentation server
Hi,
We have a requirment to download file from application server to presentation server. The problem is while down loading, some of the filds showing some junk values. Instead of that junk values we have some Russian texts there. These Russian texts only coming as junk all other data is correct. The file in the appplication server is in .dbf format. We are downloading using WS_DOWNLOAD. file type is BIN and code page we didn't specified.
Thanks in Advance
Jijeesh.P.G
Message was edited by: Jijeesh.P.G
Jijeesh P Ghi jijeesh,
Welcome to SDN.
u can use to download file from application server to presentation server using the t/c CG3Y. in that it will ask the source file path and the target file path.
if u want to find the source file path in the application server, u can use the transaction AL11 to find that one.
Regards....
Arun.
Reward points if useful. -
How to delete a file from AL11??????
Hi Friends,
how can i delete a file from AL11 directory....
i have found FM's like EPS_DELETE_FILE, EDI_PORT_DELETE_FILE and some more from SAP system but those are not deleting the files....
let me know if i can write a program for this and if yes then guide me for writing the same....
Thanks,
Nagesh.reference:http://saplab.blogspot.com/2007/10/sample-abap-program-to-delete-file-from.html
REPORT ZDELETE.
Delete a file on the application server.
PARAMETERS: P_DIR LIKE RLGRAP-FILENAME
DEFAULT '/usr/sap/trans/', *it will delete files from this dir
P_FILE1 LIKE RLGRAP-FILENAME.
DATA: P_FILE(128).
DATA: W_ANS.
START-OF-SELECTION.
CONCATENATE P_DIR P_FILE1 INTO P_FILE.
check file exists
OPEN DATASET P_FILE FOR INPUT.
IF SY-SUBRC NE 0.
MESSAGE E899(BD) WITH P_FILE 'does not exist'.
EXIT.
ELSE.
CALL FUNCTION 'POPUP_CONTINUE_YES_NO'
EXPORTING
DEFAULTOPTION = 'N'
TEXTLINE1 = P_DIR
TEXTLINE2 = P_FILE1
TITEL = 'ARE YOU SURE YOU WANT TO DELETE'
START_COLUMN = 25
START_ROW = 6
IMPORTING
ANSWER = W_ANS
EXCEPTIONS
OTHERS = 1.
ENDIF.
CLOSE DATASET P_FILE.
CHECK W_ANS = 'J'.
delete
DELETE DATASET P_FILE.
IF SY-SUBRC NE 0.
MESSAGE E899(BD) WITH 'Invalid file name' P_FILE.
ELSE.
CLOSE DATASET P_FILE.
MESSAGE I899(BD) WITH P_DIR P_FILE1 'DELETED'.
ENDIF -
Uploading and downloading files from a web app (Urgent!!)
Hi everyone:
I'm developing an application in PL/SQL to upload and download files from an HTML webpage. I congured the document table and the parameters necessary in the DAD of my application.
when I upload the file using my webpage that file info is automatically uploaded to the doc table. This is as far as I have gotten.
I need to do the following:
- Place the uploaded file into a column in another table in my database as part of a text message (think of it as an email message), and delete the file from the doc table (as this is thought to be a temp table that holds the file when uploaded from my webpage)
- Retreive the file so that it can be downloaded from another web page.
The file can be a PDF, WORD DOC, etc...
I now that I can do this with InterMedia but I haven't figured out how :(
Can anyone please point me to an example or some documentation that can guide me through the process.
DB VERSION: 8.1.7
IAS VERSION: 1.0.2.2
Thanks,
Carlos AbarcaThe idea was for you to look at the code and get an idea of how to access the BLOB in the document table. IF you look at the procedure
insert_new_photo( new_description IN VARCHAR2,
new_location IN VARCHAR,
new_photo IN VARCHAR2 )
It shows how to access the blob that is stored in the document table. You can then copy this blob to your own table using the DBMS_LOB package.
Hope this helps,
Larry -
How to download files from Application Server of Unix o.s to local director
Hi All,
I am trying to download files from Apllication server of Unix operating Systems to local file in excel sheet format using a z-program.but whenever I am trying to use OPEN dataset ........
it is showing sy-subrc = 8.
Can I have any clew please.
Thanks in advance,
Regards,
AMEER.Hi Sreekanth,
Thanks a lot for quick reply.I have to download that files from z-program only. I am giving you my code below.
*& Report ZTRAK_DOWNLOAD *
REPORT ZTRAK_DOWNLOAD MESSAGE-ID ZCT .
SELECTION-SCREEN BEGIN OF BLOCK DOWNLOAD WITH FRAME TITLE TEXT1.
PARAMETERS :
SERDIR LIKE RLGRAP-FILENAME DEFAULT '/usr/trak',
LOCDIR LIKE RLGRAP-FILENAME DEFAULT 'C:\Trak'.
SELECTION-SCREEN END OF BLOCK DOWNLOAD .
SELECTION-SCREEN BEGIN OF BLOCK INFO2 WITH FRAME.
SELECTION-SCREEN COMMENT 1(79) TEXT2.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN COMMENT 1(79) TEXT3.
SELECTION-SCREEN END OF BLOCK INFO2 .
SELECTION-SCREEN BEGIN OF BLOCK INFO3 WITH FRAME.
SELECTION-SCREEN COMMENT 1(79) TEXT4.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN COMMENT 1(79) TEXT5.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN COMMENT 1(79) TEXT6.
SELECTION-SCREEN SKIP 1.
SELECTION-SCREEN COMMENT 1(79) TEXT7.
SELECTION-SCREEN SKIP 2.
SELECTION-SCREEN COMMENT 1(79) TEXT8.
SELECTION-SCREEN SKIP 1.
SELECTION-SCREEN COMMENT 1(79) TEXT9.
SELECTION-SCREEN END OF BLOCK INFO3.
*- Internal Table to output data in Excel
DATA: BEGIN OF tab_excel OCCURS 0,
col1(50),
col2(132),
col3(255),
col4(100),
col5(100),
col6(50),
COL7(60),
col8(30),
col9(30),
col10(30),
col11(20),
col12(15),
col13(15),
END OF tab_excel.
DATA: FILE LIKE RLGRAP-FILENAME .
DATA: W_DATASET(80).
INITIALIZATION.
TEXT1 = 'Download Reports'.
TEXT2 = 'The Program downloads the reports generated by Trak'.
TEXT3 = 'Utility from Server to Local PC.'.
TEXT4 = 'Check the following before executing the Program.'.
TEXT5 = ' 1. A valid Server path is provided.'.
TEXT6 = ' 2. A valid Local PC path is provided.'.
TEXT7 = ' 3. Local PC has 10 MB free space.'.
TEXT8 = 'The report can be executed in the forground.'.
TEXT9 =
'The report should be executed after execution of Transaction TRAK'.
AT SELECTION-SCREEN.
IF SERDIR EQ ''.
MESSAGE E001(ZCT).
ENDIF.
IF LOCDIR EQ ''.
MESSAGE E002(ZCT).
ENDIF.
START-OF-SELECTION.
Download ABAP Development Summary Report
FILE = '\ABAP_Report_Developments.XLS'.
CONCATENATE LOCDIR FILE INTO FILE.
W_DATASET = '/ABAP_Report_Developments.dat'.
CONCATENATE SERDIR W_DATASET INTO W_DATASET.
PERFORM INIT.
Download BDC Development Report
FILE = '\BDC_Developments_Report.XLS'.
CONCATENATE LOCDIR FILE INTO FILE.
W_DATASET = '/BDC_Developments_Report.dat'.
CONCATENATE SERDIR W_DATASET INTO W_DATASET.
PERFORM INIT.
Download Development Summary Report
FILE = '\Developments_Summary_Report.XLS' .
CONCATENATE LOCDIR FILE INTO FILE.
W_DATASET = '/Developments_Summary_Report.dat'.
CONCATENATE SERDIR W_DATASET INTO W_DATASET.
PERFORM INIT.
Download Enhancement Development Report
FILE = '\Enhancement_Developments_Report.XLS'.
CONCATENATE LOCDIR FILE INTO FILE.
W_DATASET = '/Enhancement_Developments_Report.dat'.
CONCATENATE SERDIR W_DATASET INTO W_DATASET.
PERFORM INIT.
Download field exit Development Report
FILE = '\Field_Exit_Developments_Report.XLS'.
CONCATENATE LOCDIR FILE INTO FILE.
W_DATASET = '/Field_Exit_Developments_Report.dat'.
CONCATENATE SERDIR W_DATASET INTO W_DATASET.
PERFORM INIT.
Download Frequency & Purpose Report
FILE = '\Frequency_And_Purpose_Report.XLS'.
CONCATENATE LOCDIR FILE INTO FILE.
W_DATASET = '/Frequency_And_Purpose_Report.dat'.
CONCATENATE SERDIR W_DATASET INTO W_DATASET.
PERFORM INIT.
Download Function Group Developments Report
FILE = '\FunctionGroup_Developments_Report.XLS'.
CONCATENATE LOCDIR FILE INTO FILE.
W_DATASET = '/FunctionGroup_Developments_Report.dat'.
CONCATENATE SERDIR W_DATASET INTO W_DATASET.
PERFORM INIT.
Download Function Module Developments Report
FILE = '\FunctionModule_Developments_Report.XLS' .
CONCATENATE LOCDIR FILE INTO FILE.
W_DATASET = '/FunctionModule_Developments_Report.dat'.
CONCATENATE SERDIR W_DATASET INTO W_DATASET.
PERFORM INIT.
Download Include Developments Report
FILE = '\Include_Developments_Report.XLS'.
CONCATENATE LOCDIR FILE INTO FILE.
W_DATASET = '/Include_Developments_Report.dat'.
CONCATENATE SERDIR W_DATASET INTO W_DATASET.
PERFORM INIT.
Download UserGroup Developments Report
FILE = '\UserGroup_Developments_Report.XLS'.
CONCATENATE LOCDIR FILE INTO FILE.
W_DATASET = '/UserGroup_Developments_Report.dat'.
CONCATENATE SERDIR W_DATASET INTO W_DATASET.
PERFORM INIT.
Download Modified_Standard_SAP_Objects_Report
FILE = '\Modified_Standard_SAP_Objects_Report.XLS' .
CONCATENATE LOCDIR FILE INTO FILE.
W_DATASET = '/Modified_Standard_SAP_Objects_Report.dat'.
CONCATENATE SERDIR W_DATASET INTO W_DATASET.
PERFORM INIT.
Download Include Developments Report
*FILE = '\Include_Developments_Report.XLS'.
*CONCATENATE LOCDIR FILE INTO FILE.
*W_DATASET = '/Include_Developments_Report.dat'.
*CONCATENATE SERDIR W_DATASET INTO W_DATASET.
*PERFORM INIT.
Download SAP Script Developments Report
FILE = '\SAP_Scipt_Developments_Report.XLS'.
CONCATENATE LOCDIR FILE INTO FILE.
W_DATASET = '/SAP_Scipt_Developments_Report.dat'.
CONCATENATE SERDIR W_DATASET INTO W_DATASET.
PERFORM INIT.
Download Transaction Developments Report
FILE = '\Transaction_Developments_Report.XLS'.
CONCATENATE LOCDIR FILE INTO FILE.
W_DATASET = '/Transaction_Developments_Report.dat'.
CONCATENATE SERDIR W_DATASET INTO W_DATASET.
PERFORM INIT.
Download User Exits Developments Report
FILE = '\UserExits_Reports.XLS'.
CONCATENATE LOCDIR FILE INTO FILE.
W_DATASET = '/UserExits_Reports.dat'.
CONCATENATE SERDIR W_DATASET INTO W_DATASET.
PERFORM INIT.
Download ABAP Query Developments Report
FILE = '\ABAPQuery_Developments_Reports.XLS'.
CONCATENATE LOCDIR FILE INTO FILE.
W_DATASET = '/ABAPQuery_Developments_Reports.dat'.
CONCATENATE SERDIR W_DATASET INTO W_DATASET.
PERFORM INIT.
Download Functional Area Developments Report
FILE = '\FunctionalArea_Developments_Report.XLS'.
CONCATENATE LOCDIR FILE INTO FILE.
W_DATASET = '/FunctionalArea_Developments_Report.dat'.
CONCATENATE SERDIR W_DATASET INTO W_DATASET.
PERFORM INIT.
MESSAGE S003(ZCT) WITH LOCDIR.
END-OF-SELECTION.
This routine checks whether file exists if yes downloads it to
the Local PC
FORM INIT.
OPEN DATASET W_DATASET FOR INPUT IN TEXT MODE ENCODING DEFAULT.
DO.
IF SY-SUBRC <> 0.
EXIT.
ENDIF.
READ DATASET W_DATASET INTO tab_excel.
APPEND tab_excel.
CLEAR tab_excel.
ENDDO.
PERFORM DOWNLOAD_FILE.
ENDFORM.
This routine downloads the data in an XL format on local PC
FORM Download_File .
CALL FUNCTION 'WS_DOWNLOAD'
EXPORTING
FILENAME = FILE
FILETYPE = 'DAT'
TABLES
DATA_TAB = tab_excel
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_WRITE_ERROR = 2
INVALID_FILESIZE = 3
INVALID_TYPE = 4
NO_BATCH = 5
UNKNOWN_ERROR = 6
INVALID_TABLE_WIDTH = 7
GUI_REFUSE_FILETRANSFER = 8
CUSTOMER_ERROR = 9
OTHERS = 10.
IF sy-subrc <> 0.
message ''. " Error in file transfer
ELSE.
CLEAR TAB_EXCEL.
REFRESH TAB_EXCEL.
FILE = ''.
W_DATASET = ''.
ENDIF.
ENDFORM.
I have created those files in Application Server running in another z-program in background mode.Then I am trying to download those files using above the program.I am creating those trak/Trak files manually and I can able to see those files in A.S level.But when downloading the same files I am facing the problem.
regards,
Ameer -
HHi having trouble viewing a downloaded file from a site my iPad is telling me I don have a app to open file . And have downloaded loads of apps and still no joy . Have tried this on my android phone to and still nothing. Please can anyone help as slowly going crazy. Thanks tim
What type of file? From what site? What Apps have you downloaded for it?
Perhaps if you provide details of what you are doing we can provide more precise help. -
How do you Place rtf files from LibreOffice into InDesign CS6
I am new to InDesign CS6. I am having a problem Placing LibreOffice rtf files into InDesign.
I am using LibreOffice 4.3.2.2, Lotus WordPro, and Windows 7. I am saving my work in rtf files. Each page has two columns.
Placing rtf files from WordPro into InDesign works with no problems, but - I wonder just how long WordPro will continue to work with Windows 7 so I would like to switch to LibreOffice.
When I Place a rtf file that has two columns from LibreOffice into InDesign, I get a loaded text cursor, but nothing loads. I can take this same file, remove the columns so there is only one column, and it loads just as it should. Further, if I load the one column file into a Master set up for two columns, the file loads into two columns with all the proper formating.
Please guide me in how to Place the LibreOffice two column rtf files into InDesign.
Thanks.
CaroleThanks to everyone who read about my problem. I have solved it myself by using "RTF Import Options."
Carole -
How do I move a downloaded file (from You Tube) to Garagband - so as to separate video from audio (which I will send to iTunes)
Create a new GarageBand "Movie" project, then import your movie into GarageBand, by dragging it from the "Movies" tab of the Media Browser into the Timeline. GarageBand will split the movie into a video channel and an audio channel. Delete the video/movie channel and use the "Share" menu to send the audio channel to iTunes (assuming you have iLife '11 GarageBand)
Regards
Léonie
Maybe you are looking for
-
ICal day view upcoming events list--can it be turned off?
Just upgraded to 10.7 and the changes to iCal (v. 5.0.3) are horrifying. I plan most of my daily work on iCal and really need the Day view of the calendar to fill most of the window and show more details on my calendar items as it did before in 10.6.
-
Adobe Photoshop CS6 has stopped working - when printing
I get the message "Adobe Photoshop CS6 has stopped working" regularly when I try to print a Photoshop document. I end up having to recreate the document which usually then prints even though I have just dragged the layers across. How can I resolve
-
AirPlay VIDEO from iPad mini to AppleTV is GONE
Is Apple aware that since last week's update for AppleTV, video no longer air plays from iPad to AppleTV? Just audio reaches the TV through AppleTV...no video. Video keeps showing on the iPad screen itself, but doesn't follow the audio to the TV. 1st
-
Stolen ipad, i am occasionally remove it from Find my iphone
Stolen ipad, i am occasionally remove it from Find my iphone on apple site, any variants to redo it?
-
Lens Profile for Tokina 10-17mm
I have just downloaded LR3 to try out the distoortion tool for a bunch of shots I took with my D200 and Tokina 10-17mm. I understand this lens has not been added as yet by Adobe. I have read I might be able to find a profile through the CS5 communi