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: 

ALV in Dialog program

Former Member
0 Kudos

Hi Folks ,

I have tab strip in which in the first three tabs I'm displaying table controls. I have a requirement to display a alv when I click on the fourth tab. The alv has to be displayed on the subscreen related to the fourth tab.

Thank & Regards,

Santosh

1 ACCEPTED SOLUTION

Former Member
0 Kudos

HI santosh,

Place a custom container on the subscreen where you want to display the ALV. Give it a appropriate name.

call the custom container in your program, declare the alv grid controller and then it will work.

Best Regards,

Suvendu

7 REPLIES 7

Former Member
0 Kudos

HI santosh,

Place a custom container on the subscreen where you want to display the ALV. Give it a appropriate name.

call the custom container in your program, declare the alv grid controller and then it will work.

Best Regards,

Suvendu

0 Kudos

Hi Suvendu,

Could you please give me some idea how to call the custom container and how to display the alv on it

0 Kudos

DATA: grid TYPE REF TO cl_gui_alv_grid,

container TYPE REF TO cl_gui_custom_container,

mycontainer TYPE scrfname VALUE 'ALV1',

gs_layout TYPE lvc_s_layo.

CREATE OBJECT container

EXPORTING

container_name = mycontainer.

CREATE OBJECT grid

EXPORTING

i_parent = 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.

gs_layout-grid_title = 'Purchase Order'(100).

CALL METHOD GRID->set_table_for_first_display

EXPORTING

i_structure_name = 'EKKO'

is_layout = gs_layout

  • is_print =

CHANGING

it_outtab = i_ekko

  • it_fieldcatalog =

  • it_sort =

  • it_filter =

  • 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.

0 Kudos

Hi Santosh,

Hope the program would be helpful to you and would solve your problem.

Best Regards,

Suvendu Swain

Former Member
0 Kudos

Well not sure but you cannot call a report in a subscreen. Try to pass parameter by using submit and calling the report program.

Former Member
0 Kudos

In the fourth tab follow the standard ways of creating display in alv using ABAPobjects

e.g. -

1. Custom container in the Subscreen

2. Create Container Object

3.Create Grid Object

4. Build Field Ctalog

5. Call method set_table_for_first_display

You can find lot of links in SDN and check standard programs for

BCALV_EDIT_01/BCALV_EDIT_02/BCALV_EDIT_03/.... etc for different requirements.

Former Member
0 Kudos

Hi,

For your requirement use OOP concept to display the data on ALv grid.

1.Call one Screen for your requirement it is subscreen on Tab then place on custom container and name it.

2. Create Objects reference to CL_GUI_ALV_GRID AND CL_GUI_CUSTOM_CONTAINER.

3.then Connect Custom container and Custom cotrol on screen

4. Provide parent child relation ship between custom container and alv grid.

5. display data on grid by calling SET_TABLE_FOR_FIRST_DISPLAY method of alv grid.

for reference see program starting with BC_ALV*