Htmlb:TableView title problem
Hello,
recently we installed some support packages (now at SP59). After the installation my TableView titles are not shown correctly. Before the installation the titles were displayed completely, now after the installation the width of the column is only determined by the shown values in the columns.
The problem I have now is that vor a column which only contains the values A or B, the title "Status" is not shown. Any suggestions?
ALEX
If you are using an iterator,
use the method IF_HTMLB_TABLEVIEW_ITERATOR~GET_COLUMN_DEFINITIONS
there you can edit the width of your columns:
APPEND INITIAL LINE TO p_column_definitions ASSIGNING <tv_column>.
<tv_column>-columnname = c_type.
<tv_column>-sort = c_x.
<tv_column>-title = c_energy_type.
<tv_column>-disable_filter = c_x.
<tv_column>-edit = '1'.
<tv_column>-width = 15.
grtz
Koen
Message was edited by: Koen Labie
Similar Messages
-
HTMLB: tableview filter problems
Hi,
We developed a BSP application in CRM Web_IC. Whenever user goes to this screen, it retrieves the results from SAP CRM table and lists the entries. We used htmlb:tableview with filter attribute set to 'SERVER'. The first row of the entry is used to filter the entries displayed based on wildcard search and redisplay the same.
We noticed that all this handled by client side eventing (Java Script) and it works okay in our development and testing environment.
But we got wierd results when it went for user testing. On some of the machines, the page looks refreshed but the list display does not change based on the search. We thought it might be caching problem so we tried with different IE settings, it looks okay for some time on one of the machines but the problem gets repeated after wards. The situation is we cannot afford intermittent problems.
OS are win'2000 and XP and browser is IE 6 with sp1 and sp2. The problem is not consistent so none of the combinations actually suggested if the problem is related to one area.
Has anyone experienced similar to above. Any ideas are welcome.
Message was edited by: Raju DatlaThanks Rainer,
Without making any changes, today majority of the users are did not encounter the problem. I could not check the browser server cache settings as the BSP is using MVC and these fields are missing.
Thanks and Regards,
Raju
I lost how to add points. I remember there was a document on how to add points, which I could not get by search. Could you help me how I can award points to you.
Sorry for that and Thanks
Message was edited by: Raju Datla -
ICWC htmlb:tableview filter problems
Hi,
We developed a BSP application in CRM Web_IC. Whenever user goes to this screen, it retrieves the results from SAP CRM table and lists the entries. We used htmlb:tableview with filter attribute set to 'SERVER'. The first row of the entry is used to filter the entries displayed based on wildcard search and redisplay the same.
We noticed that all this handled by client side eventing (Java Script) and it works okay in our development and testing environment.
But we got wierd results when it went for user testing. On some of the machines, the page looks refreshed but the list display does not change based on the search. We thought it might be caching problem so we tried with different IE settings, it looks okay for some time on one of the machines but the problem gets repeated after wards. The situation is we cannot afford intermittent problems.
OS are win'2000 and XP and browser is IE 6 with sp1 and sp2. The problem is not consistent so none of the combinations actually suggested if the problem is related to one area.
Has anyone experienced similar to above. Any ideas are welcome.Hi Sasi,
Unfortunately I could not get any direct solution to the problem. I chased SAP OSS and SAP direct consultant who was working with us with no solution. Last time, I heard it was sent to htmlb team at SAP. I stopped chasing after that as project gone live and I fixed the problem by putting a search area and button using client side eventing.
If you read the source code once the page is displayed, you can see that SAP writes Javascript to handle the search. I copied the code as Javascript function and placed a button to fire this function which handles the filter as normally SAP does.
Regards,
Raju -
How to insert check box fields in a htmlb: tableview
Hi,
Can anybody tell me how to insert check box fields in a htmlb: tableview in a sequence of rows in a table view. How to generate the sequence no for the checkbox inorder to know the row that is checked.
Thanks in advance,
Aruna.Here is the code which has the custom "Checkbox" in the tableview & Triggers the event. <b>You can identify the checkbox based on cell ID (p_cell_id)</b> in the method "IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_CELL_START" & Based on the event name + Cell ID. Look at the code & let me know if you any issue.
<b>Layout:</b>
<%@page language="abap" %>
<%@extension name="htmlb" prefix="htmlb" %>
<htmlb:content id = "content"
design = "design2002+design2003"
controlRendering = "SAP"
rtlAutoSwitch = "true"
forceEncode = "ENABLED" >
<htmlb:page title="Test " >
<htmlb:form>
<%
data TV_ITERATOR Type Ref To zcl_itr.
data iterator type ref to IF_HTMLB_TABLEVIEW_ITERATOR.
create object tv_iterator exporting appl_cons = application.
iterator = tv_iterator.
%>
<htmlb:tableView id = "fligts"
headerText = "Flight"
width = "100"
headerVisible = "true"
design = "alternating"
visibleRowCount = "10"
fillUpEmptyRows = "true"
showNoMatchText = "true"
filter = "server"
sort = "server"
onHeaderClick = "MyEventHeaderClick"
table = "<%= APPLICATION->itab %>"
iterator = "<%= ITERATOR %>" />
</htmlb:form>
</htmlb:page>
</htmlb:content>
<b>Event Handling:</b>
DATA: EVENT_ID1 TYPE REF TO IF_HTMLB_DATA.
EVENT_ID1 = CL_HTMLB_MANAGER=>GET_EVENT_EX( REQUEST ).
CASE EVENT_ID1->EVENT_SERVER_NAME.
IF NOT event_id1 IS INITIAL.
if event_id1->server_event+0(9) = 'chkevent'.
SPLIT event_id1->server_event AT '-' INTO v_event v_dummy v_row v_col.
endif.
endif.
method IF_HTMLB_TABLEVIEW_ITERATOR~GET_COLUMN_DEFINITIONS.
CLEAR p_column_definitions.
CLEAR p_overwrites.
DATA: tv_column TYPE TABLEVIEWCONTROL.
tv_column-COLUMNNAME = 'FLDATE'.
tv_column-edit = 'X'.
tv_column-sort = 'X'.
tv_column-TITLE = 'Flight Date'.
tv_column-WIDTH = '100'.
APPEND tv_column TO p_column_definitions.
CLEAR tv_column.
tv_column-edit = 'X'.
tv_column-COLUMNNAME = 'CONNID'.
tv_column-TITLE = 'Conn.ID'.
tv_column-WIDTH = '70'.
tv_column-HORIZONTALALIGNMENT = 'center'.
APPEND tv_column TO p_column_definitions.
CLEAR tv_column.
tv_column-edit = 'X'.
tv_column-COLUMNNAME = 'CHECKBOX1'.
tv_column-TITLE = 'Check Box'.
tv_column-WIDTH = '30'.
tv_column-HORIZONTALALIGNMENT = 'center'.
APPEND tv_column TO p_column_definitions.
endmethod.
METHOD IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_CELL_START.
DATA: L_EVENT TYPE STRING.
CASE P_TABLEVIEW_ID.
WHEN 'fligts'.
CASE P_COLUMN_KEY.
WHEN 'CHECKBOX1'.
* CONCATENATE 'chk_event' '123' '2323' INTO L_EVENT SEPARATED BY '-' .
CONCATENATE 'chkevent' p_cell_id INTO l_event SEPARATED BY '-'.
P_REPLACEMENT_BEE = CL_HTMLB_CHECKBOX=>FACTORY( ID = P_CELL_ID
ONCLICK = L_EVENT CHECKED = 'false' ).
ENDCASE.
ENDCASE.
ENDMETHOD.
Hope this will solve your problem.
<b><i>* Reward each helpful answer.</i></b>
Raja T
Message was edited by:
Raja T -
Error when displaying amount field in HTMLB Tableview
Hi all,
I am displaying some 'X' table in HTMLB Tableview and it has one amount field.But reference(currency) field of that amount field is in other table . I know it gives the error.
Please tell me there is any other way to resolve this problem with out adding reference(currency)field in the same table?
Thanks and Regards ,
Harikrishna .Hi Hari,
But reference(currency) field of that amount field is in other table . I know it gives the error.
It will not give any error , you can use the currency key field of other table or structure .
Alternatively you can use predifined type DEC instaed of CURR .
Regards,
Anubhav -
How open URL in an htmlb TableView ?
Hi guys,
Here is my problem:
- I have in my BSP an HTMLB:TableView which display a table of Document Info Record.
- In this table of DIRs, there is a column which contains an URL in order to open an original.
ex of url :
https://daplmdv.sylvania.com:10443/sap/bc/bsp/sap/CVAW_VIEW_DOCFILE/ViewDocFile.htm?pa_document_key=ZPI000000000000000000185255000FR&pa_file_id=4B5DB6C66C9B0094E1008000C61CAA2D&filename=C:\Copie de SSO on PLP.pdf
- At the moment in htmlb:tableViewColumn, I use the property onCellClick which call a javascript function :
window.open( "<%= application->url%>", target='_blank' , 'toolbar=no, menubar=no, resizable=yes, scrollbars=yes');
- It works in IE6 but I tested it in IE7 and it doesn't work.
My question :
Is it possible to open directly the link through the tableView and without using javascript ?
I tried the property linkClickTarget but it doesn't work
Thanks for your helpHi Regis,
If you need a new window to load the document contents, then you should use the Javascripts. Because only a javascript could openup a new window in a BSP applicaiton.
But if you do not want to open up the document in a new window and want to load it by replacing the current page, then you could do it by navigating to another page which could render the document contents in this page.
Hope it helps!
Regards,
Maheswaran -
We have some HTMLB TableViews in our JSPDynPage developed portal application. After we upgraded to NetWeaver 7.0(2004S) the table views now require the users to tab across each cell within the tableview. The accessibility flag is turned off within the users profiles so that is not what is causing it. Is there a way to disable this functionality. I would hope so otherwise I would have to say that SAP did a bit of a dis-service to some of it's customers.
Thanks.
CurtisHi Curtis,
We are also facing the same problem. Customer is complaining for this. Could you please tell us what needs to be done to go to the next editable cell.
Thanks in Advance....
Satya -
Htmlb:tableView event navigation within frameset
hello,
i have a problem with event navigation in a frameset triggered from htmlb:tableView. the structure of my bsp-application:
DEFAULT.HTM
<frameset noresize cols="70%,*">
<frame src="links.htm" name="left">
<frame src="rechts.htm" name="right">
</frameset>
PAGE LEFT in the frameset with the tableView
<htmlb:form target = "right">
<htmlb:tableView id="myTable"
headerText = "Mitarbeiter"
headerVisible = "true"
design = "alternating"
visibleRowCount = "10"
fillUpEmptyRows = "true"
onRowSelection = "MyEventRowSelection"
selectionMode = "singleselect"
table = "<%= table_csks %>" >
</htmlb:tableView>
PAGE RIGHT in the frameset shuold display details of the selected tableView row:
<htmlb:form target = "right">
<br>
<%= lstable_csks-mandt %>
<br>
<%= lstable_csks-kostl %>
<br>
<%= lstable_csks-verak %>
<br>
<%= lstable_csks-ersda %>
<br>
</htmlb:form>
PROBLEM description:
when row is selected, displaying of the details on the right frame works well. but when another event of the tableView is triggered eg. browsing between table pages, the wohle table is displayed in the right frame instead to turn the table-page but stay in the same frame. of course this is done, because i have set the form-target attribute.
and here the question: how can i differentiate between the onRowSelection-Event (navigation to the right frame) and the page-browsing event (stay in same frame but change the tableView page)?
thanks a lot!
kalina<i><htmlb:tableView keyColumn = "smtp_addr"
id = "searchhelp"
table = "<%= t_searchhelp %>"
visibleRowCount = "10"
selectionMode = "SINGLESELECT"
onRowSelection = "setHelp" ></i>
since you dont have sort or filter option for your table value, you can simply use the rowindex to read the itab.
read table itab index selectedrowindex.
on your other question of using more than one field in the itab for key of a record.
declare another field in the itab and fillit with the concatenation of the key fields (say concatenate recornumber itemnumber into keyfield) and dont show it in the tableview. declare this field as the key column in tableview.
onrowselection this key value will be available in
tabvie->selectedrowkey which you can use to read the itab. however in your case this is not required as you dont use sort or filter.
Raja -
HTMLB TableView Iterator & Edit columns, cells
Hi friends,
I am getting errors when , I tried to edit the columns, & Cells of HTMLB TableView by using Iterator.Actually, I got the whole edit buttons and when I edit the values of particular column & cell fileds, it is not saving the values, instead it is giving same old values. The code I used is as follows.
<u><b>To Edit the columns,</b></u>
method
IF_HTMLB_TABLEVIEW_ITERATOR~GET_COLUMN_DEFINITIONS.
FIELD-SYMBOLS: <def> LIKE LINE OF p_column_definitions.
APPEND INITIAL LINE TO p_column_definitions ASSIGNING <def>.
<def>-COLUMNNAME = 'STUDENTID'.<def>-EDIT = 'X'.
endmethod.
<u><b>To Edit the cells,</b></u>
RENDER_CELL_START Method:
method
IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_CELL_START.
CASE p_column_key.
WHEN 'ICON'.
WHEN 'STUDENTID'.
IF p_edit_mode IS NOT INITIAL.
ENDIF.
WHEN 'SDATE'.
IF p_edit_mode IS NOT INITIAL.
ENDIF.
ENDCASE.
endmethod.
<u><b>To Edit the SDATE cells,</b></u>
WHEN 'SDATE'.
IF p_edit_mode IS NOT INITIAL.
DATA: date TYPE STRING.
date = m_row_ref->SDATE.
p_replacement_bee = CL_HTMLB_INPUTFIELD=>FACTORY(
id = p_cell_id
value = date
type = 'DATE'
showHelp = 'TRUE'
cellValue = 'TRUE' ).
ENDIF.
Why the either column or cell is not saving the new values, when I edit them? where it went wrong? please mail me in this regard.
regards
CSM ReddyHi REDDY CSM
To learn coding these Methods.
You need to learn everything from scratch about MVC.
To learn functionalities of Methods in Controller and how to use them,its Better,if you start with some tutorial(Little application) on MVC.
Here is link,Just follow this,You will get some Exposure to these methods.
http://help.sap.com/saphelp_erp2005/helpdata/en/c8/101c3a1cf1c54be10000000a114084/frameset.htm
Rest keep posting whenever you face and Problem..
Happy Coding..!!
Vijay Raheja -
Htmlb:tableView - automatic refresh
<b>Hi,</b>
I use htmlb:tableView to display data.
Have you any idea how to do automatic refresh to the tableView ?
<b>Thanks, Natalia.</b>Here is the Sample code which reload every 2 seconds..
Look at the ouput:
http://grizzlyweb.com/webmaster/javascripts/examples/refresh.htm
<html>
<head>
<title>Refresh JavaScript Example</title>
<noscript>
<meta http-equiv="refresh" content="2">
</noscript>
<script language="JavaScript">
<!--
var sURL = unescape(window.location.pathname);
function doLoad()
// the timeout value should be the same as in the "refresh" meta-tag
setTimeout( "refresh()", 2*1000 );
function refresh()
window.location.href = sURL;
//-->
</script>
<script language="JavaScript1.1">
<!--
function refresh()
window.location.replace( sURL );
//-->
</script>
<script language="JavaScript1.2">
<!--
function refresh()
window.location.reload( false );
//-->
</script>
</head>
<!--
Use the "onload" event to start the refresh process.
-->
<body onload="doLoad()">
<script language="JavaScript">
<!--
document.write('<b>' + (new Date).toLocaleString() + '</b>');
//-->
</script>
</body>
</html>
For more detail look at the below link..
http://grizzlyweb.com/webmaster/javascripts/refresh.asp
<i>* Reward each useful answer.</i>
Raja T -
How can i assign a css file to a htmlb tableview.
for instance:
I can assign css with 'class=XXX' in html code.
but how assign 'class' to a htmlbtableview.
<%html table%>
<table 'class=XXX' width="75%" border="1">
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
<%htmlb table%>
<htmlb:tableView id = "Project"
table = "<%=Project%>"
selectionMode = "SINGLESELECT">
<htmlb:tableViewColumns>
<htmlb:tableViewColumn columnName="COMCODE"
title ="code" >
</htmlb:tableViewColumn>
<htmlb:tableViewColumn columnName="PRJCODE"
title ="prjcode">
</htmlb:tableViewColumns>
</htmlb:tableView>HI
GOOD
GO THROUGH THESE LINKS
/people/thomas.jung3/blog/2005/08/22/bsp-value-input-help-popups-version-30
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/8a4ecee4-0601-0010-6aa2-9903d650266f#search=%22ASSIGN%20A%20CSS%20FILE%20TO%20A%20HTMLB%20TABLEVIEW%20%2C%20SAP%22
http://www.sapdesignguild.org/resources/ma_guidelines_3/ma_guidelines_3.pdf#search=%22ASSIGN%20A%20CSS%20FILE%20TO%20A%20HTMLB%20TABLEVIEW%20%2C%20SAP%22
THANKS
MRUTYUN^ -
HTMLB Tableview: questions..;
Hello,
Simply I output my table as follows :
<htmlb:form>
<htmlb:tableView id = "tv1"
visibleRowCount = "10"
selectionMode = "lineEdit"
table = "<%=mytable%>"
iterator = "<%=iterator%>" />
</htmlb:form>
(NOTE: where iterator is type IF_HTMLB_TABLEVIEW_ITERATOR)
Ok, its nice, but I need to customize things a bit. I have 5 fields... and I want 4 uneditable, and the 5th able to be updated and modified back into the SAP table.
How can I do this?
Thanks,
TimothyHello,
I have read many times the iterator weblogs, especially 830. I understand most but still have trouble. Allow me to show you what I have, and please tell me what is wrong.
My BSP, index.htm:
<%@page language="abap" %>
<%@extension name="htmlb" prefix="htmlb" %>
<htmlb:content design="design2003" >
<htmlb:page title="EPCOT" >
<%
SELECT * FROM ZEPCT002 INTO TABLE epcots
WHERE ZANNE = anne
AND ZPAYS = pays.
%>
<htmlb:form>
<htmlb:tableView id = "tv1"
visibleRowCount = "12"
selectionMode = "lineEdit"
table = "<%= epcots %>"
iterator = "<%= iterator %>" />
</htmlb:form>
</htmlb:page>
</htmlb:content>
For my iterator, I have made the 5th field an input field (CL_HTMLB_INPUTFIELD). And the 6th field an ICON:
image2->onclick = 'OnSaveClick'.
image2->src = cl_bsp_mimes=>sap_icon( `ICON_SYSTEM_SAVE` ).
I want, when user selects a line, enters text in this 5th field, and then clicks the icon... an event to write/modify directly this change into my table (SAP table I created). So, for index.htm, in OnInputProcessing, I have:
DATA: event TYPE REF TO CL_HTMLB_EVENT,
id type string,
row type string,
col type string,
other type string.
CLASS cl_htmlb_manager DEFINITION LOAD.
clear: event, id, row, col, other.
event = CL_HTMLB_MANAGER=>get_event( runtime->server->request ).
id = event->id.
split id at '_' into other row col.
case col.
WHEN '6'.
<b>?????</b>
endcase.
My <b>?????</b> is where I have tried many things and just dont get it. In weblog 830, I see what he is doing, but some things he does don't work for me, like:
id = htmlb_event->id.
case htmlb_event->server_event.
when 'OnUpdateUserClick'.
data: event1 type ref to cl_htmlb_event_selection.
event1 ?= htmlb_event.
read table model->ug_users index i_row assigning <irow>.
this <b>htmlb_event->id</b>, <b>htmlb_event</b>, and <b>model->ug_users</b>... for these I get syntax errors.
So, could you tell me what I need to do here?
Any guidance would be greatly appreciated,
Thanks,
Tim -
Htmlb:tableView and group building
Hi,
in abap alv-lists, it is possible to build groups like you can see in the following example:
4711 12345 asdfaslöfkj
4711 68686 asdfljsadflj
4711 97777 salfjljfaksl
and now in abap-alv
4711 12345 asdfaslöfkj
68686 asdfljsadflj
97777 salfjljfaksl
Is this possible with htmlb:tableView or something like this?
Regards,
JensYes you can make the first column to display data at the first appearance only as a Grouping. For this in the Iterator GET_Column_definition method set the FIXEDCOLUMN attribue of the column definition structure tableviewcontrol for which the grouping should apply(in your case first column).
Code goes like this...
data: ls_col_def type tableviewcontrol.
clear ls_col_def.
move: '<FieldName>' to ls_col_def-columnname,
'Icon' to ls_col_def-title,
'X' to ls_col_def-encode,
'X' to ls_col_def-FIXEDCOLUMN,
'1%' to ls_col_def-width.
append ls_col_def to p_column_definitions. -
Tree functionality in htmlb:tableView
I heard that with the newest SPs, you can add tree functionality (hierarchies; expand/collapse) to a htmlb:tableView.
Does anybody have a good example for this?
Regards,
DanielThis code works fine.
data: lt_tree type TVIEW2,
lwa_tree type TVIEWNODE2,
ls_DESTINATION type string,
ln_facture(10) type n.
if sy-host = 'MANSOLDEB02'.
* Dev
ls_DESTINATION = 'AMMDEX01'.
else.
* Prod
ls_DESTINATION = 'MANPRX01'.
endif.
ln_facture = lwa_ligne-zfacture.
CALL FUNCTION 'ZGET_TREE' destination ls_DESTINATION
EXPORTING
P_IN_FACTURE = ln_facture
P_IN_TREEID = p_cell_id
IMPORTING
PT_OUT_TREE = lt_tree.
GET REFERENCE OF lt_tree INTO lt_table.
CALL METHOD CL_HTMLB_TREE=>FACTORY
EXPORTING
* HEIGHT = '400'
ID = lwa_ligne-zfacture
* ID_POSTFIX =
* ONTREECLICK =
* RESTOREVIEWSTATE = 'TRUE'
SHOWTITLE = 'FALSE'
TABLE2 = lt_table
* TITLE = lwa_ligne-zfacture
TOGGLE = 'TRUE'
TOOLTIP = 'Détail de la facture'
RECEIVING
ELEMENT = lo_tree.
CALL METHOD lo_tree->if_bsp_bee~render_to_string
EXPORTING
page_context = page_context
RECEIVING
result = ls_texte.
cellule_bee->add_html( level = 1
html = ls_texte ).
p_replacement_bee = cellule_bee.
Regards,
Thierry Chiret -
Htmlb:group - title instead of htmlb:groupHeader
When you use a htmlb:Group, there are two ways to add text to the group header. You can use
<htmlb:group title="hello">
or
<htmlb:group>
<htmlb:groupHeader>
<htmlb:textView text="hello" />
</htmlb:groupHeader>
I'd like to change from the first variant to the second, because I want to add a link to the group-header.
Unfortunately, the header is a little higher if you use the secont variant. Is there a way to overcome this problem? Can I make the groupHeader as small as the title?
Best regards,
DanielThere is always something you can do about it
One way would be to use a <htmlb:findAndReplace> element around your troubling elements and simply replace the HTML code you want to change.
Of course you would have to check that every time you do some SP upgrade, so no very elegant ...
(but it's a way)
Max
Maybe you are looking for
-
How to manage language list in oracle bi logon page?
Hello All! Can any one explain in detail, how "Select a Language" drop-down list is populated? How to exclude all but two languages from the list in BI 10g? It is well documented how to add languages, but this seems not to work in reverse. That is, d
-
What's up with mountain lion?
Power Pc applications are no longer supported, what's up with this? I feel cheated, I have lost a lot of things I used on my mac, now I will have to purchase new Items. I think this is why they do these things so people will have to spend money. Very
-
How to Push photos to parent's iPad?
I'm sure I'm not the only one looking for a solution to this. Just gave our parents an iPad. We'd like to set them up with a few galleries and then be able to push photographs into the galleries so they can easily see new pictures. They are connectin
-
Does verizon selects collect data when using wifi ?
When signing up for verizon selects is states it collects data when using wireless service but does it collect data when using home wifi which is not verizon?
-
How to clear a drop down by key on a button action
Hi All I am new to the webdynpro i have to clear the dropdown by key, i had tired giving the wdContext.nodeA().invalidate(); on a button action which will navigate to next view after click but it doesn't effect