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

ALV

HI,

WITH OUT CREATING A SCREEN AND CUSTOM CONTROL IN IT , IS IT POSSIBLE CREATE GRID ALV . IF IT IS POSSIBLE EXPLAIN PLEASE

THANK YOU

ASHOK KUMAR

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jul 03, 2007 at 07:01 AM

    Hi Ashok,

    If you are using Object oriented concept to create ALV report then only Screen and Custom Control is used

    otherwise call FM "REUSE_ALV_GRID_DISPLAY" and pass the field catalog and internal table to this FM to display your ALV report.

    Mukesh Kumar

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 03, 2007 at 07:03 AM

    yes its possible using FACTORY classes

    refer to the following code

    -


    *

    • Local variables (l_)

    ----


    DATA: l_sap_bool TYPE sap_bool.

    TYPES: begin of g_type_s_hyperlink,

    handle type salv_de_hyperlink_handle,

    hyperlink type service_rl,

    end of g_type_s_hyperlink.

    ----


    • Local objects (lo_)

    ----


    DATA:

    lo_table TYPE REF TO cl_salv_table,

    lo_functions TYPE REF TO cl_salv_functions,

    lo_display_settings TYPE REF TO cl_salv_display_settings,

    lo_layout TYPE REF TO cl_salv_layout,

    ls_key TYPE salv_s_layout_key,

    lo_columns_table TYPE REF TO cl_salv_columns_table,

    lo_column TYPE REF TO cl_salv_column,

    lo_column_table TYPE REF TO cl_salv_column_table,

    lo_functional_settings type ref to cl_salv_functional_settings,

    lo_hyperlinks type ref to cl_salv_hyperlinks.

    DATA: lt_column_names TYPE salv_t_column_ref,

    ls_column_names TYPE salv_s_column_ref.

    DATA: l_restrict TYPE salv_de_layout_restriction.

    ----


    • Local variables (l_)

    ----


    DATA: l_ltext TYPE scrtext_l ,"Broker code long text

    l_mtext TYPE scrtext_m ,"Broker code medium text

    l_stext TYPE scrtext_s ,"Broker code short text

    ls_color TYPE lvc_s_colo.

    *--> Table for drop down

    DATA: lt_ddval TYPE STANDARD TABLE OF g_type_s_hyperlink.

    *--> work area for dropdown

    DATA: ls_ddval TYPE g_type_s_hyperlink.

    ls_key-report = cl_abap_syst=>get_current_program( ).

    TRY.

    CALL METHOD cl_salv_table=>factory

    EXPORTING

    list_display = if_salv_c_bool_sap=>false

    IMPORTING

    r_salv_table = lo_table

    CHANGING

    t_table = gt_alv_output.

    CATCH cx_salv_msg.

    ENDTRY.

    CALL METHOD lo_table->set_screen_status

    EXPORTING

    report = ls_key-report

    pfstatus = 'SALV_TABLE_STANDARD'

    set_functions = lo_table->c_functions_all.

    lo_layout = lo_table->get_layout( ).

    lo_layout->set_key( ls_key ).

    lo_layout->set_default( /rio/zcl_constants=>c_true ).

    • allow saving options for all

    l_restrict = if_salv_c_layout=>restrict_none.

    • set Layout save restriction

    lo_layout->set_save_restriction( l_restrict ).

    lo_functions = lo_table->get_functions( ).

    lo_table->display( ).

    Reward points if helpful

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 03, 2007 at 07:03 AM

    Hi Ashok,

    There are two ways to develop an ALV.

    Through ALV OOPS and Classical.

    In classical you can use, REUSE_ALV_GRID/LIST_DISPLAY

    And in OOPS

    You have to create Custom Control.

    Reward if useful!

    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.