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
Willi
But 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.
Similar Messages
-
How to send a file from FTP to external server
My requirement is to send a file from FTP to D3(External) server.
Now I am able to store the file in Appln server.
I want to send the file created by the program thru FTP to D3 server.
I know the username,Password,HostID,RFC destination details.
How to send the file from FTP to D3.
If u have any program,Plz send it...
I dont want the function modules name...I want the example code ....
Thanks in advance.Hi Sumi,
You could do it so that you create a .bat or .cmd script to your server which does your ftp transfer.
To do this you must use sm69 to create a external operating system command which you can call from FM SXPG_COMMAND_EXECUTE. To SXPG_COMMAND_EXECUTE you the file you need to transfer as a parameter.
What happens is that your abap program passes the file to windows batch script (.bat .cmd) which will then do the transfer for you.
Here's a sample of ftp-script for windows:
echo open IP_ADDRESS_TO_YOUR_SERVER > c:zftp_transfer.ftp
echo USERNAME>> c:zftp_transfer.ftp
echo PASSWORD>> c:zftp_transfer.ftp
echo put YOUR_FILE>> c:zftp_transfer.ftp
echo quit>> c:zftp_transfer.ftp
ftp -s:c:zftp_transfer.ftp
also take a look here for more details:
http://support.microsoft.com/?kbid=96269
Ok, this might be a bit trivial but if your server is unix/aix etc.. Instead of using batch script you must do a shell script.
Regards,
Ville -
Send binary files from SAP System to SAP XI/PI
Dear experts,
in our SAP ERP-System we have a link to JPG files which are stored in an archive. We want to send these files with some other information to our SAP XI and then store them on a file server. Is there a way to send a MIME attachment via RFC? Or is there another way to send binary files from SAP ERP to SAP XI? We want to avoid polling the files on OS level.
Thanks and regards,
DavidMost recommended way is to go for ABAP proxies. They support attachments.
Regards,
Prateek -
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.
-
I recently bought two iMac quad core i5 processor speed 2.5 Ghz. Every time I use Air Drop and I send a file from one iMac to the other, a black curtain drops and I am asked to restart the computer!!! What can I do?
That's a kernel panic and indicates some sort of problem either with the computer's hardware or software. Visit The XLab FAQs and read the FAQ on diagnosing kernel panics. It would help to post the panic log: Mac OS X- How to log a kernel panic.
Meanwhile, try booting the computers into Safe Mode then restarting normally. If this is simply a disk repair or cache file problem then this may fix it.
You can also try creating a new admin account on each computer then booting into the new account. This would help determine if the problem is related to a bad file in the user accounts. -
Excel 2010 cannot open ~xlsx file from WD ShareSpace
Excel fails to open an ~xlsx file from the Western Digital NAS. It shows downloading .... than fails cannot open file.
The file was previously fine and if it is copied the copy opens easily. If the copy is renamed I can use Excel's recent files option to open it. The old file cannot be opened even if renamed.
I can typically use the file for a day or so, then it becomes unusable. It cannot be opened from another Windows 7 machine either but again a copy is accessible.
The files are small typically 100Kb, password protected
Windows and Office are up to date on both machines
The problem is becoming more frequent with no apparent cause
I have tried opening from explorer, the recently used files list in Excel, and file ... open
I have tried using mapped drive, UNC name, IP address
The network location is recorded as trusted
Although there is the potential to share the file it has not been opened by other users in between working and entering the state where it cannot be used.
When a file is unusable in Excel right clicking in explorer takes a long time to offer the normal context menu. However if the file is selected then copy/paste is quick and unaffected.
Please can anyone help me fix this annoying issue.Hi,
According to your description, I have some questions.
Would you share us the whole error message when opening the special Excel file?
Did the copy file work well in the NAS?
Did you move the special Excel file to another NAS folder to test?
Did the special Excel file works well in the local disk (Download it)?
Then, I suppose that the file may be used by other program\handle\process in the background during opening process. Please try to use the tool named
Handle (It is a utility that displays information about open handles for any process in the system. You can use it to see the programs that have a file open, or to see the
object types and names of all the handles of a program.) to check.
Steps:
Copy handle.exe to C:\Windows\system32 folder.
Run cmd.exe as administrator
Type handle -a C: /Test/test in command prompt, then it will list all handles and processes accessing this folder.
4. It shows that cmd.exe is accessing c:\Test\test. Then, we can use
handle –c command to close the handles, along with
the handle ID, and the process ID, and the "-y" switch to confirm the delete.
Regards,
George Zhao
TechNet Community Support
It's recommended to download and install
Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
programs. -
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 -
Pulling .xlsx files from Sharepoint Using ssis
Hi,
I need to create package to pull the .xlsx files from sharepoint and load into another server and make the package automated everyday. I was not familiar with SSIS stuff. I came to know it can be done by using file task
and FTP, but not able to figure it out the configuration setting that should be used in the tasks.
Can anybody suggest the procress for this task?
Thanks,
Sri Harsha.
BALUSUSRIHARSHAHi Sri,
These sites are right.
SharePoint exposes file retrieval via the HTTPWebResponse interface only. So the FTP Task cannot help you in this case.
I know it may be not easy coding in C# without programming skills but one day you need to start as SSIS without C# or VB is not fully usable anyways.
Luckily there is this community wiling to help you for free and a ton of examples already on the web.
If you could try to modify the code from http://blogs.msdn.com/b/sowmyancs/archive/2007/09/15/how-to-download-files-from-a-sharepoint-document-library-remotely-via-lists-asmx-webservice-sps-2003-moss-2007.aspx so it makes sense in application to what you
need to achieve that would be great.
If you get issues, do not hesitate to post on our forum.
Arthur
MyBlog
Twitter -
How do I open an xlsx file from a website rather than downloading it?
When I try to open an .xlsx file from a website, it downloads and does not open. Before the last update, it would just open the file. How do I get it to open when I click on it rather than just download it?
Thanks for the suggestion. Unfortunately, that didn't work...it still just downloads it to the temp file and doesn't open. Any other ideas? It worked before the last update of Firefox.
-
Hi,
I use SO_NEW_DOCUMENT_SEND_API1 function module to send a mail from abap code.
But I want to set the sender. Can I realize it?
Regards
AngelaRefer this thread -
Fill "sender id" in SO_NEW_DOCUMENT_SEND_API1
Regards,
Amit -
How do I send files from my IMAC via bluetooth to my new Ipad? They will not "pair" but they are connected and discoverable. I send a file from Imac snow leopard OS X 10.6 to the ipadusing bluetooth, but the failure message says the ipad does not have the necessary services. What are these? Do I neeed to have iphoto and ms word to send pix and .doc files?
File Sharing over Bluetooth is not a feature of iOS devices. iOS does not include the required Bluetooth profiles to allow this. You cannot add this feature, so you may as well stop trying.
-
Can we send .csv file from sap srm system to sap pi?
Hi Experts,
we have 3 options send the data from sap systems to sap pi.i. e.proxy,idoc and rfc only
How can we send .csv file from sap srm to sap pi?
Regards,
AnjanAnjan
As you know SAP SRM and SAP PI are different boxes.
*_Option 1:_*
we need a shared AL11 directory in between SAP SRM and SAP PI (Ask basis to setup shared folder). Place / Populate the file in the folder from SAP SRM and then it can be picked through sender file communication channel.
In this case you (Basis team) will share one folder which is visible from the AL11 transaction of both the systems (SRM and PI). You will drop .csv file using some report or program from SRM at this location and from PI you can read that file using File communication channel (NFS mode).
Option 2:
Setup a FTP at SRM environment and expose some folder which can be accessible from PI. Use sender file communication channel at PI end to pick the file.
You can use this option incase sharing of folder is not possible (due to network / other constrains). Here FTP server is required to expose any folder as FTP so as it can be accessible from internet (remote location). You need to expose some folder at SRM machine. You will drop .csv file using some report or program from SRM at this location. Now PI can fetch the file from that location using sender file communication channel (FTP Mode) providing user credentials.
Hope it clears now.
Regards
Raj -
How do you send a File from the Clinent End To the Server?
Hi, I'm jut learing Java and am tring to send a file from the Cleints end to the Servers' end, I know how to do this in Php, but its some what different in Java, i know where is a File Class which i can post the information into but for some reason it woudn't work
<%@ page import=" javax.servlet.*, java.io.File" %>
<%
String fullname, emailadds, genre, filename;
fullname = request.getParameter("Name");
emailadds = request.getParameter("email");
genre = request.getParameter("genre");
filename = request.getParameter("clip");
File file = new File();
file.isFile();
if (file.isFile())
out.print("File is true");
else
out.print("file ain't there");
%>
just as a tester i tried this to see if file is being read, but it won't compile
I keep getting this error sign! Have i missed out a lib or somthing?
\upload_jsp.java:52: cannot find symbol
symbol : constructor File()
location: class java.io.File
File file = new File();Sham, dont show your anger... and dont use provocative words...
Now, coming to your problems.
your jsp/html should contain some thing like
<form action="/uploadServlet" method="post">
<input type="file" name="file"/>
<input type ="submit" value="upload"/>
</form>and for servlet code, refer to
http://forum.java.sun.com/thread.jspa?threadID=516176&messageID=2461686
or the easiest way would be to use 'commons-fileupload' api available on http://jakarta.apache.org/commons/ -
HT3353 send numbers files from iPad to macbook
send numbers files from ipad to macbook???
You can use iCloud to sync files between your iOS & Mountain Lion devices or you could e-mail the file to yourself.
Maybe you are looking for
-
I am looking for charts with drilldown feature. I need to drilldown to another chart or a report. can you please point me to any articles doing this from scratch? I looked the sample packaged application with charts but it does not have drilldown lin
-
I manage different calendars, private, work, hobby etc. Now, I would like to print a list of upcoming events from one of those calendars. My iPhone has a "list" option that does exactly what I want, but I can't print that. I have tried File/Print sel
-
Not picking up DHCP info from Windows wireless network
Hey all, I posted once before and received zero replies, so here's hoping the second time is the charm. I have a building using HP ProCurve 420A wireless access points. There's a primary SSID that Powerbook users can see properly using Airport. The s
-
Binding a variable to an LOV query, not working... Urgent!
Hi, Based on a column value(which gets populated at runtime), in a table, the LOV query for another column in the same table, should be restricted with this value. 1. My LOV is based on a VO. Lov query is SELECT ped.full_name as employee_name, ped.em
-
In WM managed warehouse, when I am posting GR, I am getting the following error in my mailbox: Error during creation of transfer orders for material document 5000000007 Date: 25.01.2008 Time: 14:36:00 Transf.reqmnt R01 0000000005 No destination stora