Exporting Tables from BSP to Class Methods

Afternoon Everybody,
in true SAP OSS Message style I post this question on it's own thread to enable maximum value from the reward points.
Question:
I have a BSP, in an event in my BSP I call a method in my class.
I have mastered Exporting parameters to the methods from the BSP and Importing parameters back to the BSP from the methods, but now, I need so Export a table to the method and I don't know how to.
Also, in combination with this, when I create the method I am able to setup the importing parameters, but how can create/define the importing table ?
If this is not clear I will add more info.
Thanks for your help,
Tomas.

Tomas,
The key to problem is always to learn a few "nice" things defined in the system. So let me see. The first problem you have is that methods are declared of the form:
method <parm> <direction> TYPE [REF TO] <t>
parm = the name of the paramter
direction = IMPORTING|EXPORTING|CHANGING|RETURNING
t = type of parm
However, in this type it is not possible to write that you want "type of table". You can only use predefined types (either internal or indictionary).
Having said this, most people with extensive ABAP experience before the OO-wave, tend to use character types all the time. However, we nearly always use only type string. And exactly for this type there is a type string_table.
So the code would be:
<u>Declaration:</u>
  method lines changing type string_table
<u>Calling:</u>
  DATA: t TYPE string_table.
  APPEND 'Hello' TO t.
  APPEND 'World' TO t.
  class=>method( CHANGING lines = t ).
<u>Method Implementation:</u>
  DATA: line LIKE LINE OF lines.
  LOOP AT lines INTO line.
    TRANSLATE line TO UPPER CASE.
    MODIFY lines FROM line. " write back
  ENDLOOP.
<u>Better Method Implementation (works directly on row):</u>
  FIELD-SYMBOLS: <line> LIKE LINE OF lines.
  LOOP AT lines ASSIGNING <line>.
    TRANSLATE <line> TO UPPER CASE.
  ENDLOOP.
These two types <b>string</b> and <b>string_table</b> goes a long way. The other two types that I often use are <b>ihttpvnp</b> and <b>Tihttpvnp</b> (table): they are good for name/value pairs of strings.
Now is the time that you should invest 30 minutes reading each time that you run into a problem. You have the framework, just check up on one aspect each time. (I usually use online help, for example to understand MODIFY for writing this text.)

