Transfering data from bsis table to file on application server

Hi Gurus,
In my program iam selecting data from bsis table and transferring to file on the application server.
Code:
Tables: BSIS.
data: file type rlgrap-filename.
Select * from BSIS into BSIS.
Open dataset output in text mode encoding default.
Transfer bsis to file.
closesdataset.
1, Issue when transferring iam getting dump due to type conflict.
2, Here I cant create a structure like bsis and define type c  
    varialbles as its an upgrade project.
3, I tried field-symbols using type casting but data in the
    application server is showing junk data with ##### in currncy
    fields.
4, In earlier program there is no internal table defined for bsis,
    Directly passing to work area and transferring to file on
    application server.
Please let me know any feasble solution to approach.
If need i can post the complete code.
Regards
Bhaskar

Hi Robert,
Here is my code....in ECC. While executing program is going to dump saying character type error.
tables: bsis.
data: begin of i_tab occurs 100.
        include structure bsis.
        end of i_tab.
parameters: outfile(1000) lower case.
open dataset outfile for output in text mode encoding default
ignoring conversion errors..
select * from bsis into table i_tab
where bukrs = bukrs.
   loop at i_tab.
      transfer i_tab to outfile.
   endloop.
  close dataset.
Please let me know if any soluton.
regards
Bhaskar

