FavoriteLoading
0

[代码]REUSE_ALV_GRID_DISPLAY_LVC-选择画面中添加ALV布局控制字段

在ALV报表的选择画面中加一个parameter输入一个布局名称,这样程序运行之前用户可以先选择自己布局。

ALV布局(Layout)的F4函数是 REUSE_ALV_VARIANT_F4。

详细代码如下:

数据定义:

选择画面:

屏幕F4:

布局参数 I_SAVE保存选项:

1:I_SAVE = SPACE.   布局不能被保存

2:I_SAVE = 'U'.          仅自定义的布局可以被保存

3:I_SAVE = 'X'.          仅全局布局可以被保存

4:I_SAVE = 'A'.          自定义的布局和全局的布局都可以被保存

英文如下:
1, ' ' = Display  variants cannot be saved
Defined display variants (such as delivered display variants) can be selected for presentation regardless of this indicator. However, changes cannot be saved.
2,'X' = Standard save mode
Display variants can be saved as standard display variants.
Saving display variants as user-specific is not possible.
3,'U' = User-specific save mode
Display variants can only be saved as user-specific.
4,'A' = Standard and user-specific save mode
Display variants can be saved both as user-specific and as standard
variants. Users make their choice on the dialog box for saving the
display variant.

ALV:alv输入参数is_variant赋值

显示界面:

2017-01-26_10-08-08

以上。