on 02-17-2005 7:53 PM
Hello,
I have searched this forum and while I have found many similar posts, I can't find my specific problem. In any case, I am an 8 year ABAPer who is just starting with BSPs, so please excuse me if I miss something obvious. I also apologise if this is long winded, but i want to get the whole problem out in one go...
My default.htm page creates a tree (using <htmlb:tree>) and in the OnInitialization event i select the data and fill an internal table (i_node_tab). All that works wonderfully.
My problem occurs when the user selects a node from the tree and i navigate to results.htm to display the detailed data. (the navigation works as well) I am trying to pass the contents of the internal table i_node_tab to the results.htm page but it is not coming through - the table is empty. Investigation has determined that the table is full at the end of the OnInitialization event (where it is created) but empty at the OnInputProcessing event of the default.htm page, where i set up my navigation, and therefore is empty at the OnInitialization event in results.htm. At present, OnInputProcessing (default.htm) contains:
****
event handler for checking and processing user input and
for defining navigation
data: event type ref to if_htmlb_data .
data: tree_event type ref to cl_htmlb_event_tree.
event = cl_htmlb_manager=>get_event( request ).
if event->event_name = 'tree' .
clear: tree_event .
tree_event ?= event.
move: tree_event->node to node.
navigation->set_parameter( name = 'node' value = node ).
navigation->set_parameter( 'i_node_tab' ).
navigation->next_page( 'TORESULTS' ).
endif .
*****
(FYI: "node" is passed perfectly.)
i_node_tab is defined in the page attributes (for both pages) as type Z_NODE_TAB. the attribute "Auto" is checked on the results.htm page but not on the defualt.htm page. the type definitions are:
types: begin of t_node_tab,
childid(22),
parentid(22),
revenue(16) type p decimals 2,
end of t_node_tab.
types: z_node_tab type table of t_node_tab.
Am i defining things incorrectly? in the wrong place? please help! many thanks.
James
Hi James,
I have never passed a table to another page using the auto-attribute feature but why are you using this code for a normal parameter:
navigation->set_parameter( name = 'node' value = node ).
and this code for the table?.
navigation->set_parameter( 'i_node_tab' ).
I took a quick look at the implementation of the set_parameter method and I am pretty sure you have to fill the value parameter with your table. Something like this:
navigation->set_parameter( name = 'i_node_tab' value = i_node_tab ).
best regards
Thomas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thomas-
thank you for your reply. i have actually tried both methods and just switched back to
navigation->set_parameter( name = 'i_node_tab'
value = i_node_tab ).
and i still have my problem. the table is filled with data at OnInitialization but is empty at OnInputProcessing. any ideas why the table is refreshed at these events?
james
Have a look at the documentation about stateless/stateful applications at
http://help.sap.com/saphelp_47x200/helpdata/en/a3/4b9afa7aa511d5992e00508b6b8b11/frameset.htm
Regards
Raja
Maybe this weblog could also help:
/people/mark.finnern/blog/2003/09/24/bsp-in-depth-confusion-between-stateless-stateful-and-authentication
Thorsten
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Raja, Thornsten-
thank you for your replies - those were helpful links. they did show me the process flow and when objects were created and destroyed. i determined that i needed to make my BSP stateful in order to keep my table info. unfortunately as soon as i did that i get an error on my results page (page cannot be displayed) and i don't have time to debug it.
i ended up doing a sloppy workaround that offends my programming sensabilities: i reselect the data on the results page. it works and there isn't very much data to select so runtime isn't an issue but it makes my teeth ache to be that sloppy. if any of you are in california i will buy you a beer. cheers,
james
User | Count |
---|---|
93 | |
10 | |
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.