How to export data from a Dynpro table to Excel file?

Hi
Here I go again. I read the post <b>Looking for example to export data from a DynPro table to Excel file</b> and put the code lines into a Web Dynpro Project where we need to export a dynpro table to Excel file but exactly at line 23 it doesn't recognize <b>workBook = new HSSFWorkbook();</b>
1     //Declare this in the end between the Begin others block.
2     
3     private FileOutputStream out = null;
4     private HSSFWorkbook workBook = null;
5     private HSSFSheet hsSheet = null;
6     private HSSFRow row = null;
7     private HSSFCell cell = null;
8     private HSSFCellStyle cs = null;
9     private HSSFCellStyle cs1 = null;
10     private HSSFCellStyle cs2 = null;
11     private HSSFDataFormat dataFormat = null;
12     private HSSFFont f = null;
13     private HSSFFont f1 = null;
14     
15     //Code to create the Excel.
16     
17     public void onActionExportToExcel(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
18     {
19     //@@begin onActionExportToExcel(ServerEvent)
20     try
21     {
22     out = new FileOutputStream("C:/mydirectory/myfiles/testexcel.xls");
23     workBook = new HSSFWorkbook();
24     hsSheet = workBook.createSheet("My Sheet");
25     cs = workBook.createCellStyle();
26     cs1 = workBook.createCellStyle();
27     cs2 = workBook.createCellStyle();
28     dataFormat = workBook.createDataFormat();
29     f = workBook.createFont();
30     f1 = workBook.createFont();
31     f.setFontHeightInPoints((short) 12);
32     // make it blue
33     f.setColor( (short)HSSFFont.COLOR_NORMAL );
34     // make it bold
35     // arial is the default font
36     f.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);
37     
38     // set font 2 to 10 point type
39     f1.setFontHeightInPoints((short) 10);
40     // make it red
41     f1.setColor( (short)HSSFFont.COLOR_RED );
42     // make it bold
43     f1.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);
44     f1.setStrikeout(true);
45     cs.setFont(f);
46     cs.setDataFormat(dataFormat.getFormat("#,##0.0"));
47     
48     // set a thick border
49     cs2.setBorderBottom(cs2.BORDER_THICK);
50     
51     // fill w fg fill color
52     cs2.setFillPattern((short) HSSFCellStyle.SOLID_FOREGROUND);
53     cs2.setFillBackgroundColor((short)HSSFCellStyle.SOLID_FOREGROUND);
54     // set the cell format to text see HSSFDataFormat for a full list
55     cs2.setDataFormat(HSSFDataFormat.getBuiltinFormat("text"));
56     cs2.setFont(f1);
57     cs2.setLocked(true);
58     cs2.setWrapText(true);
59     row = hsSheet.createRow(0);
60     hsSheet.createFreezePane(0,1,1,1);
61     for(int i=1; i<10;i++)
62     {
63     cell = row.createCell((short)i);
64     cell.setCellValue("Excel Column "+i);
65     cell.setCellStyle(cs2);
66     }
67     workBook.write(out);
68     out.close();
69     
70     //Read the file that was created.
71     
72     FileInputStream fin = new FileInputStream("C:/mydirectory/myfiles/testexcel.xls");
73     byte b[] = new byte[fin.available()];
74     fin.read(b,0,b.length);
75     fin.close();
76     
77     wdContext.currentContextElement().setDataContent(b);
78     }
79     catch(Exception e)
80     {
81     wdComponentAPI.getComponent().getMessageManager().reportException("Exception while reading file "+e,true);
82     }
83     //@@end
84     }
I don't know why this happen? Any information I will appreciate it.
Thanks in advance!!!
Tokio Franco Chang

