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

Column display in output using with method set_table_for_first_display

Former Member
0 Likes
2,771

Hi I am using method object-> set_table_for_first_display to display report out in the form of grid. When i add new field to the output, they are adding successfully but it going to store in column set, not in displayed column. to get them to display i have to go to choose layout->change layout->drag them to displayed column area.

How can i get them to displayed column area automatically so that i can see them in report out put.

please let me know if you not clear about my question.

thanks,

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,830

There can be 2 possible reasons

(1) Existing Global/User layout Settings .If a layout is already saved by ticking the 'Default Layout settings' and set as global/user specific ( I_SAVE = 'A'/'U'/'X' in the method set table for first display) ,then the layout maybe applied everytime the ALV is executed.In such a case the current layout needs to be deleted and after the new fields are added,they can be set again

(2)Field length of the catalog..I am not sure of the total length but there is a restriction on the number of fields displayed(based on the total length of the fields involved,I guess).

So either by setting a global variant as default or choosing specific fields in the catalog the new layout can be obtained.

Hope it helps.

Hi I am using method object-> set_table_for_first_display to display report out in the form of grid. When i add new field to the output, they are adding successfully but it going to store in column set, not in displayed column. to get them to display i have to go to choose layout->change layout->drag them to displayed column area.

How can i get them to displayed column area automatically so that i can see them in report out put.

please let me know if you not clear about my question.

thanks,

7 REPLIES 7
Read only

bernat_loscos
Explorer
0 Likes
1,830

Hi, you can try to refresh your table display using this code:

DATA: gr_alv TYPE REF TO cl_gui_alv_grid.

gr_alv->refresh_table_display( ).



Regards,

Read only

rosenberg_eitan
Active Contributor
0 Likes
1,830

Hi ,

It is all depends on the field catalog settings.

Look for "An Easy Reference for ALV Grid Control.pdf"

There is a chapter "Changing Field Catalog or Layout after First Display"

Also see program BCALV_FIELDCAT_TEST

Regards.

Read only

Former Member
0 Likes
1,830

When you added the new field to the field catalog, make sure, the no_out attribute is set to space.

Read only

0 Likes
1,830

Hi Eitan,

I did not find any clue from example program.

Thanks

Read only

0 Likes
1,830

Hi Susmitha,

I have not used no_out parameter in field catalog ...

Thanks

Read only

0 Likes
1,830

Can you please attach screen shot for the same..? Have you created in any groups for output ALV or they were already their... ?

Nabheet

Read only

Former Member
0 Likes
1,831

There can be 2 possible reasons

(1) Existing Global/User layout Settings .If a layout is already saved by ticking the 'Default Layout settings' and set as global/user specific ( I_SAVE = 'A'/'U'/'X' in the method set table for first display) ,then the layout maybe applied everytime the ALV is executed.In such a case the current layout needs to be deleted and after the new fields are added,they can be set again

(2)Field length of the catalog..I am not sure of the total length but there is a restriction on the number of fields displayed(based on the total length of the fields involved,I guess).

So either by setting a global variant as default or choosing specific fields in the catalog the new layout can be obtained.

Hope it helps.