`

EXIT_SAPMF02D_001 check address data

    博客分类:
  • ABAP
 
阅读更多
DATA: l_regex           TYPE REF TO cl_abap_regex,
      l_matcher         TYPE REF TO cl_abap_matcher,
      l_structdescr     TYPE REF TO cl_abap_structdescr,
      l_elemdescr       TYPE REF TO cl_abap_elemdescr,
      l_itab_components TYPE abap_component_tab,
      l_tmp_components  TYPE abap_component_tab,
      l_wa_component    TYPE abap_componentdescr,
      l_tmp_component   TYPE abap_componentdescr,
      l_scrtext         LIKE dd03vt-scrtext_l.
FIELD-SYMBOLS: <wa>,
               <fld>,
               <data>   TYPE addr1_data,
               <fs>     TYPE szadr_addr1_complete.

ASSIGN ('(SAPMF02D)ADDR_COMPLETE') TO <fs>.
IF sy-subrc EQ 0.
*Regular expression:only those characters in the key board can be entered except !,
* or error will be popuped.
  CREATE OBJECT l_regex
    EXPORTING
      pattern = '^[a-zA-Z0-9~`@#\\\$%\^&\*\(\)-_\+=\|/<>'':;\{\}\[\]\?,\. "]*$'.
  LOOP AT <fs>-addr1_tab ASSIGNING <wa>.
    ASSIGN COMPONENT 'DATA' OF STRUCTURE <wa> TO <data>.
    l_structdescr ?= cl_abap_typedescr=>describe_by_data( <data> ).
    l_itab_components = l_structdescr->get_components( ).
    LOOP AT l_itab_components INTO l_wa_component.
      IF l_wa_component-as_include IS INITIAL.
        l_elemdescr ?= l_wa_component-type.
        IF l_elemdescr->type_kind EQ cl_abap_elemdescr=>typekind_char.
          ASSIGN COMPONENT l_wa_component-name OF STRUCTURE <data> TO <fld>.
          CREATE OBJECT l_matcher
            EXPORTING
              regex = l_regex
              text  = <fld>.
          IF l_matcher->match( ) NE abap_true.
            SELECT SINGLE scrtext_l INTO l_scrtext FROM dd03vt WHERE tabname    EQ 'ADDR1_DATA'
                                                                 AND ddlanguage EQ sy-langu
                                                                 AND fieldname  EQ l_wa_component-name.
            MESSAGE e023(z1) WITH l_scrtext.
          ENDIF.
        ENDIF.
      ELSE. "Inlcude structure
        l_structdescr ?= l_wa_component-type.
        l_tmp_components = l_structdescr->get_components( ).
        LOOP AT l_tmp_components INTO l_tmp_component.
          l_elemdescr ?= l_tmp_component-type.
          IF l_elemdescr->type_kind EQ cl_abap_elemdescr=>typekind_char.
            ASSIGN COMPONENT l_tmp_component-name OF STRUCTURE <data> TO <fld>.
            CREATE OBJECT l_matcher
              EXPORTING
                regex = l_regex
                text  = <fld>.
            IF l_matcher->match( ) NE abap_true.
              SELECT SINGLE scrtext_l INTO l_scrtext FROM dd03vt WHERE tabname    EQ 'ADDR1_DATA'
                                                                   AND ddlanguage EQ sy-langu
                                                                   AND fieldname  EQ l_tmp_component-name.
              MESSAGE e023(z1) WITH l_scrtext.
            ENDIF.
          ENDIF.
        ENDLOOP.
      ENDIF.
    ENDLOOP.
  ENDLOOP.
ENDIF.
分享到:
评论

