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

ALV

Former Member
0 Likes
2,894

Hi Friends,

What is the purpose of parameter IS_LAYOUT in the FM 'REUSE_ALV_GRID_DISPLAY'.

and what are all the possible values we can give for that.

Thanks,

Radhika.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,238

hi,

IS_LAYOUT:

<b>simple description:</b> Structure to set the layout of the report

<b>detailed Description:</b>

Structure for describing the list to be output.

The parameters are described and grouped based on the following

categories:

o Display options

o Exceptions

o Totals

o Interaction

o Detail screen

o Color

o Other

Note the section on pre-defined settings.

Display options

o colwidth_optimize

Value range: SPACE, 'X'

'X' = Optimizes the column width to ensure that the content is

displayed completely.

o no_colhead

<b></b>

it is better to chk SE37 <b>function module documentation</b>

shan

Message was edited by:

sivakumar palaniswamy

14 REPLIES 14
Read only

Former Member
0 Likes
2,238

this is the layout

List layout specifications

Description

Structure for describing the list to be output.

The parameters are described and grouped based on the following categories:

Display options

Exceptions

Totals

Interaction

Detail screen

Color

Other

Note the section on pre-defined settings.

Display options

colwidth_optimize

Value range: SPACE, 'X'

'X' = Optimizes the column width to ensure that the content is displayed completely.

no_colhead

Value range: SPACE, 'X'

'X' = Do not output column headings.

zebra

Value range: SPACE, 'X'

'X' = Striped pattern (for wide lists, for example)

no_vline

Value range: SPACE, 'X'

'X' = Separate columns by SPACE.

Exceptions

lights_fieldname

Value range: SPACE, field name of the internal output table

Field of the internal output table that contains the coding of the exceptions to be output

Coding in the field of the output table:

'1' = red traffic light

'2' = yellow traffic light

'3' = green traffic light

lights_tabname

Value range: SPACE, table name of the internal output table

Table name of the internal output table that contains the specified field in parameter LIGHTS_FIELDNAME.

lights_rollname

Value range: SPACE, data element name

The documentation defined for this data element is displayed when the F1 help for an exception column is called.

lights_condense

Value range: SPACE, 'X'

'X' = The system outputs the 'maximum' exception of the items included in the total at subtotal level.

Example: If a list row is output with a 'red traffic light', each subtotal included in this list row is also displayed with a 'red traffic light'.

Totals

no_sumchoice

Value range: SPACE, 'X'

'X' = Value fields for which totals are calculated are communicated by the calling program (FIELDCAT-DO_SUM = 'X'). The user should not be allowed to change this pre-defined setting interactively.

no_totalline

Value range: SPACE, 'X'

'X' = No overall totals line should be displayed. If required, subtotals can nevertheless be calculated and displayed. The fields which are used for calculating subtotals are to be marked with DO_SUM = 'X' in the field catalog.

no_subchoice

Value range: SPACE, 'X'

'X' = Characteristics at whose control level subtotals should be calculated are communicated by the calling program.

The user should not be allowed to change this pre-defined setting interactively.

See also the documentation on IMPORTING parameter IT_SORT.

no_subtotals

Value range: SPACE, 'X'

'X' = Calculating subtotals should not be allowed.

totals_only

Value range: SPACE, 'X'

'X' = Data is output in compressed format only at totals line level.

Prerequisite: IMPORTING parameter IT_SORT is filled accordingly with the sort criteria and the subtotals indicator.

See also the documentation on IMPORTING parameter IT_SORT.

totals_text

Value range: SPACE, string (not more than 60)

' ' = In the first column, the standard system indicates the totals level by displaying an adequate number of '*' for the overall total. After the asterisks, the system displays the string 'total' provided that the column width of the first output column is large enough. If the column width is not sufficient, only the asterisks are displayed.

'string' = After the totals level indicated visually by means of '*', the system displays the string passed provided that the column width is sufficient.

subtotals_text

Value range: SPACE, string (not more than 60)

' ' = In the first column, the standard system indicates the totals level by displaying an adequate number of '*' for the subtotals line. After the asterisks, the system displays the string total provided that the column width of the first output column is large enough and the characteristic of the first column is not a subtotal criterion. If the column width is not sufficient, only the asterisks are displayed.

