‎2007 Jan 10 10:53 AM
Hello,
does anybody know how to create a standard variant for a report?
I want to reduce output grid's columns by a few.
Thanks
‎2007 Jan 10 12:00 PM
Hi Boris,
there are two ways.
first in abap.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = PROGNAME
I_CALLBACK_PF_STATUS_SET = 'MAIN'
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
I_CALLBACK_TOP_OF_PAGE = 'TOP_OF_PAGE_GRID'
<b> IS_VARIANT = VARIANT</b>
IS_LAYOUT = LAYOUT
IT_FIELDCAT = FIELDCAT
IT_SORT = SORT
IT_FILTER = FILTER
I_SAVE = 'A'
IT_EVENTS = EVENTS
IT_EVENT_EXIT = EVENT_EXIT
IS_PRINT = PRINT
TABLES
T_OUTTAB = ITAB
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
First you have to create layout-Variant.
second:
in the output GOTO CHANGE LAYOUT
make your changes and save it with default setting, don't mark User-specific
Regards, Dieter
‎2007 Jan 10 11:04 AM
Is it what normally we create selection-screen varinats? are you looing for standrd varinats using SHD0 tcode.
‎2007 Jan 10 11:34 AM
Hi Boris,
What I could gather from your question is that you are interested in seeing fewer columns in a report. This is how you can achieve it:
You will see a variant icon in the application toolbar. Click on the icon
It will show you a list of all the columns that are available. Choose each of the columns you do not want to be displayed and click on the arrow button, which will take the columns to the right hand side pane. Only the columns left on the L.H.S pane will be displayed.After you are through with the entire set, click on the Save icon . You will then be prompted to specify a name and you can give descrition and make this a default setting or user specific.
Hope this helps.
Thanks and Regards,
Tribeni.
Please mark useful answers.
‎2007 Jan 10 11:45 AM
What Eswar Kanakanti posted is hitting nearly what I searched for.
On the result screen I do have an ALV Grid. This grid has about 35 columns. But for the first view the visible columns should be reduced. I could do this by setting the corresponding values in the fieldcatalog. But in consequence the user would not be able to activate those columns again.
Any further suggesstions? :-]
Cheers
Boris
‎2007 Jan 10 11:51 AM
Hi,
U can create a Layout for the same and make it as input parameter .
create ur layout and pass it, it will show only those columns which u hvae alaready selected.
‎2007 Jan 10 11:58 AM
‎2007 Jan 10 12:05 PM
Hi,
this will be available for all users but u have to mention it layout parameter or change the same after the execution of the report.
whenever u execute it will take the default layout
Thanks
Shiva
‎2007 Jan 10 12:00 PM
Hi Boris,
there are two ways.
first in abap.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = PROGNAME
I_CALLBACK_PF_STATUS_SET = 'MAIN'
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
I_CALLBACK_TOP_OF_PAGE = 'TOP_OF_PAGE_GRID'
<b> IS_VARIANT = VARIANT</b>
IS_LAYOUT = LAYOUT
IT_FIELDCAT = FIELDCAT
IT_SORT = SORT
IT_FILTER = FILTER
I_SAVE = 'A'
IT_EVENTS = EVENTS
IT_EVENT_EXIT = EVENT_EXIT
IS_PRINT = PRINT
TABLES
T_OUTTAB = ITAB
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
First you have to create layout-Variant.
second:
in the output GOTO CHANGE LAYOUT
make your changes and save it with default setting, don't mark User-specific
Regards, Dieter