Skip to Content
avatar image
Former Member

OOPS Abap

Hi,

I am new to OOPS abap..what is a containerr in oops alv display...send me some documents for oops abap

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • avatar image
    Former Member
    Jan 22, 2008 at 05:45 AM
    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 22, 2008 at 08:14 AM

    hi,

    Follow this link for Abap objects PDF's

    http://www.esnips.com/doc/6d16a298-9227-4d32-acf1-e91164c89daf/3-ABAP-Objects(P283)

    Hope this is helpful, Do reward.

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 23, 2008 at 06:10 AM

    Hi Varsha,

    OOPS ALV makes use of custom container which is used to reserve space on the screen where your output ALV is displayed.

    To create a custom container, go to transaction SE80.

    Under Utilities > Settings > uncheck 'Graphical Layout'.

    then under Edit> create element> custom container.

    Following code can give you some idea.

    ****************************************************

    *& ALV Display

    ****************************************************

    call screen 100.

    ----


    • MODULE status_0100 OUTPUT

    ----


    *

    ----


    module status_0100 output.

    set pf-status 'STATUS'.

    set titlebar 'TITLE'.

    create object g_custom_container

    exporting

    container_name = 'CUSTOM_CONTROL'

    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 ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

    • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

    endif.

    create object grid

    exporting

    i_parent = g_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 ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

    • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

    endif.

    call method grid->set_table_for_first_display

    changing

    it_outtab = itab_vbak[]

    it_fieldcatalog = gt_fieldcat[]

    exceptions

    invalid_parameter_combination = 1

    program_error = 2

    too_many_lines = 3

    others = 4.

    if sy-subrc <> 0.

    • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

    • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

    endif.

    endmodule. " STATUS_0100 OUTPUT

    &----


    *& Module USER_COMMAND_0100 INPUT

    &----


    • text

    ----


    module user_command_0100 input.

    "User Actions

    case ok_code.

    when 'EXIT' or 'CANCEL'.

    leave program.

    when 'BACK'.

    leave to screen 0.

    when 'PRINT'.

    perform f_print_smartform.

    when 'PDF'.

    perform f_dnld_pdf.

    endcase.

    endmodule. " USER_COMMAND_0100 INPUT

    This code does not include data slection/preparing field catalog.

    Reward points if helpful..

    Regards,

    Vishal.

    Add comment
    10|10000 characters needed characters exceeded