Fixed width file outgoing with header,detail and trailer in one map
we have a scenario where in we have to create an output file. the file is fixed width with three different kinds of records namely header, details and trailer. if the specification of the metadata of the file is specified how will we incorporate the creation of the file in one map since the map produces only one call to UTL_FILE and writes it.
there is a work around in a crude way where in we can define the file as a CSV and pass everything in an appanded string in one column. but i wanted to know how we can get the three logical records in one map..
thanks
kamal
The problem is not with generating the records.. i mean header , detail and trailer.
it is how we put them into a fixed width sampled file. if we look at the code generated we will see only one call being made to generate the file.
Similar Messages
-
Multi-Header, Detail and Trailer Record
Hi,
I have to plants, For Each plant i need Header, no.of Details and one trailer Record i need.
Like
Plant 1000
Header1
Deatail Record1
Deatail Record2
Deatail Record3
Trailer1
for plant 2000
Header2
Deatail Record1
Deatail Record2
Deatail Record3
Trailer2
Thanks!
Regards,
SReddyHi,
If you could give us the source and target structure with occurrences, it could be easy for us to suggest.
Best regards,
raj. -
How to Seggragate Header, Footer and Trailer Records in Informatica Cloud ?
Hi All, This is my source file Structure which is Flat File. Source File : "RecordType","Creation Date","Interface Name""H","06-08-2015","SFC02""RecordType","Account Number","Payoff Amount","Good Through Date""D","123456787","2356.14","06-08-2015""D","12347","2356.14","06-08-2015""D","123487","235.14","06-08-2015""RecordType","Creation Date","TotalRecordCount""T","06-08-2015","5" The Source File has to be loaded into three targets for Header , Detail and Trailer records separately. Target Files: File 1 : Header.txt
"RecordType","Creation Date","Interface Name""H","06-08-2015","SFC02" File 2 : Detail.txt "RecordType","Account Number","Payoff Amount","Good Through Date""D","123456787","2356.14","06-08-2015""D","12347","2356.14","06-08-2015""D","123487","235.14","06-08-2015" File 3 : Trailer.txt "RecordType","Creation Date","TotalRecordCount""T","06-08-2015","5" I tired this solution below : 1. Source ---> Expression ]-----filter 1---Detail.txt -----filter 2---Trailer.txt In source , I will read the records starting from 3rd row. This is because, if i read from first row, the detail part contains more fields when compared to Header part. Header Part contains only three fields. So it is taking only first three fields records in Detail Section as well.That's why I am skipping the first two records(Header fields and header record) .. refer the example.. In filter 1, condition is Record_Type = 'D'. In Filter 2 , condition is Record_Type = 'T'.So, the filter 1 will load to Detail.txt and Filter 2 Will load to Trailer.txt In task , pre session command, Calling the windows .bat script to fetch the first two lines and load into Header.txt This solution is working fine.. My query is can we use two pipeline flow in a same mapping in Informatica cloud.? Pipeline Flow 1 Source ---> Expression ]-----filter 1---Detail.txt -----filter 2---Trailer.txtPipeline Flow 2 Source ---> Expression ]-----filter 3(Record_Type='H')---Header.txt Source file is same in two flows. In first flow, I will read from the third row, skipping the header section as I mentioned earlier.In second flow , I ll read the entire content and take only header record and load into target. If I add the flow 2 to existing flow 1. I am getting the below error..TE_7020 Internal error. The Source Qualifier [Header_Source] contains an unbound field [Creation_Date]. Contact Informatica Global Customer Support. 1. Do informatica Cloud supports, two parallel flow in a same mapping ?2. Any other best solution for my requirement? Since I am new to Informatica Cloud, Can anyone suggest any other solution if you have?? It will be more helpful if you guys suggest a good solution .. ThanksSindhu RavindranWe are using a Webservices Consumer Tranformation in our mapping to connect to RightFax Server using a WSDL url via Business Service in a mapping.Here in the mapping, where we are sending the input parameters through a flat file and then connecting to Rightfax Server via WS Consumer transformation and then fetching the data and writing to a Flat File. 07/28/2015 10:10:49 **** Importing Connection: Conn_000A7T0B0000000000EM ...07/28/2015 10:10:49 **** Importing Source Definition: SRC_RightFax_txt ...07/28/2015 10:10:49 **** Importing Target Definition: GetFax_txt ...07/28/2015 10:10:49 **** Importing Target Definition: FaultGroup_txt ...07/28/2015 10:10:49 **** Importing SessionConfig: default_session_config ... <Warning> : The Error Log DB Connection value should have Relational: as the prefix. <Warning> : Invalid value for attribute Error Log DB Connection. Will use the default value Validating Source Definition SRC_RightFax_txt... Validating Target Definition FaultGroup_txt... Validating Target Definition GetFax_txt...07/28/2015 10:10:49 **** Importing Mapping: Mapping0 ... <Warning> : transformation: RIghtfax - Invalid value for attribute Output is repeatable. Will use the default value Never [transformation< RIghtfax > ] Validating transformations of mapping Mapping0...Validating mapping variable(s).07/28/2015 10:10:50 **** Importing Workflow: wf_mtt_000A7T0Z00000000001M ... <Warning> : Invalid value Optimize throughout for attribute Concurrent read partitioning. Will use the default value Optimize throughput [Session< s_mtt_000A7T0Z00000000001M > --> File Reader< File Reader > ] <Warning> : The value entered is not a valid integer. <Warning> : Invalid value NO for attribute Fail task after wait time. Will use the default value Successfully extracted session instance [s_mtt_000A7T0Z00000000001M]. Starting repository sequence id is [1048287470] Kindly provide us a solution. Attached are logs for reference.
-
Re: to create outbound file with multiple header ,detail and trailor in informatica
Dear Mohan Prakash, Please mentation The Target Which Format you need. Please let me know. Thanks & RegardsKasireddy+966545281845
hi I want to create a file with muiltple header detail and trailorSample of my file 1F99500094959 5F99000000999911025F99000000999912025F99000000999913029F99500094959 1G83341002729803 5G83000000999918020109G83341002729803 1G83910377940 5G830000009999190201011050003522029G83910377940 T20110720000000900000006750{ In this file 1 is header and 5 is detail and 9 is trailer and in last T segment is also trailerI have any idea to create seperate 3 files and in lastconcatenate all file with the help of unixbut in my case data is so large (in millions) this approach is not use full please suggest my any ideaHow to create VSAM file
-
how to define a schema for fixed length consisting of multiple records of different types having header detail and footer at positions 22 and 23 namely having 10 for header ,20 for detail and 30 for footer.
here is the sample file
DDWTYBILL13092502572 1000000112\\NHLSFS\ORACLE\ORACLE\BILLING\VERIFY\ 2013/09/25 01:19:08 BILLEND
DDWTYBILL13092502572 2000000212PRIVATE PRIVATE STY5572142 010700 INV 12STYD000789 02-AUG-20130000010472 STY STY 1100611006MGIT 91 NNM DIMPHANA,CN,CELESTE NERINA 09-JAN-1964 TYG A2 DR DU PREEZ 5602181 63301345 TB731543 Suspect TB ?CA, (L) EMPIEEM Ward A2 TYGERBERG HOSPITAL Z03.0 Z03.9 05-AUG-201305-AUG-201324-SEP-2013FEND 113.60
DDWTYBILL13092502572 2000000312PRIVATE PRIVATE STY5572149 010700 INV 12STYD000789 02-AUG-20130000010472 STY STY 1100611006MGIT 91 NNM DIMPHANA,CN,CELESTE NERINA 09-JAN-1964 TYG A2 DR DU PREEZ 5602181 63301345 TB731548 Empyema BPF Ward A2 TYGERBERG HOSPITAL Z03.9 Z03.9 05-AUG-201305-AUG-201324-SEP-2013FEND 113.60
DDWTYBILL13092502572 2000000412PRIVATE PRIVATE STY5572351 010700 INV 12STYD000789 02-AUG-20130000010472 STY STY 1100611006MGIT 91 NNM DIMPHANA,CN,CELESTE NERINA 09-JAN-1964 TYG A2 DR DU PREEZ 5602181 63301345 TB731584 Suspect TB ?EMPIEEM, ?CA Ward A2 TYGERBERG HOSPITAL Z03.0 Z03.9 05-AUG-201305-AUG-201324-SEP-2013FEND 113.60
DDWTYBILL13092502572 2000000512PRIVATE PRIVATE STY5572352 010700 INV 12STYD000789 02-AUG-20130000010472 STY STY 1100611006MGIT 91 NNM DIMPHANA,CN,CELESTE NERINA 09-JAN-1964 TYG A2 DR DU PREEZ 5602181 63301345 TB731585 Suspect TB ?EMPIEEM, ?CA Ward A2 TYGERBERG HOSPITAL Z03.0 Z03.9 05-AUG-201305-AUG-201324-SEP-2013FEND 113.60
DDWTYBILL13092502572 2000000612MAJOR MAJOR STY5577530 010700 INV 12ZTYG000009 02-AUG-20130000010472 STY STY 1100611006MGIT 91 NNS ZOZI,S,SIYAMBONGA 27-MAR-2010 TYG D3 DR MAHOMED 5602181 113799662 TB731663 Lymphadenitis Ward D3 TYGERBERG HOSPITAL I88.9 Z03.9 H1 07-AUG-201307-AUG-201324-SEP-2013MEND 58.52
DDWTYBILL13092502572 2000000712MAJOR MAJOR STY5577537 010700 INV 12ZTYG000009 06-AUG-20130000010472 STY STY 1100611006MGIT 91 NNS DLAMINI,N,NTLANTLA 09-OCT-1976 TYG F1 DR WZESE 5602181 135524676 TB731666 Suspect TB Ward F1 TYGERBERG HOSPITAL Z03.0 Z03.9 H1 07-AUG-201314-AUG-201324-SEP-2013MEND 58.52
DDWTYBILL13092502572 30003034120000003032ENDYou can create an nXSD using Native Format Builder and use lookAhead attribute to read values at specific position and use that as the choice. You can find an example here
http://docs.oracle.com/cd/E11036_01/integrate.1013/b28994/nfb.htm#BGBBAJFD -
Procedure for creating Recording in LSMW with header data and line item
Hello Friends,
I have to do the Initial Upload of Model Service specification using LSMW ( Recording).
Transaction : ML10
The problem i am facing is that i have been given 2 files one with HEADER data and the other with LINE ITEM(Service data).
Can we use the RECORDING method to upload 2 files?
If not possible how do we proceed.
Thanks and regards
Ashish Naik.Step-by-Step Procedure:
Details of the BAPI used in this scenario:
Business Object: BUS2012
Method: CreateFromData
Details of Message Type and Basic IDoc Type:
Message Type: PORDCR
Basic IDoc Type: PORDCR02
Letu2019s have a look at the BAPI first, before proceeding to the LSMW:
1. Go to Transaction BAPI
2. Click on Search Button
3. Enter the value u201CBUS2012u201D and select u201CObj.type(Technical Object Nameu201D
4. Press ENTER
5. Following screen appears:
6. On the left side of the screen, Expand the u201CPurchaseOrderu201D.
7. Select u201CPurchaseOrderu201D and double-click on the same for details.
Building LSMW using BAPI:
1. Go to Transaction LSMW.
2. Enter the Project, Subproject and Object information and click on CREATE.
3. Enter the descriptions for Project, Subproject and Object as prompted.
4. Now select Settings à IDoc Inbound Processing
5. u201CIDoc Inbound Processingu201D screen appears. Enter the required details as shown below:
6. Click on u201CActivate IDoc Inbound Processingu201D.
7. Click on u201CYesu201D when prompted for u201CActivate IDoc Inbound?u201D
8. Hit on u201CBacku201D to return to the main screen.
9. Click on Continue (F8). Following Screen appears:
10. Select the Step 1 u201CMaintain Object Attributesu201D and select u201CExecuteu201D.
11. Select the radio button u201CBusiness Object Methodu201D and enter the following details:
Business Object: BUS2012
Method: CreateFromData
Hit ENTER
12. Save and click on BACK button. Following information message is displayed.
13. Now select step 2 u201CMaintain Source Structuresu201D and click u201CExecuteu201D.
14. In this step, we need to maintain the source structure. In our example, lets consider the example of a file with 2 structures Head and Item data as shown below:
Click on Create and name the source structure as HEADERDATA. Now select HEADERDATA and click on u201CCreateu201D again to create the child structure. Following popup appears:
Select u201CLower Levelu201D and click on Continue. Enter the Item data structure name.
Click Save and hit BACK button to go to the main screen.
15. Select step 3 u201CMaintain Source Fieldsu201D and hit execute.
16. Enter the fields as shown below:
17. Click SAVE and return to main screen.
18. Select step 4 u201CMaintain Structure Relationsu201D and click Execute.
Select E1PORDCR and click on CREATE RelationShip. Following screen appears:
Select HEADERDATA and hit ENTER
Similarly do the same for the structure E1BPEKKOA, E1BPEKPOC and E1BPPEKET.
Click Save and return to main screen.
19. Select the step u201CMaintain Field Mapping and Conversion Rulesu201D and click on execute. Maintain the Field Mapping as seen below:
20. Select step 7 u201CMaintain Source Filesu201D and provide the link for the test file created. (Create a test file with the same structure as defined earlier).
Save and return to main screen.
21. Select the step u201CAssign Filesu201D and click on Execute.
Assign the file provided to the source structure. Here the same file is provided for both the structures.
Save and return to the main screen.
22. Select the step u201CRead Datau201D and click on Execute.
Click on Execute.
Return to the main screen.
23. Select the step u201CDisplay read datau201D and click on execute.
Click on the structure name to get the field level values.
24. Return to main screen and now select u201CConvert Datau201D.
25. Return to the main screen and select u201CDisplay Converted datau201D.
26. Return to main screen and select u201CStart IDoc generationu201D.
27. Now select the step u201CStart IDoc Processingu201D on the main screen.
28. Return to main screen and click on u201CCreate IDoc overviewu201D. Here the data record and status records of the IDoc could be viewed:
Check this. This may help -
Setting fixed width on columns with the Column Graph Tool
Hi,
I'm trying to perfect my charts a little.
Right now the width of my columns using the Column Graph Tool seem to be dictated by how many columns I got in total. So if I only have two columns both get really wide. But if I have four, they look just nice. Is there any way to set a fixed width on columns with the Column Graph Tool?
Thanks!What am I thinking.
Select your graph double click the graph tool at the bottom of the dialog, enter the percentage you want the coulmns to be and the percentage you want that cluster to occupy.
Duh! -
This article is great, IF IT WORKS! What is the fix when you enter new billing details and all iTunes tells you is, "contact iTunes support"?
pbsimon82 wrote:
This article is great, IF IT WORKS! What is the fix when you enter new billing details and all iTunes tells you is, "contact iTunes support"?
You contact itunes support, just as it told you to do
http://www.apple.com/support/itunes/contact/ -
How to copy the photo with file name at window 7 and search specific one in iphone 4s?
How to copy the photo with file name at window 7 and search specific one in iphone 4s?
Clendenen02 wrote:
2) It would be equally helpful if there was something that would take the name of the picture file and spotlight comment, copy and paste it to a movie file's comments with the same name but obviously has different extention. For an example
In a Pictures folder
Name: Dark Knight, The.jpeg Comment: (2008) Genre: Action... <- copy comment
In a Movie Folder
Name: Dark Knight, The.m4v Comment: <- paste
and do this for all 700 files
This Bash script will do it.
Edit "PicDir" and "MovDir" to the location of your Folders
(Note: The comment is written to the m4v file using xattr, so the Spotlight comment field appears blank in Finder, but the comment metadata is still indexed by Spotlight (If you add a Spotlight comment from Finder, it is stored both as an extended attribute and in a .DS_Store file)
#!/bin/bash
PicDir=$HOME/Desktop/Pictures
MovDir=$HOME/Desktop/Movies
for f in $PicDir/*
do
if [ ! -d "$f" -a "${f##*.}" == "jpeg" ]; then
comment=$(mdls -raw -name kMDItemFinderComment "$f")
if [[ $comment != "(null)" ]]; then
picname=${f##*/}
movname=${picname%.*}.m4v
if [ -e "$MovDir"/$movname ]; then
xattr -w com.apple.metadata:kMDItemFinderComment "\"$comment\"" "$MovDir"/$movname
fi
fi
fi
done -
BizTalk FlatFile schema with header/Multiple Body/Trailer
Hi,
Can you please help to create a flat file schema for the below structure.?
I have a flat file with Header , multiple Body, Trailer. I am receiving XML as input and generate output as FlatFile.
My FlatFile looks like below, from Batch Header to Batch Trailer are repeated multiple times.
FileHeadercol1col2...
BatchHeadercol1col2..
BatchDetailCol1Col2..
BacthTaxCol2Col..
BatchDiscountCol1Col2..
BatchHeadercol1col2..
BatchDetailCol1Col2..
BacthTaxCol2Col..
BatchDiscountCol1Col2..
FileTrailerCol1Col2..
I have created a schema which is working fine if body occurs only once. but if we have more than once , I am getting error like unexpected error...
I have tried with few options and also verified in some references. still no luck.
Please Assist
Thanks,
VinothGive us the delimiter rules.
Is "BatchHeader" is the tag for
the header? Or how the headers are identified?
How "col1col2" col1 and col2 are
delimited? Are they delimited by position i.e. first 4 characters after the header tag "BatchHeader"
is col1 and next four character after the col1 is col2?
If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply. -
I bought a new Macbook pro in 02/26/2013 from Apple Canadian Ices -003. Than I could not use it, because my cursor uncontrollably was jumping around the screen, I was resumed my trackpad become bulging, Than on11/25/ 2013 they changed my trackpad for free, because was manufactoring defect, but not the bulging battery. They said that is do not needed. Since that my cursor is quiet often quivering, I think my Macbook has serious manufacturing defect. But they said no, during a year period I went to the genius bar at least 15 times, with this and similar problems. I went there yesterday, with different problems, and they said one of the screws came off from my truck pad, therefore they need to fix it and change it. I said: - What, how, what is the real problem? A screw does not comes off just like that? They will change my trackpad again, but not the battery. They said has to rebuild the operation system, I'm saving all of my data right now! I would like to exchange the battery too, or maybe get a new Macbook. My Macbook is 2010 China model. How long I would have this trackpad problem? What are you suggesting?
If it's a 2010 as you say towards the end of your post, it's out of warranty. The battery isn't covered in that case. Why don't you just buy a new battery if that's your concern? If it's a 2013 as you say up at the top, it shouldn't have a bulging battery. How do you know it does? If it really does, ask for the store manager and explain the problem.
-
I have two Creative Cloud accounts, occurred by accident, I wish to merge them and have all my details and licenses under one account, how do I do that?
This is due to the different changes Adobe has gone through and unfortunately I used different emails at certain times.Under one Adobe ID you can have one CC only,if by accident you have purchased two CC under one account, it needs to be cancelled & refunded, please contact Adobe Support at
http://adobe.ly/yxj0t6
Regards
Rajshree -
Out of memory error - from parsing a "fixed width file"
This may be fairly simple for someone out there but I am trying to write a simple program that can go through a "fixed width" flat txt file and parse it to be comma dilmeted.
I use a xml file with data dictionary specifications to do the work. I do this because there are over 430 fields that need to be parsed from a fixed width with close to 250,000 lines I can read the xml file fine to get the width dimensions but when I try to apply the parsing instructions, I get an out of memory error.
I am hoping it is an error with code and not the large files. If it is the latter, does anyone out there know some techniques for getting at this data?
Here is the code
import java.io.*;
import org.w3c.dom.Document;
import org.w3c.dom.*;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.DocumentBuilder;
import org.xml.sax.SAXException;
import org.xml.sax.SAXParseException;
public class FixedWidthConverter{
String[] fieldNameArray;
String[] fieldTypeArray;
String[] fieldSizeArray;
public static void main(String args []){
FixedWidthConverter fwc = new FixedWidthConverter();
fwc.go();
fwc.loadFixedWidthFile();
//System.exit (0);
}//end of main
public void go(){
try {
DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
Document doc = docBuilder.parse (new File("files/dic.xml"));
// normalize text representation doc.getDocumentElement ().normalize ();
System.out.println ("Root element of the doc is " +
doc.getDocumentElement().getNodeName());
NodeList listOfFields = doc.getElementsByTagName("FIELD");
int totalFields = listOfFields.getLength();
System.out.println("Total no of fields : " + totalFields);
String[] fldNameArray = new String[totalFields];
String[] fldTypeArray = new String[totalFields];
String[] fldSizeArray = new String[totalFields];
for(int s=0; s<listOfFields.getLength() ; s++){
Node firstFieldNode = listOfFields.item(s);
if(firstFieldNode.getNodeType() == Node.ELEMENT_NODE){
Element firstFieldElement = (Element)firstFieldNode;
NodeList firstFieldNMList = firstFieldElement.getElementsByTagName("FIELD_NM");
Element firstFieldNMElement = (Element)firstFieldNMList.item(0);
NodeList textFNList = firstFieldNMElement.getChildNodes();
//System.out.println("Field Name : " +
//((Node)textFNList.item(0)).getNodeValue().trim());
//loads values into an array
//fldNameArray[s] = ((Node)textFNList.item(0)).getNodeValue().trim();
NodeList typeList = firstFieldElement.getElementsByTagName("TYPE");
Element typeElement = (Element)typeList.item(0);
NodeList textTypList = typeElement.getChildNodes();
//System.out.println("Field Type : " +
//((Node)textTypList.item(0)).getNodeValue().trim());
//loads values into an array
//fldTypeArray[s] = ((Node)textTypList.item(0)).getNodeValue().trim();
NodeList sizeList = firstFieldElement.getElementsByTagName("SIZE");
Element sizeElement = (Element)sizeList.item(0);
NodeList textSizeList = sizeElement.getChildNodes();
//System.out.println("Field Size : " +
//((Node)textSizeList.item(0)).getNodeValue().trim());
//loads values into an array
fldSizeArray[s] = ((Node)textSizeList.item(0)).getNodeValue().trim();
}//end of if clause
}//end of for loop with s var
//setFldNameArray(fldNameArray);
//setFldTypeArray(fldTypeArray);
setFldSizeArray(fldSizeArray);
catch (SAXParseException err) {
System.out.println ("** Parsing error" + ", line "
+ err.getLineNumber () + ", uri " + err.getSystemId ());
System.out.println(" " + err.getMessage ());
catch (SAXException e) {
Exception x = e.getException ();
((x == null) ? e : x).printStackTrace ();
catch (Throwable t) {
t.printStackTrace ();
}//end go();
public void setFldNameArray(String[] s){
fieldNameArray = s;
}//end setFldNameArray
public void setFldTypeArray(String[] s){
fieldTypeArray = s;
}//end setFldTypeArray
public void setFldSizeArray(String[] s){
fieldSizeArray = s;
}//end setFldSizeArray
public String[] getFldNameArray(){
return fieldNameArray;
}//end setFldNameArray
public String[] getFldTypeArray(){
return fieldTypeArray;
}//end setFldTypeArray
public String[] getFldSizeArray(){
return fieldSizeArray;
}//end setFldSizeArray
public int getNumLines(){
int countLines = 0;
try {
//File must be in same director and be the name of the string below
BufferedReader in = new BufferedReader(new FileReader("files/FLAT.txt"));
String str;
while ((str = in.readLine()) != null) {
countLines++;
in.close();
catch (IOException e) {}
return countLines;
}//end of getNumLines
public void loadFixedWidthFile(){
int c = getNumLines();
int i = 0;
String[] lineProcessed = new String[c];
String chars;
try {
//File must be in same director and be the name of the string below
BufferedReader in = new BufferedReader(new FileReader("files/FLAT.txt"));
String str;
while ((str = in.readLine()) != null) {
//System.out.println(str.length());
lineProcessed[i] = parseThatLine(str);
i++;
in.close();
catch (IOException e) {}
//write out the lineProcess[] array to another file
writeThatFile(lineProcessed);
}//end loadFixedWidthFile()
public void writeThatFile(String[] s){
try {
BufferedWriter out = new BufferedWriter(new FileWriter("files/outfilename.txt"));
for(int i = 0; i < s.length -1; i++){
out.write(s);
}//end for loop
out.close();
catch (IOException e) {}
}//end writeThatFile
public String parseThatLine(String s){
int start = 0;
int end = 0;
String parsedLine = "";
int numChars = getFldSizeArray().length;
//Print number of lines for testing
//System.out.println(numChars);
String[] oArray = getFldSizeArray();
//String chars = oArray[0];
//System.out.println(chars.length());
//oArray
for(int i = 0; i < numChars -1; i++ ){
if(i == 0){
start = 0;
end = end + Integer.parseInt(oArray[i])-1;
else
start = end;
end = end + Integer.parseInt(oArray[i]);
parsedLine = parsedLine + s.substring(start, end) + "~";
}//end for loop
return parsedLine;
}//End of parseThatLine
I have tried to illeminate as many arrays as I can thinking that was chewing up the memory but to no avail.
Any thoughts or ideas?
Message was edited by:
SaipanMan2005You should not keep a String array of all the lines of the file read.
Instead for each line read, parse it, then write the parsed line in the other file: public void loadFixedWidthFile() {
BufferedReader in = null;
BufferedWriter out = null;
try {
//File must be in same director and be the name of the string below
in = new BufferedReader(new FileReader("files/FLAT.txt"));
out = new BufferedWriter(new FileWriter("files/outfilename.txt"));
String str;
while ((str = in.readLine()) != null) {
//System.out.println(str.length());
str = parseThatLine(str);
//write out the parsed str to another file
out.write(str);
catch (IOException e) {
e.printStackTrace(); // At least print the exception - never swallow an exception
finally { // Use a finally block to be sure of closing the files even when exception occurs
try { in.close(); }
catch (Exception e) {}
try { out.close(); }
catch (Exception e) {}
}//end loadFixedWidthFile()Regards -
LSMW with Header-Detail concept
Hi All,
How does Header-detail concept work in LSMW. Could anyone please help me with that?
If I have two files with one file has some information from the legacy system and the other file serves as a look up table, can header-detail concept be used to do a lookup for the SAP value from the lookup table?
The two files could be
First File (three fields)
PERNR LegacyDeductionCode Amount
Second File: (two fields)
LegacyDeductionCode SAPWageTypeNo
Thanks,
~MarkHi,
You can try using BAPI. Use Business Object BUS2032 and method CREATEFROMDAT2.
use the first method (Direct Input)
Object : 0090 (Sales)
Method : 0000
Programname: RVINVB10
In structure relations u can find header and line itemas.
before that define 2 structures.
===================================================
After creattion of one structure..
again click on create button> now it will ask samelevel/lowerlevel..give ur option>then u can add the fields in the next step.
check the below link also may be helpful for u
https://forums.sdn.sap.com/click.jspa?searchID=1818636&messageID=1895424 -
MacBook Pro flashes file folder with question mark and startup manager will not run
My son's MacBook Pro won't boot (gets the flashing file folder with question mark). When I try to open startup manager (holding "option" key during boot does not do it). Other posts suggest inserting the install disk, but I am pretty sure that for Lion, there was no disk, it was just off the website through the App Store. Any further suggestions?
Reinstalling Lion/Mountain Lion Without Erasing the Drive
Boot to the Recovery HD: Restart the computer and after the chime press and hold down the COMMAND and R keys until the menu screen appears. Alternatively, restart the computer and after the chime press and hold down the OPTION key until the boot manager screen appears. Select the Recovery HD and click on the downward pointing arrow button.
Repair the Hard Drive and Permissions: Upon startup select Disk Utility from the main menu. Repair the Hard Drive and Permissions as follows.
When the recovery menu appears select Disk Utility. After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list. In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive. If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the main menu.
Reinstall Lion/Mountain Lion: Select Reinstall Lion/Mountain Lion and click on the Continue button.
Note: You will need an active Internet connection. I suggest using Ethernet if possible because it is three times faster than wireless.
Maybe you are looking for
-
ICal 4.0.4 won't open in 10.6.8
I'm on a Macbook pro and iCal bounces in the dock and then closes when I try to open it. I have version 4.0.4 and OS 10.6.8. The icon also doesn't look right, it looks like a script icon with .app after it. I repaired permissions and don't know wh
-
Foreign trade data is in complete
hi, sap gurus, plz explain about foreign trade data is in complete while creating a billing document my enter prise structure is configured in company code US.\ regards, balaji.t 09990019711
-
Which flash version is compatible/where do I get it?
Which flash version is compatible with my laptop? Where can I get it? I have recently restored to factory settings and am not able to play "Gemcraft-Chasing Shadows" although I was ok. It gives the message that it may have stopped working etc. Please
-
system restored it's self after a recent operating system upgrade 8.0 and kept shutting down and restarting ,asked to be linked to my mac ,,so I did and it totally reset it's self ,all my apps ,photos and videos are gone from the day I bought the ipa
-
Is it possible to make minor adjustments to Photoshop layers?
I'm makeing a demo video for an iPhone app and I have a really good PSD template for an iPhone but I'm not seeing a way to move any of the layers around. The reason I need to make adjustments is because it has a nice relfection on the screen and I n