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

adding field to alv grid

Former Member
0 Likes
4,518

Hi all,

Can any one please let me know how to add a new field to the existing alv grid.

Thanks.

Hi all,

Can any one please let me know how to add a new field to the existing alv grid.

Thanks.

5 REPLIES 5
Read only

sivasatyaprasad_yerra
Product and Topic Expert
Product and Topic Expert
0 Likes
1,828

Are you using structure to display the fields. If yes, then in the PBO of the screen, set the visible property of the field to 'X'.

Regards,

Siva.

Read only

Former Member
0 Likes
1,828

Hi,

Enhance the structure used to build the field catalog. Considering the structure of the table passed to the set_table_for_first_display method (parameter it_outtab) is also enhanced, fill the values in the for the field before calling the method.

If you are building the field catalog manually then add the new field to the field catalog table. Example:

ls_fcat-fieldname = 'FIELDNAME'.

ls_fcat-ref_table = 'TABLE NAME'.

ls_fcat-col_pos = 8 (which position you would like to add the column to)

append ls_fcat to lt_fcat.

George

Read only

Former Member
0 Likes
1,828

Simple add the new field with all the details in exsisting Field Caltelog.

Example :



CLEAR W_FLDCAT.
W_FLDCAT-FIELDNAME = 'VBELN'. ( Field Name )
W_FLDCAT-COLTEXT = 'SALES ORDER'. ( Column Header )
APPEND W_FLDCAT TO IST_FLDCAT.

here W_FLDCAT is workarea of Field-Catelog type Itab.

IST_FLDCAT is Field-Catalog.

Regards,

Chintan.

Edited by: Chintan_SAP on May 14, 2009 9:16 AM

Read only

Former Member
0 Likes
1,828

Hi,

" You can do this but only for limited Std reports like FBL5N especially in FI. Check out BTEs. Tcode for BTEs is FIBF."

use this link for more info abt BTE's

[http://help.sap.com/saphelp_erp2004/helpdata/en/ee/e87988027a11d5a7d60000e83dda02/content.htm]

Read only

Former Member
0 Likes
1,828

Hi Ram ,

We can add a new field to an ALV grid by changing the fieldcatalog. Add a new column to the fieldcat interanal table with the new field you want. then a new column will be added to your alv grid.