'string' = After the totals level indicated visually by means of '*', the system displays the string passed provided that the column width is sufficient and the characteristic of the first column is not a subtotal criterion.

If the characteristic is a subtotal criterion, the system repeats the characteristic value for which subtotals were calculated after the totals level provided that the column width is sufficient.

numc_sum

Value range: SPACE, 'X'

' ' = In the standard system, it is not possible to calculate totals for NUMC fields.

'X' = It is generally possible to calculate totals for NUMC fields. If this indicator is set, you can use parameter FIELDCAT-NO_SUM to control for each NUMC column whether totals can be calculated or not.

Interaction

box_fieldname

Value range: SPACE, field name of the internal output table

If the list should have checkboxes at the beginning of each list row (to allow the user to select multiple rows at once), you must fill this parameter with the field name of the internal output table that represents the selection column for selecting rows with the help of checkboxes.

The field is always displayed as a checkbox at the beginning of each list row without a list heading.

box_tabname

Value range: SPACE, table name of the internal output table

f2code

Value range: SPACE, function code

Meaning when the ALV standard interface is used:

If you want to assign a standard ALV function code to a double-click (F2), you must assign this function code to this parameter.

Example: You want to assign the standard ALV function 'Detail' ('&ETA') to F2.

=> LAYOUT-F2CODE = '&ETA'

Meaning if a self-defined interface is used:

Case 1:

You leave the standard ALV function code for F2 '&IC1' in the copied interface of the application. However, you want to have a function executed with F2 that is not assigned to F2 in the interface (standard ALV function or application function). You must communicate this function code to the ALV using parameter F2CODE.

Case 2:

You remove the standard ALV function code for F2 '&IC1' from the interface of the application and use another function code instead (standard ALV function or application function). You must communicate this function code to the ALV using parameter F2CODE. This is required if you want to allow columns to be selected.

confirmation_prompt

Value range: SPACE, 'X'

'X' = If one of the functions 'Back(F03)', 'Exit(F15)' or 'Cancel(F12)' is triggered, the system asks the user if he wants to leave the list.

key_hotspot

Value range: SPACE, 'X'

The columns defined as key fields in the field catalog

(FIELDCAT-KEY = 'X') are output as a hotspot. This means that single-clicking a key field (highlighted in color in the list) triggers the function assigned to F2.

reprep

Value range: SPACE, 'X'

'X' = Enable report/report interface

Prerequisite: Application system (=> report RKKBRSTI exists).

The list module acts as a potential sender in the report/report interface (interface initialization, if required).

The calling report/module pool entered in I_CALLBACK_PROGRAM is declared to the report/report interface as the sender report with type RT=Report.

If the sender report is assigned to receiver reports in table TRSTI, function code BEBx is set to active.

( x = function code class)

Example:

If sender RKTFGS15 has a receiver assignment for Report Writer report group 7KOI with function code class '3' (SAP setting), this receiver report group is called through the report/report interface at function code 'BEB3'. The selections passed to the report/report interface are the report selections and the key information of the selected row.

For more information on the report/report interface, see the documentation on function group 'RSTI'.

Detail screen

detail_initial_lines

Value range: SPACE, 'X'

' ' = In the detail view, the system displays only fields whose content is not set to initial.

'X' = Initial field contents are also displayed on the detail screen.

detail_titlebar

Value range: SPACE, string (not more than 30)

' ' = The system displays 'Detail: Display' as the title of the detail screen.

'string' = The system displays the string passed as the title of the detail screen.

Color

info_fieldname

Value range: SPACE, field name of the internal output table

You can color an entire list row individually by using a color code that is set for each row in a column of the internal output table. You must assign the field name of the field with the color code to this parameter.

The field of the internal output table must be of type CHAR(3).

The code must comply with the following syntax:

'Cxy':

C = Color (each code must begin with 'C')

x = Color number ('1'-'9')

y = Intensified ('0' = off, '1' = on)

Note: The color of the key column is not affected. If you also want to color the key column at row or cell level, you can use complex coloring which is described below for parameter COLTAB_FIELDNAME.

