cancel
Showing results for 
Search instead for 
Did you mean: 

Internal Table Empty When Passed to results.htm

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

thomasalexander_ritter
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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

athavanraja
Active Contributor
0 Kudos

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

Answers (1)

Answers (1)

Former Member
0 Kudos

Maybe this weblog could also help:

/people/mark.finnern/blog/2003/09/24/bsp-in-depth-confusion-between-stateless-stateful-and-authentication

Thorsten

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi James

unfortunely i am not in California. But if you come to germany, i will remind you.

Former Member
0 Kudos

thorsten,

well, the world cup is coming up and i plan to be there for that. all you need to do is get some referees that won't fix the matches...

james

former_member181879
Active Contributor
0 Kudos

No, this is exactly what you want! You just need to know in what direction they are fixing it. Ladies and gentlemen, please place your bets...