Reciever File Adapter to create multiple target files
Hi All,
I have done the mapping to create multiple output messages . I would like each of the messages to be stored as a separate file in the target .
Below is the output message with 2 separate MT_CANCELOUT messages . However, both end up in one single xml file .
How do I configure the receiver file adapter to ouput 2 separate xml files ?
<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
<ns0:Message1>
<ns1:MT_CANCELOUT xmlns:ns1="urn://gm.com:VBVTEST">
<LineItem>
<id>456</id>
<name>HEY</name>
</LineItem>
</ns1:MT_CANCELOUT>
<ns1:MT_CANCELOUT xmlns:ns1="urn://gm.com:VBVTEST">
<LineItem>
<id>567</id>
<name>RAT</name>
</LineItem>
</ns1:MT_CANCELOUT>
</ns0:Message1>
</ns0:Messages>
Hi,
Sorry to say you that but your post show the opposite, it shows you have only one target message !
<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
<ns0:Message1>______<<<<<<<
<ns1:MT_CANCELOUT xmlns:ns1="urn://gm.com:VBVTEST">
<LineItem>
<id>456</id>
<name>HEY</name>
</LineItem>
</ns1:MT_CANCELOUT>
<ns1:MT_CANCELOUT xmlns:ns1="urn://gm.com:VBVTEST">
<LineItem>
<id>567</id>
<name>RAT</name>
</LineItem>
</ns1:MT_CANCELOUT>
</ns0:Message1>______<<<<<<<
</ns0:Messages>
If you want two files, you should generate two Messages, and so to do that:
In MM, in your target (tab before "function"), you should have 1 source MT and in target MT, you should have two lines (even if you use the same target MT), after having changed the ouccurence 1->N.
do the same in your operation mapping: 1->N with two receiver service interface (even if it's the same)
because you should have something like:
<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
<ns0:Message1>
<ns1:MT_CANCELOUT xmlns:ns1="urn://gm.com:VBVTEST">
<LineItem>
<id>456</id>
<name>HEY</name>
</LineItem>
</ns1:MT_CANCELOUT>
</ns0:Message1> _____<<<<<<<
<ns0:Message2> _____<<<<<<<
<ns1:MT_CANCELOUT xmlns:ns1="urn://gm.com:VBVTEST">
<LineItem>
<id>567</id>
<name>RAT</name>
</LineItem>
</ns1:MT_CANCELOUT>
</ns0:Message2>
</ns0:Messages>
regards
mickael
Edited by: Mickael Huchet on Dec 2, 2011 8:58 PM
Similar Messages
-
Use splitter to create multiple text file
Hello I have one view as source and would like to create multiple target text files based on different condition. What I am doing is that I am using SPLITTER which contain one INGRP1 and three OUTGRP( nameley TR1, TR2 and TR3) and one default REMAINING_ROWS ( what is the purpose of the REMAINING_ROWS?). So I mapped view to INGRP1 of the splitter and then added the different SPLITT condition in the condition wizard, for example :
for TR1
COMMISSION_TYPE='P' and
rownum <= 65000
for TR2
COMMISSION_TYPE='P' and
rownum > 65000
and for TR3
COMMISSION_TYPE='A'
After this since I have to create 3 comma delimted text files, I have used 3 expression for each individual splitt condition. In the expression what I am doing is that I am just concating all the fileds and then output of each expression goes to three different text files.
When I am deploying the mapping, it is coming up several errors such as :
1): PLS-00201: identifier 'COMMISSION_TYPE' must be declared
(2): PL/SQL: Statement ignored
(3): PLS-00201: identifier 'COMMISSION_TYPE' must be declared
(4): PL/SQL: Statement ignored
(5): PLS-00201: identifier 'COMMISSION_TYPE' must be declared
(6): PL/SQL: Statement ignored
(7): PLS-00201: identifier 'START_INDEX' must be declared
(8): PL/SQL: Statement ignored
(9): PLS-00201: identifier 'T_EXPR_ASSET_1_OUTPUT_ASSET$0' must be declared
(10): PL/SQL: Item ignored
(11): PLS-00201: identifier 'T_ROWKEY_SPLIT_2' must be declared
(12): PL/SQL: Item ignored
(13): PLS-00201: identifier 'T_CPPASSET_0_OUTPUT_ASSET$0' must be declared
(14): PL/SQL: Item ignored
(15): PLS-00801: internal error [21076]
(16): PL/SQL: Item ignored
(17): PLS-00801: internal error [21076]
(18): PL/SQL: Item ignored
(19): PLS-00801: internal error [21076]
(20): PL/SQL: Item ignored
Why I am getting these errors, why OWB generated code could not identify COMMISSION_TYPE filed?
Please help me.
SuhailI am really very very sorry, its my fault. I was not mapping COMMISSION_TYPE from view to splitter.
-
Multiple Target Files as the number of times Item in source node
Hi all
I am new XI ,my scenario is File to File and my data type structures for source and target are as follows
Data type for source
Source
Header 1:unbound
Org 1:unbound
In declaration of target data type occurrence of all child nodes are 1:unbounded. And I have used it in Message type and in message mapping for my target message type occurrence is showing as 1:1.
My objective is to replicate this entire Target as the no of times the Item is occurring in source ie for multiple items in source I want multiple target files. For this I have mapped item node of source to Target(parent node). But in mapping test it is only displaying one Target structure for multiple nodes in source. Please Help me in solving this issueHi Satish,
Use Multi Mappings :
When you create message mapping change the occurence of target from 1 to unbounded. This will allow you to create multiple target structures.
Then map them accordingly as per your need and you can see multiple output in test.
Just you have to be more focused on the context and for that you have to go thro' the mapping documents.
Search related documents on SDN and go thro' them.
Regards,
Shri -
I want my file adapter to poll multiple locations in soa 10g
Hi All
I had a requirement that "I want my file adapter to poll multiple locations in soa 10g".I came to know that in soa 11g it is possible.
I want this to be done in soa 10g.
plz help me.
thanks,
krishnaYou can have pick activity and have separate ftp adapter for each folder, but you will be using the same jndi in all pick activity.
In that way you can have multiple ftp adapter but uses the same jndi by increasing the performance.
User will be configured to a home location, example as below.
say a ftp user "adminuser" is configured to a default folder c:/ftp_files
You can create multiple folders under the same folder like below.
c:/ftp_files/location_a
location_b
location_c
location_d
For each location have a separate ftp adatper, but all of them uses the same jndi while defining the path you have to change according to the above folder.
Let me know how this goes.
- It is considered good etiquette to reward answerers with points (as "helpful" - 5 pts - or "correct" - 10pts).
Thanks,
Vijay -
Error in reciever file adapter , where i am getting file name dynamically
hi all,
error in reciever file adapter , where i am getting file name dynamically, please help me in this isssue , i am trying for a long time
MP: Exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: Exception in XML Parser (format problem?):'java.lang.Exception: Message processing failed in XML parser: 'Conversion configuration error: Unknown structure 'ns0:MT_eINVOICE_RECV' found in document', probably configuration error in file adapter (XML parser error)': java.lang.Exception: Exception in XML Parser (format problem?):'java.lang.Exception: Message processing failed in XML parser: 'Conversion configuration error: Unknown structure 'ns0:MT_eINVOICE_RECV' found in document', probably configuration error in file adapter (XML parser error)'i am getting new error
MP: Exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: Channel has not been correctly initialized and cannot process messages
this is my strcuture
and i have changed my structure
<HEADER>
<ADDRESS1/>
<ADDRESS2/>
<ADDRESS3/>
<ADDRESS4/>
</HEADER>
<HEADER_GST>
<TAX1/>
<TAX2/>
<TAX3/>
</HEADER_GST>
<LINE>
<QTY/>
<UOM/>
<UNIT_AMT/>
<CHARGE_TO_DT/>
</LINE>
<FILENAME>
<FILENAME/>
</FILENAME>
i have given the recordset structure as
HEADER,HEADER_GST,LINE,FILE -
Post Author: markeyjd2
CA Forum: Exporting
Greetings forum members,
My question is, in its entirety: Can a single report (rpt file) create multiple PDF files using the export command, ideally one PDF file per DB record?
In my case; I have a Crystal Report that reads data from a DB table containing ~ 500 records. When I export the report to a PDF file, I get one PDF file, with ~ 500 pages.
What I would like to do is export the report to ~ 500 individual PDF files; One file per DB record. The file names would be based on the table's primary key.
Is this possible?Post Author: Micha
CA Forum: Exporting
Hi,
you need some lines of code, but its easy. Dependend on how to start the generation of your 500 PDFs, you can write an ASP page and start it via Web Browser, or a Windows Script and start it via scheduled job...
Here's an abstract of the ASP code I use:
First, you create a recordset (here: "rsc") which gives you the list of ID fields you want to export, then you create CrystalRuntime.Application object, then you loop through the recordset, open your report (here: "oRpt") and set login info. Then set the selectionformula, so that the report displays only the data of the current ID, e.g.:
oRpt.RecordSelectionFormula = "(" & oRpt.RecordSelectionFormula & ") AND {myTab.myVal}=" & rsc("myVal")
Then you export the report, move to the next record in recordset, and repeat the loop until recordset.EOF. Then you close recordset and connection.
Micha -
Multiple Target files as the item in source file
Hi all ,
I am new XI ,my scenario is File to File and my data type structures for source and target are as follows
_Data type for source: _
Source
Header 1:unbound
org 1:unbound
order 1:unbound
Item 1:unbound
itemno 1:unbound
matno 1:unbound
Data type for Target
Target
org 1:unbound
order 1:unbound
itemno 1:unbound
matno 1:unbound
In declaration of target data type occurrence of all child nodes are 1:unbounded. And I have used it in Message type and in message mapping for my target message type occurrence is showing as 1:1.
My objective is to replicate this entire Target as the no of times the Item is occurring in source ie for multiple items in source I want multiple target files. For this I have mapped item node of source to Target(parent node). But in mapping test it is only displaying one Target structure for multiple nodes in source. Please Help me in solving this issue .
Full Points will be awarded
Thanks & Regards
Satish.Hi,
If you want multiple Targerts you need to use UseOneAsMany.
check below link
http://help.sap.com/saphelp_nw70/helpdata/en/38/85b142fa26c811e10000000a1550b0/content.htm
Thanks,
RamuV -
Question about creating multiple output files from same query
I have a query like this:
select * from emp;
ename empno deptno
Scott 10001 10
Tiger 10002 10
Hanson 10003 20
Jason 10004 30
I need to create multiple output files in xml format for each dept
example:
emp_dept_10.xml
emp_dept_20.xml
emp_dept_30.xml
each file will have the information for employees in different departmemts.
The reason I need to do this is to avoid executing the same query 200 times for generating the same output for different departments. Please let me know if it is practically possible to do this.
Any input is greatly appreciated.
Thanks a lot!!You can write a shell script to generate the multiple spools files for the same output. Below script may helps you.
#====================
#!/bin/bash
n=0
while [ $n -le 20 ]
do
n=`expr $n + 1`
sqlplus -s system/manager <<EOF
spool emp_dept_$n.xml
select count(1) from tab;
spool off
EOF
done
#==================== -
Question about creating multiple XML files from same query
I have a query like this:
select * from emp;
ename empno deptno
Scott 10001 10
Tiger 10002 10
Hanson 10003 20
Jason 10004 30
I need to create multiple output files in xml format for each dept
example:
emp_dept_10.xml
emp_dept_20.xml
emp_dept_30.xml
each file will have the information for employees in different departmemts.
We are using DBMS_XMLGEN package to generate XML.
The reason I need to do this is to avoid executing the same query 200 times for generating the same output for different departments. Please let me know if it is practically possible to do this.
Any input is greatly appreciated.
Thanks a lot!!one solution i can think of is to use SQLX operator instead of dbms_xmlgen.
here is a sample example.
declare
l_xmltype xmltype;
l_deptno emp.deptno%type;
begin
for i in (select * from emp order by deptno)
loop
select xmlconcat(
xmlelement("ename", i.ename)
,xmlelement("sal", i.sal)
,xmlelement("detpno", i.deptno))
into l_xmltype from dual;
dbms_output.put_line(l_xmltype.GetClobVal());
end loop;
end;
/Now here you can open the query once, keep writing to the file till the deptno
is same, when the deptno changes, close the file and open a new file with new
deptno and start writing.
Note : in this way you will have to add the xmlprolog manually to each of the file which should not be an issue. after opening the file add the prolog string manually.
Hope this helps. -
Need Help-SOA 11g File Adapter unable to delete input file and its crashing
Hi All
Please find the details below:
1. We have created a simple SOA composite to Read file from an input directory, archive the file in an archive directory using Inbound File Adapter Read
and then use Outbound File Adapter Write to move the file to a output directory.
2. File Adapter needs to delete the file after successful read/retrieval.
3. We are using the "Use Trigger File" for invoking the file adapter. This is a new feature in SOA 11g
4. Also we are using the option of reading the file as an attachment as we are not doing any transformation in the composite
Issue Details_
1. When the trigger file is put in the input directory for the first time, the File Adapter reads the file, archives it and moves it to the output directory
2. However it does not delete the input file from the input directory and raises Fatal Exception mentioned below:
[*2011-01-12T16:55:48.639+05:30] [soa_server1] [WARNING] [] [oracle.soa.adapter] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@19c243d]*
[userId: <anonymous>] [ecid: 0000IptyLrL9_aY5TrL6ic1DBOS_000009,0] [APP: soa-infra] File Adapter FileAdapterTriggerFilePOC PostProcessor::
Delete failed, the operation will be retried for max of [0] times
[2011-01-12T16:55:48.639+05:30] [soa_server1] [WARNING] [] [oracle.soa.adapter] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@19c243d]
[userId: <anonymous>] [ecid: 0000IptyLrL9_aY5TrL6ic1DBOS_000009,0] [APP: soa-infra] File Adapter FileAdapterTriggerFilePOC [[
BINDING.JCA-11042
File deletion failed.
File deletion failed.
File : C:\Dibya\AttachmentTest\InputDir\TestFile3.txt could not be deleted.
Delete the file and restart server. Contact oracle support if error is not fixable.
If any one has faced similar issues, kindly provide pointers on how to resolve it.
Regards,
DibyaHi,
Using the file adapter, you can poll from multilple locations...
Keep the following property in your .jca file
<property name="DirectorySeparator" value="," />
While giving the path in File Adapter configuration, keep comma and give the next location....then the file will be picked up from the locations you gave....
Hope this helps...
Thanks,
N -
File adapter should pick a single file at a time
Hi,
I have File to RFC scenario.. in my source directory I'm getting bunch of files with the same name. at a time.. but i want to pick the one by one only. that means.. my file adapater poll interval is 30 seconds.. every 30 seconds it will pick the one file.. even though there are multiple files.. but my file adapter should pick a single file ata time..
but at present my file adapater was picking all the files ata time.. but i want to make my file adapter should pick single file ata time..
for this.. any special configuration we need to do.. or any ideas or suggestion .. will be.. appriciated..
regards
Babu>>any special configuration we need to do..
there is no default configuration to achieve this functionality.
I speculate that any of this should work.
1. Post the files to a intermediate directory and use a SCRIPT/Batch program to move only one file at a time frame to the source directory.
2. Uncheck the option Process Read only files in the sender CC to prevent the file adapter to pick the read only files. Use a script that changes the permission of one file at a time so that the file adapter will pick that file alone.
In both the cases the script needs to be scheduled at the OS level to run every 30 seconds.
Thanks
SaNv.... -
Sener file adapter has read/pick the files first in first out method.
HI
In my Interface I am Using Sender as File adapter. As per my requirement Sender file adapter has to read the file from file directory. This directory having 1000u2019s of files with some files are same name (time stamp is different) and some files are different name here file adapter has to pick the file with mentioned name in File sender adapter like ZMPSMSGSTATUSMST-.xml .
But source file name is like <TABLENAME>-<TIME_STAMP>.XML (ZMPSWRKFLOWHIST-20090527-150522-628) in file directory.
The file adapter in XI will poll to this directory and picks the file in first- in first-out by sorting according to timestamp.
To do this configuration what I have to do in sender file adapter please give me your valuable inputs.HI Abhi,
Thank you for your spot replay.
I tested now but i am geting below error.
Putting message into send queue failed, due to: com.sap.aii.af.ra.ms.api.DuplicateMessageException: Message ID f4ca4f86-9c5d-4bdd-1fb1-a6bd7cda99a8(OUTBOUND) already exists in database: com.sap.sql.DuplicateKeyException: [NWMss][SQLServer JDBC Driver][SQLServer]Violation of PRIMARY KEY constraint 'PK__XI_AF_MSG__491A1D0B'. Cannot insert duplicate key in object 'dbo.XI_AF_MSG'..
Could not archive file 'E:\file\in\ZMPSMSGSTATUSMST-20090527-150522-628.xml' after processing
but i am able to see this file in Archive foleder. once file is archivied sucessfully the same file is delted from source directory?
I given processing parametes queue name is TEST.
Thanks
srinivas
Edited by: srinivasreddy p on May 28, 2009 8:43 AM
Edited by: srinivasreddy p on May 28, 2009 8:52 AM -
File Adapter and reading all XML files from direcotry
Problem occurs on PI 7.1
I defined sender file adapter. File name mask is: "*.xml" to read all XML messages from directory.
Quality of service is: Exactly One.
Poll Interval: 30
Retry interval: 30
Processing mode: Archive with option "Add Timestamp".
Processing sequence: by name.
I though that with above configuration my File Adapter will be reading folder for all coming XML files. But somehow it is reading XMLs only when I'm activating it in Integration Builder.
Any idea what can cause such strange problem?Hi Tomasz,
As per my understanding, you need to activate the file adapter for reading the XML files on your directory. Right?
If that is the case, then the issue might be with the Cache.
1. Clear the cache from the Integration Builder.
2. Check in SXI_CACHE whether there are any issues. Click on Delta Cache refresh to find out if there are any cache related issues.
Thanks, -
Sender file adapter is not polling the file.
Dear all,
Sender file adapter is not polling the file.(But Receiver file adapter is getting the file)
we have installed SP15.
It was worked fine for previous SP14.
I have cheked in Adapter monioring also.
Can you help me out of this problem
Regards
DhanabalHi Dhanabal,
Is the XI system running on a unix machine ?
If yes, from the OS level for the folder you are using in the file comm. channel, execute the command
<b>chmod 777 <folder_name></b>
The reason for the file to show up in receiver side and not get deleted might be that the xi user mighht be having only read access to the folder...
Thanks,
Renjith. -
Enable to run .exe file which is created from .air file in windows 7?
Enable to open .exe file which is created from .air file which is created from adt command in windows 7 .
for run .exe file ::
The user must right click and select "Run as Administrator" for run successfully.
so How to remove this above permission issue in Windows 7?
Thanks
SunilRight-click on the exe file and choose Properties.
Switch to the compatibility tab and uncheck the box next to "Run this program as an administrator". Click "ok".
Maybe you are looking for
-
10.5.1 Server Setup - Help Make it all Work!
Hello Everyone, I currently have a new MacMini running 10.5.1 with our Calendar, Wiki and File Sharing. I have recently just returned from the Mac OS 10.5 Training Session from Chicago Columbia College and was astonished at what their demo servers di
-
Go to Offline status after sending print in HP
Hi everybody.I have two HP Laserjet 4100. Both of them after sending print from windows go to offline status and an error message appear (Yellow Error BOX in notification area).Printer screen show Ready message. The light on the printer is green and
-
Internal links (cross-references) do not direct to the correct location
I am creating a glossary in Word 2003 that I would like to convert into PDF. I stored each entry as a bookmark (header) in Word, and many links throughout the document redirect to these bookmarked articles. When I convert to PDF (using Acrobat 8 Pro)
-
Key Note valid for use in specified state : error ...
Installing Skype failed error : code 1603 Ive tried uninstalling Windows Security update KB2918614. Ive also removed Skype and its contents from its previous location. Im really stuck ! what do i do ? i really need skype to work Solved! Go to Soluti
-
Sap Mobile platform Tutorialst
Hello, I need to consume the sap backend in android,this can be possible by using the "SAP Mobile Platform and SAPR3<>NetWeaverGateway<>SUP-ODP<>RelayServer<>Device".I already registered with the open sap, i have done the self study for th