首页 > 其他分享 >ABAP-SM30添加选择屏幕

ABAP-SM30添加选择屏幕

时间:2023-10-21 13:55:06浏览次数:45  
标签:sellist t001 no lt lv ABAP SM30 bukrs 屏幕

 1 *&---------------------------------------------------------------------*
 2 *& Report ZRFI030
 3 *&---------------------------------------------------------------------*
 4 *&
 5 *&---------------------------------------------------------------------*
 6 REPORT zrfi030.
 7 
 8 TABLES:t001 .
 9 
10 DATA:lt_sellist TYPE TABLE OF vimsellist,
11      lv_message TYPE char255,
12      lv_flag    TYPE char1.
13 
14 CLEAR lv_message .
15 CLEAR lv_flag .
16 
17 SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE text1.
18 
19   SELECT-OPTIONS:s_bukrs FOR t001-bukrs OBLIGATORY.
20 
21 SELECTION-SCREEN END OF BLOCK blk1.
22 
23 SELECT bukrs
24   INTO TABLE @DATA(lt_t001)
25   FROM t001
26   WHERE bukrs IN @s_bukrs .
27 
28 LOOP AT lt_t001 INTO DATA(ls_t001) .
29 
30   AUTHORITY-CHECK OBJECT 'M_MATE_BUK'
31    ID 'BUKRS' FIELD ls_t001-bukrs .
32   IF sy-subrc <> 0.
33     MESSAGE '没有' && ls_t001-bukrs &&  '公司代码的权限' TYPE 'S' DISPLAY LIKE 'E' .
34     lv_flag = 'X' .
35   ENDIF.
36 
37 ENDLOOP .
38 
39 IF lv_flag = '' .
40 
41   CALL FUNCTION 'VIEW_RANGETAB_TO_SELLIST'
42     EXPORTING
43       fieldname = 'BUKRS'
44 *     APPEND_CONJUNCTION       = ' '
45     TABLES
46       sellist   = lt_sellist
47       rangetab  = s_bukrs[].
48 
49   CALL FUNCTION 'VIEW_MAINTENANCE_CALL'
50     EXPORTING
51       action                       = 'U'
52 *     CORR_NUMBER                  = '          '
53 *     GENERATE_MAINT_TOOL_IF_MISSING       = ' '
54 *     SHOW_SELECTION_POPUP         = ' '
55       view_name                    = 'ZTFI_0003'
56 *     NO_WARNING_FOR_CLIENTINDEP   = ' '
57 *     RFC_DESTINATION_FOR_UPGRADE  = ' '
58 *     CLIENT_FOR_UPGRADE           = ' '
59 *     VARIANT_FOR_SELECTION        = ' '
60 *     COMPLEX_SELCONDS_USED        = ' '
61 *     CHECK_DDIC_MAINFLAG          = ' '
62 *     SUPPRESS_WA_POPUP            = ' '
63     TABLES
64       dba_sellist                  = lt_sellist
65 *     EXCL_CUA_FUNCT               =
66     EXCEPTIONS
67       client_reference             = 1
68       foreign_lock                 = 2
69       invalid_action               = 3
70       no_clientindependent_auth    = 4
71       no_database_function         = 5
72       no_editor_function           = 6
73       no_show_auth                 = 7
74       no_tvdir_entry               = 8
75       no_upd_auth                  = 9
76       only_show_allowed            = 10
77       system_failure               = 11
78       unknown_field_in_dba_sellist = 12
79       view_not_found               = 13
80       maintenance_prohibited       = 14
81       OTHERS                       = 15.
82 
83 ENDIF .

标签:sellist,t001,no,lt,lv,ABAP,SM30,bukrs,屏幕
From: https://www.cnblogs.com/TigerMan/p/17778874.html

相关文章

  • ABAP 字符串换行符等等字符处理
    https://www.cnblogs.com/jinyin/p/10850565.html  cl_abap_char_utilities=>horizontal_tabTAB符cl_abap_char_utilities=>cr_lf回车换行cl_abap_char_utilities=>vertical_tab垂直制表符cl_abap_char_utilities=>newline换行......
  • 全志R128驱动OLED屏幕步骤教程
    驱动OLED屏本文案例代码下载地址OLED驱动案例代码https://www.aw-ol.com/downloads?cat=24OLED,即有机发光二极管(OrganicLightEmittingDiode)。OLED由于同时具备自发光,不需背光源、对比度高、厚度薄、视角广、反应速度快、可用于挠曲性面板、使用温度范围广......
  • Siemens 西门子触摸屏smart line屏幕如何添加指示灯
    很多学员一开始接触西门子触摸屏的时候,在做指示灯的功能的时候会发现它与其它平时接触到的触摸屏不一样,找不到跟它们一样的指示灯元件功能。其实这里是西门子触摸屏与其它地方不同之处之一,西门子触摸屏很多东西是以事件或者变量更改状态的方式去做的。通过这些事件或者是......
  • C# 控制台应用中获取屏幕分辨率
    引用System.Management安装包。usingSystem.Management;ManagementObjectSearchermydisplayResolution=newManagementObjectSearcher("SELECTCurrentHorizontalResolution,CurrentVerticalResolutionFROMWin32_VideoController");foreach(ManagementObject......
  • 屏幕显示中英文
    1.字模软件取字符数据2.字模显示函数voiddis_charater(uint32_tcharater_lcd_Add,uint8_t*p_charater){#defineWORD_WIDTH16uint32_t*p=(uint32_t*)(charater_lcd_Add);printf("\ncharatertest\n");uint8_ti,j;for(i=0;i<W......
  • 【ABAP】代码单行长度超长Dump
    问题:TheABAPprogramlinesarewiderthantheinternaltable.    ALV自动转换成fieldcat,通过内表转换,如果代码长度超过72位,会系统Dump。CALLFUNCTION'REUSE_ALV_FIELDCATALOG_MERGE'EXPORTINGi_program_name=sy-repidi_intern......
  • xshell中Ctrl+S锁定屏幕
    xshell下使用vim的编辑一个文件,保存文件时习惯性的按Ctrl+S,结果按什么键都没有反应。原来Ctrl+S在Linux里,是锁定屏幕的快捷键。如果要解锁,按下Ctrl+Q就可以了。Ctrl+S:锁定屏幕Ctrl+Q:解锁 ......
  • ABAP:生产订单CO01/CO02/CO03保存前增强
    T-Code:SMOD-PPCO0007*&---------------------------------------------------------------------**&包含ZXCO1U06*&---------------------------------------------------------------------**[MOD-01]18.09.202117:51:22ysx检查工单所有工......
  • ABAP:CO11N报工选择屏幕增强
    T-Code:SMOD-CONFPP07AFRUD接口增强字段: 返回组件赋值*&---------------------------------------------------------------------**&包含ZXCOFU24*&---------------------------------------------------------------------*TABLES:afrud.DAT......
  • SAP ABAP 域(domain)固定值读取方法
    1SELECTSINGLEVALPOS2FROMDD07V3INTO@DATA(GT_DD07V)4WHEREDOMNAME='ZSTUTYPE'ANDVALPOS=@P_ZSTUTYP."域名和值5IFSY-SUBRC<>0.6MESSAGETEXT-134TYPE'S'DISPLAYLIKE'E......