For information on coloring columns, see the documentation on field catalog parameter FIELDCAT-EMPHASIZE of IMPORTING parameter IT_FIELDCAT.

coltab_fieldname

Value range: SPACE, field name of the internal output table

You can color cells individually by using a color code that is set for the row of the cells in a column of the internal output table.

You must assign the field name of the field with the color code to this parameter.

The field of the internal output table must be of type SLIS_T_SPECIALCOL_ALV.

Principle: The field for the color code is filled in the row in which the cells to be colored are located. The field then contains an internal table of the above structure that includes the field names of the cells to be colored with the color code. The cell coordinates are therefore derived from the row position in which the color code is written and the column information contained in the color table.

The row structure of the internal color table of type SLIS_T_SPECIALCOL_ALV is as follows:

Farbtabelle-NAME = Field name of cell to be colored

Farbtabelle-COLOR-COL = Color number (1 - 9)

Farbtabelle-COLOR-INT = Intensified (0 = off, 1 = on)

Farbtabelle-COLOR-INV = Inverse (0 = off, 1 = on)

Farbtabelle-NOKEYCOL = Ignore key coloring ('X' = yes, ' ' = no)

If parameter Farbtabelle-NAME is not filled, all color specifications refer to all fields. As a result, the entire row is colored.

Default

In many cases, the default layout settings can be kept so that you frequently do not need to pass this structure with modified flags.

Note:

All other fields not specified here explicitly are not relevant for use with REUSE_ALV_GRID_DISPLAY or are not released.

Read only

Former Member
0 Likes
2,238

Hi Radhika,

The FM REUSE_ALV_GRID_DISPLAY is used for displaying a grid. The parameter IS_LAYOUT is used for specifying the ways in which the layouts can be specified in a grid.

For more information refer the documentation provided by SAP for this FM.

Regards,

Chetan.

PS: Reward points if this is helpful.

Read only

Former Member
0 Likes
2,238

to be more clear check the function module documentation in SE37 , and click on the link IS_LAYOUT

Read only

Former Member
0 Likes
2,238

HI,

Ls_layout defines the behavior of the ALV grid.for more deails u can take se11 and see SE11 give SLIS in type pools and display.search for layout using CTRL+F u can see the possible values.

Read only

Former Member
0 Likes
2,239

hi,

IS_LAYOUT:

<b>simple description:</b> Structure to set the layout of the report

<b>detailed Description:</b>

Structure for describing the list to be output.

The parameters are described and grouped based on the following

categories:

o Display options

o Exceptions

o Totals

o Interaction

o Detail screen

o Color

o Other

Note the section on pre-defined settings.

Display options

o colwidth_optimize

Value range: SPACE, 'X'

'X' = Optimizes the column width to ensure that the content is

displayed completely.

o no_colhead

<b></b>

it is better to chk SE37 <b>function module documentation</b>

shan

Message was edited by:

sivakumar palaniswamy

Read only

0 Likes
2,238

Thanks for ur answers

Can you provide me sample code for the same.

Read only

0 Likes
2,238

goto SE37 and findout the where-used-list of that function module , u can get various programs , this will help u more

Read only

0 Likes
2,238

hi,

gd_layout-no_input = 'X'.

gd_layout-colwidth_optimize = 'X'.

gd_layout-totals_text = 'Totals'(201).

  • Set layout field for row attributes(i.e. color)

gd_layout-info_fieldname = 'LINE_COLOR'.

gd_layout-totals_only = 'X'.

gd_layout-f2code = 'DISP'. "Sets fcode for when double

"click(press f2)

gd_layout-zebra = 'X'.

gd_layout-group_change_edit = 'X'.

gd_layout-header_text = 'helllllo'.

hope this helps,

do reward it helps,

priya.

Read only

Former Member
0 Likes
2,238

Hi Radhika,

The IS_LAYOUT is used to make changes to the layout of the Grid you display.

The following are the possible values and for any other info go to the documentation of the FM

Structure for describing the list to be output.

The parameters are described and grouped based on the following categories:

Display options

Exceptions

Totals

Interaction