After test the code lines appears this error stacktrace:
[code]
java.lang.NoClassDefFoundError: org/apache/poi/hssf/usermodel/HSSFWorkbook
     at com.sap.tc.webdynpro.progmodel.api.iwdcustomevent.ExportToExcel.onActionAct1(ExportToExcel.java:232)
     at com.sap.tc.webdynpro.progmodel.api.iwdcustomevent.wdp.InternalExportToExcel.wdInvokeEventHandler(InternalExportToExcel.java:147)
     at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.invokeEventHandler(DelegatingView.java:87)
     at com.sap.tc.webdynpro.progmodel.controller.Action.fire(Action.java:67)
     at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.handleAction(WebDynproMainTask.java:101)
     at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.handleActionEvent(WebDynproMainTask.java:304)
     at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.execute(WebDynproMainTask.java:649)
     at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:59)
     at com.sap.tc.webdynpro.clientserver.cal.ClientManager.doProcessing(ClientManager.java:252)
     at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doWebDynproProcessing(DispatcherServlet.java:154)
     at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:116)
     at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doPost(DispatcherServlet.java:55)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
     at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:392)
     at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
     at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:345)
     at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:323)
     at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:865)
     at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:240)
     at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
     at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)
     at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:37)
     at com.sap.engine.core.cluster.impl6.session.UnorderedChannel$MessageRunner.run(UnorderedChannel.java:71)
     at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
     at java.security.AccessController.doPrivileged(Native Method)
     at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:95)
     at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:159)
Thanks in advance!!!
Tokio Franco Chang
[/code]

