cancel
Showing results for 
Search instead for 
Did you mean: 

content type in context node---top of list

Former Member
0 Kudos

Hello all,

I am trying to use the top_of_list in my webdynpro alv...

everything is working for alv display...now i want to add top of list to it...

anyone tried this before? or know how to declare the attribute under the context node...

I am using the following code for my top of list:--which I got from the document...

data:

lr_node type ref to if_wd_context_node,

lr_grid type ref to cl_salv_form_layout_grid,

lr_text type ref to cl_salv_form_text,

lr_label type ref to cl_salv_form_label.

create object lr_grid.

lr_text = lr_grid->create_text(

text = '1.2 TEXT'

row = 1

column = 2 ).

lr_label = lr_grid->create_label(

text = '1.1 LABEL'

row = 1

column = 1

r_label_for = lr_text ).

lr_text = lr_grid->create_text(

text = '2.2 TEXT'

row = 2

column = 2 ).

lr_label = lr_grid->create_label(

text = '2.1 LABEL'

row = 2

column = 1

r_label_for = lr_text ).

lr_node = wd_context->get_child_node( name = 'TOP_OF_LIST2' ).

call method lr_node->set_attribute

exporting

value = lr_grid

name = 'CONTENT'. <---what is the type of this attribute in context....how to declare this...

Thanks...

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Your code is ok, you only need to do one more step.

Map the context nodes TOP_OF_LIST and END_OF_LIST of the ALV component to the context of your application.

1. Go to your View Context.

2. Select your ALV Interface Controler (at right side )

3. Click and Drag ( TOP_OF_LIST and END_OF_LIST ) from ALV Interface Controler context to your View Cintext.

Regards,

Answers (0)