How To Upload/Download Files in WDP from KM
Hi folks,
I'm developing an Web Dynpro application for Portal and using a upload and download component.
I'd like to use the KM as a file repository. How can I send and get those files to/from KM application in Portal?
Using: SAP Studio 2.0.9 SP9 (WDP), SAP WebAS 6.40.
By the way, is it possible to send those files to mobile/pda using MI Client?
Regards,
Rogerio
Hi Rogerio,
see https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/tutorial on using knowledge management functions in web dynpro.htm
Hope it helps
Detlev
PS: Please consider rewarding points if answers are helpful on SDN. Thanks in advance!
Similar Messages
-
How to upload a file in bdc from application server
how to upload a file in bdc from application server
Hi
Check if this is useful and reward.
PERFORM UNIX_UPLOAD.
FORM unix_upload.
DATA : lv_string(600) TYPE c.
lv_string = p_fname. "p_fname is the filename in path
OPEN DATASET lv_string FOR INPUT IN TEXT MODE ENCODING DEFAULT.
IF sy-subrc <> 0.
MESSAGE 'File Not Found' TYPE 'I'.
LEAVE PROGRAM.
ENDIF.
DO .
READ DATASET lv_string INTO gs_gfile.
IF sy-subrc NE 0 .
EXIT.
ENDIF.
APPEND gs_gfile TO gt_gfile .
CLEAR gs_gfile .
ENDDO.
CLOSE DATASET lv_string.
CLEAR lv_string.
DATA: lc_split TYPE c VALUE cl_abap_char_utilities=>horizontal_tab.
LOOP AT gt_gfile INTO gs_gfile .
SPLIT gs_gfile AT lc_split INTO
gs_ipfile-field1
gs_ipfile-field2.
ENDLOOP.
ENDFORM. "unix_upload
here gs_ipfile is the same structure as your input file to upload
and
gs_gfile is the work area of the internal table containing characters as :
TYPES : BEGIN OF ygs_gfile ,
data(600) ,
END OF ygs_gfile .
*Internal table declaration for input file as text
gt_gfile TYPE STANDARD TABLE OF ygs_gfile INITIAL SIZE 0 ,
*Work area declaration for input file
gs_gfile TYPE ygs_gfile .
Thanks and Regards
A Swarna -
How to upload & Download file in Adf using Jdeveloper 11.1.2 ??
Hi All,
I have just started working on Oracle ADF, Thanks a lot guys for solving our queries.
I'm using Jdeveloper 11.1.2, How to upload and download file in ADF..?
I have seen couple links on net but none of them worked on jdeveloper 11.1.2......
Please Help......Hi guys,
I'm able to download file in ADF using af:fileDownloadActionListener.......
does any one knows how to upload a file using ADF??? -
How to upload image files in sqlserver from jsp
hi friends,
i want to upload images to sqlserver how will i store url of the image or dorectly store the file in binary format, if we store in related path,plese give some ideas on store that paths in data base and how we store that image files in user directories.
byehi jay , I know that concept , but i dont know how to upload image files to server Please help me
here i am giving my problem
If any user register with site, he has the option to upload his image to the site, so i am using in html file upload option, But i dont know how to store that iamge into the server
please give me suggestion
regards
sudhakar -
How to upload/download file to/from server using FiledownloadUI ?
Hi experts,
I don't have much experience of WDABAP. I have to upload a file to server and then download it again. I have implemented this functionality but I am unable to view contents of .xls/.doc/.docx/.msg file only txt file contents are properly visible. I have used following command to upload the file:-
OPEN DATASET fname FOR OUTPUT IN BINARY MODE.
I had also tried this but it is throwing exception that it can be used only for character type data.
OPEN DATASET fname FOR OUTPUT IN TEXT MODE ENCODING UTF-8 WITH SMART LINEFEED.
Thanks in advance.
Problem Solved!
Regards,
Vishesh
Edited by: Vishesh@1986 on Sep 26, 2011 7:37 AMI have resolved the issue myself!!!
-
How to upload/download file into/from blob column in ADF/JDev 11g.
Hello to all.
I found demo from Kuba user on that page: http://kuba.zilp.pl/?id=1
But that demo is for release 10g and too complicated for me for this time (I'm fish in Jdeveloper).
I can create some simple table view (of form view) with oracle connection with table with blob data.
Blob column will content doc/xls/pdf ...etc.
Now I can add two buttons for download and upload.
What I have to do in next time?
Is it possible to use some component or something?
Thank you
BenI was able to accomplish downloading from a blob, but I'm trying to dynamically set the ContentType.
As the table may contain different types of files, I'm setting the ContentType to #{row.Fileext}, where Fileext is set in SQL select as follows:
pseudocode: get file extension, and set the content type based on file extension.
sql select :decode(substr(fdv.file_name,instr(fdv.file_name,'.',-1,1)+1),'log','text/plain; charset=utf-8','xml','text/xml','xls','application/vnd.ms-excel','tif','image/tiff','jpg','image/jpeg','unknown')
I rather use a fuction/method, and tried the following instead:
ContentType = #{backingBeanScope.backing_processReqs.FileAttachContType}
where FileAttachContType =
public class ProcessReqs {
public String FileAttachContType() {
// code to substring filename for extension and decode values
return strContType
But I get the following error:
Error 500--Internal Server Error
javax.el.PropertyNotFoundException: The class 'sunrider.reqpoportal.view.backing.ProcessReqs' does not have the property 'FileAttachContType'.
at javax.el.BeanELResolver.getBeanProperty(BeanELResolver.java:547)
at javax.el.BeanELResolver.getValue(BeanELResolver.java:249)
at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:143)
Ideas?
PS: Kuba, I've been trying to get to your blog all day, and it would just time out.
Thanks everyone in advance!
-R
Edited by: user6631964 on Jul 24, 2009 5:55 PM -
BDS - How to upload/download file ?
Hello,
I would upload and download a file .doc on the BDS. There's some report to do it ?
tks.Hello Sandra, tks for reply...
what do you mean about "do you need an API to do it in a program?" ?
tks. -
How to upload .CSV file from Application Server
Hi Experts,
How to upload .CSV file separated by ',' from Application server to an internal table.
Invoice No,Cust No,Item Type,Invoice Date,days,Discount Amount,Gross Amount,Sales Amount,Customer Order No.,Group,Pay Terms
546162,3233,1,9/4/2007,11,26.79,5358.75,5358.75,11264,HRS,11
546163,2645,1,9/4/2007,11,3.07,305.25,305.25,10781,C,11
Actually I read some already answered posts. But still I have some doubts.
Can anybody please send me the code.
Thanks in Advance.Hi Priya,
Check this code
Yhe logic used here is as follows,
Get all the data into an internal table in the simple format ie: a row with one field contains an entire line
After getting the data, we split each line of the table on every occurrence of the delimiter (comma in your case)
Here, I have named the fields as field01, field02 etc, you could use your own names according to your requirement
parameters: p_file(512).
DATA : BEGIN OF ITAB OCCURS 0,
COL1(1024) TYPE C,
END OF ITAB,
WA_ITAB LIKE LINE OF ITAB.
DATA: BEGIN OF ITAB_2 OCCURS 0,
FIELD01(256),
FIELD02(256),
FIELD03(256),
FIELD04(256),
FIELD05(256),
FIELD06(256),
FIELD07(256),
FIELD08(256),
FIELD09(256),
FIELD10(256),
FIELD11(256),
FIELD12(256),
FIELD13(256),
FIELD14(256),
FIELD15(256),
FIELD16(256),
END OF ITAB_2.
DATA: WA_2 LIKE LINE OF ITAB_2.
OPEN DATASET p_FILE FOR INPUT IN TEXT MODE ENCODING NON-UNICODE.
IF SY-SUBRC = 8.
WRITE:/ 'File' , p_FILE , 'cannot be opened'.
LV_LEAVEPGM = 'X'.
EXIT.
ENDIF.
WHILE SY-SUBRC <> 4.
READ DATASET p_FILE INTO WA_ITAB.
APPEND WA_ITAB TO ITAB.
ENDWHILE.
CLOSE DATASET p_FILE.
LOOP AT ITAB INTO WA_ITAB.
SPLIT WA_ITAB-COL1 AT ',' " where comma is ur demiliter
INTO WA_2-FIELD01 WA_2-FIELD02 WA_2-FIELD03 WA_2-FIELD04
WA_2-FIELD05 WA_2-FIELD06 WA_2-FIELD07 WA_2-FIELD08 WA_2-FIELD09
WA_2-FIELD10 WA_2-FIELD11 WA_2-FIELD12 WA_2-FIELD13 WA_2-FIELD14
WA_2-FIELD15 WA_2-FIELD16.
APPEND WA_2 TO ITAB_2.
CLEAR WA_2.
ENDLOOP.
Message was edited by:
Kris Donald -
How to upload XML file from Application server.
Hi,
How to upload XML file from Application server.Please tell me as early as possible.
Regards,
Sagar.Hi,
parameters : p_file type ibipparms-path obligatory.
***DOWNLOAD---->SAP INTO EXCEL
filename1 = p_file.
call function 'GUI_DOWNLOAD'
exporting
BIN_FILESIZE =
filename = filename1
filetype = 'ASC'
APPEND = ' '
WRITE_FIELD_SEPARATOR = 'X'
HEADER = '00'
TRUNC_TRAILING_BLANKS = ' '
WRITE_LF = 'X'
COL_SELECT = ' '
COL_SELECT_MASK = ' '
DAT_MODE = ' '
CONFIRM_OVERWRITE = ' '
NO_AUTH_CHECK = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
WRITE_BOM = ' '
TRUNC_TRAILING_BLANKS_EOL = 'X'
WK1_N_FORMAT = ' '
WK1_N_SIZE = ' '
WK1_T_FORMAT = ' '
WK1_T_SIZE = ' '
IMPORTING
FILELENGTH =
tables
data_tab = it_stock
FIELDNAMES =
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,
Deepthi. -
Upload/Download file to/from a document library in a SharePoint online site
Hi,
I am referring to the below blog for Upload/Download file to/from a document library in a SharePoint online site.
http://blogs.msdn.com/b/rohitpuri/archive/2007/04/10/upload-download-file-to-from-wss-document-library-using-dav.aspx?CommentPosted=true#commentmessage
I would like to know if this is feasible with a SharePoint online site.
If feasible, how can I resolve the below exception I am getting while using the code.
“The remote server returned an error: (403) Forbidden”.
Thanks,
ThananHi,
Actually what I am trying to achieve is the two things.
1) By using only the user's name, need to upload/download from/to the document library of SharePoint online site using the CSOM. (i.e., achieving Single Sign On / Windows Authentication)
2) I need to achieve the above only by passing the document URL; not by hardcording/ configuring the document library name in the windows application.
Can anyone pls help on this now?
[Below code is working fine. But need to arrive the solution whereas the above 2 conditions are not violated.
using (var clientContext
= new ClientContext("https://yoursiteurl.com"))
string passWd
= "password";
SecureString securePassWd
= new SecureString();
foreach
(var c in passWd.ToCharArray())
securePassWd.AppendChar(c);
clientContext.Credentials
= new SharePointOnlineCredentials("username", securePassWd);
using
(var fs =
new FileStream("fileName",
FileMode.Open))
var fi =
new FileInfo("fileName");
var list = clientContext.Web.Lists.GetByTitle("Doc Library");
clientContext.Load(list.RootFolder);
clientContext.ExecuteQuery();
var fileUrl = String.Format("{0}/{1}", list.RootFolder.ServerRelativeUrl,
fi.Name);
Microsoft.SharePoint.Client.File.SaveBinaryDirect(clientContext, fileUrl,
fs, true);
Thanks,
Thanann -
How to upload pdf file from windows cell phone?
How to upload pdf file from windows cell phone?
You can do this in steps.. First use the built in method for uploading a file into the flows files object, Next you would copy the file out to an Oracle built directory on your UNIX box using utl_file.put_raw..
Here is a link to show you how to upload files in an APEX application [http://download.oracle.com/docs/cd/B31036_01/doc/appdev.22/b28839/up_dn_files.htm]
And here is a link to show you how to use utl_file.put_raw.. [http://psoug.org/reference/utl_file.html], item is towards the bottom of the screen..
Thank you,
Tony Miller
Webster, TX -
How to upload a file into a db blob column from adf page
How to upload a file into a db blob column from adf page
Which option to use ?The forum search would be my first try...
Then google...
This has been asked at least once a week and got correct answers...
Timo -
how to move downloaded files from download folder to other relevant folder or how to download files in relevant folders other than download folder
Just drag the file from the Download folder to the folder of your choice in Finder. If you are using Safari you can designate a new default download destination in Safari>Preferences>General tab, 'Save Downloads to...'. Other browsers should have a similar option in their preferences.
-
How to save downloaded files from safari for offline use?
Need help how to save downloaded PDF or images from Safari for offline use. On Mac or PC, we "save as" the files. How do you do it on safari on iPhone?
You can't detach email attachments as separate files, though you can view supported formats as attachments. If you're viewing webmail with Safari, the attachments aren't saved on the iPhone.
Apple hasn't made any announcements about new feature for the iPhone and rarely does. The other iPhone users in this user-to-user forum have no access to unannounced Apple plans, and speculation about them is prohibited by the forum Terms of Use.
If you want to make a suggestion to Apple, post it on the iPhone Feedback page:
http://www.apple.com/feedback/iphone.html
Message was edited by: modular747 -
How can i download file from a pageflow portlet in Webloigc Portal?
How can i download file from a portlet in Webloigc Portal?
My Question is, when i download files used codes in a pageflow listed below,
it didn't work. but in non-portal environments, it worked well.
How can I download a file from a portlets in portal??
Thx in advanced.
this.getResponse().setContentType ( "application/ms-excel" ) ;
this.getResponse().setHeader ( "Content-Disposition" ,"attachment;filename="
+new String("Excel.xls".getBytes(),"iso-8859-1")) ;
sth.write(this.getResponse().getOutputStream());i always use an old fashioned method when i have to do this, i create a new jsp that contains a scriptlet that writes to the ServletOutputStream.
<i>outputWriter.jsp</i>
// define your own class to get file here, otherwiser use netui-data:callControl tag
<code><pre>
File file = FileControl.getFile(fileName);
String fileName = (String) request.getParameter("fileName");
response.setContentType(file.getContentType());
ServletOutputStream sos = response.getOutputStream();
InputStream is = file.getInputStream();
for(int i = 0; (i = is.read()) != -1;)
sos.write(i);
sos.close();
</pre>
</code>
i then call this jsp from the jsp to which i forward in my action using a simple url rewrite with file name on the url.
<a href=outputWriter.jsp?fileName=nameOfFileToDownload
Maybe you are looking for
-
I want to generate a report for VAT return i.e mothly purchase amount and VAT 4% and 12.5% on the same. In which report I can get this figures Atul kulkarni
-
PP Scenario Mapping help Needed
Hi Guys Can anyone please help to map the following scenario? <b>Scenario:</b> SAP PP <b>Product:</b> Ingot <b>Size:</b> Ingot 100 X 100, Ingot 125 X 125, Ingot 160 X160 <b>Grade:</b> A, B, C, <b>Saleable Item:</b> Ingot100 X100 Grade A, Ingot100 X
-
On Equium A100-337 WLAN connection security screen is not displayed correctly
My computer use to connect to a specific wireless network without any problems automatically. However, now when trying to connect to the same network, the security key screen I am presented with is not the correct type. Instead of two lines of encryp
-
Can i have tow HttpService in the same application???
I try to use tow HttpService (one for delete row in a table and the other for read the table): <mx:HTTPService id="listcls" url=" http://127.0.0.1:32000/affcls.php" useProxy="false" method="POST"> <mx:request xmlns=""> <clsci>{clsci.text}</clsci><cls
-
Screen Layout According to Transaction Code
Hi, Can we change the SAP screen layout settings according to the transaction codes? I mean to say if we run STMS we get different colors and if we run se38 than we get different colors. So is there any setting to do the same. Thanks, Bhanu