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

create standard variant

0 Likes
1,476

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
916

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

7 REPLIES 7
Read only

Former Member
0 Likes
916

Is it what normally we create selection-screen varinats? are you looing for standrd varinats using SHD0 tcode.

Read only

Former Member
0 Likes
916

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.

Read only

0 Likes
916

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

Read only

0 Likes
916

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.

Read only

0 Likes
916

Hi,

and this layout will be available for all users?

cheers

Read only

0 Likes
916

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

Read only

Former Member
0 Likes
917

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