Upload files from abap to portal
Hi,
I need to upload files (PDF) from Abap (R/3) to SAP Portal (into knowledge management).
I found 2 functions but I don't know if they serve to me:
BDS_BUSINESSDOCUMENT_CREATEF
SDOK_PHIO_STORE_CONTENT
Somebody can help me?
Thank you!!
Marc
Hello marc,
the two function modules you mention are:
1. is for upload in BDS (business document service)
2. is for upload to content server
i think both are not what you look for, they are not related to KM.
look at this, maybe it helps:
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/d465a209-0801-0010-e88d-f651c4084b9d
Johannes
Similar Messages
-
Uploading File to ABAP AS from SAP UI5
Hello,
I am attempting to upload files from SAP UI5 to ABAP AS.
How can I do that?
I did try via PHP to my local server and the same worked but do not know how to upload in case of ABAP AS.
Please help,
Thanks in advance.
Thanks and Regards,
SarathHi Sarath,
I suggest you to try the following:
Create a service in the ICF (tcode SICF) and set a custom handler class that implements the interface IF_HTTP_EXTENSION.
Sample code for the custom handler class, (method IF_HTTP_EXTENSION~HANDLE_REQUEST)
DATA: lo_entity TYPE REF TO if_http_entity.
DATA: l_data TYPE string,
l_filename TYPE string.
lo_entity = server->request->get_multipart( 1 ).
IF lo_entity IS BOUND.
" If you want to retrieve the original name of the file
l_filename = lo_entity->get_header_field( '~content_filename' ).
" If the content of the file is not binary you can retrieve with the GET_CDATA,
" otherwise you will have to use the GET_DATA method
CALL METHOD lo_entity->get_cdata
RECEIVING
data = l_data.
ENDIF.
Set the service endpoint URL as the uploadUrl parameter of the FileUploader.
Hope it helps.
Regards,
Christian -
Uploading files from web to db server
hi, yesterday discover article from otn about uploading file from clients filesystem to web application server.
but how about uploading from clients filesystem directly into database column? (i'm talking about forms application via web server, btw, not c/s app)
i've search through the archieve, but cant find anything useful, just alot of similar question with no useful answer. so i guess alot of people could use this feature, if it can be done.
thanks in advance
PhilThe demo titled "Forms, Reports, and Portal Integrated Demo"
has the package and a form using it.
You can download it from http://technet.oracle.com/sample_code/products/forms/content.html
Read the script and search the part where you upload an image. -
Uploading Files From VC (invoking RFC) into ECC
Hi Experts,
I have a requirement which consist of uploading files (from any PC) XML or PDF extension into ECC. I need to do this with a web UI. I got no experience with CE 7.1 (and above) and I just wonder if it is possible from CE 7.1 VC or CE 7.2 VC uploading files into ECC with an RFC development. Is there any uploading component available in VC 7.X which I am not aware of ???
Regards
David Cortes
Edited by: David Cortes on Dec 12, 2011 8:27 PMHi Nivas,
Thank you for your response. What I really want to know is ..... if CE 7.1 VC or above has a component for uploading files. My scenario is as follow.
SAP NetWeaver EP 7 (1 server)
ECC SAP invoice manage (1 server)
*Open Text - Invoice Content (1 server)
My requirement is to built a Web User Interface Portal for uploading files (from any computer) and save it into ECC and OpenText Server. I would like to do this with VC but there is no any component for uploading files (not available in NetWeaver 7).
I do not know if it is a component for uploading files available in CE 7.1 VC or higher and I really would like to know and request for this installation.
Regards
David Cortes -
Creating an xml file from abap code
Hello All,
Please let me know which FM do I need to execute in order to create an XML file from my ABAP code ?
Thanks in advance,
Paul.This has been discussed before
XML files from ABAP programs -
Create XML file from ABAP with SOAP Details
Hi,
I am new to XML and I am not familiar with JAVA or Web Service. I have searched in SDN and googled for a sample program for creating XML document from ABAP with SOAP details. Unfortunately I couldn't find anything.
I have a requirement for creating an XML file from ABAP with SOAP details. I have the data in the internal table. There is a Schema which the client provided and the file generated from SAP should be validating against that Schema. Schema contains SOAP details like Envelope, Header & Body.
My question is can I generate the XML file using CALL TRANSFORMATION in SAP with the SOAP details?
I have tried to create Transformation (Transaction XSLT_TOOL) in SAP with below code. Also in CALL transformation I am not able to change the encoding to UTF-8. It's always show UTF-16.
<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sap="http://www.sap.com/sapxsl" version="1.0">
<xsl:template match="/">
<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP:Header>
<CUNS:HeaderInfo>
<CUNS:InterfaceTypeId>10006</InterfaceTypeId>
<CUNS:BusinessPartnerID>11223344</BusinessPartnerID>
<CUNS:SchemaVersion>1.0</SchemaVersion>
<CUNS:DateTime>sy-datum</DateTime>
</CUNS:HeaderInfo>
</SOAP:Header>
<SOAP:Body>
<xsl:copy-of select="*"/>
</SOAP:Body>
</SOAP:Envelope>
</xsl:template>
</xsl:transform>
In ABAP program, I have written below code for calling above Transformation.
call transformation ('Z_ID')
source tab = im_t_output[]
result xml xml_out.
call function 'SCMS_STRING_TO_FTEXT'
exporting
text = xml_out
tables
ftext_tab = ex_t_xml_data.
Please help me how to generate XML file with SOAP details from ABAP. If anybody have a sample program, please share with me.
Is there any easy way to create the XML file in CALL Transformation. Please help.
ThanksTry ABAP forum, as it seems not to be PI related.
-
How to upload file from a client machine to server machine
hei evryone!
can anyone pls help me on how i can upload file from a client machine to another machine (or server). using jsp.Then later on, i can also retrieve the names of these files to place it as values for option tag in an html form.I have a seperate screen for uploading the file and the screen for displaying all the files that were uploaded on the server...
any sample code/ ideas would be much appreciated.Thx!!!!hei evryone!
can anyone pls help me on how i can upload file from a client machine to another machine (or server). using jsp.Then later on, i can also retrieve the names of these files to place it as values for option tag in an html form.I have a seperate screen for uploading the file and the screen for displaying all the files that were uploaded on the server...
any sample code/ ideas would be much appreciated.Thx!!!! -
How to upload file from client to server in servlets.
actually in my application i have to upload file from client m/c to server.
it is not possible through file i/p stream as fileStreams does not work on network. Please mail me if you have any solution to this.
Thank's in advance............Haii roshan
Pls go through this thread..
http://forum.java.sun.com/thread.jspa?forumID=45&threadID=616589
regards
Shanu -
How to upload file from Application Server?
Dear Friends,
How to upload file from Application Server?
Plz. with example...
Regards,
Dharmeshhi,
check the code for upload from application server.
tables: kna1.
types: begin of s_file,
customer type kna1-kunnr,
country type kna1-land1,
name type kna1-name1,
region type kna1-regio,
end of s_file.
*--Internal tables
data: it_file type s_file occurs 0 with header line.
*-- Selection screen
selection-screen: begin of block b1 with frame title text-001.
parameter: p_file type rlgrap-filename default 'C:/customer.txt'
obligatory.
selection-screen: end of block b1.
*-- At selection screen
at selection-screen on value-request for p_file.
perform file_help using p_file.
*-- Process File
start-of-selection.
perform upload_file using p_file.
*-- write File data to o/p
end-of-selection.
perform write_data.
*& Form file_help
form file_help using p_p_file.
data: l_filepath type ibipparms-path.
call function 'F4_FILENAME'
EXPORTING
PROGRAM_NAME = SYST-CPROG
DYNPRO_NUMBER = SYST-DYNNR
FIELD_NAME = ' '
importing
file_name = l_filepath
p_p_file = l_filepath.
endform. " file_help
*& Form upload_file
form upload_file using p_p_file.
call function 'WS_UPLOAD'
exporting
filename = p_p_file
filetype = 'DAT'
IMPORTING
FILELENGTH =
tables
data_tab = it_file
exceptions
conversion_error = 1
file_open_error = 2
file_read_error = 3
invalid_type = 4
no_batch = 5
unknown_error = 6
invalid_table_width = 7
gui_refuse_filetransfer = 8
customer_error = 9
no_authority = 10
others = 11
if sy-subrc <> 0.
message i001.
endif.
endform. " upload_file
*& Form write_data
form write_data .
loop at it_file.
write:/ it_file-customer, it_file-country, it_file-name,
it_file-region.
endloop.
endform.
regards,
keerthi. -
How can i upload files from one ip address to another ip address machine ?
how can i upload files from one ip address to another ip address machine ?
i need to copy files from one client m/c to server m/c like sftp
please suggest solution on this -
Unable to upload files from local computer to remote server (Was: Dreamweaver)
I have lost the connection between the remote location and the local location for files on my computer. Where to I correct this issues, since I cannot upload files from local to remote. Host server from server to my computer works fine, Running Dell computerr XP operating system with CS3 Dreamweaver. Need all the help I can get.
I am now having a "ftp error - cannot make connection to host. Dreamweaver
encoutered a netwoerk or file system error. I did as you suggested and I
get to basic site definition, ( which looks o.k.), next screen ( no,I do
not want to use a server technology) Next screen ( edit local copies on my
machine ( file location looks o.k.), next screen (connect to remote
server=ftp) address of web server is correct, ( no folder on server, or ftp
login or ftp password) do not enable check in or check out
summary: local
Site name:midhba
local root folder:midhba
remote info:
access; ftp
FTP host: midhba.com
check in.check out diabled
testing server (set up later) -
How to get InputStream of uploaded file from request?
The situation:
Client is uploading xml file to server.
<form METHOD=POST ENCTYPE = "multipart/form-data" action="SendFile" accept="text/xml">
<input type="file" name="SentFile" />
<input type="submit" value="go"/>
</form>Then I need to parse data from file.
I want to use method javax.xml.parsers.DocumentBuilder.parse(InputStream is)
But, how to get InputStream of uploaded file from request?You cannot get the InputStream of the uploaded file directly. The InputStream you can obtain from request.getInputStream() contains a lot of other data as well as the uploaded file. You will have to parse the data in the InputStream to find the data that belongs to the file.
A short cut is to use the HTTP Multipart File Upload available from www.jenkov.com. It simplifies file upload and makes it easy to obtain an InputStream for only the uploaded file. It also handles upload of multiple files. It is free, open source, Apache license, so if it doesn't fit your needs, you can always read the code and see how it works. Then write your own upload servlet. -
How to create .csv file from ABAP report
Hi
We have a requirement to generate .csv file from abap report.
Currently user saves data from abap report to spreadsheet(.xls format) in desktop. Then opens excel file and save as .csv format. Need option to save directly in .csv format instead of .xls format.
Please let me know, if there is any standard function module available to create .csv file.
Regards
UmaI tried with your code it's going to dump
REPORT ZTEMP101 message-id 00.
tables: lfa1.
types: begin of t_lfa1,
lifnr like lfa1-lifnr,
name1 like lfa1-name1,
end of t_lfa1.
data: i_lfa1 type standard table of t_lfa1,
wa_lfa1 type t_lfa1.
types truxs_t_text_data(4096) type c occurs 0.
data: csv_converted_table type table of TRUXS_T_TEXT_DATA.
select-options: s_lifnr for lfa1-lifnr.
select lifnr name1 from lfa1 into table i_lfa1
where lifnr in s_lifnr.
CALL FUNCTION 'SAP_CONVERT_TO_CSV_FORMAT'
EXPORTING
I_FIELD_SEPERATOR = ';'
I_LINE_HEADER =
I_FILENAME =
I_APPL_KEEP = ' '
TABLES
I_TAB_SAP_DATA = I_LFA1
CHANGING
I_TAB_CONVERTED_DATA = csv_converted_table
EXCEPTIONS
CONVERSION_FAILED = 1
OTHERS = 2
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'WS_DOWNLOAD'
EXPORTING
BIN_FILESIZE = ' '
CODEPAGE = ' '
FILENAME =
'C:\Documents and Settings\ps12\Desktop\Test folder\exl.cvs'
FILETYPE = 'DAT'
MODE = ' '
WK1_N_FORMAT = ' '
WK1_N_SIZE = ' '
WK1_T_FORMAT = ' '
WK1_T_SIZE = ' '
COL_SELECT = ' '
COL_SELECTMASK = ' '
NO_AUTH_CHECK = ' '
IMPORTING
FILELENGTH =
TABLES
DATA_TAB = csv_converted_table
FIELDNAMES =
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 ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
my version is 4.6c -
I'm a new Mac user and am finding my way slowly around it. One question: why is a new user account created every time I upload files from my old PC?
Because you're using the Migration Assistant, and it can't migrate data to an existing user account. Transfer everything at once or use a different method.
(111200) -
Sending .xlsx file from ABAP
Hi Experts,
How can we send .XLSX file from ABAP.
I have done as suggested in note 1459896 but it's not working.
I have added the header table with such value
concatenate '&SO_FILENAME=' lv_filename into lv_text_line.
append lv_text_line to lt_att_head.
passing header table to
lo_document->add_attachment( exporting i_attachment_type = 'XLS'
i_attachment_subject = 'AttachmentFilename'
i_attachment_size = lv_size
i_attachment_header = lt_att_head
i_att_content_hex = binary_content ).
but when I try to open it in SOST it says," file format or extension is not valid " .
Do you think if I send thsi mail to outlook it will work. ?
Thanks
WilliBut SAP note says 1459896 , it can be done
using
filename = 'attachment.xlsx'
concatenate '&SO_FILENAME=' lv_filename into lv_text_line.
append lv_text_line to lt_att_head.
but still not working.
Maybe you are looking for
-
Updates to the Reference Library
I have a large number of photos that I manage using Aperture. The photos are stored outside of Aperture in directories within Finder. There are occasions where I update a photo outside of Aperture (using Photoshop) and the save the item back in in th
-
Using (Gmail) IMAP account from 2 different Macs using Mail ?
Would it be feasible/useful to access an (Gmail) IMAP mail account from 2 different Macs using Mail on each Mac? My current situation: - My main computer is an iMac in my bedroom on which I use Mail for my Gmail IMAP account. - Sometimes (ex: late at
-
I have a new iMac and new Epson WF-2540 wireless printer. I can print text, but my photo's are BAD. I do not see an option on the Mac to change the default paper to photo paper, I think would solve the problem. I don't see many options on the Mac
-
Using dmm to make readings.
I have a embedded controller pxi 8176 connecting several devices: DMM, DAQs, FG, etc. The DMM is connected to 3 SCXI 1127 modules starting on Slot 10 of a SCXI 1001 Chassis. I hooked a resistor in the terminal block in channel 9. Max see the devices.
-
BAPI_PRODORDCONF_CREATE_TT
I am using BAPI_PRODORDCONF_CREATE_TT in XMII to create production order confirmation when i do not have values in LINK_CONF_GOODSMOV the bapi does a fine job of using standard back flushing logic and posting the goods movement Now my requirement is