on 12-29-2005 6:52 AM
Hi friends,
I am getting the following error while Press submit button on my Ist PAGE.
<u>Error</u>
<b>Business Server Page (BSP) Error
What happened?
Call of BSP page terminated due to error
Business Server Page (BSP) Error
Note
Following error text processed in system:
<htmlb:tableView>: (table) Attribute value is not a table
Error Type:
Your SAP Business Server Pages Team</b>
The code I wrote for the event handling;
<u>OnInputProcessing</u>
[code]DATA: pager TYPE REF TO cl_xhtmlb_pager.
pager ?= cl_htmlb_manager=>get_data( request = request
name = 'xhtmlb:pager'
id = 'pager' ).
vindex = pager->vindex.
DATA: event TYPE REF TO if_htmlb_data.
event = cl_htmlb_manager=>get_event_ex( request ).
IF event IS NOT INITIAL
AND event->event_name = xhtmlb_events=>buttongroup
AND event->event_type = xhtmlb_events=>buttongroup_click.
CASE event->event_defined.
WHEN 'prev_page'.
vindex = vindex - vsize.
IF vindex < 1.
vindex = 1.
ENDIF.
WHEN 'next_page'.
vindex = vindex + vsize.
vMax = "<%=lines( itab )%>"
vindex = LINES( itab ) - vsize + 1.
ENDIF.
ENDCASE.
ENDIF.
DATA: barrier TYPE I.
barrier = LINES( itab ) - vSize.
IF vindex > barrier. vindex_next_disabled = 'TRUE'.
ELSE. vindex_next_disabled = 'FALSE'.
ENDIF.
IF vindex <= vsize. vindex_prev_disabled = 'TRUE'.
ELSE. vindex_prev_disabled = 'FALSE'.
ENDIF.[/code]
OnCreate
-
[code]Data: itab type standard table of zbh_queue_update initial size 0.
SELECT * FROM ZBH_QUEUE_UPDATE
INTO CORRESPONDING FIELDS OF TABLE itab
UP TO 25 ROWS.
vSize = '7'.
vIndex_prev_disabled = 'TRUE'.
vIndex_next_disabled = 'FALSE'.[/code]
<u>Layout</u>
[code]<htmlb:content design="design2003">
<htmlb:page>
<htmlb:form>
<xhtmlb:tabStrip id = "ts" renderSingleTabAsHeading ="TRUE">
<xhtmlb:tabStripItem title ="Status"
name ="tsi1" >
<xhtmlb:toolbar id="tb1" >
<xhtmlb:toolbarItem placement="LEFT" >
<xhtmlb:buttonGroup id = "btngrp"
onClick = "TablePager">
<xhtmlb:buttonGroupItem key = "prev_page"
text = "Previous Page"
design = "PREVIOUS"
disabled = "<%=vIndex_prev_disabled%>" />
<xhtmlb:buttonGroupItem key = "next_page"
text = "Next Page"
design = "NEXT"
disabled = "<%=vIndex_next_disabled%>" />
</xhtmlb:buttonGroup>
</xhtmlb:toolbarItem>
<xhtmlb:toolbarItem placement="RIGHT" >
<xhtmlb:pager id = "pager"
text = "Line [$vIndex$] of $vMax$"
vIndex = "<%=vIndex%>"
design = "VERTICAL_SIMPLE+INDICATOR" />
</xhtmlb:toolbarItem>
</xhtmlb:toolbar>
<htmlb:tableView id = "itab"
footerVisible = "false"
filter = "NONE"
table = "<%=itab%>"
visibleFirstRow = "<%=vIndex%>"
visibleRowCount = "<%=vSize%>"
width = "100%" />
</xhtmlb:tabStripItem>
</xhtmlb:tabStrip>
[/code]
When I tried with sample code & Sflight table, all is working fine. but I am getting error while trying with my ITAB.
I appreciate your suggestions in this regard.
Regards
CSM Reddy
define your internal table inside page attributes instead of inside event method oncreate.
defining as page attribute will make it global and visible in page flowlayout.
inside oncreate it is a local variable.
regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
is ZBH_QUEUE_UPDATE a table type or just a table.
if its just a table , do the following.
1. in the <b>type definitions</b> tab.
types: itabtype type standard table of ZBH_QUEUE_UPDATE .
in <b>page attribute</b>
declare itab referring to this new type called itabtype.
itab type itabtype.
Regards
Raja
Message was edited by: Durairaj Athavan Raja
Hi,
Thanks for your right suggestions. The page is displaying the table only, not showing any data.The Itab actually Contains my sample data. How to get the data should be displayed in page2?. I got problems in BSP Class & Controller class Creation as well.pls mail me some suggestions.
I will mail you more details , if I unable to sort out this.
Regards
CSM Reddy
In which event did you place the code for data selection into itab?
you should do it either in oncreate (one off in stateful mode) or in oninitialization.
also place a http break point just before htmlb:tableview in the layout to see whether the data is getting populated into itab or not.
<i>I got problems in BSP Class & Controller class Creation as well.pls mail me some suggestions.</i>
check out this weblog series for MVC
<a href="/people/sap.user72/blog/2005/03/29/bsp-howto-exploring-bsp-development-with-mvc">BSP / HowTo: Exploring BSP Development with MVC</a>
Regards
Raja
Hi,
The code for Oncreate is as :
DATA: itab type standard table of zbh_queue_update initial size 0.
SELECT * FROM ZBH_QUEUE_UPDATE
INTO CORRESPONDING FIELDS OF TABLE itab
UP TO 25 ROWS.
vSize = '7'.
vIndex_prev_disabled = 'TRUE'.
vIndex_next_disabled = 'FALSE'.
for OnInputProcessing:
DATA: pager TYPE REF TO cl_xhtmlb_pager.
pager ?= cl_htmlb_manager=>get_data( request = request
name = 'xhtmlb:pager'
id = 'pager' ).
vindex = pager->vindex.
DATA: event TYPE REF TO if_htmlb_data.
event = cl_htmlb_manager=>get_event_ex( request ).
IF event IS NOT INITIAL
AND event->event_name = xhtmlb_events=>buttongroup
AND event->event_type = xhtmlb_events=>buttongroup_click.
CASE event->event_defined.
WHEN 'prev_page'.
vindex = vindex - vsize.
IF vindex < 1.
vindex = 1.
ENDIF.
WHEN 'next_page'.
vindex = vindex + vsize.
vMax = "<%=lines( itab )%>"
vindex = LINES( itab ) - vsize + 1.
ENDCASE.
ENDIF.
DATA: barrier TYPE I.
barrier = LINES( itab ) - vSize.
IF vindex > barrier. vindex_next_disabled = 'TRUE'.
ELSE. vindex_next_disabled = 'FALSE'.
ENDIF.
IF vindex <= vsize. vindex_prev_disabled = 'TRUE'.
ELSE. vindex_prev_disabled = 'FALSE'.
ENDIF.
When I debugged ,the data is populating into the itab, But it is not displaying it in table.
<b>http break point just before htmlb:tableview in the layout to see</b> ??
you mean just break point?? pls show me how to do it?
pls mail in this regard.
Regards
CSM REDDY
from utilities->setting>abap editor->debuggin external debug activate
then in the layout where you have htmlb:tableview place the cursor and click the stop button (brak point) you should now get a prompt asking whether you want external (HTTP) break point say yes.
also post your layout code for htmlb:tableview
Regards
Raja
Hi,
The actual problem lies in ITAB type.
DATA: <u>itabtype</u> type standard table of ZBH_QUEUE_UPDATE initial size 0.
Earlier It was DATA: itab type standard table of ZBH_QUEUE_UPDATE initial size 0.
Now the table is displayed with all data.
I got one more query on this, I think you probably help me.
How to to create additionally a generic datasource based on this internal table, and an according infosource feeding an ODS object for reporting on the development queue?
Pls mail me any sort of helpful hints/code on this.
Regards
CSM REDDY
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.