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

ALV

Former Member
0 Likes
932

How to add a new coloumn to existing alv report ?

How to add a new coloumn to existing alv report ?

7 REPLIES 7
Read only

Former Member
0 Likes
912

you have to add first in int table then you have to add in the field catalog...

regards

shiba dutta

Read only

Former Member
0 Likes
912

Hi,

If we need a new column to be shown in the report output then add that required new field to the internal table which is passed to the function module for displaying ALV output. You have to fill values to that field in the internal table while populating that internal table.

thanks,

sksingh

Read only

Former Member
0 Likes
912

Check the link below to start with ALV.

http://www.sapdevelopment.co.uk/reporting/alv/alvscr.htm

Read only

Former Member
0 Likes
912

Hi,

In the Out put check the CHANGE LAYOUT

whether the extra required field is there or not on both sides check.

If it is not there, copy the report to some other Z report(if it is std)

then fetch that extra fields and add to field catalog and display in the output.

reward if useful

regards,

ANJI

Read only

Former Member
0 Likes
912

Hi Sriram,

Add the field to the final internal table definition(Preferable the last field).

Populate that field where all other field are being populated.

Fill the field catalog for that field at last(After the field catalog information for all other fields has been filled). Make the position as the last one.

Regards,

Ravi

Read only

Former Member
0 Likes
912

Hi,

You can add a new record to the ALV using the following code:

type-pools: slis.

data : it_tab type slis_t_fieldcat_alv,

wa_tab type slis_fieldcat_alv.

perform alv_grid using sel1 field1.

form al_grid using sel1 type any

field1 type any.

wa_tab-seltext_l = '<heading for the column>'.

wa_tab-fieldname = '<field_name you want to add>'.

append wa_tab to it_tab.

clear wa_tab.

regards,

Thasneem

reward if useful

Read only

Former Member
0 Likes
912

Hi Sriram,

To add a new coloumn to existing alv report, just follow these steps,

1. Add the field in Final Internal which will populate the data.

2. Add the field in Selection-screen so that user can filter the data.

3. Do the validation for that field in selection-screen.

4. In Data retrive logic add the new field as per the requirement.

5. In fieldcatlog add the new filed with all required Properties.

6. Call the Display FM like 'REUSE_ALV_GRID_DISPLAY'.

Finally execute the Prog. and wiht new field u r ALV output will displayed.

    • Reward if Helpfull.

Thanks,

Anil.