Application Development 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: 

"Select Layout" option in alv output

Former Member
0 Kudos

Hi All,

I have developed a ALV report.

In the output, on clicking the "Select Layout" button, a small window opens with some layout option/variant say "ZSLEB".

When i choose this layout, the output changes and takes the form of the chosen layout i.e. ZSLEB.

Now, on refresh, the alv output doesnt display this new layout, but goes back to the default layout/variant.

Actually, i am not passing anythin to the IS_Variant parameter in the ALV_GRID_Display FM.

I suppose i need to somehow manage to fetch the "ZSLEB" layout value during refresh and pass it to Is_Variant. Please help me in doing this.

Thanks & Regards,

Tejas Savla

1 REPLY 1

abdulazeez12
Active Contributor
0 Kudos

Variant information

Description

This structure is only relevant if display variants are to be saved and/or read.

Variant information including the name of the list variant that is used to output the list.

To allow display variants to be read within the ALV, you must specify the acess path using fields REPORT (required field), HANDLE (optional field) and/or LOG_GROUP (optional field).

If you also want to allow display variants to be saved, you must additionally fill parameter I_SAVE accordingly.

See also the documentation on IMPORTING parameter I_SAVE.

A variant is uniquely described through:

The program to which the variant is assigned (REPORT)

The handle (HANDLE), if, for example, multiple lists with different structures and data are called in a program (I_CALLBACK_PROGRAM).

The handle is a CHAR(4) field that must be uniquely defined and describes the assignment of the call to the current structure of the internal output table.

Example:

Depending on the user interaction, several types of lists can be output in program x.

The user should be able to define display variants for each type of list.

You provide this function to the user by assigning a HANDLE to each list. If variants for the program and the handle are saved, the handle must not be modified any more.

The logical group, if, for example, the same list is created with different settings through various transactions (LOG_GROUP).

The logical group is a CHAR(4) that must be uniquely defined and specifies the assignment.

Example:

Program x is called through transactions T1 and T2. Depending on the transaction code, the fields available to the user through the field catalog differ in their assignment to different logical groups.

If variants for the program and the logical group are saved, the logical group must not be modified any more.

The user name, if user-specific variants are saved (USERNAME).

You do not have to fill this parameter manually since the variant name is unique.

The variant name (VARIANT).

You only have to fill this parameter if this structure is to be used to read a concrete variant and the list is to be output with this variant.

Value range

To call a list with a variant, you must specify the above fields.

Default

If the structure is initial, but saving is active (I_SAVE is not initial), then

IS_VARIANT-REPORT = I_CALLBACK_PROGRAM is set.