Similar Messages

  • Fetch the data from the tables in the SQL 2005 server to sap R/3.

    Hi Experts,
    We need to fetch the data from the tables in the SQL 2005 server to sap R/3.
    Please explain which will be the best approach to fetch the same and how to do it. Sample program can greatly help.
    << Please do not offer points >>
    Regards,
    Shobana K
    Edited by: Rob Burbank on Sep 21, 2010 2:36 PM

    Hi,
    Try NATIVE SQL statements in your abap code otherwise you can try to establish jdbc connection from ABAP program.
    search in SDN for samples!
    Suresh

  • Open data set for reading excel file on application server in back ground

    open data set for reading excel file on application server in back ground

    hi Vijay,
    I am afraid you won't be able to read from Excel file on Appl. Server.
    ec

  • Select Data from BSIS table taking too long

    Hi
    I have to develop a report to give the  details of Extended Withholding Tax (EWT)  for a list of Expenses GL.
    Each expense GL is  linked to another Gl which is the EWT Tax GL Account. This is maintained in a Ztable.
    I havae wirtten the following code. It takes a lot of time to extract a data.
    This give me the GL i require
    SELECT * FROM ZSECCO_GL_EWT INTO CORRESPONDING FIELDS OF TABLE IT_GL
     WHERE BUKRS    = P_BUKRS
     AND   WT_QSCOD = P_QSCOD.
    Then I select  only the distinct documents No, from BSIS table  fro the hkonts  in the above internal table
    SELECT DISTINCT BUKRS GJAHR BELNR  FROM BSIS INTO CORRESPONDING FIELDS OF
    TABLE IT_BSIS_GL
     FOR ALL ENTRIES IN IT_GL
     WHERE BUKRS = P_BUKRS AND  HKONT = IT_GL-HKONT  AND GJAHR = P_GJAHR.
    Here I   once again select the   document details based on the document No. from above internal table
    This query takes a lot of time
    SELECT * FROM BSIS INTO CORRESPONDING FIELDS OF TABLE IT_BSIS
     FOR ALL ENTRIES IN IT_BSIS_GL
     WHERE  BUKRS = P_BUKRS AND GJAHR = P_GJAHR
        AND BELNR = IT_BSIS_GL-BELNR.
    Please Help

    Hi,
    Check note 992803; it could be that there is insufficient or missing index for BSIS table.
    Regards,
    Eli

  • Transfering Data from One table to another

    Hi all,
    Can we transfer data from Cluster Table to ZTABLE (Transparent Table)?
    if Yes, How can we do that?
    Thanks
    Devinder

    Hi,
    Generating a (surrogate) primary key value is usually done using:
    A) an Oracle sequence to generate a number
    B1) refer to the NEXVAL of the sequence in your insert statements
    or
    B2) a trigger on your agents table that populates agent_id by referring to the NEXTVAL of the sequence.
    Both approaches have pro's and con's, see what best fits your requirement.
    See this explanation (including examples):
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:6575961912937#tom6583848685931
    Also, since you're new to SQL, check the [Oracle docs|http://www.oracle.com/pls/db102/homepage].
    (Or http://www.oracle.com/pls/db112/homepage if you're on 11G)
    Especially the Concepts and Fundamentals.

  • Transfering data from oracle table to a file on a windows server

    Hi
    I have an oracle DB version 11.2 running on oracle enterprize linux 5.9. I would much appreciate an suggestions on how to transfer data from the oracle DB to a flat file on a windows server.
    What i have done so far is to use utl_file to create a csv file on the oracle server and am now attempting to transfer this file. I was going to use scp or rcp but am unable to get this to work(was looking at filezilla). Another option i can use is ftp as i have a unix script which i can run to do this. All this is done through an oracle package which is run hourly through dbms_scheduler. I have been using sp_host_command to run unix commands directly from pl/sql so can use this to run a unix script for last resort if i cant find an easier way to automate this.
    Any suggestions or options would be much appreciated.
    Cheers
    Gary

    Well, using DBMS_SCHEDULER you can run o/s commands so you could use that to do your FTP or whatever to move the file.
    Alternatively, you could write your own FTP package using the built in UTL_TCP package, or you can get hold of one of the freebie packages people have made available to do the same e.g.
    ORACLE-BASE - FTP From PL/SQL in Oracle in Oracle

  • Transferring data from one table to another table using a Keycolumn using SSIS row by row dynamically

    Hi All,
    I have a Store Procedure(SP) which has a output variable name "AcivityID" which is the key column. In this SP, transformation  of data is done from one table to insert data into other table. I have to execute the SP and insert row by row data
    using the output variable "ActivityID"  whose value will keep on changing. How can I do it?
    Thanks,
    Kallu

    Value changing on a row by row basis? Not quite sure what you mean, but it seems that you want to use the results of an insert into one table as input for another. If so then SSIS is not needed, inside the stored proc use the SQL that will do that and for
    all records as
    INSERT A INTO dbo.table1
    OUTPUT INSERTED.A INTO MyTable;
    Arthur My Blog

  • Fetch data from n tables mdb file

    hello,
    I am able to fetch data from n no. of columns in a table but i want to fetch data from n no. of tables as well... below is part of the code:
    while (res.next())
    for(int j=1;j<=tbn;j++) --- tbn no.of tables
    System.out.println("table counter");
    for (int i = 1; i <= cno; i++) --- cno no. of columns
    phno = res.getString(i);
    v = new Vector();
    v.addElement(phno);
    System.out.println(v);
    }

    wow thanks for quick reply,,, i would like to fetch data from atleast 2 tables ...below is my code.... its printing the last row of the second table
    public Vector msdata(String filepath)
    String databaseFolder=filepath;
    String driver = "sun.jdbc.odbc.JdbcOdbcDriver";
    String url = "jdbc:odbc:DRIVER={Microsoft Access Driver (*.mdb)};DBQ="+filepath;
    String userNameFromDB = "", pwdFromDB = "";
    try
    Class.forName(driver);
    conn = DriverManager.getConnection(url,"","");
    stmt = conn.createStatement();
    DatabaseMetaData dbmd = conn.getMetaData();
    String[] types = {"TABLE"};
    String colnum = null;
    ResultSet tables = dbmd.getTables(null, null,"%", types);
    // Get the table names
    while (tables.next())
    // Get the table name
    tableName = tables.getString(3);
    tbn++;
    System.out.println("Table Name: " + tableName);
    res = stmt.executeQuery("select * from "+tableName);
    ResultSetMetaData resultsMD = res.getMetaData();
    cno = resultsMD.getColumnCount() ;
    System.out.println("number of columns: " + cno);
    System.out.println("number of tables: " +tbn);
    while (res.next())
    for(int j=1;j<=tbn;j++)
    while (res.next())
    //System.out.println(tbn);
    for (int i=1; i<= cno;i++)
    phno = res.getString(i);
    System.out.println(phno);
    v = new Vector();
    v.addElement(phno);
    System.out.println(v);
    res.close();
    tables.close();
    stmt.close();
    conn.close();
    catch(Exception ee)
    System.out.println("driver error............");
    ee.printStackTrace();
    return v;
    }

  • Transferring data from one table to few new tables

    Hi,
    I have a table that contains millions of records. I need to transfer the records from that table to few new tables. For a future convenient purpose, the data is being splitted into multiple new tables. I am planning to use a cursor to fetch the records from the old table and call a new procedure in a loop. The new procedure is the one doing the split and inserts into different tables. Also I am planning to commit each 10,000 records. This is because I am planning to store the primary key in a temp table each time and to store the error message in another temp log table. So that I can rerun the same query multiple times to complete this transfer. I know doing in a loop and frequent commit will affect the performance. But I feel those 2 is required in my scenario. Can anyone suggest a better way if any?
    Thanks

    check if "create onesmaletable as select col1, col4, colwhatever from hugetable" (CTAS) works for you.
    hth

  • Transferring data from one table to another

    I have two tables.i have some information existing in one of the tables.this information is defined at the broadest possible level e.g. Level A has one row.
    I have to transfer this information to the other table when asked to by the user, but the problem is that the other table needs to have 64 rows created corresponding to the single row in the first table,i.e the other table will have 64 rows corresponding to a single row in the first table.
    This needs to be done as quickly as possible so that the system does not hang and the other processing logic continues.
    Moreover the first table can have more rows and each row may have 64 instances created in the other table when asked to by the user.
    Please help if anyone has answer to this query.Any kind of algorithm will help.

    Walk through the fist table, and for each row make 64 inserts.
    Do it in one transaction (i.e. without autocommit) to speed it up a bit and improve data consistency. Don't forget to commit at the end. If that seems to be too slow, you can always make a stored procedure to do the same to avoid round trip time for each insert statement if the database is on another machine...

  • Transfering data from ztable across the r/3 systems by using change pointer

    hi all,
    what we have to do at the field of domain level when we are transfering data from custom table across the r/3 systems by using change pointers.

    Hi Deepak,
    Check this blog.. it gives a very good explanation on extraction of data through function modules...
    /people/siegfried.szameitat/blog/2005/09/29/generic-extraction-via-function-module
    Hope it helps..
    Regards
    Manick
    Message was edited by:
            Manickavasagan M

  • Gui_download for transferring the data from internal table to excel sheet.

    hi all,
    i am using gui_download for transferring the data from internal table to excel sheet.
    I have a internal table with 3 columns col1,col2,col3 and I am getting the file at the specified path,but my problem is that,in the excel sheet(path specified) all the 3 columns values are printed in one column.Please help me.
    Thanks in advance.

    Hi Venkata,
    plz use FM 'SAP_CONVERT_TO_XLS_FORMAT' :
      call function 'SAP_CONVERT_TO_XLS_FORMAT'
        exporting
    *   I_FIELD_SEPERATOR          =
    *   I_LINE_HEADER              =
          i_filename                 = p_file
    *   I_APPL_KEEP                = ' '
        tables
          i_tab_sap_data             = t_mbew
    * CHANGING
    *   I_TAB_CONVERTED_DATA       =
    * EXCEPTIONS
    *   CONVERSION_FAILED          = 1
    *   OTHERS                     = 2
      if sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      endif.
    Hope this helps,
    Erwan

  • In PL-SQL archive data from a table to a file

    I am currently developing a vb app where I need to archive data from a table to a file. I was hoping to do this with a stored procedure. I will also need to be able to retrieve the data from the file for future use if necessary. What file types are available? Thanks in advance for any suggestions.

    What about exporting in an oracle binary format? The export files cannot be modifiable. Is there a way to use the export and import utility in PL/SQL?
    null

  • Inserting data from  a table  to an XML file

    I want to insert the values from this xml file emp.xml into a table Employees :
    <EMPLOYEES>
    <EMP>
    <EMPNO>7369</EMPNO>
    <ENAME>SMITH</ENAME>
    <JOB>CLERK</JOB>
    <HIREDATE>17-DEC-80</HIREDATE>
    <SAL>800</SAL>
    </EMP>
    <EMP>
    <EMPNO>7499</EMPNO>
    <ENAME>ALLEN</ENAME>
    <JOB>SALESMAN</JOB>
    <HIREDATE>20-FEB-81</HIREDATE>
    <SAL>1600</SAL>
    <COMM>300</COMM>
    </EMP>
    <EMP>
    </EMPLOYEES>
    and here is my Employee table in Oracle 9i database
    SQL> DESC EMPLOYEE;
    Name Null? Type
    EMPNO NUMBER
    EMPNAME VARCHAR2(10)
    JOB VARCHAR2(10)
    HIREDATE DATE
    SAL NUMBER
    After getting help from the members i was able to do the insert of data from the xml file to the table..how to do the insert of data from the table to the xml file.
    Regards,
    Renu

    Hello michaels , thank you for the solution, still i am having some problems
    Here is what i have done :
    1.
    SQL> CREATE DIRECTORY my_table_dir AS 'E:\table_files'
    2 ;
    Directory created.
    2.
    SQL> select * from myemp;
    ENAME
    SMITH
    ALLEN
    3.
    This is the content of the existing xml file saved in the directory E:\table_files as emp.xml
    <EMPLOYEES>
    <EMP>JIM</EMP>
    <EMP>RICK</EMP>
    </EMPLOYEES>
    4.
    Now i executed this code :
    declare
    emp_xml xmltype;
    begin
    select sys_xmlagg (column_value, sys.xmlformat ('EMPLOYEES')) emp_xml
    into emp_xml
    from table (xmlsequence (cursor (select *
    from myemp
    where ename in ('SMITH', 'ALLEN')),
    sys.xmlformat ('EMP')
    dbms_xslprocessor.clob2file (emp_xml.getclobval (), 'E:\table_files', 'emp.xml');
    end;
    And the Error i got is :
    declare
    ERROR at line 1:
    ORA-29280: invalid directory path
    ORA-06512: at "SYS.UTL_FILE", line 18
    ORA-06512: at "SYS.UTL_FILE", line 424
    ORA-06512: at "XDB.DBMS_XSLPROCESSOR", line 46
    ORA-06512: at line 12

  • Export data from a table to text file using srcipt task

    Hi
    i am new to SSIS
    i have to export data from a table and append it into a existing file through SSIS script task
    please help
    Thanks
    Umesh

    Hi Umesh,
    The data structure of the source table and the structure of the destination file are the same, right? Is the destination file a flat file? Do you have to do it through Script Task? If the destination file is a flat file, this can be done easily by using
    the stock tasks/components other than .NET code. In the Data Flow Task, we choose the appropriate source adapter (such as OLE DB Source or ADO.NET Source) to extract data from the source table, perform transformation if necessary, and then load to the destination
    file via a Flat File Destination. When setting up the Flat File Destination, uncheck the “Overwrite data in the file” option so that the extracted data will be appended to the existing file.
    If you need to implement it through Script Task/Component indeed, you may benefit from the following code examples:
    http://stackoverflow.com/questions/8070163/how-to-add-custom-footer-to-an-ssis-flat-file-seperate-component-or-script-tas 
    http://stackoverflow.com/questions/8467326/add-header-and-footer-row-flat-file-ssis 
    If you need further help about the script, I suggest that you ask a new question in .NET forums where you can get more dedicated support:
    http://social.msdn.microsoft.com/Forums/vstudio/en-US/home?category=netdevelopment 
    Regards,
    Mike Yin
    TechNet Community Support

Maybe you are looking for

  • How do I get the cd out of the computer?

    How do I get the cd out of the computer once the music has been downloaded?

  • Project Documentation tab: can you 'freeze' a graph so another can be added and compared against?

    I've been using the Project Documentation view recently to quickly compare dc signals against changes that I make to an electrical system. What I'm trying to do is capture a few seconds of a DC signal, stop acquisition, make a change in the system, t

  • BEx cumulative feature issue

    Dear Friends, I am working on a scenario to create a report like this : Customer Document date doctype refecendoc no  clrdocno  <KYF DEB_CRE_LC>   <KYF Balance>. Now the issue is..I want ot have date selection on Deb_cre_lc keyfigure and customer als

  • Very very slow r3load

    hi, i am performing the import using R3load on oracle 10.2.0.2.0 databse which is on 4.5B before upgrade. init.ora parameters are maintained as per OSS 936441 for 205GB database import is taking almost 13 hours which looks to be very high. DB is on 1

  • Purchase order with Component List (BOM) ....??

    HI MM Gurus, We want to create PO with a component list that should be appears under the main item. The component list is a mterial BOM. exam:- bom MATERIAL - CATALOG1 (Non Stock Materials) COMPONENT 1 :-ABCD COMPONENT 2 :- XYZ. WHEN I ENTER THE BOM