Detail screen

Color

Other

Note the section on pre-defined settings

Read only

baskaran00
Active Participant
0 Likes
2,238

Hi,

IS_LAYOUT is used to format the ALV grid display.

For eg. If u want ALV report in Edit mode u can set as l_layout-edit = 'X'.

Here is the declaration.

DATA : l_layout TYPE SLIS_LAYOUT_ALV.

l_layout-edit = 'X'. "Edit the ALV Report

l_layout-zebra = 'X'. "To give Zebra style

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

IS_LAYOUT = l_layout.

Hope now u got an idea.

Rgds,

Router

Read only

Former Member
0 Likes
2,238
  • Create Layout info

clear p_alv_layout.

p_alv_layout-colwidth_optimize = 'X'.

p_alv_layout-zebra = 'X'.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

  • I_INTERFACE_CHECK = ' '

  • I_BUFFER_ACTIVE = ' '

I_CALLBACK_PROGRAM = l_callback_program

I_CALLBACK_PF_STATUS_SET = 'SET_PF_STATUS'

I_CALLBACK_USER_COMMAND = 'USER_COMMAND'

  • I_CALLBACK_TOP_OF_PAGE = ' '

  • I_CALLBACK_HTML_TOP_OF_PAGE = ' '

  • I_CALLBACK_HTML_END_OF_LIST = ' '

  • I_STRUCTURE_NAME =

  • I_BACKGROUND_ID = ' '

I_GRID_TITLE = 'Bearbeiter'(010)

  • I_GRID_SETTINGS =

IS_LAYOUT = p_alv_layout

.

.

.

.

.

.

Read only

Former Member
0 Likes
2,238

is_layout has some parameters which can be passed to define the properties of the list to be displayed.

for example, if we need the list to be displayed in zebra crossing format, we can assign 'X value to is_layout-zebra.

we can also define if we need a checkbox.

different parameters are available in this structure for different functions.

this structure is not mandatory.

thanks

pavan

Read only

Former Member
0 Likes
2,238

hi radhika,

IS_LAYOUT -List layout specifications

•The parameters are described under the following headers:

– Display options

–Totals

– Interaction

– Detail screen

– Display variants (only for hierarchical lists)

– Color

–Other

Display options

•colwidth_optimize

•no_colhead

•zebra

•no_vline

•no_min_linesize

•max_linesize

Exceptions

•lights_fieldname value set: SPACE, internal output table field name

•lights_tabname value set: SPACE, internal output table name

•lights_rollname value set: SPACE, data element name

•lights_condense value set: SPACE, 'X'

Totals

•no_sumchoice value set: SPACE, 'X'

•no_totalline value set: SPACE, 'X'

•no_subchoice value set: SPACE, 'X'

•no_subtotals value set: SPACE, 'X'

•totals_only value set: SPACE, 'X'

•totals_text value set: SPACE, string(max.60)

•subtotals_text value set: SPACE, string(max.60)

•numc_sum value set: SPACE, 'X'

Interaction

•box_fieldname value set: SPACE, internal output table field name

•box_tabname value set: SPACE, internal output table name

•no_input value set: SPACE, 'X'

•expand_fieldname value set: SPACE, internal header table field name

•f2code value set: SPACE, function code

•confirmation_prompt value set: SPACE, 'X'

•key_hotspot value set: SPACE, 'X'

•no_keyfix value set: SPACE, 'X'

•get_selinfos value set: SPACE, 'X'

Detail screen

• detail_popup value set: SPACE, 'X'

• detail_initial_lines value set: SPACE, 'X'

• detail_titlebar value set: SPACE, string(max.30)

Display variants & color

• header_text value set: SPACE, CHAR(20)

• item_text value set: SPACE, CHAR(20)

• item_default value set: SPACE, 'X'

• info_fieldname value set: SPACE, internal output table field name

• coltab_fieldname value set: SPACE, internal output table field name

regards,

keerthi

Read only

Former Member
0 Likes
2,238

Hi,

if u want learn about alvs,

u can find lot of example programs in sap.

Just type BALV in se38 transaction and press f4.u will get lot of example programs.

Rgds,

Sunil.K