cancel
Showing results for 
Search instead for 
Did you mean: 

HtmlB tableview

Former Member
0 Kudos

Dear BSP gurus,

I am from portal background and i am newbie in BSP. my requirement is..

I have a htmlb tableview and the below is the code for that, bsically it is actually displaying the model data, I want to display the similar data in HTML table instead of htmlb tableview, I really do not know whether I am asking a dumb question... kindly help me with this issue, apprecita your help.. thanks.

<htmlb:tableView id            = "ABCdd"
                   width         = "100%"
                   sort          = "SERVER"
                   iterator      = "<%= lo_iterator %>"
                   footerVisible = "FALSE"
                   table         = "//model/ABC.." >

- Rad

Accepted Solutions (1)

Accepted Solutions (1)

GrahamRobbo
Active Contributor
0 Kudos

Hi Rad,

the <htmlb:tableview> BSP extension is essentially a tag library element that renders HTML. You can of course see this by doing a view source in your browser.

So you can certainly replace this with your own HTML if you want. Do some of the BSP tutorials and you will quickly get the idea.

Cheers

Graham Robbo

Answers (3)

Answers (3)

Former Member
0 Kudos

it worked , Thanks all.

ChandraMahajan
Active Contributor
0 Kudos

Hi,

Use HTML element table,

<table>

<tr>

<td> </td>

</tr>

</table>

Thanks,

Chandra

Former Member
0 Kudos

Dear All,

apologies for responding late for this thread.

As suggested by Graham and Chandra tried using the Html Table,

but my data is coming from the model ....table = "//model/ABC.." > if I use the html table how can I render my model data in to the table cells.

<table >

<tr>

<td>&nbsp;</td>

</tr>

</table>

GrahamRobbo
Active Contributor
0 Kudos

<table>
<% data: ref type ref linetype.
loop at //model/ABC.. reference into ref. %>
<tr>
<td><%= ref->col1%></td>
<td><%= ref->col2%></td>
</tr>
<% endloop. %>
</table>
Former Member
0 Kudos

Hi Graham,

thanks for the response; unfortunately this does not wrk for ME,

it is giving an error Field "//model/abcd.." is unknown it is neither in one of the specified table nor defined by a DATA statement.

my code is

<table>
<% Data: ref TYPE /abcd/testtype.
 LOOP AT //model/abcd . %>
<td>
<p><%= ref->col1%></p>
<% endloop. %>

I know I am asking a pretty basic question, but I dont have any other choise, anyways thaks everybody for all the reponses.

Edited by: RAD on Oct 17, 2011 8:49 PM

ChandraMahajan
Active Contributor
0 Kudos

Hi Rad,

you //model/abcd should be declared as attribute in Page Attribute Tab. Also you need to define work line item for this table as an attribute in the page attrribute Tab then you can use the mentioned code to loop over your table, taking contents into work area and then displaying it.

I hope this will solve your problem.

Thanks,

Chandra

Former Member
0 Kudos

Dear Rad,

here's a code example on how to integrate ABAP with BSP to show you an internal table without using HTMLB.

I have put all the code inside the layout, but you usually should use the BSP events (onInitialization, etc...) or external ABAP Classes.

The example is rather basic.

It just selects 20 lines from the DB and then makes a loop and writes HTML code to create the <table>.


<%@page language="abap" %>

<%
  DATA: lt_table TYPE table of ptrv_perio,
  lw_table TYPE ptrv_perio.
  SELECT *
  FROM ptrv_perio
  INTO TABLE lt_table
  UP TO 20 ROWS.
%>

<table>

<%  
  loop at lt_table into lw_table.
%>
<tr>
<td>
<%=lw_table-pernr%>
</td>

<td>
<%=lw_table-perio%>
</td>

<td>
<%=lw_table-pdvrs%>
</td>

</tr>
<%
  endloop.
%>
</table>

Kind Regards

/Ricardo Quintas