Similar Messages

  • Looking for example to export data from a DynPro table to Excel file

    Hello,
    I have a certain content in a table.
    I would like to export this content to Excel file and let the user save it on his PC. I tried to use the Office Controller but with no success.
    Have someone already made something like this and can show me an example?

    Hi
    I already explained this in another post. Anyway i will cut and paste the same for you.Here you go.Sample way to create a Excel file and then download it to a local pc using a FileUI Download element.
    We are developing a generic component for the same requirement which will download data to a excel from any table.
    Anyway here is something which will give you some kind of idea as to how you can write the data from WebDynpro to a excel file.
    For running this application
    Ensure that the requisite JAR files are set for the Excel API's. See the blog link below.
    Steps :
    All your files in the machine running the WAS will be created in the default location
    Alias : webdynpro/resources
    Path : <Drive>:/usr/sap/J2E/JC00/j2ee/cluster/server0/temp/webdynpro/web
    You can open your Visual Administrator and go to HTTP provider service and then create your own Alias. say
    Alias : myAlias
    Path : <Drive>:/mydirectory/myfiles
    Once this is done restart your WebAS.
    The code explained will perform the following.
    There is a button UI element and a Download UI element. On click of the Action associated with the button ui element
    The code below will create a excel file in the location mentioned.
    On click of the download UI element you can view the excel file that was created.
    Now create a New project in your NWDS
    Follow the blog for importing the necessary jar files for Excel
    /people/perumal.kanthan/blog/2005/03/21/reading-excel-data-from-java-using-hssf-api
    Once that is done you can create say a button in your Webdynpro and associate it with a action.
    Then you can write some code like the one below.
    //Declare this in the end between the Begin others block.
      private FileOutputStream out = null;
      private HSSFWorkbook workBook = null;
      private HSSFSheet hsSheet = null;
      private HSSFRow row = null;
      private HSSFCell cell = null;
      private HSSFCellStyle cs = null;
      private HSSFCellStyle cs1 = null;
      private HSSFCellStyle cs2 = null;
      private HSSFDataFormat dataFormat = null;
      private HSSFFont f = null;
      private HSSFFont f1 = null;
    //Code to create the Excel.
      public void onActionExportToExcel(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionExportToExcel(ServerEvent)
        try
          out = new FileOutputStream("C:/mydirectory/myfiles/testexcel.xls");
          workBook = new HSSFWorkbook();
          hsSheet = workBook.createSheet("My Sheet");
          cs = workBook.createCellStyle();
          cs1 = workBook.createCellStyle();
          cs2 = workBook.createCellStyle();
          dataFormat = workBook.createDataFormat();
          f =  workBook.createFont();
          f1 = workBook.createFont();
           f.setFontHeightInPoints((short) 12);
    //          make it blue
           f.setColor( (short)HSSFFont.COLOR_NORMAL );
    //           make it bold
    //          arial is the default font
           f.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);
    //          set font 2 to 10 point type
           f1.setFontHeightInPoints((short) 10);
    //          make it red
           f1.setColor( (short)HSSFFont.COLOR_RED );
    //          make it bold
           f1.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);
          f1.setStrikeout(true);
          cs.setFont(f);
          cs.setDataFormat(dataFormat.getFormat("#,##0.0"));
    //       set a thick border
         cs2.setBorderBottom(cs2.BORDER_THICK);
    //       fill w fg fill color
         cs2.setFillPattern((short) HSSFCellStyle.SOLID_FOREGROUND);
        cs2.setFillBackgroundColor((short)HSSFCellStyle.SOLID_FOREGROUND);
    //       set the cell format to text see HSSFDataFormat for a full list
         cs2.setDataFormat(HSSFDataFormat.getBuiltinFormat("text"));
         cs2.setFont(f1);
         cs2.setLocked(true);
         cs2.setWrapText(true);
         row = hsSheet.createRow(0);
         hsSheet.createFreezePane(0,1,1,1);
        for(int i=1; i<10;i++)
           cell = row.createCell((short)i);
          cell.setCellValue("Excel Column "+i);
          cell.setCellStyle(cs2);
         workBook.write(out);
         out.close();
    //Read the file that was created.
         FileInputStream fin = new FileInputStream("C:/mydirectory/myfiles/testexcel.xls");
         byte b[] = new byte[fin.available()];
         fin.read(b,0,b.length);
         fin.close();
         wdContext.currentContextElement().setDataContent(b);
        catch(Exception e)
          wdComponentAPI.getComponent().getMessageManager().reportException("Exception while reading file "+e,true);  
        //@@end
    You can now add a Download UI Element to the layout.
    Create a Context Attribute say "dataContent" and this should be of Type Binary.
    The Data property of the File UI download element should be mapped to dataContent.
    In the init method write code like
    This is done for the download element.
         IWDAttributeInfo attInfo = wdContext.getNodeInfo().getAttribute("dataContent");   
         IWDModifiableBinaryType binaryType = (IWDModifiableBinaryType) attInfo.getModifiableSimpleType();
    //In addition the FileDownload UI element needs for defined resource types  
         binaryType.setFileName("testexcel.xls");
         binaryType.setMimeType(WDWebResourceType.XLS);
    Hope that helps you. Anyway its a sample and it should be helpful for you to see how you can modify it and of course maintain some standards in coding unlike the test sample given above :).
    Let me know if you require further clarifications
    regards
    ravi

  • How to export data from a Oracle table to a delimited file?

    I know how to load delimited file into a table, but how to export
    data from a Oracle table to a delimited file?
    Thanks in advance.

    Try looking at this link, it's long but there's three different solutions discussed in it. If you look at Barbara Boehmer's
    solution in her posts in the link below you'll see that she's addressed your concerns with spool files.
    Re: utl_smtp and triggers

  • How to export data from a string to a CSV file

    Hello,
    i do have a string in a Livecycle Designer script object with a couple of rows with different entries divided by a semicolon:
    COLUMN1;COLUMN2;COLUMN3
    Entry1;Entry2;Entry3
    Entry4;Entry5;Entry6
    The goal is now to export this string from Livecycle Designer into a CSV file by clicking a button. Is there any solution suggested?
    Thank you very much.

    Hi,
    You can try creating a dataObject and then exporting it, you might get some warning messages popup but try this;
    var csvData = "COLUMN1;COLUMN2;COLUMN3\r\n";
    csvData += "Entry1;Entry2;Entry3\r\n";
    csvData += "Entry4;Entry5;Entry6\r\n";
    var pdf = event.target;
    pdf.createDataObject("Data.csv", csvData);
    pdf.exportDataObject({cName: "Data.csv"});
    If you replace the last line with
    pdf.exportDataObject({cName: "Data.csv", nLaunch: 2});
    It will open in whatever .csv is registered for (Excel on my system)
    Regards
    Bruce

  • Exporting data from Oracle to an existing Excel file

    Hi,
    I want to know if it is possible to open up an excel file on the server (with the necessary lay-out) and to write the query results in it?
    Another remark: the file needs to be saved under a different name (we use the user name as part of the files since the file will be sent through email rather than be displayed on the user's screen)

    If you are satisfied with a straight dump, you might want to use utl_file to make a standard CSV-file.
    If you need a little more control of the layout, you might want to check out the SYLK file format (quite ancient)
    These require no Excel application and works on UNIX servers too. If you really have to have the full magic (on a Win32 platform) you could try using Jacob or some other Java-COM-bridge to launch the Excel-application and enter the values into the worksheet but this falls into the "duct tape and chewing gum"-category of stability in my opinion...

  • How to Export data from webdynpro using Jecxcel

    Hi ,
    Can anyone help me how to export data from web dynpro using Jexcel. kindly send me the related links.
    Thanks

    Hi Sandeep,
    Have you refered in the blogs?
    U can find may more document related to this.the below blog helps u in
    Exporting Data from Web Dynpro in Different Formats Using Open Source (POI, JExcel, iText) APIu2019s.
    https://www.sdn.sap.com/irj/sdn/index?rid=/library/uuid/b030e7fb-2662-2b10-0dab-c4aa52c3550b
    Regards
    Supraja

  • How to read data from an internal table into a real table?

    Hello experts,
    I'm relatively new to ABAP and I'm trying to figure out how to read data from an internal table into a table that I created.  I'm trying to use the RRW3_GET_QUERY_VIEW_DATA function module to read data from a multiprovider.  I'm trying to read data from the e_cell_data and e_axis_data tables into a table that I've already created.  Please see code below.
    TABLES MULTITAB.
    DATA:
      query_name TYPE RSZCOMPID,
      s_cubename TYPE RSINFOPROV,
      t_cell_data TYPE RRWS_T_CELL,
      t_axis_data TYPE RRWS_THX_AXIS_DATA,
      t_axis_info TYPE RRWS_THX_AXIS_INFO,
      wa_t_cell_data like line of t_cell_data,
      wa_t_axis_data like line of t_axis_data,
      w_corp_tab like line of t_cell_data.
    s_cubename = 'CORP_MPO1'.
    query_name = 'Z_corp_test'.
        CALL FUNCTION 'RRW3_GET_QUERY_VIEW_DATA'
           EXPORTING
             i_infoprovider           = s_cubename
             i_query                  = query_name
            i_t_parameter            = query_string_tab
           IMPORTING
             e_cell_data              = t_cell_data
             e_axis_data              = t_axis_data
             e_axis_info              = t_axis_info.
    If anyone has any information to help me, I would greatly appreciate it.  Thanks.

    Hi,
    <li>Once you call the function module RRW3_GET_QUERY_VIEW_DATA, lets say data is available in the corresponding tables e_cell_data e_axis_data which you have mentioned.
    <li>Modify your internal table defined for other purpose, with data from e_cell_data e_axis_data like below.
    LOOP AT t_cell_data INTO wa_t_cell_data.
      "Get the required data from t_cell_data.
      MOVE-CORRESPONDING wa_t_cell_data TO it_ur_tab.
      "Modify your internal table wih data
      MODIFY it_ur_tab TRANSPORTING <field1> <field2> <field3>.
    ENDLOOP.
    LOOP AT t_axis_data INTO wa_t_axis_data.
      "Get the required data from t_cell_data.
      MOVE-CORRESPONDING wa_t_axis_data TO it_ur_tab.
      "Modify your internal table wih data
      MODIFY it_ur_tab TRANSPORTING <field1> <field2> <field3>.
    ENDLOOP.
    Thanks
    Venkat.O

  • PROBLEM IN EXPORTING DATA FROM A RELATIONAL TABLE TO ANOTHER RELATIONAL TAB

    Hi,
    While trying to export data from a source table to a target table, problem occurs with loading the data in the work table(SrcSet0)[As shown in the operator]. The Work Table has been dropped and created successfully, the problem is coming with loading the data( in this work table(SrcSet0)). The error details as mentioned below. Please advise:-
    ODI-1227: Task SrcSet0 (Loading) fails on the source ORACLE connection ORACLE_SOURCE.
    Caused By: java.sql.SQLException: SQL string is not Query
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1442)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3752)
         at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3806)
         at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1667)
         at oracle.odi.query.JDBCTemplate.executeQuery(JDBCTemplate.java:189)
         at oracle.odi.runtime.agent.execution.sql.SQLDataProvider.readData(SQLDataProvider.java:89)
         at oracle.odi.runtime.agent.execution.sql.SQLDataProvider.readData(SQLDataProvider.java:1)
         at oracle.odi.runtime.agent.execution.DataMovementTaskExecutionHandler.handleTask(DataMovementTaskExecutionHandler.java:67)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.processTask(SnpSessTaskSql.java:2906)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2609)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:537)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:453)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:1740)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$2.doAction(StartSessRequestProcessor.java:338)
         at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:214)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:272)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$0(StartSessRequestProcessor.java:263)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$StartSessTask.doExecute(StartSessRequestProcessor.java:822)
         at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:123)
         at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$2.run(DefaultAgentTaskExecutor.java:82)
         at java.lang.Thread.run(Thread.java:662)
    Thanks
    Anindya

    Hi actdi,
    This is my KM_IKM SQL Incremental Update.xml code:-
    and I have find it(for (int i=odiRef.getDataSetMin(); i <= odiRef.getDataSetMax(); i++)) and high lighted it(Bold Text).
    So, please advise.
    Here is the main part of this code because the code is too long to post.It exceeds maxlength for the msg.
    So here it is:
    <Object class="com.sunopsis.dwg.dbobj.SnpTxtHeader">
    <Field name="Enc" type="java.lang.String">null</Field>
    <Field name="EncKey" type="java.lang.String">null</Field>
    <Field name="ITxt" type="com.sunopsis.sql.DbInt"><![CDATA[1695003]]></Field>
    <Field name="ITxtOrig" type="com.sunopsis.sql.DbInt"><![CDATA[102]]></Field>
    <Field name="SqlIndGrp" type="java.lang.String"><![CDATA[2]]></Field>
    <Field name="Txt" type="java.lang.String"><![CDATA[insert into <%=odiRef.getTable("L","INT_NAME","A")%>
    <%=odiRef.getColList("", "[COL_NAME]", ",\n\t", "", "(((INS or UPD) and !TRG) and REW)")%>,
    IND_UPDATE
    *<%for (int i=odiRef.getDataSetMin(); i <= odiRef.getDataSetMax(); i++){%>*
    <%=odiRef.getDataSet(i, "Operator")%>
    select <%=odiRef.getPop("DISTINCT_ROWS")%>
    <%=odiRef.getColList(i,"", "[EXPRESSION]", ",\n\t", "", "(((INS or UPD) and !TRG) and REW)")%>,
    <% if (odiRef.getDataSet(i, "HAS_JRN").equals("1")) { %>
    JRN_FLAG IND_UPDATE
    <%} else {%>
    'I' IND_UPDATE
    <%}%>
    from <%=odiRef.getFrom(i)%>
    where (1=1)
    <%=odiRef.getJoin(i)%>
    <%=odiRef.getFilter(i)%>
    <%=odiRef.getJrnFilter(i)%>
    <%=odiRef.getGrpBy(i)%>
    <%=odiRef.getHaving(i)%>
    <%}%>
    ]]></Field>
    </Object>
    <Object class="com.sunopsis.dwg.dbobj.SnpLineTrt">
    <Field name="AlwaysExe" type="java.lang.String"><![CDATA[0]]></Field>

  • How to move data from a staging table to three entity tables #2

    Environment: SQL Server 2008 R2
    I have a few questions:
    How would I prevent duplicate records, when/ IF SSIS is executed many times?
    How would I know that all huge volume of data being loaded in the entity tables?
    In reference to "how to move data from a staging table to three entity tables ", since I am loading large volume of data, while using lookup transformation:
    which of the merge components is best suited.
    How to configure merge component correctly. (screen shot is preferred) 
    Please refer to the following link
    http://social.msdn.microsoft.com/Forums/en-US/5f2128c8-3ddd-4455-9076-05fa1902a62a/how-to-move-data-from-a-staging-table-to-three-entity-tables?forum=sqlintegrationservices

    You can use RowCount transformation in the path where you want to capture record details. Then inside rowcount transformation pass a integer variable to get count value inside
    the event handler can be configured as below
    Inside Execute SQL task add INSERT statement to add rowcount to your audit table
    Can you also show me how to Check against destination table using key columns inside a lookup task and insert only non
    matched records (No Match output)
    This is explained clearly in below link which Arthur posted
    http://www.sqlis.com/sqlis/post/Get-all-from-Table-A-that-isnt-in-Table-B.aspx
    For large data I would prefer doing this in T-SQL. So what you could do is dump data to staging table and then apply
    T-SQL MERGE between tables (or even a combination of INSERT/UPDATE statements)
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • How to export data from a spread sheet which has multiple work sheets?

    How to export data from a spread sheet which has multiple work sheets to a single text file with fixed length fields?

    Hello s1,
    saving them as CSV will not give a fixed legth output but, as the naming says, a Character Separated Value file.
    Regards
    Marcus

  • How to move data from 2 internal table to 1 internal table

    Can any body send me code that how to move data from 2 internal table into one internal table.
    Moderator message : Read ABAP documentation. Thread locked.
    Edited by: Vinod Kumar on Jun 13, 2011 11:45 AM

    Hi Mohdarif92;
    I don't know your full needs. But general method should be as below code.
    Please check exam below code.
    Best regards.
    data : begin of gt_result.
                ... like mkpf-...
                ... like mkpf-...
                ... like mseg-...
                ... like mseg-...
              end of gt_result
    select *
    into table gt_mkpf
    from mkpf where ...
    select *
    into table mseg
    from mseg where ...
    loop at gt_mkpf.
         loop at gt_mseg where ... = mkpf-...
            move-corresponding gt_mkpf to gt_result.
            move-corresponding gt_mseg to gt_result.
            append gt_result
         endloop.
    endloop.

  • Import/export data from ms sql 7 to xml file in a particular xpdl format

    I'm trying to write java program to import/export data from ms sql 7 to xml file in a particular xpdl format. Can anyone suggest how to do it?

    take a glance at what these guys do: http://www.openbusinessengine.org/docs/guide.html

  • Problem while exporting the data from a report to an excel file.

    Hi SAP guru's,
    I have a problem while exporting the data from a report to an excel file.
    The problem is that after exporting, the excel file seems to have some irrelevant characters....I am checking this using SOST transaction..
    Required text (Russian):
    Операции по счету                                    
    № документа     Тип документа     № учетной записи     Дата документа     Валюта     Сумма, вкл. НДС     Срок оплаты     Описание документа
    Current Text :
       ? 5 @ 0 F 8 8  ? >  A G 5 B C                                   
    !   4 > : C       "" 8 ?  4 > : C      !   C G 5 B = > 9  7 0 ? 8 A 8        0 B 0  4 > : C         0 ; N B 0      ! C <       ! @ > :  > ? ; 0 B K        ? 8 A 0 = 8 5  4 > : C
    Can you help me making configuration settings if any?
    Regards,
    Avinash Raju

    Hi Avinash
    To download  such characteres you need to adjust code page to be used during export. You can review SAP note 73606 to identify which code page is required for this language
    Best regards

  • How to Export data from a Table to Excel using PL/SQL Code

    Hi,
    I need to export data from a table to the excel sheet using PL/SQL script.
    could you pls provide with custom codes or sample procedures.
    Bobby

    http://asktom.oracle.com/pls/ask/f?p=4950:8:7947129213057862756::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:728625409049

  • How to get data  from an internal table in some other program

    I would like to get data from the internal table in the other program. When I using FM "LIST_FROM_MEMORY" to get the data, it doesn't work and the exception is not fount.
    If any special code need in the other program, like write data to memory .
    Many thx .
    From Ross Wang

    Hi
    <li>You need to have interaction if you want to use EXPORT/IMPORT statments.
    <li>The internal tables in both programs must be same
    <li>Program one ..Calling program
    REPORT ZTEST_NOTEPAD.
    DATA: BEGIN OF it_t001 OCCURS 0,
            bukrs TYPE t001-bukrs,
            butxt TYPE t001-butxt,
          END OF it_t001.
    START-OF-SELECTION.
      SUBMIT ztest_notepad1 AND RETURN.
      IMPORT it_t001 FROM MEMORY ID 'ZTEST_T100'.
      LOOP AT it_t001.
        WRITE:/ it_t001.
      ENDLOOP.
    <li>Program two ...Called program
    REPORT ztest_notepad1.
    DATA: BEGIN OF it_t001 OCCURS 0,
            bukrs TYPE t001-bukrs,
            butxt TYPE t001-butxt,
          END OF it_t001.
    START-OF-SELECTION.
      SELECT * FROM t001 INTO CORRESPONDING FIELDS OF TABLE it_t001 UP TO 10 ROWS.
      IF sy-dbcnt > 1.
        EXPORT it_t001 TO MEMORY ID 'ZTEST_T100'.
      ENDIF.
    I hope that it gets you some idea.
    Thanks
    Venkat.O

Maybe you are looking for