Application Development and Automation 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: 
Read only

ALV Report

Former Member
0 Likes
510

Hai,

How 2 place a ALV Report in a container ?

1 ACCEPTED SOLUTION
Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
485

Hi,

You need to create a custom control in the screen and then use this customer control to create custom container object then pass this container object to in the grid instantiation.

see the below code.

CREATE OBJECT lr_container

EXPORTING

container_name = 'CONTAINER'.

CREATE OBJECT lr_alv

EXPORTING

i_parent = lr_container.

Regards,

Sesh

Hai,

How 2 place a ALV Report in a container ?

3 REPLIES 3
Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
486

Hi,

You need to create a custom control in the screen and then use this customer control to create custom container object then pass this container object to in the grid instantiation.

see the below code.

CREATE OBJECT lr_container

EXPORTING

container_name = 'CONTAINER'.

CREATE OBJECT lr_alv

EXPORTING

i_parent = lr_container.

Regards,

Sesh

Read only

Former Member
0 Likes
485

check program BCALV_EDIT_05

Read only

Former Member
0 Likes
485

Hi,

In the screen layout,make a custom container (Icon with C ) and name it in Capital letters as <b>CONTAINER</b>.The code below in bold letters is what exactly you want.I ve given a small example on how to use ALV:

REPORT SAMPLE.

<b>DATA: alv type ref to cl_gui_alv_GRID,

cont type ref to cl_gui_custom_container,</b>

itab_spfli type table of spfli.

START-OF-SELECTION.

select * from spfli into table itab_spfli.

call screen 100.

END-OF-SELECTION.

&----


*& Module STATUS_0100 OUTPUT

&----


  • text

----


MODULE STATUS_0100 OUTPUT.

seT PF-STATUS 'GUI'.

  • SET TITLEBAR 'xxx'.

<b>if cont is initial.

CREATE OBJECT cont

EXPORTING

CONTAINER_NAME = 'CONTAINER'.

CREATE OBJECT ALV

EXPORTING

I_PARENT = CONT.</b>

CALL METHOD ALV->SET_TABLE_FOR_FIRST_DISPLAY

EXPORTING

I_STRUCTURE_NAME = 'SPFLI'

CHANGING

IT_OUTTAB = itab_spfli

Regards,

Beejal

**Reward if this helps