Can sender file adapter read plain files with different structure?
Hej experts,
I am facing the following sutiation in FIle-to-Mail scenario:
Bank sends two types of file : CONTRL and BANSTA to the same directory where XI shall pick , map to other stucture (mail structure ) and send mail.
You can not identify the file type( CONTRL or BANSTA) from file name - only from file content.
Would it be possible for XI to pick up file, check the structure and select the right XML structure to transform to?
Any other solutions?
Thak you for your help,
Natlaiya
You can not identify the file type( CONTRL or BANSTA) from file name - only from file content.
Would it be possible for XI to pick up file, check the structure and select the right XML structure to transform to?
If not wrong even XI/ PI cannot understand it.....if you say you can implement an adapter module to do the file conversion....even in that case you will need to know the file format....do you need to implement any conversion on the file?
Regards,
Abhishek.
Similar Messages
-
How can i map a file with different structures to several deep structures?
Hey experts,
here is my situation. I have to build a file2file scenario. The file has a flat structure without any separators. Depending on the value of the keyfield, i have to determinate, which kind of structure in the current sequence there is. Like i wrote, there isn't any fieldseparator, but for every possible structure (overall 4 types) i know the type by the length of every field in the structure.
My task is:
1. Read the file into PI and transform to XML
2. Map the flat structure depending on the keyvalue to the deep structure
3. Transform several fields in the different structures like the requirement
4. Write back the file via FTP as the same flat structure as before
Do you have any approach to solve the item number 2 (the other steps are clear for me)?
Do i need several mapping-programs? If so, how can i determinate the right mapping-program, deping on the keyvalue?
Thanks in advance
TobiHere the inbound payload:
<?xml version="1.0" encoding="utf-8" ?>
- <ns:MT_MULTI_TYPES xmlns:ns="namespace">
- <VORSATZ>
<ZSATA>0</ZSATA>
<MANDT>001</MANDT>
<BUKRS>0560</BUKRS>
<BLART>8F</BLART>
<BELNR>1816008128</BELNR>
<BUZEI>000</BUZEI>
<ERDAT>20080905</ERDAT>
<UZEIT>000549</UZEIT>
<ZPROG>PGRR3010</ZPROG>
<ZLIEF>T</ZLIEF>
<START>20080905</START>
<ZFILL />
<ZENDE>E</ZENDE>
</VORSATZ>
- <KOPFSATZ>
<ZSATA>1</ZSATA>
<MANDT>001</MANDT>
<BUKRS>0560</BUKRS>
<BLART>8F</BLART>
<BELNR>1816008128</BELNR>
<BUZEI>000</BUZEI>
<BUDAT>20080904</BUDAT>
<BLDAT>20080904</BLDAT>
<XBLNR />
<WAERS />
<HWAE2>EUR</HWAE2>
<HWAE3 />
<KURS2>000000000</KURS2>
<KURS3>000000000</KURS3>
<BKTXT />
<ZFILK />
<ZENDE>E</ZENDE>
</KOPFSATZ>
- <POSITIONSSATZ>
<ZSATA>4</ZSATA>
<MANDT>001</MANDT>
<BUKRS>0560</BUKRS>
<BLART>8F</BLART>
<BELNR>1816008128</BELNR>
<BUZEI>001</BUZEI>
<KOART>S</KOART>
<SHKZG>S</SHKZG>
<NEWKO>30611102</NEWKO>
<GSBER>17AB</GSBER>
<ZUBUK />
<VBUND />
<WRBTR>0000000000000</WRBTR>
<ZBTR1>0000000057576</ZBTR1>
<ZBTR2>0000000000000</ZBTR2>
<ZSTEU />
<VALUT>20080904</VALUT>
<KOSTL />
<AUFNR />
<ZUONR>X4025V64RE460XXXXX</ZUONR>
<SGTXT>REX</SGTXT>
<BEWAR />
<ZFPOS />
<ZENDE>E</ZENDE>
</POSITIONSSATZ>
- <POSITIONSSATZ>
<ZSATA>4</ZSATA>
<MANDT>001</MANDT>
<BUKRS>0560</BUKRS>
<BLART>8F</BLART>
<BELNR>1816008128</BELNR>
<BUZEI>009</BUZEI>
<KOART>S</KOART>
<SHKZG>S</SHKZG>
<NEWKO>20519109</NEWKO>
<GSBER>17AB</GSBER>
<ZUBUK />
<VBUND />
<WRBTR>0000000000000</WRBTR>
<ZBTR1>0000000021070</ZBTR1>
<ZBTR2>0000000000000</ZBTR2>
<ZSTEU />
<VALUT>20080904</VALUT>
<KOSTL />
<AUFNR />
<ZUONR>X4025V64RE460XXXXX</ZUONR>
<SGTXT>REX</SGTXT>
<BEWAR />
<ZFPOS />
<ZENDE>E</ZENDE>
</POSITIONSSATZ>
- <POSITIONSSATZ>
<ZSATA>4</ZSATA>
<MANDT>001</MANDT>
<BUKRS>0560</BUKRS>
<BLART>8F</BLART>
<BELNR>1816008128</BELNR>
<BUZEI>010</BUZEI>
<KOART>S</KOART>
<SHKZG>S</SHKZG>
<NEWKO>20519109</NEWKO>
<GSBER>17AA</GSBER>
<ZUBUK />
<VBUND />
<WRBTR>0000000000000</WRBTR>
<ZBTR1>0000000009796</ZBTR1>
<ZBTR2>0000000000000</ZBTR2>
<ZSTEU />
<VALUT>20080904</VALUT>
<KOSTL />
<AUFNR />
<ZUONR>X4027V63RE460XXXXX</ZUONR>
<SGTXT>REX</SGTXT>
<BEWAR />
<ZFPOS />
<ZENDE>E</ZENDE>
</POSITIONSSATZ>
- <NACHSATZ>
<ZSATA>9</ZSATA>
<MANDT>001</MANDT>
<BUKRS>0560</BUKRS>
<BLART>8F</BLART>
<BELNR>1816008128</BELNR>
<BUZEI>010</BUZEI>
<ERDAT>20080905</ERDAT>
<UZEIT>000549</UZEIT>
<ZPROG>PGRR3010</ZPROG>
<ZZSOL>000000000359502</ZZSOL>
<ZZHAB>000000000359502</ZZHAB>
<ZZBEL>0000001</ZZBEL>
<ZZPOS>000000010</ZZPOS>
<ZFILN />
<ZENDE>E</ZENDE>
</NACHSATZ>
- <VORSATZ>
<ZSATA>0</ZSATA>
<MANDT>001</MANDT>
<BUKRS>0560</BUKRS>
<BLART>8F</BLART>
<BELNR>1816008128</BELNR>
<BUZEI>000</BUZEI>
<ERDAT>20080905</ERDAT>
<UZEIT>000549</UZEIT>
<ZPROG>PGRR3010</ZPROG>
<ZLIEF>T</ZLIEF>
<START>20080905</START>
<ZFILL />
<ZENDE>E</ZENDE>
</VORSATZ>
- <KOPFSATZ>
<ZSATA>1</ZSATA>
<MANDT>001</MANDT>
<BUKRS>0560</BUKRS>
<BLART>8F</BLART>
<BELNR>1816008128</BELNR>
<BUZEI>000</BUZEI>
<BUDAT>20080904</BUDAT>
<BLDAT>20080904</BLDAT>
<XBLNR />
<WAERS />
<HWAE2>EUR</HWAE2>
<HWAE3 />
<KURS2>000000000</KURS2>
<KURS3>000000000</KURS3>
<BKTXT />
<ZFILK />
<ZENDE>E</ZENDE>
</KOPFSATZ>
- <POSITIONSSATZ>
<ZSATA>4</ZSATA>
<MANDT>001</MANDT>
<BUKRS>0560</BUKRS>
<BLART>8F</BLART>
<BELNR>1816008128</BELNR>
<BUZEI>001</BUZEI>
<KOART>S</KOART>
<SHKZG>S</SHKZG>
<NEWKO>30611102</NEWKO>
<GSBER>17AB</GSBER>
<ZUBUK />
<VBUND />
<WRBTR>0000000000000</WRBTR>
<ZBTR1>0000000057576</ZBTR1>
<ZBTR2>0000000000000</ZBTR2>
<ZSTEU />
<VALUT>20080904</VALUT>
<KOSTL />
<AUFNR />
<ZUONR>X4025V64RE460XXXXX</ZUONR>
<SGTXT>REX</SGTXT>
<BEWAR />
<ZFPOS />
<ZENDE>E</ZENDE>
</POSITIONSSATZ>
- <POSITIONSSATZ>
<ZSATA>4</ZSATA>
<MANDT>001</MANDT>
<BUKRS>0560</BUKRS>
<BLART>8F</BLART>
<BELNR>1816008128</BELNR>
<BUZEI>009</BUZEI>
<KOART>S</KOART>
<SHKZG>S</SHKZG>
<NEWKO>20519109</NEWKO>
<GSBER>17AB</GSBER>
<ZUBUK />
<VBUND />
<WRBTR>0000000000000</WRBTR>
<ZBTR1>0000000021070</ZBTR1>
<ZBTR2>0000000000000</ZBTR2>
<ZSTEU />
<VALUT>20080904</VALUT>
<KOSTL />
<AUFNR />
<ZUONR>X4025V64RE460XXXXX</ZUONR>
<SGTXT>REX</SGTXT>
<BEWAR />
<ZFPOS />
<ZENDE>E</ZENDE>
</POSITIONSSATZ>
- <POSITIONSSATZ>
<ZSATA>4</ZSATA>
<MANDT>001</MANDT>
<BUKRS>0560</BUKRS>
<BLART>8F</BLART>
<BELNR>1816008128</BELNR>
<BUZEI>010</BUZEI>
<KOART>S</KOART>
<SHKZG>S</SHKZG>
<NEWKO>20519109</NEWKO>
<GSBER>17AA</GSBER>
<ZUBUK />
<VBUND />
<WRBTR>0000000000000</WRBTR>
<ZBTR1>0000000009796</ZBTR1>
<ZBTR2>0000000000000</ZBTR2>
<ZSTEU />
<VALUT>20080904</VALUT>
<KOSTL />
<AUFNR />
<ZUONR>X4027V63RE460XXXXX</ZUONR>
<SGTXT>REX</SGTXT>
<BEWAR />
<ZFPOS />
<ZENDE>E</ZENDE>
</POSITIONSSATZ>
- <NACHSATZ>
<ZSATA>9</ZSATA>
<MANDT>001</MANDT>
<BUKRS>0560</BUKRS>
<BLART>8F</BLART>
<BELNR>1816008128</BELNR>
<BUZEI>010</BUZEI>
<ERDAT>20080905</ERDAT>
<UZEIT>000549</UZEIT>
<ZPROG>PGRR3010</ZPROG>
<ZZSOL>000000000359502</ZZSOL>
<ZZHAB>000000000359502</ZZHAB>
<ZZBEL>0000001</ZZBEL>
<ZZPOS>000000010</ZZPOS>
<ZFILN />
<ZENDE>E</ZENDE>
</NACHSATZ>
</ns:MT_MULTI_TYPES>
And here the outbound payload:
<?xml version="1.0" encoding="UTF-8" ?>
- <ns0:MT_MULTI_TYPES xmlns:ns0="namespace">
- <VORSATZ>
<ZSATA>0</ZSATA>
<MANDT>001</MANDT>
<BUKRS>0560</BUKRS>
<BLART>8F</BLART>
<BELNR>1816008128</BELNR>
<BUZEI>000</BUZEI>
<ERDAT>20080905</ERDAT>
<UZEIT>000549</UZEIT>
<ZPROG>PGRR3010</ZPROG>
<ZLIEF>T</ZLIEF>
<START>20080905</START>
<ZFILL />
<ZENDE>E</ZENDE>
</VORSATZ>
- <VORSATZ>
<ZSATA>0</ZSATA>
<MANDT>001</MANDT>
<BUKRS>0560</BUKRS>
<BLART>8F</BLART>
<BELNR>1816008128</BELNR>
<BUZEI>000</BUZEI>
<ERDAT>20080905</ERDAT>
<UZEIT>000549</UZEIT>
<ZPROG>PGRR3010</ZPROG>
<ZLIEF>T</ZLIEF>
<START>20080905</START>
<ZFILL />
<ZENDE>E</ZENDE>
</VORSATZ>
- <KOPFSATZ>
<ZSATA>1</ZSATA>
<MANDT>001</MANDT>
<BUKRS>0560</BUKRS>
<BLART>8F</BLART>
<BELNR>1816008128</BELNR>
<BUZEI>000</BUZEI>
<BUDAT>20080904</BUDAT>
<BLDAT>20080904</BLDAT>
<XBLNR />
<WAERS />
<HWAE2>EUR</HWAE2>
<HWAE3 />
<KURS2>000000000</KURS2>
<KURS3>000000000</KURS3>
<BKTXT />
<ZFILK />
<ZENDE>E</ZENDE>
</KOPFSATZ>
- <KOPFSATZ>
<ZSATA>1</ZSATA>
<MANDT>001</MANDT>
<BUKRS>0560</BUKRS>
<BLART>8F</BLART>
<BELNR>1816008128</BELNR>
<BUZEI>000</BUZEI>
<BUDAT>20080904</BUDAT>
<BLDAT>20080904</BLDAT>
<XBLNR />
<WAERS />
<HWAE2>EUR</HWAE2>
<HWAE3 />
<KURS2>000000000</KURS2>
<KURS3>000000000</KURS3>
<BKTXT />
<ZFILK />
<ZENDE>E</ZENDE>
</KOPFSATZ>
- <POSITIONSSATZ>
<ZSATA>4</ZSATA>
<MANDT>001</MANDT>
<BUKRS>0560</BUKRS>
<BLART>8F</BLART>
<BELNR>1816008128</BELNR>
<BUZEI>001</BUZEI>
<KOART>S</KOART>
<SHKZG>S</SHKZG>
<NEWKO>30611102</NEWKO>
<GSBER>17AB</GSBER>
<ZUBUK />
<VBUND />
<WRBTR>0000000000000</WRBTR>
<ZBTR1>0000000057576</ZBTR1>
<ZBTR2>0000000000000</ZBTR2>
<ZSTEU />
<VALUT>20080904</VALUT>
<KOSTL />
<AUFNR />
<ZUONR>X4025V64RE460XXXXX</ZUONR>
<SGTXT>REX</SGTXT>
<BEWAR />
<ZFPOS />
<ZENDE>E</ZENDE>
</POSITIONSSATZ>
- <POSITIONSSATZ>
<ZSATA>4</ZSATA>
<MANDT>001</MANDT>
<BUKRS>0560</BUKRS>
<BLART>8F</BLART>
<BELNR>1816008128</BELNR>
<BUZEI>009</BUZEI>
<KOART>S</KOART>
<SHKZG>S</SHKZG>
<NEWKO>20519109</NEWKO>
<GSBER>17AB</GSBER>
<ZUBUK />
<VBUND />
<WRBTR>0000000000000</WRBTR>
<ZBTR1>0000000021070</ZBTR1>
<ZBTR2>0000000000000</ZBTR2>
<ZSTEU />
<VALUT>20080904</VALUT>
<KOSTL />
<AUFNR />
<ZUONR>X4025V64RE460XXXXX</ZUONR>
<SGTXT>REX</SGTXT>
<BEWAR />
<ZFPOS />
<ZENDE>E</ZENDE>
</POSITIONSSATZ>
- <POSITIONSSATZ>
<ZSATA>4</ZSATA>
<MANDT>001</MANDT>
<BUKRS>0560</BUKRS>
<BLART>8F</BLART>
<BELNR>1816008128</BELNR>
<BUZEI>010</BUZEI>
<KOART>S</KOART>
<SHKZG>S</SHKZG>
<NEWKO>20519109</NEWKO>
<GSBER>17AA</GSBER>
<ZUBUK />
<VBUND />
<WRBTR>0000000000000</WRBTR>
<ZBTR1>0000000009796</ZBTR1>
<ZBTR2>0000000000000</ZBTR2>
<ZSTEU />
<VALUT>20080904</VALUT>
<KOSTL />
<AUFNR />
<ZUONR>X4027V63RE460XXXXX</ZUONR>
<SGTXT>REX</SGTXT>
<BEWAR />
<ZFPOS />
<ZENDE>E</ZENDE>
</POSITIONSSATZ>
- <POSITIONSSATZ>
<ZSATA>4</ZSATA>
<MANDT>001</MANDT>
<BUKRS>0560</BUKRS>
<BLART>8F</BLART>
<BELNR>1816008128</BELNR>
<BUZEI>001</BUZEI>
<KOART>S</KOART>
<SHKZG>S</SHKZG>
<NEWKO>30611102</NEWKO>
<GSBER>17AB</GSBER>
<ZUBUK />
<VBUND />
<WRBTR>0000000000000</WRBTR>
<ZBTR1>0000000057576</ZBTR1>
<ZBTR2>0000000000000</ZBTR2>
<ZSTEU />
<VALUT>20080904</VALUT>
<KOSTL />
<AUFNR />
<ZUONR>X4025V64RE460XXXXX</ZUONR>
<SGTXT>REX</SGTXT>
<BEWAR />
<ZFPOS />
<ZENDE>E</ZENDE>
</POSITIONSSATZ>
- <POSITIONSSATZ>
<ZSATA>4</ZSATA>
<MANDT>001</MANDT>
<BUKRS>0560</BUKRS>
<BLART>8F</BLART>
<BELNR>1816008128</BELNR>
<BUZEI>009</BUZEI>
<KOART>S</KOART>
<SHKZG>S</SHKZG>
<NEWKO>20519109</NEWKO>
<GSBER>17AB</GSBER>
<ZUBUK />
<VBUND />
<WRBTR>0000000000000</WRBTR>
<ZBTR1>0000000021070</ZBTR1>
<ZBTR2>0000000000000</ZBTR2>
<ZSTEU />
<VALUT>20080904</VALUT>
<KOSTL />
<AUFNR />
<ZUONR>X4025V64RE460XXXXX</ZUONR>
<SGTXT>REX</SGTXT>
<BEWAR />
<ZFPOS />
<ZENDE>E</ZENDE>
</POSITIONSSATZ>
- <POSITIONSSATZ>
<ZSATA>4</ZSATA>
<MANDT>001</MANDT>
<BUKRS>0560</BUKRS>
<BLART>8F</BLART>
<BELNR>1816008128</BELNR>
<BUZEI>010</BUZEI>
<KOART>S</KOART>
<SHKZG>S</SHKZG>
<NEWKO>20519109</NEWKO>
<GSBER>17AA</GSBER>
<ZUBUK />
<VBUND />
<WRBTR>0000000000000</WRBTR>
<ZBTR1>0000000009796</ZBTR1>
<ZBTR2>0000000000000</ZBTR2>
<ZSTEU />
<VALUT>20080904</VALUT>
<KOSTL />
<AUFNR />
<ZUONR>X4027V63RE460XXXXX</ZUONR>
<SGTXT>REX</SGTXT>
<BEWAR />
<ZFPOS />
<ZENDE>E</ZENDE>
</POSITIONSSATZ>
- <NACHSATZ>
<ZSATA>9</ZSATA>
<MANDT>001</MANDT>
<BUKRS>0560</BUKRS>
<BLART>8F</BLART>
<BELNR>1816008128</BELNR>
<BUZEI>010</BUZEI>
<ERDAT>20080905</ERDAT>
<UZEIT>000549</UZEIT>
<ZPROG>PGRR3010</ZPROG>
<ZZSOL>000000000359502</ZZSOL>
<ZZHAB>000000000359502</ZZHAB>
<ZZBEL>0000001</ZZBEL>
<ZZPOS>000000010</ZZPOS>
<ZFILN />
<ZENDE>E</ZENDE>
</NACHSATZ>
- <NACHSATZ>
<ZSATA>9</ZSATA>
<MANDT>001</MANDT>
<BUKRS>0560</BUKRS>
<BLART>8F</BLART>
<BELNR>1816008128</BELNR>
<BUZEI>010</BUZEI>
<ERDAT>20080905</ERDAT>
<UZEIT>000549</UZEIT>
<ZPROG>PGRR3010</ZPROG>
<ZZSOL>000000000359502</ZZSOL>
<ZZHAB>000000000359502</ZZHAB>
<ZZBEL>0000001</ZZBEL>
<ZZPOS>000000010</ZZPOS>
<ZFILN />
<ZENDE>E</ZENDE>
</NACHSATZ>
</ns0:MT_MULTI_TYPES> -
How to send file with original name through Mail adapter
I have to send file with original name as attachment through Mail Adapter. I am picking the file from FTP server through File Adapter. I am not using message mapping because files do not have any standard format.
Hi,
Have you solve your problem ?...
I have exactly the same scenario : pik up a file (file adapter) and send it in attachment by mail adapter without mapping (no IR)...
I activated Adapter specific paramters properties in the File adapter sender and i can see the FileName tag in DynamicConfiguration section of SoapHeader in SXMB_MONI...
I want to use MessageTransformationBean... BUT, how can i 'access' to FileName tag ???...
Thanks...
I setup modules like this :
AF_Modules/DynamicConfigurationBean 1
AF_Modules/MessageTransformBean rename
sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean mail
1 key.0 write http://sap.com/xi/XI/System/File FileName
1 value.0 message.FileName
rename Transform.ContentDisposition attachment;filename=message.FileName
rename Transform.ContentDescription message.FileName
rename Transform.ContentType application/csv-tab-delimited-table;name=message.FileName
But my file name attachment is message.FileName....
Edited by: Emmanuel JORAND on Sep 29, 2008 9:23 PM
Edited by: Emmanuel JORAND on Sep 29, 2008 10:25 PM -
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. -
Sending file with bluetooth from laptop to phone
I am having great difficulty sending file from laptop to phone using bluetooth. I can send files from phone to laptop.
I have followed the instructions from this link: http://wiki.archlinux.org/index.php/Bluetooth .
also i am using xfce4 as my Desktop Environment.
any other help would be greatly appreciated.The thing is, this is not the topic you started, so it is solved . The OP used Xfce, and I linked him to a solution on how to do so - on Xfce. So yes, it is solved. He's the only one to say so. As you say, your problem is different, so you might want to bump your own topic instead .
-
I have imported my pictures into aperture, how do I export into jpeg files so i can share files with friends who dont use aperture ?
If you want the same export settings on some or all of the images you can select all that have the same export requirements and export them as a group.
If all the images have the same requirements then you can select them all and run the export command. -
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 -
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 -
What adobe app can decode files with extensions bup, ifo, vob?
What adobe app can decode files with extensions bup, ifo, vob?
>bup, ifo
Nothing... those are part of the file structure of a DVD
>vob
This is the actual video on a DVD... so Premiere Elements or Premiere Pro -
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 -
Printing different/selective files with different copies
Hi everyone,
I've been working on finding a solution, on how to print different pdf files with different copies, without opening the pdf-files.
Task:
I have a folder, with 25 pdf files
I want to make a php overview, of the folder
At the end of each line/file - i would like to add a number for the copies
In the end, I would like to simply press print - and every document ive added a number/copies to - are being printet...
I guess I need to use PrintPDF - but does anyone know any pre-made program/function - that could handle the "copies" part...?
I hope someone can help me out,
Thanks
JanWell, i had hoped that the acrobat could open silent - eventhough they've removed that feature in the newer versions.
Even though the program would open - if the amount of copies was added - and i just hat to press print - it would ease the job alot. -
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. -
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" -
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 -
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.
Maybe you are looking for
-
Contact shows unknown phone number when SMSing
iPhone 4s IOS 6.1 I create an SMS using Messages I type in the contact name, in this case 'David' Various 'David's pop up but 3 phone numbers show for the David in question. 1. Home 2. iPhone 3. Unknown However, when I go to the Contact using 'Contac
-
There has to be a way to disable the "CS Live" toolbar menu in Illustrator. Doesn't there? There is an option in Photoshop: it's in the Preferences menu, under "Plugins". No such option in Illy. I might have had a use for this feature-I'm not dead se
-
HR_FBN_GENERATE_SEND_EMAIL
hi, I am working on scripts to send mail with PDF as an attachment, while surfing the net I found the FM HR_FBN_GENERATE_SEND_EMAIL to send the mail. if any one know whether I can use this FM could you help how to pass data to the FM. CALL FUNCTION '
-
Thread pool small example needed
Hi friends, Can you please give a small example program for thread pool to understand?
-
Internal HD has a problem?
Ok here is the situation, I was haveing some issues with me internal HD with Snow lepard. Finder was acting funny freezing up and getting snotty. I tried several thing like Disk repair verify permission all that. MY disk drive I believe isn't working