SAP如何保存用户设置的格式为“特定用户”
请问在SAP中不同的用户可能需要看的栏位不一样。如何设置个性化的保存每个人的格式?我的系统现在是给我的需求相反了我本来需要的是“特定用户”选中,“缺省设置”不选中。都为系...
请问在SAP中不同的用户可能需要看的栏位不一样。如何设置个性化的保存每个人的格式?我的系统现在是给我的需求相反了我本来需要的是“特定用户”选中,“缺省设置”不选中。都为系统设置,用户不能修改?这个是如何实现的?如图所示。
展开
2个回答
展开全部
很多ALV的报表都需要手动的进行设置格式以使数据看上去更有意义和条理,如果每次进来都重新操作一遍是很烦人的,所以SAP有提供了一个保存格式的功能,保存格式可以是 ‘缺省设置’ 和 ‘特定用户’ 两种 至于这两种功能的激活是在程序中指定的。
1.FUN ALV
在调用显示ALV函数的时候有个I_SAVE 参数
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = g_repid
is_layout = gs_layout
it_fieldcat = gt_fieldcat[]
i_save = 'A'
is_variant = v_stru_disvar
it_events = git_events[]
it_sort = it_sort[]
is_print = gs_print
TABLES
t_outtab = gt_data
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
2.OO ALV 的方式和FUN的有点不同
DATA:g_variant TYPE disvariant.
g_variant-report = sy-repid.
CALL METHOD gcl_alv->set_table_for_first_display
EXPORTING
is_layout = gs_layout
is_variant = g_variant
i_save = 'A'
it_toolbar_excluding = gt_exclude
CHANGING
it_outtab = gt_data[]
it_fieldcatalog = gt_fieldcat
EXCEPTIONS
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
OTHERS = 4.
I_SAVE 参数有四个可选值 分别是 空(两个功能都关闭,只能选择更改不能保存) X(只保留缺省默认的) U(只保留特定用户功能) A(缺省默认和特定用户都可以),下面是SAP对这个参数的官方介绍。
' ' = 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.
'X' = Standard save mode
Display variants can be saved as standard display variants.
Saving display variants as user-specific is not possible.
'U' = User-specific save mode
Display variants can only be saved as user-specific.
'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.
1.FUN ALV
在调用显示ALV函数的时候有个I_SAVE 参数
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = g_repid
is_layout = gs_layout
it_fieldcat = gt_fieldcat[]
i_save = 'A'
is_variant = v_stru_disvar
it_events = git_events[]
it_sort = it_sort[]
is_print = gs_print
TABLES
t_outtab = gt_data
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
2.OO ALV 的方式和FUN的有点不同
DATA:g_variant TYPE disvariant.
g_variant-report = sy-repid.
CALL METHOD gcl_alv->set_table_for_first_display
EXPORTING
is_layout = gs_layout
is_variant = g_variant
i_save = 'A'
it_toolbar_excluding = gt_exclude
CHANGING
it_outtab = gt_data[]
it_fieldcatalog = gt_fieldcat
EXCEPTIONS
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
OTHERS = 4.
I_SAVE 参数有四个可选值 分别是 空(两个功能都关闭,只能选择更改不能保存) X(只保留缺省默认的) U(只保留特定用户功能) A(缺省默认和特定用户都可以),下面是SAP对这个参数的官方介绍。
' ' = 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.
'X' = Standard save mode
Display variants can be saved as standard display variants.
Saving display variants as user-specific is not possible.
'U' = User-specific save mode
Display variants can only be saved as user-specific.
'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.
2013-03-30
展开全部
开发时设置的,使用ALV参数i_savei_save = '' --- 不能保存格式;i_save = 'X' --- 保存标准格式;i_save = 'U' --- 保存特定用户格式;i_save = 'A' --- 保存标准格式和特定用户格式 到思互圈子网站查看回答详情>>
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询