Method GET_STATIC_ATTRIBUTES with generic table-structure

Hi ,
I am trying to select some rows of a web dynpro alv .
  LS_ALL-TABNAME = VAR_NAME_OF_TABLE.
  CREATE DATA LS_ALL-OBJECT TYPE TABLE OF (VAR_NAME_OF_TABLE).      "<<<<<
  INSERT LS_ALL INTO TABLE LT_ALL.
  LOOP AT LT_ALL INTO LS_ALL.
    ASSIGN LS_ALL-OBJECT->* TO <FS_TABLE>.                 "<<<<<
  ENDLOOP.
  LT_ELEMENTS = WD_THIS->DYN_NODE->GET_SELECTED_ELEMENTS( INCLUDING_LEAD_SELECTION = ABAP_TRUE ).
  LOOP AT LT_ELEMENTS INTO LR_ELEMENT.
    LR_ELEMENT->GET_STATIC_ATTRIBUTES( IMPORTING STATIC_ATTRIBUTES = <FS_TABLE> ).
  "coding...
  ENDLOOP.
My problem: It's a generic web dynpro alv (with a dynamic context node) and i only have the tablename (and so it's structure) of the alv at runtime in a variable.
I want to select some rows of this alv and get the data of the selected rows, so I try to work with field-symbols, but because of the move-corresponding in the coding of the method IF_WD_CONTEXT_ELEMENT~GET_STATIC_ATTRIBUTES...:
method IF_WD_CONTEXT_ELEMENT~GET_STATIC_ATTRIBUTES .
  field-symbols:
    <values> type data.
  assign me->static_attributes->* to <values>.
  move-corresponding <values> to static_attributes.
endmethod.
...i get the short-dump:
German:
Falscher Typ eines Operanden bei der Anweisung MOVE-CORRESPONDING.
English:
Wrong type of operands during the assignment MOVE-CORRESPONDING.
So how can i get the structure of my generic table and do a move-corresponding with the method above?
Many thanks in advance!
Regards,
Ludwig
Edited by: Ludwig Heinz on Mar 13, 2008 9:45 AM

Ok - but how can i make a declaration of dref_tab?
my coding:
TYPES: BEGIN OF TS_ALL,
  TABNAME TYPE DD02L-TABNAME,
  OBJECT  TYPE REF TO DATA,
END OF TS_ALL.
"dref_tab TYPE HASHED TABLE OF TS_ALL
"     WITH UNIQUE KEY TABNAME,
  FIELD-SYMBOLS:
  <FS_LINE>  TYPE ANY,
  <FS_STRUCT> TYPE ANY,
"<FS_TABLE> TYPE ANY TABLE.
  CREATE DATA LS_ALL-OBJECT TYPE (LF_TABLENAME).    
  INSERT LS_ALL INTO TABLE LT_ALL.
"CREATE DATA dref_tab TYPE TABLE OF (LF_TABLENAME).
"ASSIGN dref_tab->* TO <FS_TABLE>.
LOOP AT LT_ALL INTO LS_ALL.
    ASSIGN LS_ALL-OBJECT->* TO <FS_STRUCT>.             
  ENDLOOP.
  LT_ELEMENTS = WD_THIS->DYN_NODE->GET_SELECTED_ELEMENTS( INCLUDING_LEAD_SELECTION = ABAP_TRUE ).
  LOOP AT LT_ELEMENTS INTO LR_ELEMENT.
    LR_ELEMENT->GET_STATIC_ATTRIBUTES( IMPORTING STATIC_ATTRIBUTES = <FS_STRUCT> ).
"        append <FS_STRUCT> to <FS_TABLE>.
  ENDLOOP.
syntax-error:
"dref_tab" is not a datareference-variable.
So how is the right declarion of "dref_tab" ?
Many thanks - i've you can solve this - i think i can finish it
Regards,
Ludwig

