How to cretae two flat file with a single program

Hi All,
I am trying to creating to two files on the application server using the open data set and close data.
lets say the first file is file1 and second file is file2. but when i go to the Tcode AL11 and check the file only second file is appears there.
its may be coz i m using two times this open data and close data in my program.
can u tell help me howz these two file is appears on the application server i.e AL11.
its very urgent pls help me.
Thanks!
Vipin

Hi Do one thing,
Start ur program in debugging mode complete first open data set and close data set and then go and chekc whehter the file got created or not and also check the sy-subrc values when u r doing ur open data set.
if the first file is not done then no file will be in AL11 including ur new file name.
In this way you can find whether the file got created or not.
check that u r giving differnet file names fifferently otherwise it will be keep on overwriting the existing one.
Regards,
sasi

Similar Messages

  • How to load a flat file with utf8 format in odi as source file?

    Hi All,
    Anybody knows how we can load a flat file with utf8 format in odi as source file.Please everybody knows to guide me.
    Regards,
    Sahar

    Could you explain which problem are you facing?
    Francesco

  • How to parse a flat file with C#

    I need to parse a flat file with data that looks like
    01,1235,555
    02,2135,558
    16,156,15614
    16,000,000
    You get the idea. Anyway, I'd like to just used a derived column and move on except I need to put a line number on each row as it comes by so the end looks like,
    1,01,1235,555
    2,02,2135,558
    3,16,156,15614
    4,16,000,000
    I'm trying to do with a script transformation but I can't seem to get the hang of the syntax. I've tried looking at various examples but everybody seems to prefer VB and I'd like to keep all of my packages C#. I've set up my input and my output columns I just
    need to figure out how to write the code that says something like:
    row_number = 1
    line_number = row_number
    record_type = input.split.get the second data element
    data_point_1 = input.split.get the third data element
    row_number = row_number ++

    /* Microsoft SQL Server Integration Services Script Component
    * Write scripts using Microsoft Visual C# 2008.
    * ScriptMain is the entry point class of the script.*/
    using System;
    using System.Data;
    using Microsoft.SqlServer.Dts.Pipeline.Wrapper;
    using Microsoft.SqlServer.Dts.Runtime.Wrapper;
    [Microsoft.SqlServer.Dts.Pipeline.SSISScriptComponentEntryPointAttribute]
    public class ScriptMain : UserComponent
    private int rowCounter = 0;
    // Method that will be started before the rows start to pass
    public override void PreExecute()
    base.PreExecute();
    // Lock variable for read
    VariableDispenser variableDispenser = (VariableDispenser)this.VariableDispenser;
    variableDispenser.LockForRead("User::MaxID");
    IDTSVariables100 vars;
    variableDispenser.GetVariables(out vars);
    // Fill the internal variable with the value of the SSIS variable
    rowCounter = (int)vars["User::MaxID"].Value;
    // Unlock variable
    vars.Unlock();
    // Method that will be started for each record in you dataflow
    public override void Input0_ProcessInputRow(Input0Buffer Row)
    // Seed counter
    rowCounter++;
    // Fill the new column
    Row.MaxID = rowCounter;
    Here is a script to get an incremental ID. On the ReadWriteVariables of the script add the "User::MaxID" variables to get the last number. On the Inputs and Outputs tab, create an output column  here in the code it's MaxID numeric data types.

  • How to load a flat file with lot of records

    Hi,
    I am trying to load a flat file with hundreds of records into an apps table. when i create the process and deploy it onto the console it asks for an input in an html form. why does it ask for an input when i have specified the input file directory in my process? is there any way around tis where in it just reads all the records from the flat file directly??is custom queues anyway related to what I am about to do?any documents on this process will be greatly appreciated.If any one can help me on this it will be great. thank you guys....

    After deploying it, do you see if it is active and the status is on from the BPEL console BPEL Process tab? It should not come up to ask for input unless you are clicking it from the Dashboard tab. Do not click it from the Dashboard. Instead you should put some files into the input driectory. Wait few seconds you should see the instances of the BPEL process is created and start to process the files asynchrously.

  • How to load several transformation files with a single action

    Hi everybody,
    We are loading data from BI cube into BPC cube. We are working on SAP BPC 7.0 version and we have designed several transformation files in order to load each key figure we need.
    Now, we want to load all the transformation files executing only one action. Which one is the best way to do it?
    We thought that it would be possible to build a single process chain, where we would call the target cube and all the transformation files. In this way, the administrator only has to execute once a package that would execute the process chain. We don't want the administrator to execute several times a package looking for the different transformation files.
    How can we do it? Is there any example or document related to it?
    Any idea out there?
    Kind regards
    Albert Mas

    HI SCOTT,
    I AM FACING A PROBLEM WHEN I RUN 2 ROUNDS IN ONE TRANSFORMATION FILE...
    I need to distribute a source field in to BPC through making 2 conversion files... following is the data
    Transformation file
    *OPTIONS
    FORMAT = DELIMITED
    HEADER = YES
    DELIMITER = ,
    AMOUNTDECIMALPOINT = .
    SKIP = 0
    SKIPIF =
    VALIDATERECORDS=YES
    CREDITPOSITIVE=YES
    MAXREJECTCOUNT=
    ROUNDAMOUNT=
    CONVERTAMOUNTWDIM=ZOUTPUT
    *MAPPING
    CATEGORY=*NEWCOL(ACT)
    PAO=0COSTCENTER
    TIME=0FISCYEAR
    ZOUTPUT=0FUNDS_CTR
    SIGNEDDATA=0DEB_CRE_LC
    *CONVERSION
    PAO=PAO_CONVER.XLS
    ZOUTPUT=ZOUTPUT_CONVER.xls
    *OPTIONS
    FORMAT = DELIMITED
    HEADER = YES
    DELIMITER = ,
    AMOUNTDECIMALPOINT = .
    SKIP = 0
    SKIPIF =
    VALIDATERECORDS=YES
    CREDITPOSITIVE=YES
    MAXREJECTCOUNT=
    ROUNDAMOUNT=
    CONVERTAMOUNTWDIM=ZOUTPUT
    *MAPPING
    CATEGORY=*NEWCOL(ACT)
    PAO=0COSTCENTER
    TIME=0FISCYEAR
    ZOUTPUT=0FUNDS_CTR
    SIGNEDDATA=0DEB_CRE_LC
    *CONVERSION
    PAO=PAO_CONVER.XLS
    ZOUTPUT=AMOUNT_CONVER.XLS
    Conversion file 1 (PAO=PAO_CONVER.XLS)
    EXTERNAL
    INTERNAL
    ID0001
    F08001
    ID0002
    F08001
    ID0003
    F08001
    DG0001
    F08001
    DG0002
    F08001
    Conversion file 2 (ZOUTPUT=ZOUTPUT_CONVER.xls)
    ID0001
    FX01
    VALUE*1
    ID0002
    FX01
    VALUE*1
    ID0003
    FX01
    VALUE*.40
    DG0001
    FX02
    VALUE*1
    DG0002
    FX02
    VALUE*1
    Conversion file 3 (ZOUTPUT=AMOUNT_CONVER.XLS)
    EXTERNAL
    INTERNAL
    FORMULA
    ID0003
    FX02
    VALUE*.60
    I am getting the following error
    [Start validating transformation file]
    Validating transformation file format
    Start validation transformation 1/2
    Validating options...
    Validation of options was successful.
    Validating mappings...
    Validation of mappings was successful.
    Validating conversions...
    Validation of the conversion was successful
    Start validation transformation 2/2
    Validating options...
    Validation of options was successful.
    Validating mappings...
    Validation of mappings was successful.
    Validating conversions...
    Validation of the conversion was successful
    Creating the transformation xml file. Please wait...
    Transformation xml file has been saved successfully.
    Begin validate transformation file with data file...
    [Start test transformation file]
    Validate has successfully completed
    ValidateRecords = YES
    Reject count: 0
    Record count: 6
    Skip count: 0
    Accept count: 6
    0COSTCENTER is not a valid command or column 0COSTCENTER does not exist in source
    Validation with data file failed

  • How to merge two java files with InputDialog to select?Please help me!?

    //Addition Java application
    import javax.swing.JOptionPane; // import the class
    public class Addition {
    // main method
    public static void main(String[] args)
    String firstNumber, secondNumber;
    int number1, number2, sum;
    // read the first number
    firstNumber = JOptionPane.showInputDialog("Please enter a integer: ");
    // read the second number
    secondNumber = JOptionPane.showInputDialog("Please enter another integer: ");
    // data type conversion
    number1 = Integer.parseInt(firstNumber);
    number2 = Integer.parseInt(secondNumber);
    sum = number1 + number2;
    // display the result
    JOptionPane.showMessageDialog(null, "The sum is " + sum + ".", "Results", JOptionPane.PLAIN_MESSAGE);
    System.exit(0);
    //Multiplication Java Application
    import javax.swing.JOptionPane;
    public class Multiplication5
    public static void main(String args[])
    int number1, number2, number3, number4, number5, product;
    String firstNumber, secondNumber, thirdNumber, forthNumber, fifthNumber ;
    firstNumber =
    JOptionPane.showInputDialog("Please input an integer");
    secondNumber =
    JOptionPane.showInputDialog("Please input another integer");
    thirdNumber =
    JOptionPane.showInputDialog("Please input the third integer");
    forthNumber =
    JOptionPane.showInputDialog("Please input the forth integer");
    fifthNumber =
    JOptionPane.showInputDialog("Please input the fifth integer");
    number1 = Integer.parseInt(firstNumber);
    number2 = Integer.parseInt(secondNumber);
    number3 = Integer.parseInt(thirdNumber);
    number4 = Integer.parseInt(forthNumber);
    number5 = Integer.parseInt(fifthNumber);
    product = number1 * number2 * number3 * number4 * number5;
    JOptionPane.showMessageDialog(null, "The product is " + product, "Results", JOptionPane.PLAIN_MESSAGE);
    System.exit(0);
    I seek for help to merge above two java application files.
    I need to call JoptionPane.showInputDialog to prompt the user to input the operation, 1 for addition, 2 for multiplication. In this dialog, the user is expected to enter the integer of 1 or 2 for the calculation.
    Please help me ! Thank you!

    Hi CRay,
    You just need to call the main methods of the 2 classes according to "1" or "2" entered.
    It is better if the "multiplication" and "addition" are declared as methods rather than in main methods.
    Example:-
    public static void Addition()
    Then call
    Addition.addition();
    than
    Addition.main(new String[]{});
    as shown below.
    import javax.swing.JOptionPane; // import the class
    public class Test{
        public static void main(String[] args){
            // read which  operation to perform
            String operation = JOptionPane.showInputDialog("Please enter which operation : ");
            if(operation.equals("1")){
                Addition.main(new String[]{});
            else{
                Multiplication5.main(new String[]{});
    }Rose

  • Re: How to merge two video files in a single file.

    If you want to get just sequence of two files, so you can use http://java.sun.com/products/java-media/jmf/2.1.1/solutions/Concat.html I suppose.
    Or some for merging on http://java.sun.com/products/java-media/jmf/2.1.1/solutions/

    Hi watergad,
    ThX good help!
    NeuralC

  • How to compose two gif files into a single gif file?

    pls give me the direction , should i use the classes in swing or someone else?

    hello,
    this reply might be abit off but iam not sure about this in java but in c++ you can use the ImageProcessing library to do this.
    asrar

  • How to use two ALV grids in a single program (pl read below for details)?

    Please read thoroughly::
    I have an ALV report using REUSE_ALV_GRID_DISPLAY.
    On the output of this report, when I click on a "change" button, a couple of columns should be made editable.
    I achieved this by modifying the fieldcatalog and triggering the output with another REUSE_ALV_GRID_DISPLAY.
    When I click on the back button of this second report, it is still taking me to the first one.
    How to over come this?
    Note:
    I used custom containers etc but the default buttons on the container are not controllable. I added custom buttons but could not suppress the default ones. So I did not pursue this much even though this is more comfortable to use.
    I am not able to get into the code in debug to see how the default buttons like COPY, INSERT ROW etc are working.
    Can any body throw some inputs into this?
    Thanks,
    Ven.

    >I achieved this by modifying the fieldcatalog and triggering the >output with another REUSE_ALV_GRID_DISPLAY.
    >When I click on the back button of this second report, it is still >taking me to the first one.
    >How to over come this?
    For this there is a solution
    i am thinking you are using user_command and calling the second time ALV Grid if so check this.
    form user_command using r_ucomm type sy-ucomm selfield type slis_selfield.
    case r_ucomm.
    when 'CHANGE'.
    selfield-exit = 'X'.   "use this , this will solve the problem
    "i hope you are calling the Function here
    endform.

  • How to handle flat file with variable delimiters in the file sender adapter

    Hi friends,
    I have some flat files in the ftp server and hope to poll them into XI, but before processing in XI, I hope to do some content conversion in the file sender adapter, according to the general solution, I just need to specify the field names, field seperator, end seperator, etc. But the questions is:
    The fileds in the test data may have different amount of delimiters (,), for example:
    ORD01,,,Z4XS,6100001746,,,,,2,1
    OBJ01,,,,,,,,,,4,3     
    Some fileds only have 1 ',' as the delimiter, but some of them have multiple ','.
    How can I handle it in the content conversion?
    Regards,
    Bean

    Hi Bing,
    Plz do refer the following blogs u will get an idea:
    File content conversion Blogs
    /people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1
    /people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2
    /people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion
    /people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file
    /people/shabarish.vijayakumar/blog/2005/08/17/nab-the-tab-file-adapter
    /people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1
    /people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2
    /people/venkat.donela/blog/2005/06/08/how-to-send-a-flat-file-with-various-field-lengths-and-variable-substructures-to-xi-30
    /people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file
    /people/shabarish.vijayakumar/blog/2005/08/17/nab-the-tab-file-adapter
    /people/jeyakumar.muthu2/blog/2005/11/29/file-content-conversion-for-unequal-number-of-columns
    /people/shabarish.vijayakumar/blog/2006/02/27/content-conversion-the-key-field-problem
    /people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter
    /people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion
    http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm
    Regards,
    Vinod.

  • How to load unicode data files with fixed records lengths?

    Hi!
    To load unicode data files with fixed records lengths (in terms of charachters and not of bytes!) using SQL*Loader manually, I found two ways:
    Alternative 1: one record per row
    SQL*Loader control file example (without POSITION, since POSITION always refers to bytes!)<br>
    LOAD DATA
    CHARACTERSET UTF8
    LENGTH SEMANTICS CHAR
    INFILE unicode.dat
    INTO TABLE STG_UNICODE
    TRUNCATE
    A CHAR(2) ,
    B CHAR(6) ,
    C CHAR(2) ,
    D CHAR(1) ,
    E CHAR(4)
    ) Datafile:
    001111112234444
    01NormalDExZWEI
    02ÄÜÖßêÊûÛxöööö
    03ÄÜÖßêÊûÛxöööö
    04üüüüüüÖÄxµôÔµ Alternative2: variable length records
    LOAD DATA
    CHARACTERSET UTF8
    LENGTH SEMANTICS CHAR
    INFILE unicode_var.dat "VAR 4"
    INTO TABLE STG_UNICODE
    TRUNCATE
    A CHAR(2) ,
    B CHAR(6) ,
    C CHAR(2) ,
    D CHAR(1) ,
    E CHAR(4)
    ) Datafile:
    001501NormalDExZWEI002702ÄÜÖßêÊûÛxöööö002604üuüüüüÖÄxµôÔµ Problems
    Implementing these two alternatives in OWB, I encounter the following problems:
    * How to specify LENGTH SEMANTICS CHAR?
    * How to suppress the POSITION definition?
    * How to define a flat file with variable length and how to specify the number of bytes containing the length definition?
    Or is there another way that can be implemented using OWB?
    Any help is appreciated!
    Thanks,
    Carsten.

    Hi Carsten
    If you need to support the LENGTH SEMANTICS CHAR clause in an external table then one option is to use the unbound external table and capture the access parameters manually. To create an unbound external table you can skip the selection of a base file in the external table wizard. Then when the external table is edited you will get an Access Parameters tab where you can define the parameters. In 11gR2 the File to Oracle external table can also add this clause via an option.
    Cheers
    David

  • Flat file with chinese characters

    Hi all,
    I am working on a solution to map a file with this structure (not xml):
    //.comment 1
    0~keyh2..hn~
    0~it1it2..itn~key
    0~it1it2..itn~key
    //.comment 2
    0~keyh2..hn~
    0~it1it2..itn~key
    0~it1it2..itn~key
    0~it1it2..itn~key
    This is my conversion setup
    recordser.structure = comment,1,header,1,item,*
    recordset.sequence = variable
    keyFieldName = key
    comment.fieldSeparator = .
    comment.fieldStructure = key.comment
    comment.keyFieldValue = //
    header.fieldSeparator = ~~
    header.beginSeparator = 0~~
    header.endSeparator = ~~
    header.fieldStructure = 0~keyh2..hn~
    header.keyFieldValue = 0
    item.fieldSeparator = ~~
    item.beginSeparator = 0~~
    item.fieldStructure = 0~it1it2..itn~key
    item.keyFieldValue = 1
    The problem now is that this file come from Chinese system and it is provide with chinese letters (looks like 2 bytes per letter). When I provide character encoding as ISO-2022 then adapter shows exception:
    java.io.UnsupportedEncodingException
    when I try to process it without passing any encoding then the exception is:
    more elements in file csv structure than field names specified
    Is there anyone who can help me with these?
    br
    Dawid

    Hi,
    I think it is something wrong with the File content conversion parameters parameters.
    You can avoid comment 1 and comment 2 by using the parameter Document offset.Follow this link for that:
    <a href="http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm">http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm</a>.
    I think you didn't specify the field names in the File Content Conversion parameters.
    Follow these two weblogs for the File Content Conversion parameters:
    <a href="/people/venkat.donela/blog/2005/06/08/how-to-send-a-flat-file-with-various-field-lengths-and-variable-substructures-to-xi-30:///people/venkat.donela/blog/2005/06/08/how-to-send-a-flat-file-with-various-field-lengths-and-variable-substructures-to-xi-30
    <a href="/people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter">/people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter</a>
    Hope it helps.
    Regards,
    JE

  • Flat file with fixed lengths to XI 3.0 using a Central File Adapter---Error

    Hi
    According to the following link
    /people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter
    In Adapter Monitor I got the following error,
    In sender Adapter,
    Last message processing started 23:47:35 2008-10-25, Error: Conversion of complete file content to XML format failed around position 0 with java.lang.Exception: ERROR converting document line no. 1 according to structure 'Substr':java.lang.Exception: Consistency error: field(s) missing - specify 'lastFieldsOptional' parameter to allow this
      last retry interval started 23:47:35 2008-10-25
      length 15,000 secs
    some one help me out ?
    Thanks
    Ram

    from the blog you referenced -
    <u> /people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter
    <b>goto step 4</b>
    <u>additional parameters</u>
    add as the last entry
    <recordset structure>.lastFieldsOptional            Yes
    e.g.,
      Substr.lastFieldsOptional            Yes

  • Send a flat file with fixed lengths to XI 3.0 using a Central File Adapter?

    Hello,
    I'm wondering if someone have experience setting up conversion for different record structures. The example shown,
    /people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter,
    (in a greate way) only picture one kind of structure.
    How should it be done if the file would contain
    10Mat1
    20100PCS
    The first record structure has columns
    ID(2),Material(10)
    The second redcord structure has columns
    ID(2),Quantity(3), Unit of messure (3)
    Brgds
    Kalle
    Message was edited by: Karl Bergstrom

    The configuration would be like follows:
    Content Conversion Parameters:
    Document Name: <your message type name>
    Document Namespace: <your message type namespace>
    Document Offset: <leave empty>
    Recordset Name: <any name>
    Recordset Namespace: <leave empty>
    Recordset Structure: row1,,row2,
    Recordset Sequence: any
    Recordsets per Message: *
    Key Field Name: ID
    Key Field Type: String
    Parameters for Recordset Structures:
    row1.fieldNames           ID,Material
    row1.fieldFixedLengths    2,10
    row1.keyFieldValue        10
    row2.fieldNames           ID,Quantity,UOM
    row2.fieldFixedLengths    2,3,3
    row2.keyFieldValue        20
    Instead of row1 and row2 you can choose any name.
    Regards
    Stefan

  • How can we load a flat file with very, very long lines into a table?

    Hello:
    We have to load a flat file with OWB. The problem is that each of the lines in the file might be up to 30.000 characters long (up to 1.000 units of information in each line, 30 characters long each)
    Of course, our mapping should insert these units of information as independent rows in a table (1.000 rows, in our example).
    We do not know how to go about it. We usually load flat files using table functions, but we am not sure that they will be able to cope with these huge lines. And how should we pivot those lines? Will the Pivot operator do the trick? Or maybe we should pivot those lines outside the database before loading them?
    We are a bit lost. Any suggestion would be appreciated.
    Regards
    Edited by: [email protected] on Oct 29, 2008 8:43 AM
    Edited by: [email protected] on Oct 29, 2008 8:44 AM

    Yes, well, we could define a 1.000 column external table, and then map those 1.000 columns to the Pivot operator… perhaps it would work. But we have been investigating a little bit, and we think that we have found a better solution: there is a unix utility called “fold”. This utility can split our 30.000 character lines in 1.000 lines, 30 characters long each: just what we needed. Then we can load the resulting file using an external table.
    We think this is a much better solution that handling 1.000 columns in the external table and in the Pivot operator.
    Thanks for your help.
    Regards
    Edited by: [email protected] on Oct 29, 2008 10:35 AM

Maybe you are looking for

  • How I do a clean install of Win 8.1

    Since my initial post        "Why is option to create striped volume grayed out in disk management?" I have seen numerous threads re doing a clean install of Win 8.1. So I'm re-posting the info I got from Puget Systems  http://www.pugetsystems.com/ w

  • 2500 images flowed into iPhoto that aren't mine! What happened?  Whose are they?! Do I have to go through

    When I opened iPhoto about 2500 images imported that are not mine.  What happened?  Whose are they?  How do I get rid of them?

  • Transferring to a replacement S4

    Only 4 questions My old LCD screen is broken;  black but power to the phone still works.  How can I do a hard reset on the old phone if I cannot see the screen? I moved the SIM card from the old phone to the new phone but my pictures didn't transfer

  • Processing Pattern task runs multiple times

    I am trying out the processing pattern with some long running tasks. The tasks are submitted by the first node in the cluster to start up. I seem to see multiple copies of my task running as I start up other nodes in the cluster. It would appear that

  • Bold text is blurred

    Installation from Lion to Mountain Lion was as it should be for everything that I can tell so far except for font that's bold looking "smudged".....just an example here is the gmail "compose" button: http://gyazo.com/8426a221118749520cbab6c1b2a31f05