Skip to Content
author's profile photo Former Member
Former Member

ALV GRID using classes

HI ,

i created Docking Container and splitted and

with this method i defined container go_splitter->get_container

after that i assigned grids to that corresponding containers,

after that i displayed data using set_table_for_first_disaply.

and after

CALL SCREEN '0100'.

but if i excute after call statement i am not getting any output .

tell me whats problem in my logic and solution.

Give me on Good Example of Displaying Grid Control using Classes it will be helpful to me .

THX

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jun 19, 2008 at 03:14 AM

    Hi,

    Refer the below link.

    [two-alv's|two-alv's]

    [3-alv-in-a-screen|3-alv-in-a-screen]

    Reward if found helpful.

    Regards,

    Boobalan Suburaj

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 19, 2008 at 03:18 AM
    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 19, 2008 at 03:29 AM

    Hi,

    refer to these examples

    BCALV_GRID_01,BCALV_GRID_02 ,BCALV_GRID_03

    BCALV_GRID_04,BCALV_GRID_05 ,BCALV_GRID_06

    BCALV_GRID_07,BCALV_GRID_08 ,BCALV_GRID_09

    BCALV_GRID_10,BCALV_GRID_11 ,BCALV_GRID_AND_POPUp

    BCALV_GRID_DEMO,BCALV_GRID_DND_TREE

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 19, 2008 at 04:51 AM

    hi Chaay a,

    U can use ..

    *Display percentage completion at storage type

    • Set Container

    v_container = c_container1 .

    v_title = text-036 ."Percentage completion at storage level

    *Build field catalog for storage type

    perform build_catalog_vtyp.

    if it_vltyp[] is not initial.

    perform create_containerobject using v_container

    v_title

    it_field_cat

    it_vltyp .

    refresh : it_field_cat[] .

    ----


    • -->P_V_CONTAINER Container name*

    • -->P_IT_FIELD_CAT field cat internal table

    • -->P_IT_OUTPUT1 table that is to be displayed

    ----


    form create_containerobject using p_v_container type any

    p_v_title type any

    p_it_field_cat like it_field_cat

    p_it_table type any .

    • Check if the report is being executed in the background job

    if cl_gui_alv_grid=>offline( ) is initial.

    • If it is being executed in the foreground mode, than create the

    • frontend container

    create object ob_custom_container

    exporting

    container_name = p_v_container

    exceptions

    cntl_error = 1

    cntl_system_error = 2

    create_error = 3

    lifetime_error = 4

    lifetime_dynpro_dynpro_link = 5

    others = 6.

    if sy-subrc <> 0.

    message e000 with text-033."Unable to display data in the ALV

    endif.

    endif .

    • To Instantiate ALV grid control

    create object ob_alvgrid

    exporting

    i_parent = ob_custom_container

    exceptions

    error_cntl_create = 1

    error_cntl_init = 2

    error_cntl_link = 3

    error_dp_create = 4

    others = 5.

    if sy-subrc <> 0.

    message e000 with text-033."Unable to display data in the ALV

    endif.

    clear wa_layout.

    *optimisind the size of all fields in the layout

    wa_layout-cwidth_opt = c_x .

    if p_v_title = '% Completion by Storage Type'.

    wa_layout-no_toolbar = c_x.

    endif.

    wa_layout-grid_title = p_v_title .

    • To display data in the ALV control

    call method ob_alvgrid->set_table_for_first_display

    exporting

    is_layout = wa_layout

    • IT_TOOLBAR_EXCLUDING = ''

    changing

    it_fieldcatalog = p_it_field_cat

    it_outtab = p_it_table.

    endform. " create_containerobject

    Amit

    Edited by: Amit Kumar on Jun 19, 2008 6:52 AM

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.