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 A COLUMN TO THE ALV

Former Member
0 Likes
3,064

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
Read only

Former Member
0 Likes
1,954

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
Read only

Former Member
0 Likes
1,955

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

Read only

Former Member
0 Likes
1,954

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.

Read only

Former Member
0 Likes
1,954

HI GOLDIE,

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

Read only

hymavathi_oruganti
Active Contributor
0 Likes
1,954

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.

Read only

Former Member
0 Likes
1,954

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^

Read only

Former Member
0 Likes
1,954

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

Read only

0 Likes
1,954

Can you tell me how you achieved this?