‎2011 Jun 23 9:35 AM
Hey Guru's,
I am using an OO ALV and i want to get a save button as we get in BCALV_GRID_09 program
my code is as follows please suggest.
*---Set Table for Fisrt Display
CALL METHOD g_grid->set_table_for_first_display
EXPORTING
it_toolbar_excluding = LT_EXCLUDE -
> excluding some toolbar functions
is_layout = GS_LAYOUT -
> Program name passing
i_save = C_SAVE -
> passing A here
i_default = 'X'
CHANGING
it_fieldcatalog = IT_FCAT
it_outtab = TB_OUTTAB[].
Thanks in advance
‎2011 Jun 23 10:44 AM
Hi Suresh,
Use the following code to achive that.
CALL METHOD g_grid->set_table_for_first_display
EXPORTING
it_toolbar_excluding = LT_EXCLUDE ---your code
is_layout = GS_LAYOUT
is_variant = GS_VARIANT -added a point here--
>Pass the Program name as mentioned below
i_save = C_SAVE
i_default = 'X' ---this is not necessary any how you can put this no problem
CHANGING
it_fieldcatalog = IT_FCAT
it_outtab = TB_OUTTAB[].
Data : gs_variant type disvariant.
gs_variant-report = sy-repid (make sure you are submitting the correct program i mean method set table for first displat is called that program names. not current program like submitting something)
i_default = 'X' is for getting the default layout...since you are excluding some functions no need to do this.
Hope this works,
Regards,
bhargav
‎2011 Jun 23 9:50 AM
Hi Suresh,
You code is right but you need to pass IS_VARIANT parameter to the method set_table_for_first_display.
pass is_variant-report = sy-repid.
Thanks,
Ravi Aswani
‎2011 Jun 23 10:01 AM
Hi,
Yes you should pass the IS_VARIANT parameter to the method set_table_for_first_display.
gs_layout-report = sy-repid."parameter should have the program name.
IS_VARIANT = gs_layout " pass to set_table_for_first_display.
regards,
Dhina..
Edited by: Dhina DMD on Jun 23, 2011 11:02 AM
‎2011 Jun 23 10:44 AM
Hi Suresh,
Use the following code to achive that.
CALL METHOD g_grid->set_table_for_first_display
EXPORTING
it_toolbar_excluding = LT_EXCLUDE ---your code
is_layout = GS_LAYOUT
is_variant = GS_VARIANT -added a point here--
>Pass the Program name as mentioned below
i_save = C_SAVE
i_default = 'X' ---this is not necessary any how you can put this no problem
CHANGING
it_fieldcatalog = IT_FCAT
it_outtab = TB_OUTTAB[].
Data : gs_variant type disvariant.
gs_variant-report = sy-repid (make sure you are submitting the correct program i mean method set table for first displat is called that program names. not current program like submitting something)
i_default = 'X' is for getting the default layout...since you are excluding some functions no need to do this.
Hope this works,
Regards,
bhargav
‎2011 Jun 23 11:08 AM