Skip to Content
avatar image
Former Member

TOP OF LIST in ALVof Wb dynpro

Hi

I am displayin a normal ALV in web dynpro using the following code.

DATA lo_nd_cn_rdata TYPE REF TO if_wd_context_node.

DATA lt_cn_rdata TYPE wd_this->elements_cn_rdata.

  • navigate from <CONTEXT> to <CN_RDATA> via lead selection

lo_nd_cn_rdata = wd_context->get_child_node( name = wd_this->wdctx_cn_rdata ).

lo_nd_cn_rdata->bind_table( it_final ).

Please let me know how to display top of list for ALV.

I need to display.

Run date. run time and title of report on top of page.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Apr 21, 2010 at 09:27 AM

    HI Gautam

    Up to my knowledge I will give you the code...

    Create top_of_list node with COntent of type string bind the context to interface controller top_of_list node...

    otherwise see this articlee

    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/b0ee06d0-d475-2b10-ddad-bc4bf134cfb8

    DATA lo_cmp_usage TYPE REF TO if_wd_component_usage.

    lo_cmp_usage = wd_this->wd_cpuse_alv( ).

    IF lo_cmp_usage->has_active_component( ) IS INITIAL.

    lo_cmp_usage->create_component( ).

    ENDIF.

    DATA lo_interfacecontroller TYPE REF TO iwci_salv_wd_table .

    lo_interfacecontroller = wd_this->wd_cpifc_alv( ).

    DATA lv_value TYPE REF TO cl_salv_wd_config_table.

    lv_value = lo_interfacecontroller->get_model(

    ).

    DATA:

    lr_grid TYPE REF TO cl_salv_form_layout_grid,

    node1 TYPE REF TO if_wd_context_node,

    lv_header TYPE REF TO cl_salv_form_header_info.

    CREATE OBJECT lr_grid.

    lv_header = lr_grid->create_header_information(

    row = 1

    column = 2

    • rowspan =

    • colspan =

    text = 'Sales Document Details' ). // here pass the concatenated string

    node1 = wd_context->get_child_node( 'TOP_OF_LIST' ).

    CALL METHOD node1->set_attribute

    EXPORTING

    value = lr_grid

    name = 'CONTENT'.

    CALL METHOD lv_value->if_salv_wd_table_settings~set_top_of_list_visible

    EXPORTING

    value = abap_true.

    hope it will work.

    THanks and Regards

    Tulasi Palnati

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 21, 2010 at 08:50 AM

    Hi,

    I see this info is small, you can also put this info in ALV Header.

    Concatenate all your tex like

    <ALV_REPORT_NAME> RunNo: <1000> RunID < > in a single string and set it as ALV header

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 21, 2010 at 08:52 AM

    If you don't find any standard functionality, you can create 3 text view ui elements before ALV and assign required values to them through context attribute (of type string). This will display desired data before ALV.

    Regards,

    Saket.

    Add comment
    10|10000 characters needed characters exceeded