Similar Messages

  • Is it possible to export tables from diffrent schema using expdp?

    Hi,
    We can export tables from different schema using exp. Ex: exp user/pass file=sample.dmp log=sample.log tables=scott.dept,system.sales ...But
    Is it possible in expdp?
    Thanks in advance ..
    Thanks,

    Hi,
    you have to use "schemas=user1,user2 include=table:"in('table1,table2')" use parfileexpdp scott/tiger@db10g schemas=SCOTT include=TABLE:"IN ('EMP', 'DEPT')" directory=TEST_DIR dumpfile=SCOTT.dmp logfile=expdpSCOTT.log{quote}
    I am not able to perform it using parfile also.Using parfile it shows "UDE-00010: multiple job modes requested, schema and tables."
    When trying the below, i get error
    {code}
    bash-3.00$ expdp directory=EXP_DUMP dumpfile=test.dmp logfile=test.log SCHEMAS=(\'MM\',\'MMM\') include=TABLE:\"IN\(\'EA_EET_TMP\',\'WS_DT\'\)\"
    Export: Release 10.2.0.4.0 - 64bit Production on Friday, 15 October, 2010 18:34:32
    Copyright (c) 2003, 2007, Oracle. All rights reserved.
    Username: / as sysdba
    Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    Starting "SYS"."SYS_EXPORT_SCHEMA_01": /******** AS SYSDBA directory=EXP_DUMP dumpfile=test.dmp logfile=test.log SCHEMAS=('MM','MMM') include=TABLE:"IN('EA_EET_TMP','WS_DT')"
    Estimate in progress using BLOCKS method...
    Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
    Total estimation using BLOCKS method: 0 KB
    Processing object type SCHEMA_EXPORT/TABLE/TABLE
    Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
    Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
    Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
    Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
    . . exported "MM"."EA_EET_TMP" 0 KB 0 rows
    ORA-39165: Schema MMM was not found.
    Master table "SYS"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded
    Dump file set for SYS.SYS_EXPORT_SCHEMA_01 is:
    /export/home/nucleus/dump/test.dmp
    Job "SYS"."SYS_EXPORT_SCHEMA_01" completed with 1 error(s) at 18:35:19
    {code}
    When checking expdp help=y shows :-
    {code}TABLES Identifies a list of tables to export - one schema only.{code}
    As per few testing,tables from different schemas are not possible to export using expdp in a single command.
    Anand

  • Exporting Table from Indesign to tagged text.

    Hi, all!<br />I need to export table from InDesign to tagged text by the script.<br />I found ExportAllStories.jsx in samples.<br />It's good example but I have some questions<br />1. In my document more then one table and I need to export only some of them. So, how can I export only one of them? May be Tables have some "labels" or something other differential sign?<br />2. How can I ser encoding type of distanation file (by the default InDesing set <ASCII-WIN>, but I'm need to set <Unicode>).

    Edit>InCopy>Export All Strories.
    Open the INDD in InCopy.
    This assumes everyone involved has access to the files.

  • How to export tables from development server to production server

    HI,
    Any body plz let me know how to export tables from development server to production server. what are the user names and password i need to ask my manager to do that. what are the requirements i need to ask him.
    Plz reply me ASAP.
    Thanks in advance.

    hi buddy
    first of all you should let us know the environment of production and development servers
    database versions
    and you need to have userid which has privilege to export tables of other schema. userid(owner) of the tables you want to export.
    Traditional way
    export tables in development server and then ftp to production and then import
    in the above case you should have similar database structure(tablespace etc) to avoid errors...
    if there are few tables only , you can use dblink instead of export and import...

  • Exporting table from methode

    Hi experts,
    how can I handle it to exporting a table from a structure from a methode?
    At the moment I export the structure in the methode but I need to export a table.
    At the moment:
    Parameter    Type           Typing Methode  Associated Type
    param_1      Exporting    Type                    structure
    I need something like that:
    Parameter    Type           Typing Methode  Associated Type
    param_1      Exporting    Type Table of      structure
    ... but that is not possible

    I think he meant something like this
    CLASS lcl_test DEFINITION.
      PUBLIC SECTION.
        CLASS-METHODS: get_tab EXPORTING gen_table TYPE table.
    ENDCLASS.                  
    CLASS lcl_test IMPLEMENTATION.
      METHOD get_tab.
        SELECT * FROM sflight INTO TABLE gen_table UP TO 10 ROWS.
      ENDMETHOD.                   
    ENDCLASS.                   
    START-OF-SELECTION.
      DATA: it_sflight TYPE TABLE OF sflight.
      lcl_test=>get_tab( IMPORTING gen_table = it_sflight ).
      "here IT_SFLIGHT holds what you want
    Of course you could make it more generic, meaning query dynamic DB table inside get_tab and create dynamic table outside the method call to get returned data to that table. But basically it shows the idea.
    Regards
    Marcin

  • Create a table in SQL Server, Export tables from Microsoft Excel to Microsoft SQL Server, Populate the created table

    Hello team,
    I have a project that I need to do, what is the best approach for each step?
    1- I have to create a table in Microsoft SQL Server.
    2- I have to import data/ tables from Microsoft Excel or Access to Microsoft SQL Server. Should I use Microsoft Visual Studio to move data from Excel or Access?
    3-I should populate the created table with the data from the exported data.
    4-How should I add the second and third imported table to the first table? Should I use union query?
    After I learn these, I will bring up the code to make sure what I do is right.
    Thanks for all,
    Guity
    GGGGGNNNNN

    Hello Naomi,
    I have imported all the tables into SQL Server,
    I created a table:
    CREATE
    TABLE dbo.Orders
    Now I want to populate this table with the values from imported tables, will this code take care of this task?
    INSERT INTO dbo.Orders(OrderId, OrderDate)
    SELECT OrderId, OrderDate
    FROM Sales.Orders
    UNION
    SELECT OrderId, OrderDate
    FROM Sales.Orders1
    Union
    SELECT OrderId, OrderDate
    FROM Sales.Orders2
    If not, what is the code?
    Please advise me.
    GGGGGNNNNN
    GGGGGNNNNN

  • Calling a Swing class method from from another swing class method

    Hi guys,
    I'm desperate for help or a pointing in the right direction. Basically, I want to call the public void createUI method in class AddressUI in the public void createUI method of PartnerUI class. Is that legal? How do I go about it? Thanks.
    package com.client.gui;
    import java.awt.*;
    import javax.swing.*;
    import client.application.MainFrame;
    import client.gui.base.BasicDialogUI;
    import client.page.base.BasicDialogPage;
    import client.table.model.AddressModel;
    public class AddressUI extends BasicDialogUI{
         private static final long serialVersionUID = -1214150134433745466L;
         public AddressUI(MainFrame frame, BasicDialogPage page) {
              super(frame, page);
         @Override
         public void createUI() {
         AddressModel am = new AddressModel();
         JTable table = new JTable(am);
         table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
         table.setColumnSelectionAllowed(true);
         JScrollPane scroller = new JScrollPane(table);
         scroller.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
         scroller.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
         JPanel addressPanel = new JPanel(new FlowLayout());
         addressPanel.setBackground(Color.BLUE);
         addressPanel.setForeground(Color.WHITE);
         addressPanel.setOpaque(true);
         JLabel addressHeader = new JLabel("Anschriften:");
         JPanel addressHeaderPanel = new JPanel();
         addressHeaderPanel.setBackground(Color.BLUE);
         addressHeaderPanel.setForeground(Color.WHITE);
         addressHeader.setOpaque(true);
         addressHeaderPanel.add(addressHeader);
         JButton buttonNew = new JButton("Neu");
         JButton buttonChange = new JButton("Ändern");
         JButton buttonDelete = new JButton ("Löschen");
         JPanel buttonsPanel = new JPanel(new FlowLayout());
         buttonsPanel.add(buttonNew);
         buttonsPanel.add(buttonChange);
         buttonsPanel.add(buttonDelete);
         addressPanel.add(buttonsPanel, FlowLayout.RIGHT);
         addressPanel.add(scroller, FlowLayout.CENTER);
         addressPanel.add(addressHeaderPanel, FlowLayout.LEFT);
         public final void showUI() {
              createUI();
              getMainFrame().setDialogPanel(this);
              getMainFrame().pack();
              this.setVisible(true);
         @Override
         public void formToModel() {
         @Override
         public void modelToForm() {
         @Override
         public boolean validateUI() {
              return true;
    package com.impaqgroup.pp.client.gui;
    import java.awt.BorderLayout;
    import java.awt.Color;
    import javax.swing.JPanel;
    import javax.swing.JTable;
    import com.impaqgroup.pp.client.application.MainFrame;
    import com.impaqgroup.pp.client.gui.base.BasicDialogUI;
    import com.impaqgroup.pp.client.page.base.BasicDialogPage;
    import com.impaqgroup.pp.client.table.model.PartnerModel;
    public class PartnerUI extends BasicDialogUI{
         private static final long serialVersionUID = 1024614598666310834L;
         public PartnerUI(MainFrame frame, BasicDialogPage page) {
              super(frame, page);
         @Override
         public void createUI() {
              JPanel partnerPanel = new JPanel();
              partnerPanel.setBackground(Color.BLUE);
              partnerPanel.setForeground(Color.WHITE);
              partnerPanel.setOpaque(true);
              PartnerModel pm = new PartnerModel();
              JTable partnerTable = new JTable(pm);
              partnerTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
              partnerTable.setColumnSelectionAllowed(true);
              partnerPanel.add(partnerTable, BorderLayout.CENTER);
         @Override
         public final void showUI() {
              createUI();
              getMainFrame().setDialogPanel(this);
              getMainFrame().pack();
              this.setVisible(true);
         @Override
         public void formToModel() {
         @Override
         public void modelToForm() {
         @Override
         public boolean validateUI() {
              return true;
    }

    Have you tried adding something like the below to PartnerUI#createUI() ?
    AddressUI aui = new AddressUI( getMainFrame(), getPage() );
    aui.createUI();

  • Export table from pdf to excel

    I have been attempting to convert a large table from a pdf file to an Excel worksheet, but I am having no luck. I am working on Adobe 8, and I can't figure out a way to do it. I've tried saving the file as .txt, but this completely screws up the formatting when I open it with Excel. I thought I remembered using a past version of adobe to accomplish this simply by right-clicking on a selected region of the table and selecting "Export to Excel"... where did that option go? I am currently copying and pasting each individual row of the table into Excel in order to keep the formatting, but this is too time consuming. HELP!!!!!!!!!!!!!!!!

    Use the menu entry 'Open Table in Spreadsheet' in Adobe Acrobat 8 Professional.

  • Exporting tables from 8i to 9i

    Hi Gurus,
    Can an existing Table from Oracle 8i be imported to Oracle 9i? If it is possible how can this be possible? I need to move onto Oracle 9i Standard Edition Release 2 (9.2.0.1.0) for Windows . And I am presently running on Oracle 8i Release 8.1.5.
    Thanks in advance
    Dirhaan from Sri Lanka

    Welcome to fourm !
    just take the export of the table and copy that dump file to machine contains 9i SE.
    import that table using imp command
    for better understanding, please go through exp/imp section in utilities doc. also as 9i is desupported, please move to 10g

  • Exporting Tables From Workstation

    Dear Fiends
    Hi Everyone , I am trying to take backup for my tables from the workstation through my program , I have create procedure in the form, and call this procedure by
    When-button-pressed
    EXPORT_TABLES;
    And my producer as the following
    PROCEDURE EXPORT_TABLES IS
    PATH VARCHAR2(300);
    BEGIN
    -- TABLES EXPORTING
    SET_APPLICATION_PROPERTY(CURSOR_STYLE,'BUSY');
    PATH:='D:\BACKUP\SOFTDREAMS'||sysdate||'.DMP';
    HOST('Exp'||'TEST'||'/'||'TEST@MANUF'||' FILE='||PATH,no_screen);
    SET_APPLICATION_PROPERTY(CURSOR_STYLE,'default');
    SYNCHRONIZE;
    MESSAGE('The Backup Has Been Finished !!!');
    END;
    But I am not getting the backup file
    Waiting for your valuable answer with example please if it is possible .
    Best regards
    Jamil Alshaibani

    If listner start on how u will take backup,if takes backup is valid when the all users tranactions is going on.
    kanish

  • Export Tables from Pages to Numbers with AppleScript?

    I've hit a stumbling block while trying to use AppleScript to remove a table from pages and paste it into Numbers.
    I've found no way to directly identify the table in the document to copy for pasting into Numbers and I've been unable to remove the other information from the document to isolate the table for a select all command.
    The easiest thing I can think of is a AppleScript to remove the first set of characters before the table or to explicitly extract tables only from the document.
    I've tried all manners of AppleScripts and I can't seem to get it to work. None of the AppleScript text selection commands work to remove the information other than the table.

    Try selecting the whole of the contents of the document and then running:
    tell app "Pages"
    selection
    end tell
    This will return a list of the selected objects, amongst which you should see something like: table 1 of body text of document id 15373020 of application "Pages"
    With that data you should be able to select just that item:
    select table 1 of body text of document id 15373020 of application "Pages"
    Obviously that's just an example. If you were scripting this, you would most likely work through the list filtering only those objects you want to work with - the tables in this case.

  • Export Table from ABAP Method

    Hello Experts,
    I have created one class which contains a method having one import parameter and one export parameter.Export parameter is of type table, say iTab
    In the code of the method, i called one RFC which has one table parameter. Ex.-
    method get_data.
    call function z_test
        Exporting
             name = 'AAA'
        Tables
             list = iTab.
    endmethod.
    But when I compile the method, it is showing me the error that "iTab is not a internal table, occurs specification is missing".
    Then I Used another internal table instead of iTab. Error was not came, but I am not understanding how to assign this new internal table to export parameter of a method.
    Thanks in Advance,
    Prashant Jagdale

    Hi Keshav,
    I tried using iTab type <Table_Name> in method signature and used
    TABLES
       LIST = ItAB[]
    But no success....Again Error - "iTab is not a internal table, occurs n specification is missing"
    when i declare another internal table inside method using type table of and assigned to list. No error comes but I am not understanding how to pass these values of newly created internal table to method's export parameter.
    Any help??
    Thanks in Advance,
    Prashant

  • Download internal table from BSP application to C:\ drive of the user

    Hi,
    How do we download a internal table data from a BSP application to the C:\ drive of the user. Have tried GUI Download, but it doesn't work. Also don't want a pop up to appear while this is happening. The code has to there in 'OnInputProcessing' event.
    Regards,
    Jaison

    Hi Raja,
    I went through few of the blogs and wrote the below code for downloading data. My requirement is that in the InputProcessing event i need to write a subset of data to the users C:\ drive. But even after doing the below change i'm unable to get the requirement done. Can you please tell me as to what i'm missing. I'm new to BSP development and help would be highly appreciated.
    if not it_messages1[] is initial.
      clear wa_messages1.
      loop at it_messages1 into wa_messages1.
       clear temp_string.
       concatenate wa_messages1-PROJECT wa_messages1-FILENAME.......
       into temp_string separated by CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB.
       concatenate main_string temp_string into main_string separated by
       CL_ABAP_CHAR_UTILITIES=>CR_LF.
      endloop.
    CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
      EXPORTING
        TEXT                 = main_string
        MIMETYPE        = 'APPLICATION/MSEXCEL;charset=utf-16le'
      ENCODING       =
    IMPORTING
       BUFFER         =  xmain_string.
    EXCEPTIONS
      FAILED         = 1
      OTHERS         = 2
    CALL METHOD cl_bsp_utility=>download
    EXPORTING
        object_s = xmain_string
        content_type = 'APPLICATION/MSEXCEL;charset=utf-16le'
        content_disposition = 'attachment;filename=test.xls'
        response = mresponse
        navigation = navigation.
    Edited by: Jaison Yohannan on Jun 3, 2009 2:16 PM

  • Declaration of Rabge table Paramater in Global class method

    Hi Friends,
    I have created a Global class with a method GET_DATA.
    In that method,i have written the like  :
    select * from kna1 into table it_kna1where kunnr in S_kunnr.
    But, I am getting the error with Range table S_KUNNR.
    Kindly, Let me know how I should Declare S_KUNNR in parameter list of GET_DATA,  what should be its associated data type?
    Regards,
    Xavier.p
    Edited by: Xavier on Jul 16, 2009 3:50 PM

    1) Create a Public Type for ranges. You can do it in SE11 or in SE24. I generally prefer doing it in SE24.
    Go to Types Tab
    Declare your range type
    TYPES: ty_r_kunnr type range of kna1-kunnr.
    2) Use this type to declare your method's parameters:
    IR_KUNNR TYPE TY_R_KUNNR
    3) When calling the method you can do like:
    CALL METHOD O_REF->GET_dATA
      EXPORTING
        IR_KUNNR = S_KUNNR[].
    Regards,
    Naimesh Patel

  • How to delete the committed row from a table from its VOImpl class ??

    I am new to ADF and I have problem to solve. To perform roll back I am using fetching key before roll back and setting it after undo operation, so that I can stay back in the currently selected row. But in my case I am using application model commit for one LOV attribute selection in the row. So when ever I am performing roll back operation after inserting a row, the values other than this committed LOV attribute gets roll backed, but I need remove the entire row from table. Does there any option to remove a row based on the attribute values of a row from VO's row implementation or from bean class in a performance optimized way ?
    Thanks in advance..........

    http://java.sun.com/javase/6/docs/api/javax/swing/table/DefaultTableModel.html#removeRow(int)
    Why did you mark it answered but gave no dukes to finalight? That's not how it works.
    You should mark his answer as correct and give him at least one duke, for the effort!

Maybe you are looking for

  • "Windows Cryptographic service provider error no. 3221225506" signing in to digital signatures

    Dear Friends,                    Please help me find solution for this problem which has totally jeopardized my work. I am using Adobe reader X. Everytime I open MCA forms for signing, I have to use some DSC which are stored in my Explorer. But when

  • Pictures not showing up in my ftp server.

    Okay, so i am working on a site where you need to register and activate. So i got the register part good and when you go to the email and click activate it all was working good and everything untill now i ftped it and now my images and headers do not

  • OBIEE 11g - Hierarchy

    Hi, My client is on OBIEE 11g. Is it possible to create a tree-like structure (as shown below) from a hierarchy in the prompt? TestPrompt should show following Org Level1 ------Org Level2a ------------Org Level3a ------------------Org Level4a -------

  • Rule incorrect error in the update rule of standard infocube

    hi, In the standard Appraisal infocube(BW 3.X) i have added a new keyfigure field  and written a rule in the update rule to populate datas. whn i checked for sytax errors, saved and return to the update rule screen it displays a red status for tht ke

  • Position Based Busgeting/Personnel Cost Planning

    Hi,  I am new to this topic and so I have some questions which may be very basic.  I apologize in advance. 1. When we extract HR information from R/3 is the position information rolled up or can we get individual records by position ID? 2. Do we need