How to send Excel File using file adapter
Hello,
Please could you tell how i can send an excel file using the file adpater?
thank you.
Hi hassiba ,
If u want to doc on creating modules just check the wonderful document.
How To Create Modules for the J2EE Adapter Engine at service.sap.com. It will clear all the basics of creating Adapter module.
https://websmp102.sap-ag.de/~form/sapnet?_SHORTKEY=01100035870000582377&
Thanks ,
sekhar.
Similar Messages
-
Please tell me How to send excel file content to MAILBOX
Hello ,
Can anybody tell me how to send Excel file data to MailboxHi,
Check this sample code.
INITIALIZATION .
CLASS cl_abap_char_utilities DEFINITION LOAD.
gf_etb = cl_abap_char_utilities=>horizontal_tab. "For horrizontal tab
gf_cr = cl_abap_char_utilities=>cr_lf. "For enter
gf_lf = cl_abap_char_utilities=>newline. "For new line
Declaration
DATA: lwa_hd_change TYPE sood1,
lt_objcont TYPE STANDARD TABLE OF soli,
lwa_objcont TYPE soli,
lt_receivers TYPE STANDARD TABLE OF soos1,
lwa_receivers TYPE soos1 ,
lt_att_cont TYPE STANDARD TABLE OF soli,
lwa_att_cont TYPE soli,
lt_packing TYPE STANDARD TABLE OF soxpl,
lwa_packing TYPE soxpl,
lf_sent TYPE sonv-flag,
lf_size TYPE i.
CONSTANTS: lc_obj(11) TYPE c VALUE 'BOMSouthco',
lc_desc(20) TYPE c VALUE 'BOM Download',
lc_lang(1) TYPE c VALUE 'E',
lc_raw(3) TYPE c VALUE 'RAW',
lc_net(1) TYPE c VALUE 'U',
lc_mail(4) TYPE c VALUE 'MAIL',
lc_xls(3) TYPE c VALUE 'XLS',
lc_ext(3) TYPE c VALUE 'EXT'.
Passing values to the strutures used in SO_OBJECT_SEND function module
lwa_hd_change-objla = lc_lang.
lwa_hd_change-objnam = lc_obj.
lwa_hd_change-objdes = lc_desc.
lwa_hd_change-objlen = 255.
lwa_objcont-line = text-t29.
APPEND lwa_objcont TO lt_objcont.
CLEAR lwa_objcont.
lwa_receivers-recextnam = text-t31.
lwa_receivers-recesc = lc_net.
lwa_receivers-sndart = lc_mail.
lwa_receivers-sndex = 'X'.
lwa_receivers-sndpri = 1.
lwa_receivers-mailstatus = 'E'.
APPEND lwa_receivers TO lt_receivers.
CLEAR lwa_receivers.
lwa_receivers-recextnam = text-t30.
lwa_receivers-recesc = lc_net.
lwa_receivers-sndart = lc_mail.
lwa_receivers-sndex = 'X'.
lwa_receivers-sndpri = 1.
lwa_receivers-mailstatus = 'E'.
APPEND lwa_receivers TO lt_receivers.
CLEAR lwa_receivers.
Passing values for the attachment file
LOOP AT gt_output INTO gwa_output.
CONCATENATE gf_lf gwa_output-matnr gf_etb gwa_output-idnrk gf_etb
gwa_output-type gf_etb gwa_output-menge gf_etb
gwa_output-meins gf_etb gwa_output-comp gf_etb
INTO lwa_att_cont-line.
APPEND lwa_att_cont TO lt_att_cont.
CLEAR lwa_att_cont.
ENDLOOP.
CHECK lt_att_cont IS NOT INITIAL.
DESCRIBE TABLE lt_att_cont LINES lf_size.
lwa_packing-transf_bin = ' '.
lwa_packing-head_start = 1.
lwa_packing-head_num = 0.
lwa_packing-body_start = 1.
lwa_packing-body_num = lf_size.
lwa_packing-file_ext = lc_xls.
lwa_packing-objlen = lf_size * 255.
lwa_packing-objtp = lc_ext.
lwa_packing-objdes = lc_desc.
lwa_packing-objnam = lc_obj.
APPEND lwa_packing TO lt_packing.
CLEAR lwa_packing.
CHECK gf_error IS NOT INITIAL. "Check if unix file is written
FM to send email to the intended recipients
CALL FUNCTION 'SO_OBJECT_SEND'
EXPORTING
object_hd_change = lwa_hd_change
object_type = lc_raw
IMPORTING
sent_to_all = lf_sent
TABLES
objcont = lt_objcont
receivers = lt_receivers
packing_list = lt_packing
att_cont = lt_att_cont
EXCEPTIONS
active_user_not_exist = 1
communication_failure = 2
component_not_available = 3
folder_not_exist = 4
folder_no_authorization = 5
forwarder_not_exist = 6
note_not_exist = 7
object_not_exist = 8
object_not_sent = 9
object_no_authorization = 10
object_type_not_exist = 11
operation_no_authorization = 12
owner_not_exist = 13
parameter_error = 14
substitute_not_active = 15
substitute_not_defined = 16
system_failure = 17
too_much_receivers = 18
user_not_exist = 19
originator_not_exist = 20
x_error = 21
OTHERS = 22.
IF sy-subrc = 0.
MESSAGE s004 WITH text-t34.
ENDIF.
COMMIT WORK.
Reward if helpful.
Regards,
Ramya -
Maximum file size data that can be send to MQ using mq adapter
Dear All,
What is the maximum file size data that can be send to MQ using mq adapter ?
The file can be csv, fixed , xml.
Please let me know if anybody is aware of any limitations
Best Regards
ArcIf you are on 10g then you are looking at a limit of 7MB, although any messages over 1MB will require some tuning.
You can integrate using the native schema, or xml so you can use csv, fixed length, and xml files.
cheers
James -
Sending empty files using SFTP Adapter
I am trying to send empty files using SFTP adapter. The interface has to send the file whether its empty file or containing data using SFTP adapter. I am using BizTalk Server 2013 R2. Is it a bug or the hotfix is already there for this issue.
The issue here is not your SFTP not able to send 0KB files, but the file receive adapter that is receiving the file. The file adapter deletes 0 KB files and doest not transmit it further.
If u have a ftp receive for example you should be able to send 0KB files.
If u have a custom file receive adapter , is it handling 0KB files ?
Regards <br/> When you see answers and helpful posts,<br/> please click Vote As Helpful, Propose As Answer, and/or Mark As Answer -
How to read pdf file using file adapter
Hi..
How to read pdf file using file adapter?
regards
ArunHi
This may help you
/people/sap.user72/blog/2005/07/27/xi-generate-pdf-file-out-of-file-adapter
/people/alessandro.guarneri/blog/2007/02/21/sap-xi-acting-as-a-huge-file-mover
---Ram -
Reading .pdx file using File Adapter
Hi,
I have .pdx file in the input directory of my BPEL process .Also i have the DTD of the pdx file.Using file Adapter wizard i converted tht DTD to the XSD.Now when I run my BPEL process i am getting this error.
Failed to translate file : {C:\OraBPELPM_1\integration\jdev\jdev\mywo
rk\TestWs\readPDX\inputDr\agile_20070621_050222833.pdx}
<2007-07-06 23:08:38,137> <INFO> <default.collaxa.cube.activation> <File Adapter
::Inbound> Sending message to Adapter Framework for rejection to user-configured
rejection handlers : {
file=C:\OraBPELPM_1\integration\jdev\jdev\mywork\TestWs\readPDX\inputDr\agile_2
0070621_050222833.pdx, Exception=ORABPEL-11207
IO Failure in translator.
IO failure because the translator failed to SAX Parse InputStream .
Check the error stack and fix the cause of the error. Contact oracle support if
error is not fixable.
<2007-07-06 23:08:38,138> <WARN> <default.collaxa.cube.activation> <AdapterFrame
work::Inbound> [Read_ptt::Read(ProductDataeXchangePackage)] - onReject: The reso
urce adapter 'File Adapter' requested handling of a malformed inbound message. H
owever, the following bpel.xml activation property has not been defined: 'reject
edMessageHandlers'. Please define it and redeploy the business process. Will use
the default Rejection Directory file://C:\OraBPELPM_1\integration\orabpel\domai
ns\default\archive\jca\readPDX\rejectedMessages for now.
<2007-07-06 23:08:38,138> <WARN> <default.collaxa.cube.activation> <AdapterFrame
work::Inbound> [Read_ptt::Read(ProductDataeXchangePackage)] - onReject: Sending
invalid inbound message to Exception Handler:
<2007-07-06 23:08:38,138> <INFO> <default.collaxa.cube.activation> <AdapterFrame
work::Inbound> Handing rejected message to DEFAULT rejection handler: file://C:\
OraBPELPM_1\integration\orabpel\domains\default\archive\jca\readPDX\rejectedMess
ages since none of the configured rejection handlers [] succeeded.
<2007-07-06 23:08:38,142> <INFO> <default.collaxa.cube.activation> <File Adapter
::Inbound> Deleting file : C:\OraBPELPM_1\integration\jdev\jdev\mywork\TestWs\re
adPDX\inputDr\agile_20070621_050222833.pdx after processing.
Can somebody help me to find how to rectify this?
Thanks in AdvanceHi Anirudh,
Please have a look at the answers for ur questions:
(1)Is it a .pdf file?
its a .pdx file.This file is generated from Agile PLM side.It consists of DTD information and the actual xml.If i rename it to .xml then its working fine.But i would be getting this file in .pdx format
(2)Its size?
It can be 73 MB
(3)Using a file adapter to pick the file?
Yes
(4)Picking from the local box or a remote one?
For the time being i am picking it up from the local box.But going fwd it shld be from remote
(5)Any firewall being used?
No
(6)Is the schema correct and confirming with right namespaces?
Yes
(7)BPEL version?
10.1.2
Thanks
Cheers
Anirudh Pucha -
List files using file adapter in 10G
Hi',
How can we list the files using File/FTP adapter in SOA 10G.
My requirement is to get details like name of file and the timestamp.
Please advice.
Thanks
YatanYatan,
I used in the past a javaEmbedded activity which uses a shell script to list and get all the needed data from a directory.
(I found it the easiest and faster way to do it)
Arik -
Creating PDF files using file adapter
Hi,
Is it possible to create a pdf file using, File/FTP adapter? If yes can someone please suggest how to do it.
Thanks,
PhaniHi Phani,
I would say pdf files are binary files with a specialized format.
You can move pdf files through BPEL or ESB (i.e. file/ftp -> file/ftp), or from file to database BLOB and database to file, by importing the schema as opaque.
However I doubt that file adapter can create PDF files from a plain-text xml file, i.e. as PDFCreator would.
In a sense a pdf file is much like a jpg, mp3, or zip file, it can be passed through bpel but not created.
In other words if you have a base64Binary element in xml, that you know is the complete bytes to a pdf, jpg, or other file, you can write it out as a file using the File adapter.
Thanks
Steve -
Reading Multiple lines in a file Using File Adapter
Hi All,
Iam new to this technology.How to read multiple lines in a file using file adapter.Brief me with the methodology.I didn't look at anything else but if you want to write more than one line ever to your file you should change this
out = new FileOutputStream("Calculation.log");to this...
out = new FileOutputStream("Calculation.log",true);A quick look at the API reveals the follow constructor FileOutputStream(File file, boolean append) append means should I add on the end of the file or over-write what is there.
By default you over-write. So in our case we say true instead which says add on to what is there.
At the end of that little snippet you shoudl be closing that stream as well.
So where you have
p.close();You should have
p.close();
out.close(); -
Delete file using file adapter
Hi,
How can we delete a file using file adapter, I am using SOA 11g R3.
Thanks
Yatanthanks for reply,
What I am trying to do is to only delete the file, is there some way where we can simply do a "delete", instead of first reading a file and then deleting it.
Thanks
Yatan -
Export the Form Data to Excel File using FILE EXPORT
One problem i am getting...
I want to export printers page to some excel file using FILE > EXPORT option.
I login into System Administrator Responsibility > printers > register...
I want to export this printers data to flat file(EXCEL File) using FILE > EXPORT in the form...
The movement I click FILE > EXPORT...a flash screen appears and disapperas...nothing will be exported...
What Might be the problem...
How can I solve this...
My FND_LOBS_CTX index is fine..it is valid and- Check the security level of the "Trusted sites" zone, make sure it is set to "Low"
- Make sure you do not have a yellow warning bar
- Make sure you are not accessing the application through dev60cgi/f60cgi
- Verify that you have sufficient space in the tablespace (Check init<SID>.ora for any errors)
- Check the export on some other modules to determine whether the issue is across all Apps or with a specific module only -
"encoding = UTF-8" missing while writing XML file using file Adapter
Hi,
We are facing an unique problem writing xml file using file adapter. The file is coming without the encoding part in the header of xml. An excerpt of the file that is getting generated:
<?xml version="1.0" ?>
<customerSet>
<user>
<externalID>51017</externalID>
<userInfo>
<employeeID>51017</employeeID>
<employeeType>Contractor</employeeType>
<userName/>
<firstName>Gail</firstName>
<lastName>Mikasa</lastName>
<email>[email protected]</email>
<costCenter>8506</costCenter>
<departmentCode/>
<departmentName>1200 Corp IT Exec 8506</departmentName>
<businessUnit>1200</businessUnit>
<jobTitle>HR Analyst 4</jobTitle>
<managerID>49541</managerID>
<division>290</division>
<companyName>HQ-Milpitas, US</companyName>
<workphone>
<number/>
</workphone>
<mobilePhone>
<number/>
</customerSet>
</user>
So if you see the header the "encoding=UTF-8" is missing after "version-1.0".
Do we need to configure any properties in File Adapter?? Or is it the standard way of rendering by the adapter.
Please advice.
Thanks in advance!!!System.out.println(nodeList.item(0).getFirstChild().getNodeValue());
-
HI Experts,
I have a scenario. Import IDOC into PI and PI transform IDOC to Excel. Using mail adapter attach that Excel using pi and send to vendor. Can you please help me on the same?
Thanks
SaiSreevastavHi Sai,
you can use XSLT or java mapping or adapter module to convert IDOC xml to XLS. Please refer the below blog
Convert incoming XML to Excel or Excel XML – Part 1 - XSLT Way
Convert incoming XML to Excel Sheet Part 2 – Adapter Module way
Convert incoming XML to Excel Sheet
then after converting to Excel, you can use the payloadswap bean in mail adapter
XI: Sender mail adapter - PayloadSwapBean - Step by step
regards,
Harish -
Is it possible to read the file using File Adapter which is in client machi
Is it possible to read the file using file Adapter which is in client machine(on the same network).Then what is thee need of FTP Adapter?
You can achieve that by exposing your client machine as a drive, then you can go using file adapter.
FTP adapter will help you to communicate with different machine which is in different network.
It is considered good etiquette to reward answerers with points (as "helpful" - 5 pts - or "correct" - 10pts).
Thanks,
Vijay -
Pooling data from an XML file to another XML file using File Adapter
Hi,
I am trying to Pool data from an XML file to another XML file using File Adapter. I have added "Target Namespace" in both the XML and XSD.The problem is "At the destination given in the FileAdapter" only a blank XML file is created and it doesnot have any data.
Kindly suggest me some methods
Thanks in Advance.Ok here is a solution with external tables.
SQL> CREATE DIRECTORY my_xml_dir AS 'E:\oracle\Log_files\UTL_AKIVATST'
2 /
Directory created.
SQL> DROP TABLE my_xml_et
2 /
Table dropped.
SQL> CREATE TABLE my_xml_et
2 ( EMPNO NUMBER,
3 EMPNAME VARCHAR2(10),
4 JOB VARCHAR2(10),
5 HIREDATE DATE,
6 SAL NUMBER
7 )
8 ORGANIZATION EXTERNAL
9 (
10 TYPE ORACLE_LOADER
11 DEFAULT DIRECTORY my_xml_dir
12 ACCESS PARAMETERS
13 (
14 records delimited by "</EMP>"
15 badfile my_xml_dir:'empxt%a_%p.bad'
16 logfile my_xml_dir:'empxt%a_%p.log'
17 FIELDS
18 (
19 filler char(2000) terminated by "<EMP>",
20 EMPNO char(2000) enclosed by "<EMPNO>" and "</EMPNO>",
21 EMPNAME char(2000) enclosed by "<ENAME>" and "</ENAME>",
22 JOB char(2000) enclosed by "<JOB>" and "</JOB>",
23 HIREDATE char(2000) enclosed by "<HIREDATE>" and "</HIREDATE>",
24 SAL char(2000) enclosed by "<SAL>" and "</SAL>"
25 )
26 )
27 LOCATION ('emp.xml')
28 )
29 PARALLEL
30 REJECT LIMIT UNLIMITED
31 /
Table created.
SQL> SELECT * FROM my_xml_et
2 /
EMPNO EMPNAME JOB HIREDATE SAL
7369 SMITH CLERK 17-DEC-80 800
7499 ALLEN SALESMAN 20-FEB-81 1600
This is the XML file i used emp.xml
<EMPLOYEES>
<EMP>
<EMPNO>7369</EMPNO>
<ENAME>SMITH</ENAME>
<JOB>CLERK</JOB>
<HIREDATE>17-DEC-80</HIREDATE>
<SAL>800</SAL>
</EMP>
<EMP>
<EMPNO>7499</EMPNO>
<ENAME>ALLEN</ENAME>
<JOB>SALESMAN</JOB>
<HIREDATE>20-FEB-81</HIREDATE>
<SAL>1600</SAL>
<COMM>300</COMM>
</EMP>
</EMPLOYEES>
Use this external table to insert into your table.
Thanks,
Karthick. -
Reading encrypted file using file adapter...
Is it possible to read and write encrypted file using file adapter or if the file adapter is capable to encryption and decryption?
what is the soa version you are currently running?
Maybe you are looking for
-
Ipod classic not responding, reseting, or recognized by itunes or windows
ipod will not turn on,rest, etc. screen flashes when hooked to computer, and when going through 5 steps of troubleshooting, the apple will briefly show up. Does not charge up after being hooked to computer. no longer recognized by itunes or window (a
-
ASA5510 Security Plus + Anyconnect Essentials = BASE?
Recently upgraded a 5510 to Anyconnect Essentials and Anyconnect Mobile, the device was Security Plus and is now Base. Is it supposed to work this way? I lost my Gigabit interfaces. Is it possible to have Security Plus + Anyconnect Essentials?
-
Lib32-gtk2 looks for theme engines in the wrong place
When starting a 32 bit gtk-app in a 64 bit environment with DE KDE4 I get the following error: Gtk-WARNING **: /usr/lib/gtk-2.0/2.10.0/engines/libqtcurve.so: wrong ELF class: ELFCLASS64 I have qtcurve installed as well as lib32-qtcurve from AUR (amon
-
The display of sub screen exceeds the sub screen area
Hi Experts, I have a requirement, that i need to make changes to one of the screens in the standard transaction. I found there is a screen exit exist for this. This screen is called in the tab strip(In the standard transaction). I have done the scr
-
How to convert PDF file into binary using APIs of Adobe Workflow server?
I m using the Adobe Workflow Server 6.2. I want to write a web services to convert PDF file into binary and embed this binary data with XML. I want to use the APIs (or libraries) of Adobe Workflow server but dont know abt the APIs or Libraries that c