Create Structure with dynamical Table-Type

Hi experts,
is there a possibility, to create a structure via SE11 and including there a field which referes to a dynamic table-type.
So that I can append to this structure-field all different table-types?
for example: ones I append MARA[] and ones AFKO[]
Thx for help

Hi Christian,
There's not predefined generic type to do that, but you could create your own field type (deep structure) which would be able to keep table lines after transposition (90 degree flip) where in example it would have four columns: Table type, row id(index) field name, value. That way you could store ANY table row you need... This will not come cheap and will involve some work of course.
You may want have a look at standard ABAP services RRTS and RTTI (see classes and structures used in attributes an parameters) - these are two services for handling data types and metadata related operations during runtime. You may want to use them for flipping your table entries to the tabular form and so on. You may also find some ideas there on how to compose your own data type for your purposes.
Good luck!
Marcin

Similar Messages

  • Se11 structure with se11 table type included

    Hi ABAP Gurus,
    in order to pass a complex datastructure by RFC I want to create a new structure via SE11 which includes in addition to some normal fields an field which represents a table of a certain type. Therefore I created a table type and tried to include that in the structure definition but without success. Any ideas of how I can create such a 'non-flat' structure in the ABAP dictionary ?
    I know that such a thing can be declared as a type in ABAP, but I'm not sure if I can do it in the dictionary.
    Any reply is very appreciated,
    Best regards, Philipp

    Hi,
    You can insert structure into the table, and vice versa is not possible.
    If you want to insert structure GO to Se11 -> provide table name -> chnage/create -> edit -> include -> insert -> provide the strcuture you want to include.
    Thanks,
    Sriram Ponna.

  • Dynamic ALV: but with globally available dynamic table type

    Hello,
    I would like to create a dynamic node for a ALV and dynamic table types to fill and the ALV.
    The ALV data can be changed so I need to read it again.
    I have read all the threads about dynamic node create and i have no problem with it. I can create a structure and a table dynamically. thats also no issue for me.
    But. I fill the ALV data in a method and read it in another method to save the changes in a data base table.
    Thats also no problem
    So where i need your help? I currently create the dynamic table and structure in both methods. That works, but why do the same thing twice?
    I cant figure out by myself how to create a dynamic table/structure in a global way, so the dynamic table/structure is created once and then available in the whole WD4A view.
    I tried is with a class type in se24 with reference to CL_ABAP_STRUCTDESCR but I cant make that run, because to access the type I created an attribute in se24 with reference to the class type that I now try in instance and fill in the method. But ABAP thinks that my attribute is not compatible anymore.
    Any idea how to make a dynamic table globally available? That must be an ABAP god who can answer this question, hehe. So imagin me falling on my knees for the one who has an answer that really works
    Kind regards,
    Hendrik

    This doesn't seem too difficult really. For a dynamic table you just need to declare the internal table as TYPE REF TO DATA.
    Just more this declaration to the attributes of your Component Controller. So for instance in my component controller I have an attribute called i_data with the RefTo column checked and the associated type = DATA.
    So now I could do the following:
      create data wd_this->idata type table of (tablename).
    Or however you are dynamically creating the table - maybe with TYPE HANDLE instead.
    The point is that your dynamic table is now global to your entire component and you can read and write to it from different methods.
    Is this what you were looking for?  Without knowing more about your existing coding, it is difficult to say more.

  • Syntax error when creating a user-defined table type in SQL Server 2012

    Why am I getting a syntax error when creating a user-defined table type in SQL Server 2014?
    CREATE TYPE ReportsTableType AS TABLE 
    ( reportId INT
    , questionId INT
    , questionOrder INT );
    Results:
    Msg 156, Level 15, State 1, Line 1
    Incorrect syntax near the keyword 'AS'.

    Hope these posts could help, 
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/37a45a9a-ed8c-4655-be93-f6e6d5ef44be/getting-incorrect-syntax-while-creating-a-table-type-in-sql-server-2008-r2?forum=transactsql
    Regards, Dineshkumar,
    Please Mark as Answer if my post answers your question and
    Vote as Helpful if it helps you

  • 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

  • How to create a table less structure with dynamic menu module

    Hi guys,
    I am using dynamic menu module for creating a main menu for http://firstsite08.businesscatalyst.com/
    but it is generating table structure. What changes to do i had to make to generate a table less structure from dynamic menu module.

    Hi Andy,
    When you create a Menu, the option dropdown for the menu has Default, but under that you will see HTML CSS Only option which creates a ul li structure.
    For the Menu Module options you can find more information from the knowledgebase: http://kb.worldsecuresystems.com/134/bc_1345.html?bc-partner#main_Menu_Modules
    If you would like to use the version 2 menu module you can find a bit of a guide I wrote here: http://forums.adobe.com/docs/DOC-1903

  • Structure of Dynamic Table in Function Module

    Hi,
    I'm trying to find a way to get as OUTPUT a dynamic Table from a Function Module.
    I declared a table called T_DATA without a type.
    And this table should have a dynamic table back.
    The problem that I get the data back but, I only found a data without any field-elements.
    The data is there but there's no structure, no table.
    Is there any way that I can send the Data in a proper structure?

    Hi
       Try using the following code
    type-pools:slis.
    data:it_fcat type lvc_t_fcat,
         wa_fcat type lvc_s_fcat,
         itab type ref to data.
    data:it_fcat1 type slis_t_fieldcat_alv,
         wa_fcat1 like line of it_fcat1.
    data:cl_tab type ref to cl_alv_table_create,
         wa_ref type ref to data.
    field-symbols:<itab> type table,
                  <wa> type any,
                  <comp>.
    create object cl_tab.
    refresh:it_fcat.
    wa_fcat-fieldname = 'NAME'.
    wa_fcat-inttype  = 'C'.
    wa_fcat-intlen = '10'.
    wa_fcat1-fieldname = 'NAME'.
    wa_fcat1-inttype  = 'C'.
    wa_fcat1-intlen = '10'.
    append wa_fcat to it_fcat.
    append wa_fcat1 to it_fcat1.
    wa_fcat-fieldname = 'NAME2'.
    wa_fcat-datatype  = 'CHAR10'.
    wa_fcat1-fieldname = 'NAME2'.
    wa_fcat1-datatype  = 'CHAR10'.
    append wa_fcat to it_fcat.
    append wa_fcat1 to it_fcat1.
    cl_alv_table_create=>create_dynamic_table(
      exporting
       I_STYLE_TABLE             = I_STYLE_TABLE
        it_fieldcatalog           = it_fcat
       I_LENGTH_IN_BYTE          = I_LENGTH_IN_BYTE
      importing
        ep_table                  = itab
       E_STYLE_FNAME             = E_STYLE_FNAME
    EXCEPTIONS
       GENERATE_SUBPOOL_DIR_FULL = 1
    if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
               WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    assign itab->* to <itab>.
    create data wa_ref like line of <itab>.
    assign wa_ref->* to <wa>.
    do.
      assign component 'NAME' of structure <wa> to <comp>.
      <comp> = 'AA'.
      unassign <comp>.
      assign component 'NAME2' of structure <wa> to <comp>.
      <comp> = 'AB'.
      insert <wa> into table <itab>.
      exit.
    enddo.
    call function 'REUSE_ALV_GRID_DISPLAY'
    exporting
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                = ' '
      I_BUFFER_ACTIVE                   = ' '
       i_callback_program                = sy-repid
      I_CALLBACK_PF_STATUS_SET          = ' '
      I_CALLBACK_USER_COMMAND           = ' '
      I_CALLBACK_TOP_OF_PAGE            = ' '
      I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  = I_STRUCTURE_NAME
      I_BACKGROUND_ID                   = ' '
      I_GRID_TITLE                      = I_GRID_TITLE
      I_GRID_SETTINGS                   = I_GRID_SETTINGS
      IS_LAYOUT                         = IS_LAYOUT
       it_fieldcat                       = it_fcat1
      IT_EXCLUDING                      = IT_EXCLUDING
      IT_SPECIAL_GROUPS                 = IT_SPECIAL_GROUPS
      IT_SORT                           = IT_SORT
      IT_FILTER                         = IT_FILTER
      IS_SEL_HIDE                       = IS_SEL_HIDE
      I_DEFAULT                         = 'X'
      I_SAVE                            = ' '
      IS_VARIANT                        = IS_VARIANT
      IT_EVENTS                         = IT_EVENTS
      IT_EVENT_EXIT                     = IT_EVENT_EXIT
      IS_PRINT                          = IS_PRINT
      IS_REPREP_ID                      = IS_REPREP_ID
      I_SCREEN_START_COLUMN             = 0
      I_SCREEN_START_LINE               = 0
      I_SCREEN_END_COLUMN               = 0
      I_SCREEN_END_LINE                 = 0
      I_HTML_HEIGHT_TOP                 = 0
      I_HTML_HEIGHT_END                 = 0
      IT_ALV_GRAPHICS                   = IT_ALV_GRAPHICS
      IT_HYPERLINK                      = IT_HYPERLINK
      IT_ADD_FIELDCAT                   = IT_ADD_FIELDCAT
      IT_EXCEPT_QINFO                   = IT_EXCEPT_QINFO
      IR_SALV_FULLSCREEN_ADAPTER        = IR_SALV_FULLSCREEN_ADAPTER
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           = E_EXIT_CAUSED_BY_CALLER
      ES_EXIT_CAUSED_BY_USER            = ES_EXIT_CAUSED_BY_USER
      tables
        t_outtab                          = <itab>
    EXCEPTIONS
      PROGRAM_ERROR                     = 1
    Regards

  • WD4A Dynamic ALV Table with dynamic tables

    Hi all,
    first I want give you the information what I try to do.
    I have an another WD4A application for administrative use in which I can assign certain tablefields to a certain user. You can say it's something like a customizing application.
    In the next application (with my issues) I will display the tables for the user, but these tables are not the complete table.
    I have a node in my context of the component controller which is bound to my ALV. I add during the runtime attributes to my node.
    * .... coding ....declaration
    * get the node
      lr_node = wd_context->get_child_node( 'M_TABLE' ).
      lr_node_info ?= lr_node->get_node_info( ).
    * remove the attributes, if exists
      lr_node_info->remove_dynamic_attributes( ).
    * .... coding ....
    *   add attributes
        LOOP AT l_t_m_table INTO l_s_m_table.
          CLEAR ls_attribute.
    *     name of the attribute
          MOVE l_s_m_table-NAME TO ls_attribute-NAME.
    *     DDIC type of the attribute
          MOVE l_s_m_table-TYPE_NAME TO ls_attribute-TYPE_NAME.
    *     If the DDIC has a gen namespace like /B135/ replace the / with _
          REPLACE ALL OCCURRENCES OF '/' IN ls_attribute-NAME WITH '_'.
    *     add the attribute
          lr_node_info->add_attribute( EXPORTING
                                         attribute_info = ls_attribute ).
        ENDLOOP.
    This coding works fine I get the columns in my ALV. Then I tried to fill my ALV table with data from a database table.
    I created dynamicly an internal table with the following coding:
    *   Create dynamic table
        CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE
          EXPORTING
            IT_FIELDCATALOG = l_t_FLDCAT
          IMPORTING
            EP_TABLE = l_t_NEW_M_TABLE.
    *   assign the table
        ASSIGN l_t_NEW_M_TABLE->* TO <M_TABLE>.
    *   structure of table
        CREATE DATA l_s_NEW_M_TABLE LIKE LINE OF <M_TABLE>.
        ASSIGN l_s_NEW_M_TABLE->* TO <l_s_m_table>.
    * get data from database
    SELECT * FROM (l_m_table) INTO CORRESPONDING FIELDS OF TABLE <M_table> WHERE OBJVERS = 'A'.
    With this coding I get the data from the database and only the required fields that means I have e.g. an itab with columns1, columns3, columns4 from the database.
    I also added e.g. these columns  (columns1, columns3, columns4 from the database) to the node as attribute. Now it should be possible to bind the table to the structure with this coding:
    lr_comp_usage_m = wd_this->wd_cpuse_usage_alv_M_table( ).
    *   create component if not active
        IF lr_comp_usage_m->has_active_component( ) IS INITIAL.
          lr_comp_usage_m->create_component( ).
        else.
    * set data if node exists
          l_ref_interfacecontroller = wd_this->wd_cpifc_usage_alv_M_table( ).
          l_ref_interfacecontroller->set_data( lr_node ).
        endif.
    *   bind table
        lr_node->bind_table( <M_TABLE> ).
    Now, I get an error, which is caused by the table binding.
    In ST22 I get:
    Short text
        Line types of an internal table and a work area not compatible.
    What happened?
        Error in the ABAP Application Program
        The current ABAP program "CL_WDR_CONTEXT_NODE_VAL=======CP" had to be
         terminated because it has
        come across a statement that unfortunately cannot be executed.
    Error analysis
        The statement
           "INSERT wa INTO TABLE itab"
        requires the lines of the internal table "TABLE" and the
        work area " wa" to be compatible. Compatibility means
        equivalence in the context of ABAP/4 type checking.
        In this case, the condition is not satisfied because the internal table
        "TABLE" has the line type "u" and the length 28, but the work area " wa"
        has the type "C" and the length 2.
        (If the work area " wa" is the header line of the internal
        table "TABLE", the above inconsistency can arise if an internal
        table t with the line type T1 is passed to a subroutine (FORM or
        FUNCTION) as an actual parameter and the corresponding formal
        parameter p is declared in the subroutine by "TABLES p STRUCTURE T2".
        If then T1 and T2 are incompatible, the header line p
        has the type T2 (specifed by STRUCTURE), but the internal
        table p has the line type T1 (passed from the actual parameter)).
    Source Code Extract
    Line  SourceCde
        1 method if_wd_context_node~get_static_attributes_table .
        2
        3   field-symbols:
        4     <element> like line of me->collection,
        5     <static_attributes> type data,
        6     <table> type index table.
        7
        8 * check whether elements are supllied or not
        9   if me->elements_supplied = abap_false.
       10     me->supply_elements( ).
       11   endif.
       12
       13   clear table.
       14
       15   if me->table_ref is not initial.
       16     assign me->table_ref->* to <table>.
       17     table = <table>.
       18   else.
       19     loop at me->collection assigning <element> from from to to.
       20       assign <element>->static_attributes->* to <static_attributes>.
    error in line 21       insert <static_attributes> into table table.
       22     endloop.
       23   endif.
       24
       25 endmethod.
    Any suggestions? Is it allowed to use bind_table() with a field symbol?
    Another strange thing is that if I try the same with static itab and attributes during runtime it works, but only if the fields of the itab has the same name as the attributes, which means that I can not use itabs with fieldnames like /BI0/S_CUSTOMER and if I can not use them it's difficult to read data from database with SELECT * FROM ... INTO CORRESPONDING FIELDS OF TABLE itab.
    Thanks in advance for your suggestions!
    Best Regards,
    Marcel

    Hi Francois,
    I solve it with the RTTI and the method    
    lr_node_info = lr_node_info->add_new_child_node(
                          name = 'Dynamic_TABLE'
                          IS_MANDATORY = ABAP_false
                          IS_MULTIPLE = ABAP_true
                          STATIC_ELEMENT_RTTI = lr_struct_descr
                          IS_STATIC = ABAP_false
    I don't know why it doesn't work with adding attributes and binding the table after adding the attributes.
    Anyway thanks for your help.
    Best Regards,
    Marcel

  • Function Modue with Dynamic Table as output parameter

    Hi experts,
    i have function (below) which reads "dynamically" data from table which is specify as input parameter, the data are "saved" in <ft>.
    How can i return <ft> as output parameter of function module (table) ?
    function
    import parameter  - > IC_TABLE
    source code
    data :   lt_OPTIONS   type standard table of RFC_DB_OPT,
             lt_fields    type standard table of rfc_db_fld,
             lt_data      type standard table of tab512,
             la_rfcdata   type tab512,
             la_rfcfields type rfc_db_fld,
             lr_dref      type ref to data.
    field-symbols: <ft>         type table.
    field-symbols: <structure>  type any.
    field-symbols: <field_to>   type any.
    field-symbols: <field_from> type any.
    CALL FUNCTION 'RFC_READ_TABLE'
      EXPORTING
        query_table                = IC_TABLE
      DELIMITER                  = ' '
      NO_DATA                    = ' '
      ROWSKIPS                   = 0
      ROWCOUNT                   = 0
      tables
        OPTIONS                    = lt_OPTIONS
        fields                     = lt_fields
        data                       = lt_data
    EXCEPTIONS
       TABLE_NOT_AVAILABLE        = 1
       TABLE_WITHOUT_DATA         = 2
       OPTION_NOT_VALID           = 3
       FIELD_NOT_VALID            = 4
       NOT_AUTHORIZED             = 5
       DATA_BUFFER_EXCEEDED       = 6
       OTHERS                     = 7.
      create data lr_dref type table of (ic_table).
      assign lr_dref->* to <ft>.
    Fill data from OLTP table into ct_table.
      assign local copy of initial line of <ft> to <structure>.
      loop at lt_data into la_rfcdata.
        loop at lt_fields into la_rfcfields.
          assign component sy-tabix of structure <structure> to <field_to>.
          if sy-subrc is initial.
            assign la_rfcdata+la_rfcfields-offset(la_rfcfields-length)
              to <field_from>.
            <field_to> = <field_from>.
          endif.
        endloop.
        append <structure> to <ft>.
      endloop.
    Thanks in advance
    Martin

    Hi Martin,
    parameters with generic types are not allowed. So TYPE ANY TABLE etc. will not work. As Alex alreads said, you could return a reference to your table.
    Your parameter should be typed like:
    re_table type ref to data.
    At the end of your function module get a reference of your table into your parameter:
    get reference of <ft> into re_table
    After the call of your function module you can now handle and work with your table as wished:
    * Declaration
    data: re_table type ref to data.
    field-symbols: <my_table> type standard table.
    * Assign reference to fieldsymbol
    assign re_table->* to <my_table>
    if sy-subrc NE 0.
    " Error: Could not assign reference
    endif.
    Best regards,
    Fabian

  • Livecycle userform with dynamic table

    Hi Everyone,
    New to Livecycle Designer and was hoping this is possible - Can you have a PDF userform with a dynamic table below it?...
    Basically the user fills out a userform then clicks an ADD button - this populates a dynamic table below the userform then clears/resets the userform - as the records fill the table an EDIT button appears in the last column so that if the user makes an error with a record they could click the EDIT button, this would bring the record back into the userform fields so they could change the field(s) they made the error in then a SAVE button would replace the ADD button in this instance, clicking SAVE then changes the record and clears/resets the userform ready for more entries.
    At the bottom of the PDF there would be an EXPORT button which attaches the table as a csv or tab-delimited text file to an email message...
    If someone could point me in the right direction it would be appreciated - I have googled and searched the forums for an answer but they mostly relate to importing data into a dynamic table from a database or xml file... I was hoping to directly populate the table with the userform.
    I also have a PDF example which illustrates what I am trying to achieve... but seems you cannot attach to a post... I can email it if someone has a solution, but needs to see it visually.
    Cheers

    You don't know the names of your columns? hmm you do, because before you created dynamic table you had to create field catalog, so the structure and column names of newly (dynamically) created table will be the same like defined in the field catalog.
    The last loop also does not look good, in my opinion should be something like:
    LOOP AT lt_datatable +(my first table)+ ASSIGNING <ls_data4>.
        AT NEW pernr.
          APPEND initial line to <fs_1> assigning <fs_2>.
          <fs_2>-pernr = <ls_data4>-pernr.
        ENDAT.
        ASSIGN COMPONENT <ls_data4>-wage_type OF STRUCTURE <fs_2> TO <fs_5>.
        <fs_5> = <ls_data4>-amount.
    ENDLOOP.
    also keep in mind that number of calls of method cl_alv_table_create=>create_dynamic_table is limited to 36 (?) calls within one program session because it uses dynamic subroutine pool behind so you will have short dump if you will execute that 37 times.

  • Manipulate Layout on ALV Grid with dynamic table

    Dear all
    i'm generating a dynamic table depending of a date selection. That means that I show columns for weeks and the quantity of weeky migh change.
    Now the users wants to have a specific layout of the ALV grid with totals. When he saves the layout, only the weeks at this selection will show the next time he runs the programm with a larger selection.
    a) Is it possible to modify the layout during runtime by programming?
    b) Do you have any other ideas how to solve this problem?
    Thank you

    You don't know the names of your columns? hmm you do, because before you created dynamic table you had to create field catalog, so the structure and column names of newly (dynamically) created table will be the same like defined in the field catalog.
    The last loop also does not look good, in my opinion should be something like:
    LOOP AT lt_datatable +(my first table)+ ASSIGNING <ls_data4>.
        AT NEW pernr.
          APPEND initial line to <fs_1> assigning <fs_2>.
          <fs_2>-pernr = <ls_data4>-pernr.
        ENDAT.
        ASSIGN COMPONENT <ls_data4>-wage_type OF STRUCTURE <fs_2> TO <fs_5>.
        <fs_5> = <ls_data4>-amount.
    ENDLOOP.
    also keep in mind that number of calls of method cl_alv_table_create=>create_dynamic_table is limited to 36 (?) calls within one program session because it uses dynamic subroutine pool behind so you will have short dump if you will execute that 37 times.

  • Issue with dynamic table which has RichCommandLink and RichSparkChart

    I’m running into an issue when I create a dynamic table with columns of type RichCommandLink and RichSparkChart.
    If my table has both of these types of columns, then the RichCommandLink column behaves like a NOP, meaning clicking on it does not cause the link to take effect and does not navigate to the designated page.
    If I remove the RichSparkChart column, then the RichCommandLink column behaves properly.
    Is there something I’m supposed to be aware of when creating these types of columns? Is there a known problem with RichSparkChart column, like some exception thrown which halts proper rendering of the rest of the columns?
    Thanks,
    Ania.

    Turned out that the problem was with ids which I was dynamically assigning. There was an overlap meaning two columns/elements got the same id. Not the manifestation or behavior I would expect as a result, but once I fixed that, having these two columns side by side works well.

  • Create structure in Dynamic ALV for color and editing cells

    Hi experts,
    I created dynamic ALV . in this i want coloring and editing of cells.
    this can be done by strucutture lvc_t_scol, lvc_t_styl.
    My problem is how to create structure in field catalogue of Dynamic ALV.
    Thanks

    Hello
    I am not sure if you have missed the following part of the coding:
    " Add table type (LVC_T_STYL) as field to structure ==> complex structure
      CLEAR: gs_comp.
      gs_comp-type ?= cl_abap_typedescr=>describe_by_data( celltab ).
      gs_comp-name  = 'CELLTAB'.
      APPEND gs_comp TO gt_components.
      go_sdescr  = cl_abap_structdescr=>create( gt_components ).
      go_tdescr  = cl_abap_tabledescr=>create( go_sdescr ).
      CREATE DATA gdo_handle TYPE HANDLE go_tdescr.
      ASSIGN gdo_handle->* TO <gt_itab>.
    This is exactly your requirement.
    Regards
      Uwe

  • Dynamic table type

    Hi folks,
    Is there any generic data type for table declaration, beside :
    data: lt_generic type table of data 
    I know that field-symbols can have the generic table type any
    field-symbols: <lft_generic> type any table. 
    I basically want to be able to read from generic tables.
    READ TABLE lt_generic .... 
    Thanks
    Andreas

    Hi Neil,
    actually i want to execute a read on the dynamic created tabel.
    Maybe this repot explains my purpose.
    REPORT  ztc_dqm_dynamic.
    * Step 1: << local definitions >>
    " << variables >>
    " << error string >>
    DATA: lv_error TYPE string.
    " << struc >>
    " << holds one component >>
    DATA: ls_component TYPE
          cl_abap_structdescr=>component.
    " << table >>
    DATA: lt_component TYPE cl_abap_structdescr=>component_table.
    DATA: lt_db_indexfields TYPE TABLE OF ztcc_dqm_indices.
    " << dynamic >>
    " << generated struc >>
    DATA: ls_dystruc TYPE REF TO data.
    " << generated table >>
    DATA: lt_dytable TYPE REF TO data.
    " << field symbols >>
    FIELD-SYMBOLS: <lfs_indexfields> TYPE ANY TABLE.
    FIELD-SYMBOLS: <lfs_indexfield> TYPE ANY.
    FIELD-SYMBOLS: <lfs_db_indexfields> TYPE ztcc_dqm_indices.
    " << objects >>
    DATA: lr_struc_type TYPE REF TO cl_abap_structdescr.
    DATA: lr_table_type TYPE REF TO cl_abap_tabledescr.
    " << exception >>
    DATA: lr_ex TYPE REF TO cx_sy_type_creation.
    * Step 2: << dynamic struc >>
    " << set struc fields >>
    SELECT *
      FROM ztcc_dqm_indices
        INTO TABLE lt_db_indexfields
          WHERE addr_type EQ 1
            ORDER BY index_order.
    " << get types >>
    LOOP AT lt_db_indexfields ASSIGNING <lfs_db_indexfields>.
      ls_component-name =
        <lfs_db_indexfields>-fieldname.
      ls_component-type ?=
         cl_abap_datadescr=>describe_by_name( <lfs_db_indexfields>-fieldtype ).
      APPEND ls_component TO lt_component.
    ENDLOOP.
    " << create struc >>
    TRY.
        CALL METHOD cl_abap_structdescr=>create
          EXPORTING
            p_components = lt_component
            p_strict     = abap_true
          RECEIVING
            p_result     = lr_struc_type.
      CATCH cx_sy_struct_creation INTO lr_ex.
        CALL METHOD lr_ex->if_message~get_text
          RECEIVING
            result = lv_error.
        WRITE: / lv_error.
    ENDTRY.
    " << create table >>
    TRY.
        CALL METHOD cl_abap_tabledescr=>create
          EXPORTING
            p_line_type        = lr_struc_type
    *        p_table_kind       = tablekind_std
    *        p_unique           = abap_false
    *        p_key              = p_key_kind
    *        keydefkind_default =
          RECEIVING
            p_result           = lr_table_type.
      CATCH cx_sy_table_creation INTO lr_ex.
        CALL METHOD lr_ex->if_message~get_text
          RECEIVING
            result = lv_error.
        WRITE: / lv_error.
    ENDTRY.
    " << create attributs >>
    CREATE DATA: ls_dystruc TYPE HANDLE lr_struc_type.
    CREATE DATA: lt_dytable TYPE HANDLE lr_table_type.
    * Step 3: << dynamic assignment >>
    ASSIGN lt_dytable->* TO <lfs_indexfields>.
    ASSIGN ls_dystruc->* TO <lfs_indexfield>.
    " << this works >>
    LOOP AT <lfs_indexfields> ASSIGNING <lfs_indexfield>.
    ENDLOOP.
    " << i want >>
    READ TABLE lt_dytable
      INTO ls_dystruc
        WITH KEY .....

  • Itextsharp using livecycle form with dynamic table

    Hello all, after searching Google for the past two days and not able to find any relevant information, hence this post.
    Some background:
    1) Created a pdf form using Adobe Livecycle designer 9.
    2) It is a dynamic form with textboxes and a table configured to repeat rows dynamically.
    3) Testing form using xml data within designer works just fine.
    Requirement:
    Need to populate form dynamically using data from database.
    Solution:
    Found iTextSharp (free assembly) which assists with populating existing pdf form.
    Issue
    This assembly works without any issue when populating textfields (see sample code below). The problem I am facing is with the dynamic table where in I am not able to reference rows greater than 1. Since the pdf template contains a table with just one row referencing the first row using acrofield works.
    I was under impression since this is a dynamic table with repeat enabled, in asp.net if I referenced row2 onwards the table would grow automatically. Which I have come to realize is not going to be possible.
    So I am looking for ideas on how I can accomplish this. I wish this could have been a fixed row table then reference rows would have been easier. However in this situation the table has to be dynamic.
    Any ideas thoughts would be appreciated.
    Below is my sample code:
    PdfStamper ps = null;
    try {
    // read existing PDF document
    PdfReader r = new PdfReader(
    // optimize memory usage
    new RandomAccessFileOrArray(Request.MapPath("itext.pdf")), null
    ps = new PdfStamper(r, Response.OutputStream);
    // retrieve properties of PDF form w/AcroFields object
    AcroFields af = ps.AcroFields;
    // fill in PDF fields by parameter:
    // 1. field name
    // 2. text to insert
    af.SetField("txtCompany", "Company name");
    af.SetField("txtDateDepartLocation", "date depart location");
    af.SetField("txtDate","test date");
    af.SetField("txtServiceNumber", "Service number");
    af.SetField("Table2.Row1.Cell1", "1test");  this works
    //doesnt work!!!
    af.SetField("Table2.Row2.Cell1", "1test");
    af.SetField("Table2.Row3.Cell1", "1test");
    // make resultant PDF read-only for end-user
    ps.FormFlattening = true;
    // forget to close() PdfStamper, you end up with
    // a corrupted file!
    ps.Close();
    catch { }
    finally { if (ps != null) ps.Close(); }

    Hi FourEyes;
    Try using this.
    Select Col1, Col2, Col3
    into :P1_Field1, :P1_Field2, :P1_Field3
    from Your_Table
    Where (your conditions);

Maybe you are looking for

  • Embed a view in a Tab

    Hi all, As I am new to WebDynpro,I have a doubt.Can anyone clarify this. I have a Home page which is having 1 tabstrip with 5 tabs. And I have a seperate view for Employee registration form. But I want to Embed this Employee reg Form to one of the ta

  • How to make BW closer to REALTIME?

    Hi gurus,    Our clients needs BW's data closer to R3's real time data. But the BW extraction has some mechanism like freeze time or safe time (I don't know how to say) that we can only extract R3's new data every 5-8 hours.    Anything we can do to

  • Framemaker link to Robohelp 8 generates umlaut in file names - How to remove?

    I'm linking translated German Framemaker files into Robohelp. The heading 1 and heading 2 topics in my Framemaker source files often contain umlauts in the words/phrases. Unfortunately, when linking to Robohelp 8, the umlauts appear in the topic file

  • Do CC users have access to current programs after cancelling a subscription? The FAQs suggests we do

    One Q&A in your FAQs has attracted my attention. ~~~~~ Do Creative Cloud members have access to previous versions of Creative Cloud apps? Yes. Creative Cloud paid members have access to a select set of archived versions of the desktop apps. Starting

  • IPhone hangs while syncing, iPhoto can't detect iPhone

    Hello, I am a first time poster (be gentle My iPhone has worked perfectly since August. Last week i plug in to sync. It appears in the sidebar of iTunes. I press sync. Starts with "backing up iPhone" dialogue then progress bar in iTunes stops. Same t