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: 

ADDING A COLUMN TO THE ALV

Former Member
0 Kudos

HI Experts,

im here with a problem , i want to know if its possible to add an extra column to the ALV display my problem is im using the dictionary table directly not using any structures and hence iv not declared any field catalog....the output of this one extra field has to be hard coded and added to the display so it appears with the displayed alv at all times.

is this possible can i get help pls?

Thanks & Regards,

Goldie.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

it is possible,

get the fieldcatalog for the table using FM REUSE_ALV_FIELDCATALOG_MERGE, after this add the details of extra field to this fieldcat and display it will work.

Regards,

Raghavendra

7 REPLIES 7

Former Member
0 Kudos

Hi,

it is possible,

get the fieldcatalog for the table using FM REUSE_ALV_FIELDCATALOG_MERGE, after this add the details of extra field to this fieldcat and display it will work.

Regards,

Raghavendra

former_member223537
Active Contributor
0 Kudos

Hi,

Append one more field to the field catalog & populate the same in the output internal table of ALV.


  fieldcatalog-fieldname   = 'NETPR'.
  fieldcatalog-seltext_m   = 'Net Price'.
  fieldcatalog-col_pos     = 7.
  fieldcatalog-outputlen   = 15.
  fieldcatalog-datatype     = 'CURR'.
  append fieldcatalog to fieldcatalog.
  clear  fieldcatalog.

Former Member
0 Kudos

HI GOLDIE,

JUST GIVE ME UR REPORT REQUIERMENTS OR CODE OF IT AND I WILL DEFINATELY HELP U OUT.

hymavathi_oruganti
Active Contributor
0 Kudos

declare internal table like below,

data: begin of itab,

include structure abc.

data: extra_field type ...,

end of itab.

now build fieldcat either using reuse_alv_fieldcat_merge fn module

or build manually.

Former Member
0 Kudos

hi

good

i dont think you can hard coded the field in the alv output ,other than that you can add that extra field in your structure and you can display the same in the alv output if you r not using any field catalog.

reward point if helpful.

thanks

mrutyun^

Former Member
0 Kudos

thank u everyone for ur replies ,i have solved the problem hard coding it solves the problem!

0 Kudos

Can you tell me how you achieved this?