相关推荐

    hm1375_tinav2.1验证通过_增加设备ID的读取显示_20170825_1333没有外层目录.7z

    vfe_err("vfe sensor register check error at input_num = %d\n",input_num); dev-&gt;device_valid_flag[input_num] = 0; //goto snesor_register_end; } else{ dev-&gt;device_valid_flag[input_num] =...

    BIos原代码《陈文钦》

    C O D E S E G M E N T ; ;---------------------------------------; cgroup group _text _text segment word public 'CODE' assume cs:cgroup .486p ;---------------------------------------; public _BIOS_...

    C语言编程-通讯录.doc

    printf(" 3.Address Book data Search\n"); // 数据查找 printf(" 4.Address Book data Alter\n"); // 数据修改 printf(" 5.Address Book data Insert\n"); // 数据插入 printf(" 6.Address Book data Delete\n...

    虚拟网卡驱动源代码(原版)

    * $Id: snull.c,v 1.21 2004/11/05 02:36:03 rubini Exp $ */ #include #include #include #include #include #include &lt;linux/kernel.h&gt; /* printk() */ #include &lt;linux/slab.h&gt; /* kmalloc() */ #...

    thl_r16_tinav2.0_hm1375验证通过_增加打印设备ID_20170824_1447.7z

    vfe_err("vfe sensor register check error at input_num = %d\n",input_num); dev-&gt;device_valid_flag[input_num] = 0; //goto snesor_register_end; } else{ dev-&gt;device_valid_flag[input_num] =...

    8-07-14_MegaCLI for linux_windows

    SCGCQ00353584 Defect CLI has to refresh the MR_CTRL_INFO after the MR_DCMD_CTRL_FLASH_FW_DOWNLOAD for OFU. SCGCQ00356037 Defect CLI Crashes When Running ADP FW Flash Command SCGCQ00356190 Defect No ...

    D语言的ORM框架HibernateD.zip

    HibernateD 是 D 语言的 ORM 框架,类似 Java 的 Hibernate,示例代码:import hibernated.core; // Annotations of entity classes class User {  long id;  string name;  Customer customer;  @...

    JLink_Windows_V648.zip

    DLL: NXP KW35 / KW36 / KW38 / KW39: Added flash programming support for the data flash area. DLL: NXP KW35 / KW36 / KW38 / KW39: Added flash programming support for the data flash area. DLL: NXP KW38:...

    Oracle学习要点记录(包括DML\DDL等数据库管理语句)

    - 示例:`CREATE DATABASE LINK ora01 CONNECT TO nc61_0612 IDENTIFIED BY "1" USING '(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=20.10.130.84)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=ORCL...

    Microsoft Library MSDN4DOS.zip

    BOUND Check Array Index Against Bounds BSF Bit Scan Forward BSR Bit Scan Reverse BT Bit Test BTC Bit Test and Complement BTR Bit Test and Reset BTS Bit Test and Set CALL Call Procedure CBW/CWDE ...

    ORCALE语句大全

    - **退出界面**: 使用`exit`命令退出SQL Plus界面。 #### 二、执行与编辑SQL语句 - **执行SQL语句**: 可以通过`start D:\1.sql`或`@ D:\1.sql`来执行存储在指定路径下的SQL脚本。 - **编辑SQL语句**: 使用`edit D:\...

    内存管理内存管理内存管理

    *just set the beginning to be last_valid_address */ managed_memory_start = last_valid_address; /* Okay, we're initialized and ready to go */ has_initialized = 1; } 现在,为了完全地管理内存,...

    WordPress中利用AJAX技术进行评论提交的实现示例

    exit; } function ajax_post_comment_slow() { fail('用不用说这么快?想好了再说!'); } add_filter('comment_flood_trigger', 'ajax_post_comment_slow', 0); function ajax_comment() { if ($_POST['action'...

    操作系统(内存管理)

    * to the same address. However, current_location_mcb * is of the correct type, so we can use it as a struct. * current_location is a void pointer so we can use it * to calculate addresses....

    oracle学习文档 笔记 全面 深刻 详细 通俗易懂 doc word格式 清晰 连接字符串

    oracle 甲骨文 获得最高认证级别的ISO标准安全认证,性能最高, 保持开放平台下的TPC-D和TPC-C的世界记录。但价格不菲 大型企业 db2 IBM DB2在企业级的应用最为广泛, 在全球的500家最大的企业中,几乎85%以上用DB2...

    Bochs - The cross platform IA-32 (x86) emulator

    - Determine and select max physical address size automatically at configure time: - 32-bit physical address for 386/486 guests - 36-bit physical address for PSE-36 enabled Pentium guest - 40-bit ...

    Zebra105sl斑马打印机设置手册范本.doc

    控制面板上有多个指示灯和按键,如Power指示灯、Take label指示灯、Error指示灯、Check ribbon指示灯、Paper out指示灯、Data状态灯以及各种功能键,如-,+键、Previous键、Next/save键、Setup/exit键、Pause键、...

    微软内部资料-SQL性能优化2

    For a process to access 3 GB of address space, the executable image must have been linked with the /LARGEADDRESSAWARE flag or modified using Imagecfg.exe. It should be pointed out that SQL Server was ...

    BURNINTEST--硬件检测工具

    - Changed the mechanism to check for the required DirectX Direct3D as the previous method did not work on some system (some W2003 servers). - Enhanced the mechanism to report memory hardware errors ...

    Windows Server 2003 Resource Kit Tools

    Winexit.scr: Windows Exit Screen Saver Winhttpcertcfg.exe: WinHTTP Certificate Configuration Tool Winhttptracecfg.exe: WinHTTP Tracing Facility Configuration Tool Winpolicies.exe: Policy Spy Wins....

Global site tag (gtag.js) - Google Analytics