Skip to Content
author's profile photo
Former Member

BSP Element - Dynamic tableView with Internal Table

Once again 😊

I've created a new BSP Element and I have an Internal table of "Table Sizes"

* Type definitions
  TYPES: begin of mygrowthtab,
    name     type sumtabgrow-name,
    type     type sumtabgrow-type,
    size     type sumtabgrow-size,
    extents  type sumtabgrow-extents,
    dyn_siz  type sumtabgrow-dyn_siz,
    growth   type i,
  end of mygrowthtab,

  mygrowthtabtype type table of mygrowthtab.

* Data declaration
  DATA: MYGROWTH_TEMP TYPE MYGROWTHTAB.
  DATA: GROWTHTAB_COPY TYPE MYGROWTHTABTYPE.
  DATA: WGROWTHTAB_COPY TYPE MYGROWTHTAB.
  DATA: growtab TYPE TABLE OF SUMTABGROW.
  DATA: sizetab TYPE TABLE OF SUMTABGROW.
  DATA: wgrowtab TYPE SUMTABGROW.
  DATA: wsizetab TYPE SUMTABGROW.
  DATA: P1 TYPE P DECIMALS 0.

  CALL FUNCTION '/SDF/GET_DB_ORA_TABLES_GROWTH'
    DESTINATION rfcdest
    TABLES
      SUM_GROWTH_ALL    = growtab
      SUM_SIZE_ALL      = sizetab
    EXCEPTIONS
      WRONG_DATABASE    = 1
      NO_PERMISSION     = 2
      HISTORY_NOT_FOUND = 3.

* Concatenation of the output with the flux compensator
    data: table type ref to cl_htmlb_tableView.
    data: columns type ref to cl_htmlb_tableViewColumns.
    data: column type ref to cl_htmlb_tableViewColumn.

    table ?= cl_htmlb_tableView=>factory( id = 'dbsizetable'
                     width = '100%'
                     footerVisible = 'true'
                     fillUpEmptyRows = 'true'
                     table = sizetab
                     design = 'ALTERNATING'
                     sort = 'SERVER'
                     visibleRowCount = '10' ).

However I get the error ""SIZETAB" is not type-compatible with formal parameter "TABLE"."

I've been at it now for about 3 hours with no luck of determining why I get this error - I know it must be something simple that I am overlooking so if anyone can give me that good swift kick to the head I need - much appricated!!

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Jul 23, 2004 at 08:02 AM

    I don't know what type of systems you are going against, but I checked by landscape (R/3 46C and WebAS 620). The function /SDF/GET_DB_ORA_TABLES_GROWTH wants /SDF/SUMTABGROW for that table defintion. However your code is passing it type SUMTABGROW. In my 46C system there are actually two different structure defintions. However in the WebAS there is only SUMTABGROW. You might just try using the BAPI Browser to generate a local type defintion for this interface parameter. That way you know you will match.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Thomas Jung

      You are either an early riser or a night owl. I was in Detroit before Germany.

      Thanks a million for the help. I hadn't gotten to the debug mode as I couldn't get it to activate because of the error. Fall back on my Java days I guess - I need to have a better look at the whole ABAP debugging I have a feeling it's one of those things I've been missing 😊

  • author's profile photo
    Former Member
    Aug 18, 2004 at 02:48 PM

    Hi everybody!

    I'm trying to write a new bsp element and i'm having the same problems as Craig last time with the different that my internal table is outside of the class.

    I pass this table from my new bsp extension to the handler class.

    <%@page language="abap" %>
    <%@extension name="htmlb" prefix="htmlb" %>
    <%@ extension name="tester" prefix="tst" %>
    <htmlb:content design="design2003" >
     <htmlb:page title  = "Extension Pager ">
          <%
            data:  flight    type flight.
                   select *
                   from spfli
                   into table flight
                   where carrid = 'LH'.
      %>
    
      <htmlb:form>
       <tst:pager table_in="<%=flight%>" />
      </htmlb:form>
     </htmlb:page>
    </htmlb:content>
    

    My element has only the attribute "table_in" which is defined in the class as table_in type ref to data

    my_table ?= cl_htmlb_tableview=>factory(  
                               id ='mytable'
                                 ........
                                            )
    get reference of table_in into my_table->table.
    

    The class can be activated but not the bsp application.

    I get this error each time the same error:

    The type of "%_BSP_ELEM_3->TABLE_IN" cannot be converted to the type of 'FLIGHT'

    I've been at it now for some hours trying to determe this error. Could anyone help?- Thanks!

    Nestor

    -


    Message was edited by: Brian McKellar

    Added code sequences to make easier reading. Please see :O Rules of Engagement --- 2005-02-25 on how code can be better appended.

    Add comment
    10|10000 characters needed characters exceeded