One file with different contents
Hi,
My scenario is idoc to jms. i want get a flat file from jms but header data it should be xml format and remaining part be fixed length format
example of flat file
TID96668718
TTE966687182010-11-25-13.44.19.000000K293495 450345189003541709720970796538046 00 002010-11-25-15.03.48.000000
TO197209707 mk 20101125MK Koskinen 000000000000000000001000000000000000000061L000000003661482 Export by Lorry Germany UPM-KYMMENE SALES GMBH 000000000003480604 Leopoldsklinge 1 74363 Güglingen CIP 74363 GÜGLINGEN WILHELM LAYHER GMBH & CO.KG 200023049000
TO200034444800000000348060400003651100023419000WILHELM LAYHER GMBH & CO.KG 24 00000000014860åM2 UPM Sales GmbH 0000024000000000033313910000000033313912K293495 01400000000333139100000000000000014 DAYS FROM INVOICE DATE 7969/11/5
please help to me how to do this scenario
with java mapping how to do could you please explain this scenario
Edited by: SWATHIP on Feb 2, 2011 1:56 PM
Similar Messages
-
To create multiple files with same content but with different names
Hi SapAll.
here i have got a tricky situation on Idoc to File Scenario.
in my interface of an Idoc to file ,there is requirement to create multiple files with different file names but with same content based on one Idoc Segment.
which means there will be one Zsegment with two fields in the idoc,where one field with (content refers to the name which file name should start with .so lets say if this segment is repeated for 3 times then PI should create 3 files in the same directory with same content but with different file names (from the filed).
so here for now iam using one reciever file communication channel.
can any body give me the quick answer.
regards.
VarmaWhat do you mean by different names?
when i make proper setting in the Receiver Channel....on how to create the filename (what to append) like add Timestamp, counter, date, messageid.....even in this case you will ahve file with different names and that too from same File channel.
You can perform multi-mapping in XI/ PI and then your File channel will place the files in the target folder with relevant names. You cannot use Dynamic Configuration with Multi-Mapping!
If you intend to use different File channels, then do the configuration as required (normal)...even over here you can follow multi-mapping.
Do not use a BPM!
Regards,
Abhishek. -
To create 3 diff files with same content but with diff names in same target
Hi SapAll.
i have got a a requirement where pi need to create 3 different files with same content but with different names under same target from a single Idoc.
its an IDOC to 3 File Inteface.
can any body help me in providing the differnt solutions for this without use of any script executions.
will be waiitng for response.
regards.
Varma> i want to use only one communication channel to produce 3 different file names with same content ,so here i should use only one message mapping in 3 operation mappings .
This is not possible to produce 3 different file names with single CC. You have to use 3 different CCs. unless you have going to use some other trick e.g some script to rename the file etc..
As I suggested in my previous reply use Multi-Mapping Or create 3 different Interface Mappings (by using the same MM).
Note: You have to create 3 different Inbound Message Interfaces (you can use the same Inbound Message Type) otherwise while creating the 3 Interface Determination it won't allow because of same Outbound & Inbound Message Interface. It will simply say Interface alreday exists..
So, just use the Multi-Mapping which is best solution in my opinion, because the benefit of using multi-mapping are:
1. You have to create only single Message Mapping
2. Single Interface Mapping
3. Single Receiver Determination
4. Single Interface Determination
5. 3 Receiver CCs (3 you have to use in any case)
6. Performance wise it is good (read the blog's last 2 para)
7. And last but not the least easy to maintain the scenario. -
Parsing XML file with different languages (Xerces)
How do we code or program to an XML file with different
languages , say english and spanish. WHen we parse such a document with the default locale , the presence of special characters throws errors .For eg when I use xerces and use
DOMParser parser = new DOMParser();
try
// Parse the XML Document
parser.parse(xmlFile);
catch (SAXException se)
se.printStackTrace();
org.xml.sax.SAXParseException: An invalid XML character (Unicode: 0xfc) was found in the element content of the document.
System Error: void org.apache.xerces.framework.XMLParser.parse(org.xml.sax.InputSource)
So what locale do we set before we parse ?How to handle this problemYou need an encoding attribute in the xml declaration. If you don't, the parser assumes UTF-8, which are ASCII characters up to 127 - useful (only) for English.
So, something like this would allow you to use characters above 127, ISO-8859-1 is the encoding used by standard PCs.
<?xml version="1.0" encoding="ISO-8859-1"?>
You can find a (offical) list of encodings at:
http://www.iana.org/assignments/character-sets
I'm not sure about mixing various encodings. I think you have to resort external parsed entities, which can have their own encoding, but I think you cannot mix encodings in one XML file.
Good luck. -
I have an iPhone 5 and have just set up the iCloud for it. I also have an iPad with different content and I also want to connect it to iCloud. Will I lose everything that's on my iPad or iPhone or do they sync together without losing anything?
The problem is that all services are bundled with your Apple ID ([email protected]):
Your iCloud account (Mail, Contacts, Calendars, Reminders, Notes, Backups, etc.),
also iTunes & App Store purchases (Music, Movies, TV Shows, etc.),
and the iTunes Match services.
(I guess that all your devices - yours and your wife's are connected to one iTunes library, right?)
If you want that your wife gets her own iCloud account for Mail, Contacts, Calendars, etc. but gets also access to your media then you have two set up two things on her device:
iCloud (Settings > iCloud) with her account (e.g. [email protected])
and
iTunes & App Stores (Settings > iTunes & App Stores) with your account (e.g. [email protected]).
In this case she gets access to your library and could use the same iTunes Match account.
(See also: Using one Apple ID for iCloud and a different Apple ID for Store Purchases http://support.apple.com/kb/HT4895) -
How can i compare two excel files with different no. of records.
Hi
I am on to a small project that involves us to compare two excel files. i am able to do it but am struck up at a point. When i compare 2 different .csv files with different no. of lines i am only able to compare upto a point till when the number of lines is same in both the files.
Eg. if source file has 8 lines and target file has 12 lines. The difference is displayed only till 8 lines and the remaining 4 lines in source lines are not shown.
Can you help me in displaying those extra 4 lines in source file. I am attaching my code snippet below..
while (((strLine = br.readLine()) != null) && ((strLine1 = br1.readLine())) != null)
String delims = "[;,\t,,,|]";
String[] tokens = strLine.split(delims);
String[] tokens1 = strLine1.split(delims);
if (tokens.length > tokens1.length)
for (int i = 0; i < tokens.length; i++) {
try {
if (!tokens.equals(tokens1[i])) {
System.out.println(tokens[i] + "<----->" + tokens1[i]);
out.write(sno + " \t" + lineNo1 + " \t\t" + tokens[i] + "\t\t\t\t" + tokens1[i]);
out.println();
sno++;
} catch (Exception exception)
out.write(sno + " \t" + lineNo1 + " \t\t" + tokens[i] + "\t\t\t\t" + "");
out.println();
Thanks & RegardsA CSV file is not an Excel file.
But apart from that your logic makes no sense.
If the 2 files are of different sizes the files are different by definition, so further comparison isn't needed, you're done.
If you want to compare individual records, you need to compare all records from one file with all records from the other, unless the order of records is important in which case your current system might work.
That system however is overly complicated for comparing CSV files.
As you assume a single record per line, and if one can assume those records to have identical layout (so no leading or trailing whitespace in or between columns in one file that's not in the other) comparing records is simply a matter of comparing the entire lines. -
From sap to excel file with different sheets?
can i upload an internal table from SAP to single Excel file with different sheets for example like : sheet1, sheet2, sheet3.......sheet10. , but need to upload data from sap to excel worksheets ie. from multiple named tabs in Excel. Is this possible, and if so, please can you help and advise me how?
thanks
venkat.
Edited by: Matt on Feb 16, 2009 2:15 PM Removed excessive question marks...!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!Hi venkat,
Yes indeed it is possible to write data from internal table to different excel sheets. Check out SAP's Microsoft OLE functionality.Search on SDN for OLE . Following are some links
https://www.sdn.sap.com/irj/scn/wiki?path=/display/abap/sample%252bprogram%252bto%252bopen%252bexcel%252bsheet%252busing%252bole
You can also check out FM ALSM_EXCEL_TO_INTERNAL_TABLE to check how to read different worksheets.
Using the above two resources you can create a program that can upload data to multiple worksheets in the same workbook.
Also see this link
Creating Excel with More than one page
Edited by: aditya aghor on Feb 16, 2009 1:57 PM
Edited by: aditya aghor on Feb 16, 2009 2:02 PM -
How to generate a second csv file with different report columns selected?
Hi. Everybody:
How to generate a second csv file with different report columns selected?
The first csv file is easy (report attributes -> report export -> enable CSV output Yes). However, our users demand 2 csv files with different report columns selected to meet their different needs.
(The users don't want to have one csv file with all report columns included. They just want to get whatever they need directly, no extra columns)
Thank you for any help!
MZHello,
I'm doing it usually. Typically example would be in the report only the column "FIRST_NAME" and "LAST_NAME" displayed whereas
in the csv exported with the UTL_FILE the complete address (street, housenumber, additions, zip, town, state ... ) is written, these things are needed e.g. the form letters.
You do not need another page, just an additional button named e.g. "export_to_csv" on your report page.
The csv export itself is handled from a plsql procedure "stored procedure" ( I like to have business logic outside of apex) which is invoked by pressing the button "export_to_csv". Of course the stored procedure can handle also parameters
An example code would be something like
PROCEDURE srn_brief_mitglieder (
p_start_mg_nr IN NUMBER,
p_ende_mg_nr IN NUMBER
AS
export_file UTL_FILE.FILE_TYPE;
l_line VARCHAR2(20000);
l_lfd NUMBER;
l_dateiname VARCHAR2(100);
l_datum VARCHAR2(20);
l_hilfe VARCHAR2(20);
CURSOR c1 IS
SELECT
MG_NR
,TO_CHAR(MG_BEITRITT,'dd.mm.yyyy') AS MG_BEITRITT ,TO_CHAR(MG_AUFNAHME,'dd.mm.yyyy') AS MG_AUFNAHME
,MG_ANREDE ,MG_TITEL ,MG_NACHNAME ,MG_VORNAME
,MG_STRASSE ,MG_HNR ,MG_ZUSATZ ,MG_PLZ ,MG_ORT
FROM MITGLIEDER
WHERE MG_NR >= p_start_mg_nr
AND MG_NR <= p_ende_mg_nr
--WHERE ROWNUM < 10
ORDER BY MG_NR;
BEGIN
SELECT TO_CHAR(SYSDATE, 'yyyy_mm_dd' ) INTO l_datum FROM DUAL;
SELECT TO_CHAR(SYSDATE, 'hh24miss' ) INTO l_hilfe FROM DUAL;
l_datum := l_datum||'_'||l_hilfe;
--DBMS_OUTPUT.PUT_LINE ( l_datum);
l_dateiname := 'SRNBRIEF_MITGLIEDER_'||l_datum||'.CSV';
--DBMS_OUTPUT.PUT_LINE ( l_dateiname);
export_file := UTL_FILE.FOPEN('EXPORTDIR', l_dateiname, 'W');
l_line := '';
--HEADER
l_line := '"NR"|"BEITRITT"|"AUFNAHME"|"ANREDE"|"TITEL"|"NACHNAME"|"VORNAME"';
l_line := l_line||'|"STRASSE"|"HNR"|"ZUSATZ"|"PLZ"|"ORT"';
UTL_FILE.PUT_LINE(export_file, l_line);
FOR rec IN c1
LOOP
l_line := '"'||rec.MG_NR||'"';
l_line := l_line||'|"'||rec.MG_BEITRITT||'"|"' ||rec.MG_AUFNAHME||'"';
l_line := l_line||'|"'||rec.MG_ANREDE||'"|"'||rec.MG_TITEL||'"|"'||rec.MG_NACHNAME||'"|"'||rec.MG_VORNAME||'"';
l_line := l_line||'|"'||rec.MG_STRASSE||'"|"'||rec.MG_HNR||'"|"'||rec.MG_ZUSATZ||'"|"'||rec.MG_PLZ||'"|"'||rec.MG_ORT||'"';
-- DBMS_OUTPUT.PUT_LINE (l_line);
-- in datei schreiben
UTL_FILE.PUT_LINE(export_file, l_line);
END LOOP;
UTL_FILE.FCLOSE(export_file);
END srn_brief_mitglieder;Edited by: wucis on Nov 6, 2011 9:09 AM -
Streaming files with different folders
Hi
i am new to FMS4 and i am having a problem playing some files with different folders.
i have different folders in C:\media3\feeds
in that directory i have folder "1", "2" and "3"
other words C:\media3\feeds\1
C:\media3\feeds\2
C:\media3\feeds\3
in config folder i changed fms.ini
VOD_DIR = C:\media3\feeds\
and
VOD_COMMON_DIR = C:\media3\feeds\
i only got the f4v files to work in C:\media3\feeds\ which link is rtmp://localhost/vod/mp4:testfile.f4v
so i tired to have some folders in C:\media3\feeds\ like mention above
i tried to put <Streams>/;<C:\media3\feeds\1</Streams> in Applications.xml file in the C:\Program Files\Adobe\Flash Media Server 4\applications\vod
and used rtmp://localhost/vod/1/mp4:testfile.f4v
here is piece of the App file
<Application>
<StreamManager>
<VirtualDirectory>
<!-- Specifies application specific virtual directory mapping for recorded streams. -->
<Streams>/;${VOD_COMMON_DIR}</Streams>
<Streams>/;${VOD_DIR}</Streams>
<Streams>/;<C:\media3\feeds\1</Streams>
<Streams>/;<C:\media3\feeds\2</Streams>
</VirtualDirectory>
nothing worked
can some one help me with this??If you are using
VOD_DIR = C:\media3\feeds\ or VOD_COMMON_DIR = C:\media3\feeds\
and having files in folder "1" which is under "C:\media3\feeds\"
then you URI should be rtmp://localhost/vod/mp4:1/testfile.f4v (where testfile.f4v is present under C:\media3\feeds\1)
If you are using
<Streams>/;C:\media3\feeds\1</Streams>
<Streams>/;C:\media3\feeds\2</Streams>
Then your URI should be rtmp://localhost/vod/mp4:testfile.f4v (where testfile.f4v is present under C:\media3\feeds\1 or C:\media3\feeds\2)
Also please note in your configuration which you have specified
<Streams>/;<C:\media3\feeds\1</Streams><Streams>/;<C:\media3\feeds\2</Streams>
please remove "<" in "<C:\media3\feeds\1" and "<C:\media3\feeds\2" -
Wifi sync 2 iPhones in one iTunes with different Apple-ID's.
Wifi sync 2 iPhones in one iTunes with different Apple-ID's. My Phone will show up in iTunes, my wife's wont. After plugging my wife's phone into my Win 8.1 pc and check Sync over wifi, I hit the eject button, could this be the reason? Or might it be the different Apple-ID's? If the answer is the first, is there any way tohave iTunes forgetmy wife's phone so I can addit from scratch?
Ello,
I know this, but thats in the past now sadly. The question is: Why wont my wife's iPhone show up in iTunes via wifi?
Is it because I pushed the eject button? And if so, is there any way I can make iTunes forget my wife's iPhone and *** it from scratch again?
Or is it because the phones uses different Apple-ID's? -
One Key FIgure in more than one column with different restrictions
Hi,
I am using a key figure in more than one column with different restrictions, but restriction in one column is affecting the result in other column. What shall i do to make it independent from one another??Hi Pravender Chauhan,
If you want in Single column different value for different Rows based on same Key Figure, you can create Structure where you can define different logic for each row but using same key figure.
If you want to use different Key figures then you should have to Restricted Key Figure and for any calculation you can use calculated Key figure.
Assign points if Useful.
Regards,
Rajdeep. -
Reading fixed length file with different record types
Hi,
I need to read a fixed-length file with different record types, but the record identifier is in 31st position and not in 1st position.
But if I give 31 as position in File adpater wizard, BPEL takes whole 1-31 as identifier.
How we need to read such files.
Thanks
Ravdeephi ,
u cannot use the default wzard for this
use some thing like this nxsd:lookAhead="30" nxsd:lookFor="S"have a look at the below link it has some examples
http://download.oracle.com/docs/cd/B31017_01/integrate.1013/b28994/nfb.htm -
Creating pdf-file from multiple files with different orientation
How do I put together two files with different orientation in the page set up so that the lying A4-format is standing up in the new pdf-file?
lophelia wrote:
How do I put together two files with different orientation in the page set up so that the lying A4-format is standing up in the new pdf-file?
First I've underline a Phrase in your Question did you mean underlying A4-format?
Are both PDF Files created with A4-Format? If yes then:
Did you shift orientation to Portriat Format for the item(s) that you need, such as a Chart or an excel Document? If so:
Then when the documents are meged They should print correctly. -
SSIS project - read multiple flat files with different formats
hi all,
i need to import multiple flat files with different formats into different tables of the sql server database and not able to figure out the best way out in ssis to do so...
please advise the possible methods in ssis to do so and if possible the process which can be dynamic as file names or columns might change in future.Hi AK1987,
To import flat files with dynamic columns, we can use Script Task inside a Foreach Loop Container to parse the first row of the flat file to get the columns names and save them into a .NET variable, then, we can create “Create Table” script based on this
variable, and then store the script into a SSIS package variable. After that, we create a staging table based on the package variable, load the flat file data to the staging table. Eventually, we load data from the staging table to the destination table. For
the detail steps, please walk through the following blog:
http://www.citagus.com/citagus/blog/importing-from-flat-file-with-dynamic-columns/
Regards,
Mike Yin
TechNet Community Support -
SSIS - Import Multiple flat files with different metadata
Hi ,
I have set of flat files with different metadata structure, I would like to load them into staging tables.
1. ) Can we load the flatfiles into the staging tables with out having multiple data flow task.
2.) If possible , can we programmatically select the staging table based on the metadata of the flatfile and load them.
Please advise.
Thanks
ThiyaNope in SSIS a data flow task needs to have a fixed metadata. So if your file metadata varies then best option would be use OPENROWSET syntax to pull the data and populate into your staging table. You may also use
SELECT .. INTO StagingTable ... FROM OPENROWSET (...)
syntax to create staging table at runtime based on the file metadata
http://sqlmate.wordpress.com/2012/08/09/use-your-text-csv-files-in-your-queries-via-openrowset/
If you want to do this in SSIS you need to create data flow dynamically using script task and build the metadata
see
http://www.selectsifiso.net/?p=288
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs
Maybe you are looking for
-
Unable to Install Adobe Creative Suite 6 Std
40-22086-084020032014 is the package submited by the adobe Support Advisor.
-
Acrobat 9 and X folders stay in registry and program files.
Hi, I could see two folders of Acrobat 9 and 10 are present in my program files folder and also in registry. Our installer searches path and copy .api file in the folder. Now, it would be bit confusing for the installer to pick up the active installe
-
If i want to switch phones do I have to pay more?
If i want to switch my phone from the LG env 3 to the palm pixi do I have to switch my plan? I was talking to a verizon guy at the store and he said that if i would buy the palm pixi and switch everything over the internet the phone wont work without
-
Hi, I want to generate a report/query to get Activities & connected Cases using CRM 5.0. Can anyone please let me know the tables involved or query to be used? thanks in advance, LSP
-
Tween Max AS3 Not Working on Root of loaded SWF
I have a project where I'm loading a SWF into another Shell SWF and I've run into a strange bug. Tween Max works in the compiled clip everywhere, but on the root of the loaded SWF. It's not erroring out, it's just not tweening anything? Here's