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

Creating Automatic ALV Grid

Former Member
0 Likes
954

Hi Abapers!

i tried CALL METHOD l_alv->set_table_for_first_display with internal table to automaticaly creating alv grid.The output shows like all the itab data displaying in single feild.Instead of itab if i gave any table name like mara it is working fine .

is it possible to display itnternal table by using this method?

Thanks in Advance!!!

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
829

HI

Refer to this links

https://www.sdn.sap.com/irj/sdn/wiki?path=/display/abap/7%2bsteps%2bto%2bcreate%2boops%2balv

http://abapreports.blogspot.com/2008/06/alv-grid-display-with-oops.html

check the program BCALV_GRID_01 to BCALV_GRID_08.

and also BCALV_EDIT_01 to BCALV_EDIT_08 programs.

6 REPLIES 6
Read only

Former Member
0 Likes
830

HI

Refer to this links

https://www.sdn.sap.com/irj/sdn/wiki?path=/display/abap/7%2bsteps%2bto%2bcreate%2boops%2balv

http://abapreports.blogspot.com/2008/06/alv-grid-display-with-oops.html

check the program BCALV_GRID_01 to BCALV_GRID_08.

and also BCALV_EDIT_01 to BCALV_EDIT_08 programs.

Read only

Former Member
0 Likes
829

This is because of header line issue if mara table:

CALL METHOD oref1->set_table_for_first_display
      EXPORTING
        is_layout                     = wa_layout
      CHANGING
        it_outtab                     = i_mara[]"--<<<This is Body of Internal table.
        it_fieldcatalog               = fieldcat

Read only

0 Likes
829

Hi Amit,

Thanks for ur reply.Should i build fieldcatlog manualy? and is the exporting parameter is_layout is my interanl table? could u pl expalin with little bit more,if possible?

Thanks ia advance.

Edited by: Ranganayahi Chandirasekaran on Dec 10, 2008 7:52 AM

Read only

0 Likes
829

Hello

If you like to have weird errors due to faulty fieldcatalogs then you should create it manually otherwise I recommend to use fm LVC_FIELDCATALOG_MERGE.

If you are still using itab's with header lines then you have missed an important restriction that fortunately has come with ABAP-OO: header lines are banned from ABAP classes (and they should be banned from any programming object as well).

The EXPORTING parameter IS_LAYOUT describes the layout of your ALV list (e.g. which columns are displayed, column width optimization, subtotals, etc.).

Your data itab has to "feed" to CHANGING parameter IT_OUTTAB.

Regards

Uwe

Read only

Former Member
Read only

Former Member
0 Likes
829

Closing this thread.