Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

OOPS Abap

Former Member
0 Kudos

Hi,

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

4 REPLIES 4

Former Member
0 Kudos

Former Member
0 Kudos

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.

vishal_sharda2
Participant
0 Kudos

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.