Similar Messages

  • How to create table with existing table structure

    How to do if i need a table with exactl similar structure of table mara?How to create it?

    Hi,
    In SE11 there will be a button Copy Table.
    Regards,
    Satish

  • How to call a function with generic table parameter

    Hi everybody
    I need to call function module RSAR_ODS_API_GET (from BW). It recive an internal table with request ids and should return in E_T_DATA "unstructured" data from the psa and in E_T_RSFIELDTXT the description of the data structure, I guess
    from sap help only thing I have reggarding how to use the function module is :
    "You can call up the function module RSAR_ODS_API_GET with the list of request IDs given by the function module RSSM_API_REQUEST_GET. The function module RSAR_ODS_API_GET no longer recognizes InfoSources on the interface, rather it recognizes the request IDs instead. With the parameter I_T_SELECTIONS, you can restrict reading data records in the PSA table with reference to the fields of the transfer structure. In your program, the selections are filled and transferred to the parameter I_T_SELECTIONS.
    The import parameter causes the function module to output the data records in the parameter E_T_DATA. Data output is unstructured, since the function module RSAR_ODS_API_GET works generically, and therefore does not recognize the specific structure of the PSA. You can find information on the field in the PSA table using the parameter E_T_RSFIELDTXT."
    unfortunately I when running de report bellow, I get a dump which says:
    Function parameter "E_DATA" is unknown
    in the definition of the interface E_DATA has no type, which  means it can recive any table type, right?
    So I have two questions?
    1) How to get the code working
    2) How do I use the parameter E_T_RSFIELDTXT to parse the data returned in E_DATA
    by debuging RSSM_API_REQUEST_GET for this code I found it try to put an internal table with the struct of the database table /BIC/B0000151000 in E_DATA
    Thanks a lot for any help
    rgds
    my test report is:
    REPORT  ZTEST_PSA_API.
    TABLES: /BIC/B0000151000 .
    TYPE-POOLS: RSSM.
    TYPES: BEGIN OF STC_REQ_LINE,
      sign(1),
             option(2),
             low  TYPE rsa_request,
             high TYPE rsa_request,
             END OF STC_REQ_LINE,
      IT_REQUEST TYPE STC_REQ_LINE OCCURS 0.
    DATA: lit_request TYPE RSSM_T_API_REQUEST_GET WITH HEADER LINE,
          lc_system TYPE RSSM_T_API_LOGSYS,
          lit_request1 TYPE IT_REQUEST WITH HEADER LINE.
    DATA: lc_dtarget_name TYPE RSA_ODSNAME,
          lit_meta_data TYPE RSARC_T_RSFIELDTXT.
    DATA: lt_psa_data LIKE /BIC/B0000151000 OCCURS 0.
    CALL FUNCTION 'RSSM_API_REQUEST_GET'
      EXPORTING
        I_SOURCE    = '2LIS_13_VDITM'
        I_TYP       = 'D'
        I_DATEFROM  = '20060627'
      IMPORTING
        E_T_REQUEST = lit_request[]
        E_T_LOGSYS  = lc_system
        EXCEPTIONS  = 1.
    READ TABLE lit_request.
    lit_request1-sign = 'I'.
    lit_request1-option = 'EQ'.
    lit_request1-low = lit_request-request .
    APPEND lit_request1 .
    break-point .
    CALL FUNCTION 'RSAR_ODS_API_GET'
      EXPORTING
        I_T_REQUEST = lit_request1[]
      IMPORTING
        E_ODSNAME = lc_dtarget_name
        E_T_RSFIELDTXT = lit_meta_data
      TABLES
        E_DATA = lt_psa_data
      EXCEPTIONS
        NO_DATA_FOUND = 1
        PARAMETER_FAILURE = 2
        REQUEST_NOT_AVAILABLE = 3
        NO_REQUEST_FOUND = 4
        NO_FIELDS_TO_ODS = 5
        NO_ODS_FOUND = 6
        PACKAGE_LOCKED_BY_LOADING = 7 .

    Try to pass table parameter without "[]" :
    CALL FUNCTION 'RSAR_ODS_API_GET'
    EXPORTING
    I_T_REQUEST = lit_request1
    IMPORTING
    E_ODSNAME = lc_dtarget_name
    E_T_RSFIELDTXT = lit_meta_data
    TABLES
    E_DATA = lt_psa_data

  • Generic table structure

    Hi all,
    I am creating a FM which will have an input field as a table name and structures to the corresponding table. So is there any generic structure available in the DDIC that can be used as a base for the fields coming in.
    If not available what should i consider while creating a structure for the same.
    Regards,
    Stock

    I intend to have an IMPORT parameters as
    TABLE -->          any DB table  (dynamic as per requirement)
    WA_STRUCT---> a single record entry with all the columns for the above table
    Can we specify the same in the importing section and have the same functionality as in tables section.
    IMPORT
    wa_struct
    without the type and associated type.
    Regds,
    Stock

  • Problem with generic table in tableview

    Hi,
    I need a generic editable table in my tableview. I coded the page as shown below. Displaying the data works fine but after editing, the modifications are not present in my variable model->table. It seems that my reference is lost.
    How can I solve this problem
      field-symbols: <tab> type table.
      assign model->table->* to <tab>.
      if <tab> is assigned.
    %>
    <htmlb:tableView id              = "itab"
                      selectionMode   = "LINEEDIT"
                      table           = "<%= <tab> %>"
                      columnDefinitions  = "<%= model->controltab %>"
                      filter          = "SERVER"
                      selectedRowIndex = "<%= model->selected_row %>"
                      onRowSelection  = "row_select"
                      sort            = "SERVER"
                      columnHeaderVisible = "TRUE"
                      visibleRowCount = "<%= model->ROW_COUNT %>"
                      iterator = "<%= iterator %>"     />

    i guess somewhere (may be in oninputprocessing) you need to get the ref of <tab> to your model table .
    <b> get reference of <tab> into model->table-> .</b>
    i never tried anything like this, but i suggest you to try this.
    Regards
    Raja

  • Collating PDFs with similar table structure into one excel / text file

    Hi, I'm using Adobe Acrobat X v10.1.1.  I have multiple PDFs which aswell as containing pictures, contain the same table of data in each one.  This is in the same format in each one and I want to extract each table's data and collate into one text file(This is a small table of data, 3 x 3).  I explored the option of exporting FDF data and then using a 3rd party tool to convert all into an excel file, however, the forms option in my tools menu won't expand.  I am possible making this more difficult for myself than is necessary.  Has anyone attempted something similar before and what would recommendations of approach be?
    Thanks for any help.
    Al.

    use logical database SDF, nodes ska1 and  skc1c
    A.

  • Popup with generic ALV to display all fields of a structure

    Hello WebDynpro Experts,
    I have developed a WebDynpro application using an ALV control to display all the search results in a table.
    The number of columns shown in this table is reduced by a default view, that is preset for all users.
    In the SAP GUI there is a standard feature to show all the details of a record in a pop up window.
    E.g. in WE02 you see a few fields in the ALV table, and when you click on the details button, you get a popup with all the fields of the selected line.
    Is there something similar in the ALV table for WebDynpro?
    I want to show all the fields of the selected structure in a generic table with two columns: Field label and value.
    Can anybody help?
    Regards,
    Jürgen

    Hello Jurgen,
                    When you select a particular row in ALV table, you can get the data in that row by using ONLEADSELECT
            method from used component(SALV_WD_TABLE).
                   And i Guess you can get all the field names of that structure from DD03L table and you can display them
            in a generic table.
        Regards,
        Harry

  • Question about reading generic tables with keys

    Hello
    I'm wondering if it's possible to read a generic table with key statement:
    FIELD-SYMBOLS:
        <lv_key>         TYPE zconf_key,
        <lt_data_bi>     TYPE INDEX TABLE,
        <lt_data_ai>     TYPE INDEX TABLE,
        <ls_data_bi>     TYPE any,
        <ls_data_ai>     TYPE any.
    * create data types
      CREATE DATA lt_data_bi TYPE (ls_node-data_table_type).
      ASSIGN lt_data_bi->* TO <lt_data_bi>.
      CREATE DATA lt_data_ai TYPE (ls_node-data_table_type).
      ASSIGN lt_data_ai->* TO <lt_data_ai>.
    * do check
      LOOP AT <lt_data_ai> ASSIGNING <ls_data_ai>.
        ASSIGN COMPONENT 'KEY' OF STRUCTURE <ls_data_ai> TO <lv_key>.
        READ TABLE <lt_data_bi> WITH KEY key = <lv_key>
        ASSIGNING <ls_data_bi> BINARY SEARCH.
    I receive the message: "The specified type has no structure and therefore no component called KEY" in the read statement above.
    Does anyone has an idea what I can do here?
    Regards,
      Mathias

    Mathias Glockner wrote:
    >     READ TABLE <lt_data_bi> WITH KEY key = <lv_key>
    In your structure ls_data_bi there is no field called KEY . please check whether you have field KEY in structure
    a®s

  • How to create a table with just its structure in Access 2013?

    I have a front-end and back-end Access 2013 database. I want to send it to an MS Access development company. I cannot send it with any data because it has our members social security numbers and other personal identification data. In MS Access 2003
    I could save a table with just its structure.
    How do I save a table with just its structure? I want to learn how to do this.
    Thanks for the help.
    Robert

    On the Create tab of the ribbon, click Table Design.
    This opens the table design window, in which you can define fields and indexes without entering any data. Don't forget to save the design when you're done.
    Regards, Hans Vogelaar (http://www.eileenslounge.com)

  • Import from database an internal table with generic Type : Web Dynpro ABAP

    Hi everyone,
    i have a requirement in which i'm asked to transfer data flow between two frameworks, from WD Component to another. The problem is that i have to transfer internal tables with generic types. i used the import/ export from database approache but in that way i get an error message saying "Object references and data references not yet supported".
    Here is my code to extract a generic internal table from memory.
        DATA l_table_f4 TYPE TABLE OF REF TO data.
      FIELD-SYMBOLS: <l_table_f4> TYPE STANDARD TABLE.
      DATA lo_componentcontroller TYPE REF TO ig_componentcontroller .
      DATA: ls_indx TYPE indx.
      lo_componentcontroller =   wd_this->get_componentcontroller_ctr( ).
      lo_componentcontroller->fire_vh_search_action_evt( ).
      ASSIGN l_table_f4 TO <l_table_f4>.
    *-- Import table for Help F4
      IMPORT l_table_f4 TO <l_table_f4> FROM DATABASE indx(v1) TO ls_indx ID 'table_help_f4_ID'.
    The error message is desplayed when last instruction is executed " IMPORT l_table_f4...".
    I saw another post facing the same problem but never solved "Generic Type for import Database".
    Please can anyone help ?
    Thanks & Kind regards.

    hi KIan,
    go:
    general type
    TYPE : BEGIN OF ty_itab,
               field1 TYPE ztab-field1,
               field2 TYPE ztab-field2,
    *your own fields here:
               field TYPE i,
               field(30) TYPE c,
               END OF ty_itab.
    work area
    DATA : gw_itab TYPE ty_itab.
    internal table
    DATA : gt_itab TYPE TABLE OF ty_itab.
    hope this helps
    ec

  • How to create an internal table with a types structure?

    Hi experts,
    I've 3 internal tables with the same structure, I think I could put a type structure and put that type inside the body of the internal data, is this possible? If true, how can I put that?
    Example:
    TYPES: Begin of type_s,
                   pernr like pa0001-pernr,
                 end of type_s.
    Data: begin of itab_1 occurs 0,
    ¿¿¿??? reference to type_s
             end of itab_1.
    Thanks a lot,
    Regards,
    Rebeca

    Hi,
    Use like this..
    DATA: Begin of type_s,
    pernr like pa0001-pernr,
    end of type_s.
    DATA: BEGIN OF ITAB_1 OCCURS 0.
    INCLUDE STRUCTURE type_s.
    DATA: END OF ITAB_1.
    Otherwise like this.
    types: Begin of type_s,
    pernr like pa0001-pernr,
    end of type_s.
    Data: itab_1 type standard table of type_s.
    Note: You have to create work area explicitly.
    Like this
    data wa like itab1.
    Edited by: Velangini Showry Maria Kumar Bandanadham on May 26, 2009 1:04 PM

  • How to write export dump commad with no datable data only table structure.

    How to write export dump commad with no datable data only table structure will there and command for hole schma.
    e.g. export dump command for scott schema and all table within scott schema in it no table data should be exported.

    If I understand the question, it sounds like you just need to add the flag "ROWS=N" to your export command (I assume that you're talking about the old export utility, not the Data Pump version).
    Justin

  • Can I join Structure with Z table ?

    Can I join Structure with Z table?
    If yes...plz explain me with an example.
    PLease provide me with an example to join a structure with a Ztable...
    Any help would be appreciated...
    Regards,
    Krishna Chaitanya

    Hi Chitanya,
      It is possible to add fields in the form of structure to a Z table.it can be done in the form of Include or Append structure.There are no other ways to join structure to the table upto my knowledge.
    if it useful, reward points.
    Thank u,
    Prasad G.V.K

  • Copy the structure of a table to another with another table name.

    how to copy the structure of a table to another with another table name.
    ie. i want a emp table with same values/structure to be copied to another table called my_employee.
    how can this be done?

    create table my_emp as select * from emp;
    If you do not want the data to be copied then do the following:
    create table my_emp as select * from emp
    where 1=2;
    Avanti.

  • Generic method invocations with explicit type parameters

    If I interpret the JSR14 public draft spec (June 23, 2003) section 5.6 correctly the following method invocations with explicit type parameters should compile: package generics;
    public class G121 {
      void f() {
        this.<String>f2();
        <String>f2(); // compilation error
        <String>f3(); // compilation error
      <T> void f2() {
      static <T> void f3() {
    }but the class does not compile: jc -J-showversion generics\G121.javajava version "1.5.0-beta"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta-b32c)
    Java HotSpot(TM) Client VM (build 1.5.0-beta-b32c, mixed mode)
    generics\G121.java:6: illegal start of expression
        <String>f2(); // compilation error
                ^
    generics\G121.java:8: illegal start of expression
        <String>f3(); // compilation error
                ^
    2 errors
    >A bug or do I miss something?

    I get this error:
    LineCount.java:104: cannot find symbol
    symbol : method <java.io.File>sort(java.util.List<java.io.File>)
    location: class java.util.Collections
    Collections.<File>sort( list );
    ^
    1 errorYou don't need the explicit type argument there, but anyway...
    If you look at the docs for Collections.sort(List<T> list) you'll see it is declared as:
    static <T extends Comparable<? super T>> void Collections.sort(List<T> list) Unfortunately, although File implements Comparable, it doesn't actually implement Comparable<File> or even Comparable<Object>, so I guess it can't satisfy the bound.
    You can get it to compile by removing the explicit type argument and casting to the raw type List, but that's not very nice.
    This seems like an oversight to me - File already has both int compareTo(Object o) and int compareTo(File pathname) so I don't see why it can't implement Comparable<File>. This isn't the only such case in the API though, so maybe I'm missing something.
    Mark

Maybe you are looking for

  • Converting I-tunes 6.0 M4p files to mp3

    I have a number of files that have been downloaded from I-tunes 6 that will not play in my Dj CD players. My CD players play Mp3 files but not the newer AAC files from I-tunes 6. Is there a program or a way to convert the file, by keeping the file on

  • WebDynpro Abap test failed (System admin/suport)

    Hello, I'm using EP 7.0 and I'm trying to test travel&expenses (Ehp3) WD for Abap from System Admin/Support Desk: Integration of SAP Applications/WebDynpro and we get the following error: Exception in SAP Application Integrator occured: Unable to par

  • Blury video issue

    Before I had the proper underwater case for my GoPro Hero 2 I shot some video which turned out rather blury.  I'm new to video editing and using Premier Elements 10.  Any advice on which effect to use or other tool to improve video quality?  Thanks f

  • Startrfc & RFC Server Groups

    Good day. I was curious if there was a command line tool, similar to startrfc, that would leverage the <i><b>RFC Server Groups</b></i> (RZ12) as opposed to the <i><b>Logon Groups</b></i> (SMLG). We currently have 2000 iDocs to post at once and are bo

  • How to send TR to partner system

    Dear all, i want to  send system-created TR for production order as a workload overview in partner system, how to achieve that? Thanks in advance. Victoria