ZLAN_ACC代码


*&---------------------------------------------------------------------*
*& Report  ZLAN_ACC
*&by lan
*有兴趣和精力一起完善的朋友联系 1510491230@qq.com
*&---------------------------------------------------------------------*

report zlan_acc.

define sql_exsit_check.
  select count( * )
  from &1
  where &2 = p_object.
  if sy-subrc = 0.
    p_gt_rep_out-exsit = 'X'.
  endif.
end-of-definition.

define tab_rep_sel_t. "表的处理方式
  data ls_&1 like gt_&1.
  loop at p_gt_rep-&1 into ls_&1.
    if ls_&1 is not initial.
      read table p_gt_node with key nodekey =  ls_&1-node-key binary search.
      if sy-subrc = 0.
        ls_&1-node-sel = 'X'.
      else.
        ls_&1-node-sel = ''.
      endif.
      modify p_gt_rep-&1 from ls_&1.
    endif.
  endloop.
end-of-definition.

define tab_rep_sel_s. "结构的处理方式
  if p_gt_rep-&1 is not initial.
    read table p_gt_node with key nodekey =  p_gt_rep-&1-node-key binary search.
    if sy-subrc = 0.
      p_gt_rep-&1-node-sel = 'X'.
    else.
      p_gt_rep-&1-node-sel = ''.
    endif.
  endif.
end-of-definition.

define pop_key_append.
  clear gt_pop.
  gt_pop-key = &1.
  gt_pop-text = &2.
  gt_pop-value = &3.
  append gt_pop.
end-of-definition.

define object_add. "像gt_表添加对象
  data ls_&1 like p_gt_&1.

  clear:lv_exsit,ls_&1.

  read table p_gt_&1 transporting no fields with key &2 = &3.
  if sy-subrc ne 0.
    loop at gt_rep.
      read table gt_rep-&1 transporting no fields with key &2 = &3.
      if sy-subrc = 0 .
        lv_exsit = 'X'.
        exit.
      endif.
    endloop.
    if lv_exsit is initial.
      ls_&1-&2 = &3.
      append ls_&1 to p_gt_&1.
    endif.
  endif.
end-of-definition.

define key_parse.
  split lv_string1 at &1 into lv_string2 lv_string3.
  split lv_string3 at lv_c into &2 lv_string2.
end-of-definition.

define global_get.
  assign (&1) to &2.
end-of-definition.

define mac_add_form_field. " form html_viewer_init 中使用
  append initial line to &1 assigning <ls_form_field>.
  <ls_form_field>-name = &2.
  <ls_form_field>-value = &3.
end-of-definition.

class lcl_application definition deferred.

*----------------------------------------------------------------------*
*       CLASS LCL_APPLICATION DEFINITION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
class lcl_application definition.

  public section.
    methods:
      handle_node_double_click
      for event node_double_click
                  of cl_gui_alv_tree
        importing node_key.
endclass.                    "LCL_APPLICATION DEFINITION

*----------------------------------------------------------------------*
*       CLASS LCL_APPLICATION IMPLEMENTATION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
class lcl_application implementation.

  method  handle_node_double_click.
    perform object_display using node_key.
  endmethod.                    "HANDLE_NODE_DOUBLE_CLICK

endclass.                    "LCL_APPLICATION IMPLEMENTATION

*HTML浏览器事件处理器
class cl_myevent_handler definition.

  public section.
    methods: on_sapevent
                for event sapevent of cl_gui_html_viewer
      importing action frame getdata postdata query_table.

endclass.                    "cl_myevent_handler DEFINITION

*----------------------------------------------------------------------*
*       CLASS cl_myevent_handler IMPLEMENTATION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
class cl_myevent_handler implementation.

  method on_sapevent.

    perform response_parse tables postdata using action.


  endmethod.                    "on_sapevent

endclass.                    "cl_myevent_handler IMPLEMENTATION

type-pools:trwbo,abap,trsel,icon.

types: ty_spaces_tt type standard table of i with default key.

*types:begin of ty_info, "提交到服务器所需的程序信息
*  rep_name(40), "资源库名
*  zip, "压缩标识
*  text(40),
*  url(250),
**  datum like sy-datum,
**  uzeit like sy-uzeit,
*  end of ty_info.

types:begin of ty_node,
        object(40),
        key        type i,
        sel,
        request    type trkorr,
        rtype,
        rtmsg(255),
      end of ty_node.

types: begin of ty_codes, "源代码
*         line(72),
         line(720), "如果程序代码长度超了72,read report会dump掉的
       end of ty_codes.
types:begin of ty_code,
        code type standard table of ty_codes with default key,
        node type ty_node,
      end of ty_code.

types:begin of ty_text,
        text type standard table of textpool with default key,
        node type ty_node,
      end of ty_text.

types:begin of ty_sta,
        sta  type rsmpe_stat,
        node type ty_node,
      end of ty_sta.

types: begin of ty_cua, "status
         adm type rsmpe_adm,
         sta type standard table of ty_sta with default key, "包含node
         fun type standard table of rsmpe_funt with default key,
         men type standard table of rsmpe_men with default key,
         mtx type standard table of rsmpe_mnlt with default key,
         act type standard table of rsmpe_act with default key,
         but type standard table of rsmpe_but with default key,
         pfk type standard table of rsmpe_pfk with default key,
         set type standard table of rsmpe_staf with default key,
         doc type standard table of rsmpe_atrt with default key,
         tit type standard table of rsmpe_titt with default key,
         biv type standard table of rsmpe_buts with default key,
       end of ty_cua.

types: begin of ty_tadir, "程序信息
         obj_type type tadir-object,
         obj_name type tadir-obj_name,
         devclass type devclass,
       end of ty_tadir.

types: begin of ty_dynpro, "屏幕
         header     type rpy_dyhead,
         containers type dycatt_tab,
         fields     type dyfatc_tab,
         flow_logic type swydyflow,
         spaces     type ty_spaces_tt,
         node       type ty_node,
       end of ty_dynpro.

types: begin of ty_table, "表、结构
         tablename  like dd03l-tabname,
         dd02v      type dd02v,
         dd09v      type dd09v,
         tabletitle like dd02t-ddtext,
         istructure type dd03p occurs 0, "不能用type table of(会报错)
         node       type ty_node,
       end of ty_table.

types:begin of ty_ttyp, "表类型,
        typename  type ttypename,
        gotstate  type  ddgotstate,
        dd40v_wa  type  dd40v,
        dd42v_tab type  dd42v occurs 0,
*    dd43v_tab type  dd43v occurs 0,
        node      type ty_node,
      end of ty_ttyp.

types:begin of ty_dtel, "数据元素
        name  type ddobjname,
        dd04v type dd04v,
        tpara type tpara,
        node  type ty_node,
      end of ty_dtel.

types:begin of ty_class, "类
        clsname  type seoclass-clsname,
        class    type vseoclass,
*        interface type vseointerf,
        t_source type standard table of string with default key,
        node     type ty_node,
      end of ty_class.

types:begin of ty_doma, "域
        name        type ddobjname,
        dd01v       type dd01v,
        t_dd07v_tab type standard table of dd07v with default key,
        node        type ty_node,
      end of ty_doma.

types:begin of ty_lock, "锁对象
        name  type ddobjname,
        dd25v type dd25v, "Header of the Lock Object
        dd26e type standard table of dd26e with default key, "Base Tables of the Lock Object "必须要这样写,不然会报错不能在结构中使用通用类型定义chenyl for chenyl 14.08.2017 11:37:03
        dd27p type standard table of dd27p with default key, "Lock Parameter of the Lock Object
        ddena type standard table of ddena with default key, "Lock Arguments of the Lock Object
        node  type ty_node,
      end of ty_lock.

types:begin of ty_snro,
        object            type tnro-object,
        interval_exists,
        object_attributes type tnro,
        object_text       type tnrot,
        interval          like table of inriv with default key, "编号间隔范围
        node              type ty_node,
      end of ty_snro.

types:begin of ty_tcode,
        tstc  type tstc,
        tstcp type tstcp,
        tstcc type tstcc, "Additional Attributes for TSTC
        tstct type standard table of tstct with default key,
        tstca type standard table of tstca with default key,
        usott type standard table of usott with default key,
        node  type ty_node,
      end of ty_tcode.

types:begin of ty_fugr,
        area  like tlibt-area, "函数组
        areat type areat, "函数组文本
        node  type ty_node,
      end of ty_fugr.

types:begin of ty_func,
        functionname       type rs38l-name,
        global_flag        like  rs38l-global,
        remote_call        like  rs38l-remote,
        update_task        like  rs38l-utask,
        short_text         like  tftit-stext,
        function_pool      like  rs38l-area,
*  remote_basxml_supported like  rs38l-basxml_enabled, "R3没有这个字段
        import_parameter   type standard table of rsimp with default key,
        changing_parameter like table of rscha with default key,
        export_parameter   like table of rsexp with default key,
        tables_parameter   like table of rstbl with default key,
        exception_list     like table of rsexc with default key,
        documentation      like table of  rsfdo with default key,
        source             like table of rssource with default key,
        new_source         type rsfb_source, "rssource只有72的长度是不够的
        node               type ty_node,
      end of ty_func.
types:begin of ty_prog,
        program like sy-repid, "存放程序名、函数组名等
      end of ty_prog.
types:begin of ty_w3mi,
        objid  type wwwdatatab-objid,
        key    type wwwdatatab,
        buffer type xstring,
      end of ty_w3mi.

data: cx_root type ref to cx_root. "根异常

data:
  gt_request type trwbo_request_headers with header line,
  gs_cua     type ty_cua,
  gs_code    type ty_code,
  gs_codes   type ty_codes,
  gs_text    type ty_text,
  gt_screen  type standard table of ty_dynpro with header line,
  gt_table   type standard table of ty_table with header line, "多张表、结构 dictionary
  gt_ttyp    type table of ty_ttyp with header line, "表类型
  gt_dtel    type table of ty_dtel with header line, "数据元素
  gt_class   type table of ty_class with header line, "类
  gt_doma    type table of ty_doma with header line, "域
  gt_lock    type table of ty_lock with header line,
  gt_snro    type table of ty_snro with header line,
  gt_tcode   type table of ty_tcode with header line,
  gs_fugr    type ty_fugr,
  gt_func    type table of ty_func with header line,
  gt_prog    type table of ty_prog with header line,
  gt_w3mi    type table of ty_w3mi with header line.

*资源库
types:begin of ty_rep,
        uname(40), "用户名
        program   like sy-repid, "存放程序名、函数组名等
        type, "对象类型
        typet(20), "对象类型描述
        package   type devclass, "包
        node      type ty_node,
        code      type ty_code, "源代码
        cua       type ty_cua, "pf status
        text      type ty_text, "文本池
        screen2   like standard table of gt_screen with default key, "国际营销701 用screen取名会报错
        ttyp      like table of gt_ttyp with default key, "表类型
        dict      like table of gt_table with default key, "表、结构、视图
        dtel      like table of gt_dtel with default key, "数据元素
        class     like table of gt_class with default key, "类
        doma      like table of gt_doma with default key, "域
        lock      like table of gt_lock with default key,
        snro      like table of gt_snro with default key, "编号范围对象
        tcode     like table of gt_tcode with default key,
        fugr      type ty_fugr , "函数组
        func      like table of gt_func with default key,
      end of ty_rep.
types ty_t_rep type table of ty_rep.

tables sscrfields.

*资源库集
data:
  gs_rep type ty_rep,
  gt_rep like table of gs_rep with header line.
*data:begin of gs_rep_pac, "包起来的资源库
*  info type ty_info,
*  rep like table of gt_rep,
*  end of gs_rep_pac.

*tree 输出的rep
data:begin of gt_rep_out occurs 0,
       object(40),
       otype(40),
       descp      type repti, "程序描述
       exsit,
       request    type trkorr, "请求(可以根据对象类型去抓一把)
       rtype,
       rtmsg(255),
     end of gt_rep_out.
*data gt_rep_out_sel like table of gt_rep_out with header line.

*资源库数据tree展示
data:
  g_alv_tree         type ref to cl_gui_alv_tree,
  g_custom_container type ref to cl_gui_docking_container,
  g_application      type ref to lcl_application.
data: gt_fieldcatalog type lvc_t_fcat,
      ok_code         like sy-ucomm.
data:
  gt_selected_node type standard table of lvc_s_chit with header line.

*查询返回的结果
data:begin of gt_result occurs 0,
       sel,
       id(40),
       name(40),
       text(40),
       url(250),
       detail(250),
       datum       like sy-datum,
       uzeit       like sy-uzeit,
       tag(40),
       uname(40),
       count(9),
     end of gt_result.

*html浏览器
data go_docking      type ref to cl_gui_docking_container.
data go_html_viewer type ref to cl_gui_html_viewer .

*table control(修改资源对象属性值)
data:begin of gs_popk,
       title(40),
     end of gs_popk.
data:begin of gt_pop occurs 0,
       key(40),
       text(40),
       value(250),
     end of gt_pop.

*解析json用
data:begin of gs_fields,
       key(40),
       value(256),
     end of gs_fields.

*alv
data:
  gt_fieldcat      type lvc_t_fcat with header line,
  gs_layout        type lvc_s_layo,
*  go_event_receiver type ref to lcl_event_receiver,
  gs_grid_settings type lvc_s_glay,
  gt_sort          type lvc_t_sort with header line.
*class lcl_event_receiver definition deferred.

*屏幕传值专用全局变量
data:
  gv_url type text132,
  gv_par type string.

*全局变量
data:
  gv_msg(255),
  gv_program        like sy-repid value sy-repid, "程序名
  gv_package        type devclass,
  gv_request        type trkorr,
  gv_xml            type string,
  gv_filename       like ibipparms-path,
  gv_state, "程序执行状态
  gv_rtype,
  gv_rtmsg(255),
  gs_rfcsi          type rfcsi,
  gv_codepage       type cpcodepage,
  gv_namespace(250),
  gv_init,
  gv_notif_time(30).

data:begin of gt_repid occurs 0,
       id like gt_result-id,
     end of gt_repid.

*选择屏幕
selection-screen function key 1 .

selection-screen begin of block b1 with frame title text-001.
parameters:
  p_id(40)     modif id m1,
  p_repnam(40) modif id m1, "资源项目名
  p_text(40)   modif id m4.

select-options:
s_prog for sy-repid no intervals modif id m2.

parameters:
  p_uname(40) modif id m3,
  p_passwd(9) modif id m3.

parameters:
  p_tag(40)  modif id m2,
  p_url(250) modif id m2 lower case.
selection-screen end of block b1.

selection-screen begin of block b2 with frame title text-002.
parameters:
  p_search radiobutton group g1 default 'X' user-command u1,
  p_export radiobutton group g1,
  p_import radiobutton group g1.
selection-screen end of block b2.

selection-screen begin of block b6 with frame title text-006.
parameters:
  p_server radiobutton group g2 default 'X' user-command u2,
  p_file   radiobutton group g2.
selection-screen end of block b6.

selection-screen begin of block b5 with frame title text-005.
parameters:
*p_debug as checkbox default 'X'. "开发环境
p_debug default '' no-display. "生产环境
parameters: p_comp type c no-display. "编译
selection-screen end of block b5.

selection-screen begin of block b7 with frame title text-010. "关于(通知)
selection-screen comment /1(72) gv_c1.
selection-screen comment /1(72) gv_c2.
selection-screen comment /1(72) gv_c3.
selection-screen comment /1(72) gv_c4.
selection-screen comment /1(72) gv_c5.
selection-screen end of block b7.

*导入 对象重命名屏幕
selection-screen begin of screen 2004 title text-004.
parameters:
  p_func  as checkbox,
  p_tab   as checkbox,
  p_tcode as checkbox.
selection-screen end of screen 2004.

*用户注册屏幕
selection-screen begin of screen 2005 title text-009.
parameters:
  gv_uname(40) obligatory,
  gv_paswd(9)  obligatory,
  gv_phone(11) obligatory,
  gv_email(30) obligatory.
selection-screen end of screen 2005.

initialization.
  perform initialization.

at selection-screen output.
  perform selection_screen_pbo.

at selection-screen.
  perform selection_screen_pai.

start-of-selection.
  perform screen_check.
  perform exec_check.

*查询
  if p_search = 'X'.
    perform rep_search.
    perform result_output. "输出查询结果
*导出
  elseif p_export = 'X' .
    loop at s_prog. "先确定文件夹(同时取表)
      perform rep_scan tables gt_rep using s_prog-low.
    endloop.
    perform rep_get tables gt_rep. "再往下找
*    perform rep_pac. "资源库打包 (现在看来没啥用啊)
    if p_file = 'X'.
      perform rep_download using p_repnam gt_rep[].
    elseif p_server = 'X'.
      perform rep_commit using gt_rep[].
    endif.
*导入
  elseif p_import = 'X' .
    if p_file = 'X'.
      perform rep_upload changing gt_rep[].
    elseif p_server = 'X'.
      perform rep_from_server changing gt_rep[].
    endif.
    perform rep_display tables gt_rep.
  endif.

*&---------------------------------------------------------------------*
*&      Form  OUTPUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
form output .
  perform log_output.
endform.                    " OUTPUT

*&---------------------------------------------------------------------*
*&      Form  DATA_INITIALIZE
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
form data_initialize .
  data current_resources type sy-index.
  data maximal_resources type sy-index.
  data recommended_delay type sy-index.

*取系统信息
*  call function 'RFC_GET_SYSTEM_INFO' "R3没有
  call function 'RFC_SYSTEM_INFO'
    importing
      rfcsi_export      = gs_rfcsi
      current_resources = current_resources
      maximal_resources = maximal_resources
      recommended_delay = recommended_delay.

*系统编码
  call function 'SCP_CODEPAGE_FOR_LANGUAGE'
    exporting
      language    = sy-langu
    importing
      codepage    = gv_codepage
    exceptions
      no_codepage = 1.

*  gv_program(1) = 'Z'.

endform.                    " DATA_INITIALIZE
*&---------------------------------------------------------------------*
*&      Form  CODE_CHECK
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
form code_check changing o_error_subrc o_error_message.
  data i_program        type sy-repid.
  data o_error_include  type sy-repid.
  data o_error_line     type sy-tabix.
  data:begin of i_source occurs 0,
         line(72),
       end of i_source.

  i_program = gv_program.

  call function 'RS_SYNTAX_CHECK'
    exporting
*     I_GLOBAL_CHECK  = ' '
*     I_GLOBAL_PROGRAM = ' '
      i_program       = i_program
*     I_WITH_DIALOG   = ' '
    importing
      o_error_include = o_error_include
      o_error_line    = o_error_line
      o_error_message = o_error_message
*     o_error_offset  = o_error_offset
      o_error_subrc   = o_error_subrc
*     o_navigate      = o_navigate
*     cancel          = cancel
    tables
      i_source        = i_source.

endform.                    " CODE_CHECK
*&---------------------------------------------------------------------*
*&      Form  LOCK_DELETE
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
form lock_delete using p_program.
  data:
    lv_grag like seqg3-garg,
    enq     like table of seqg3.

  lv_grag = p_program.
  call function 'ENQUEUE_READ'
    exporting
      gname  = 'TRDIR'
      garg   = lv_grag
      guname = ''
    tables
      enq    = enq
    exceptions
      others = 0.

  describe table enq lines sy-tfill.

  check sy-tfill > 0.

  call function 'ENQUE_DELETE'
    exporting
      suppress_syslog_entry = 'X'
*    importing
*     subrc                 = rc
    tables
      enq                   = enq.
endform.                    " LOCK_DELETE
*&---------------------------------------------------------------------*
*&      Form  CODE_DELETE
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
form code_delete .

  call function 'RS_DELETE_PROGRAM'
    exporting
*     CORRNUMBER = CORRNUMBER
      program = gv_program.

endform.                    " CODE_DELETE

*&---------------------------------------------------------------------*
*&      Form  rep_Log
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_0057   text
*----------------------------------------------------------------------*
form rep_log  using request rtype rtmsg changing p_node type ty_node.
  p_node-rtype = rtype.
  p_node-rtmsg = rtmsg.
  p_node-request = request.
endform.                    " rep_Log
*&---------------------------------------------------------------------*
*&      Form  LOG_OUTPUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
form log_output .
endform.                    " LOG_OUTPUT

*&---------------------------------------------------------------------*
*&      Form  STATUS_GET
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p_export        text
*  <--  p_import        text
*----------------------------------------------------------------------*
form status_get using p_program changing p_gs_cua type ty_cua.
  data:
    ls_sta        type ty_sta,
    lt_rsmpe_stat like table of rsmpe_stat with header line.

  call function 'RS_CUA_INTERNAL_FETCH'
    exporting
      program         = p_program
      language        = '1'
      state           = 'A'
    importing
      adm             = p_gs_cua-adm
    tables
*     sta             = p_gs_cua-sta
      sta             = lt_rsmpe_stat
      fun             = p_gs_cua-fun
      men             = p_gs_cua-men
      mtx             = p_gs_cua-mtx
      act             = p_gs_cua-act
      but             = p_gs_cua-but
      pfk             = p_gs_cua-pfk
      set             = p_gs_cua-set
      doc             = p_gs_cua-doc
      tit             = p_gs_cua-tit
      biv             = p_gs_cua-biv
    exceptions
      not_found       = 1
      unknown_version = 2
      others          = 3.
  if sy-subrc ne 0.
    perform msg_sys_into changing gv_msg.
*    concatenate '读取程序' p_program 'STATUS出错:' gv_msg into gv_msg.
*    perform rep_Log using p_program 'E' gv_msg.
  else.
    loop at lt_rsmpe_stat.
      ls_sta-sta = lt_rsmpe_stat.
      append ls_sta to p_gs_cua-sta.
    endloop.
*    concatenate '读取程序' p_program 'STATUS成功' into gv_msg.
*    perform rep_Log using p_program 'S' gv_msg.
  endif.
endform.                    " STATUS_GET

*&---------------------------------------------------------------------*
*&      Form  STATUS_DOWNLOAD
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p_export        text
*  <--  p_import        text
*----------------------------------------------------------------------*
form xml_download using p_gv_filename p_gv_xml.

  data:
    v_stream    type string,
    lcl_xml_doc type ref to cl_xml_document,
    v_subrc     type sysubrc.

  create object lcl_xml_doc.
  if sy-subrc = 0.
    v_stream = p_gv_xml.
    v_subrc = lcl_xml_doc->parse_string( stream = v_stream ).
    check v_subrc = 0.
    v_subrc = lcl_xml_doc->export_to_file( filename = p_gv_filename ).
    if v_subrc = 0.
*      perform rep_Log using space 'S' 'repository下载成功'.
    else.
*      perform rep_Log using space 'S' 'repository下载失败'.
    endif.
  endif.
endform.                    " STATUS_DOWNLOAD
*&---------------------------------------------------------------------*
*&      Form  file_download
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_GV_FILENAME  text
*      -->P_GV_XML       text
*----------------------------------------------------------------------*
form file_download using p_gv_filename p_gv_xml.

  data:
    datatab type table_of_strings,
    ld_file type string.

  ld_file = p_gv_filename.

  append p_gv_xml to datatab.

  call method cl_gui_frontend_services=>gui_download
    exporting
      filename = ld_file
    changing
      data_tab = datatab
    exceptions
      others   = 1.
endform.                    " STATUS_DOWNLOAD
*&---------------------------------------------------------------------*
*&      Form  rep_upload
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
form rep_upload  changing p_gt_rep.
*取文件路径
  perform filename_get changing gv_filename.

*  perform xml_upload using gv_filename changing gv_xml gv_zip.
*  if gv_zip is initial. "xml文件
*    perform xml_to_data using gv_xml  changing p_gt_rep.
*  else.
  perform file_upload using gv_filename changing gv_xml.
  perform zip_to_data using gv_xml  changing p_gt_rep.
*  endif.

endform.                    " rep_upload

*&---------------------------------------------------------------------*
*&      Form  STATUS_FROM_XML
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
form zip_to_data using p_gv_xml changing p_gt_rep .
  data lo_ref type ref to cx_root. "异常处理
  data lv_text type string.
  data:
    lv_gzip_in  type xstring,
    lv_text_out type string.

  clear p_gt_rep.

  if p_gv_xml is initial.
    return.
  endif.

*解压
*非unicode系统不能填UTF-8,不填表示ANSI,可以导入UTF-8(乱码)和ANSI,导入 UTF-8 的压缩文件中文会乱码
*unicode只能导入UTF-8,否则会异常,不填默认UTF-8
  lv_gzip_in = p_gv_xml.
  call method cl_abap_gzip=>decompress_text
    exporting
      gzip_in  = lv_gzip_in
*     conversion = 'UTF-8' "源文件是UTF-8
*     conversion = '4102' "源文件是UTF-8
*     conversion = 'ANSI' "源文件是UTF-8
    importing
      text_out = lv_text_out.

  perform xstring_to_string changing lv_text_out.

*转进内表
  try.
      call transformation id
        source xml lv_text_out
*        options
*        clear = 'ALL' "4.7 没有这个options
*        value_handling = 'ACCEPT_DATA_LOSS' "这个参数也没有
        result data = p_gt_rep.
    catch cx_root into lo_ref.
      lv_text = lo_ref->get_text( ).
      concatenate 'rep转换出错:' lv_text into lv_text.
      message lv_text type 'S' display like 'E'.
  endtry.


endform.                    " STATUS_FROM_XML
*&---------------------------------------------------------------------*
*&      Form  xml_to_data
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_GV_XML   text
*      -->P_GT_REP   text
*----------------------------------------------------------------------*
form xml_to_data using p_gv_xml changing p_gt_rep .
  data lo_ref type ref to cx_root. "异常处理
  data lv_text type string.
  if p_gv_xml is initial.
    return.
  endif.

*转进内表
  try.
      call transformation id
        source xml p_gv_xml
*        options
*        clear = 'ALL' "4.7 没有这个options
*        value_handling = 'ACCEPT_DATA_LOSS'
        result data = p_gt_rep.
    catch cx_root into lo_ref.
      lv_text = lo_ref->get_text( ).
  endtry.

endform.                    " STATUS_FROM_XML
*&---------------------------------------------------------------------*
*&      Form  STATUS_CREATE
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
form status_set using p_program p_gv_package p_cua type ty_cua.
  data: ls_tr_key type trkey.
  data:
    ls_sta        type ty_sta,
    lt_rsmpe_stat like table of rsmpe_stat with header line.

  if p_cua is initial.
    return.
  endif.

  loop at p_cua-sta into ls_sta where node-sel = 'X'.
    lt_rsmpe_stat = ls_sta-sta.
    append lt_rsmpe_stat.
  endloop.

  if lines( lt_rsmpe_stat ) = 0.
    return.
  endif.

  perform request_set using p_gv_package 'CUAD' p_program changing gv_request gv_rtype gv_rtmsg. "会包所有的gui状态和菜单栏
  if gv_rtype = 'S'.
    call function 'RS_CUA_INTERNAL_WRITE'
      exporting
        program   = p_program
        language  = '1'
        tr_key    = ls_tr_key
        adm       = p_cua-adm
        state     = 'A' "为I时出现一个激活了之后还是显示未激活的bug
      tables
*       sta       = p_cua-sta
        sta       = lt_rsmpe_stat
        fun       = p_cua-fun
        men       = p_cua-men
        mtx       = p_cua-mtx
        act       = p_cua-act
        but       = p_cua-but
        pfk       = p_cua-pfk
        set       = p_cua-set
        doc       = p_cua-doc
        tit       = p_cua-tit
        biv       = p_cua-biv
      exceptions
        not_found = 1
        others    = 2.
    if sy-subrc <> 0.
      perform msg_sys_into changing gv_msg.
      loop at p_cua-sta into ls_sta where node-sel = 'X'.
        perform rep_log using space 'E' gv_msg changing ls_sta-node.
        modify p_cua-sta from ls_sta.
      endloop.
    else.

      loop at p_cua-sta into ls_sta where node-sel = 'X'.
        perform rep_log using gv_request 'S' '成功' changing ls_sta-node.
        modify p_cua-sta from ls_sta.
      endloop.
    endif.
  else. "没有包请求
    loop at p_cua-sta into ls_sta where node-sel = 'X'.
      perform rep_log using gv_request gv_rtype gv_rtmsg changing ls_sta-node.
      modify p_cua-sta from ls_sta.
    endloop.
  endif.

*  perform request_set using p_gv_package 'ABAP' p_program.
endform.                    " STATUS_CREATE
*&---------------------------------------------------------------------*
*&      Form  rep_get
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
form rep_get tables p_gt_rep structure gt_rep.
  data:
    ls_rep       like gt_rep,
    ls_rep_class like gt_rep. "class用的传参
  data:
    lt_code  type table of ty_codes,
    ls_class type ty_class.

  loop at p_gt_rep into ls_rep.
    clear:gt_request,gt_request[],gs_cua,
    gs_code,gs_text,gt_screen,gt_screen[],
    gt_table,gt_table[],gt_ttyp,gt_ttyp[],gt_dtel,gt_dtel[],gt_doma,gt_doma[],
    gt_class,gt_class[],
    gt_lock,gt_lock[],gt_func,gt_func[],
    gt_snro,gt_snro[],gt_tcode,gt_tcode[],gt_prog[].

    if ls_rep-type = 'F'. "函数
*取函数
      gt_func[] = ls_rep-func.
      perform func_get tables gt_func gt_table gt_ttyp gt_dtel.
      loop at gt_func.
*分析函数代码
        if gt_func-source is not initial.
          lt_code = gt_func-source.
        else.
          lt_code = gt_func-new_source.
        endif.
        perform code_analyze tables lt_code
                                                     gt_lock
                                                     gt_snro
                                                     gt_func
                                                     gt_table
                                                     gt_ttyp
                                                     gt_dtel
                                                     gt_w3mi
                                                     gt_prog.

        perform func_get tables gt_func gt_table gt_ttyp gt_dtel.
      endloop.
      perform rep_data_add using 'FUNC' gt_func[] changing ls_rep.
    else. "可执行程序和include
*取代码
      perform code_get using ls_rep-program changing gs_code.
      perform rep_data_add using 'CODE' gs_code changing ls_rep.
*分析程序代码(此处分析数据字典可以不要了)
      perform code_analyze tables gs_code-code
                                                   gt_lock
                                                   gt_snro
                                                   gt_func
                                                   gt_table
                                                   gt_ttyp
                                                   gt_dtel
                                                   gt_w3mi
                                                   gt_prog.
    endif.

*根据所用处清单取数据字典(分析程序代码取type部分可以不要了)(代码中用到的class名也在此处收集,WBCROSSGT表可以根据程序名查出class和class中使用的class)
    perform rep_dict_name_get tables gt_table gt_ttyp gt_dtel gt_class using ls_rep .

*class也放在程序分组下了,需要解析class的数据字典
    loop at gt_class into ls_class.
      ls_rep_class-type = 'C'. "class
      ls_rep_class-program = ls_class-clsname.
      perform rep_dict_name_get tables gt_table gt_ttyp gt_dtel gt_class using ls_rep_class .
    endloop.

*text-pool
    perform text_get using ls_rep-program changing gs_text .
    perform rep_data_add using 'TEXT' gs_text changing ls_rep.
*status
    perform status_get using ls_rep-program changing gs_cua.
    perform rep_data_add using 'CUA' gs_cua changing ls_rep.
*锁对象
    perform rep_data_add using 'LOCK' gt_lock[] changing ls_rep.
*屏幕
    perform screen_get tables gt_screen using ls_rep-program.
    perform rep_data_add using 'SCREEN2' gt_screen[] changing ls_rep.
    do. "表类型可以查出结构,结构的 字段又可以是表类型,递归
*表类型
      perform ttyp_get tables gt_ttyp gt_table.
      perform rep_data_add using 'TTYP' gt_ttyp[] changing ls_rep.
*自建表和结构、这一步分割数据元素和域+同时需要把锁用到的加进来
      perform table_get tables gt_table gt_ttyp gt_dtel.
      perform rep_data_add using 'DICT' gt_table[] changing ls_rep.
      loop at gt_ttyp where dd40v_wa is initial. "结构里没有找到字段参考表类型
        exit.
      endloop.
      if sy-subrc ne 0.
        exit.
      endif.
    enddo.
*倒序(防止依赖无法激活,这种可能有一个问题就是依赖的组件在别的文件夹下出现了,就不能直接倒序处理了)


* 编号范围对象+编号范围
    perform snro_get tables gt_snro gt_dtel.
    perform rep_data_add using 'SNRO' gt_snro[] changing ls_rep.
*数据元素
    perform dtel_get tables gt_dtel.
    perform rep_data_add using 'DTEL' gt_dtel[] changing ls_rep.
*域
    perform doma_get tables gt_dtel gt_doma.
    perform rep_data_add using 'DOMA' gt_doma[] changing ls_rep.
*tcode
    perform tcode_get tables gt_tcode using ls_rep-program.
    perform rep_data_add using 'TCODE' gt_tcode[] changing ls_rep.
*class
    perform class_get tables gt_class.
    perform rep_data_add using 'CLASS' gt_class[] changing ls_rep.
*用户名
    ls_rep-uname = p_uname.

    modify p_gt_rep from ls_rep.
  endloop.
endform.                    " rep_get
*&---------------------------------------------------------------------*
*&      Form  rep_download
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
form rep_download using p_program p_gt_rep.

  perform filename_set using p_program changing gv_filename.
*  if p_zip = 'X'.
  perform zip_from_data using p_gt_rep changing gv_xml.
  perform file_download using gv_filename gv_xml.
*  else.
*    perform xml_from_data using p_gt_rep changing gv_xml.
*    perform xml_download using gv_filename gv_xml.
*  endif.

endform.                    " rep_download
*&---------------------------------------------------------------------*
*&      Form  CODE_GET
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_GT_CODE  text
*      -->P_PROGRAM  text
*----------------------------------------------------------------------*
form code_get
               using    p_program
               changing p_gs_code structure gs_code.
  clear p_gs_code.
  read report p_program into p_gs_code-code.
  if sy-subrc <> 0.
    perform msg_sys_into changing gv_msg.
    concatenate '读取程序' p_program '代码出错:' gv_msg into gv_msg.
*    perform rep_Log using p_program 'E' gv_msg.
  else.
    concatenate '读取程序' p_program '代码成功' into gv_msg.
*    perform rep_Log using p_program 'S' gv_msg.
  endif.

endform.                    " CODE_GET
*&---------------------------------------------------------------------*
*&      Form  MSG_INTO
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      <--P_GV_MSG  text
*----------------------------------------------------------------------*
form msg_sys_into  changing p_gv_msg.
  clear p_gv_msg.

  check sy-msgid is not initial.
  message id sy-msgid
    type sy-msgty
    number sy-msgno
    with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4 into p_gv_msg.
endform.                    " MSG_INTO
*&---------------------------------------------------------------------*
*&      Form  REP_DATA_ADD
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_1206   text
*      <--P_GS_REP  text
*----------------------------------------------------------------------*
form rep_data_add  using p_type p_data
                   changing p_gs_rep.
  field-symbols <fs>.
  assign component p_type of structure p_gs_rep to <fs>.
  <fs> = p_data.
endform.                    " REP_DATA_ADD
*&---------------------------------------------------------------------*
*&      Form  FILENAME_GET
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      <--P_GV_FILENAME  text
*----------------------------------------------------------------------*
form filename_get  changing p_gv_filename.

  data:l_obj type ref to cl_gui_frontend_services.
  data: it_file type filetable with header line.
  data: g_rc type i.
  clear p_gv_filename.

  create object l_obj.
  call method l_obj->file_open_dialog
    exporting
      file_filter = '*.LAN'
*     initial_directory = 'C:\data'
    changing
      file_table  = it_file[]
      rc          = g_rc.
  read table it_file index 1.
  p_gv_filename = it_file-filename.

  if p_gv_filename is initial.
    perform msg_and_leave using '文件名不能为空'.
  endif.
endform.                    " FILENAME_GET
*&---------------------------------------------------------------------*
*&      Form  XML_UPLOAD
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_GV_FILENAME  text
*      <--P_GV_XML  text
*----------------------------------------------------------------------*
form xml_upload  using    p_gv_filename
                 changing p_gv_xml p_zip.
  data:
    lcl_xml_doc type ref to cl_xml_document,
    v_subrc     type sysubrc.

  clear p_zip.

  create object lcl_xml_doc.
  if sy-subrc = 0.
    call method lcl_xml_doc->import_from_file
      exporting
        filename = gv_filename
      receiving
        retcode  = v_subrc.
    if v_subrc ne lcl_xml_doc->c_ok.
      case v_subrc.
        when lcl_xml_doc->c_no_ixml.
          p_zip = 'X'.
        when lcl_xml_doc->c_failed.
*          perform rep_Log using space 'E' '解析文件出错'.
        when lcl_xml_doc->c_not_found.
*          perform rep_Log using space 'E' '文件查找失败'.
        when 1. "zip文件
          p_zip = 'X'.
      endcase.
    endif.

    if p_zip is initial.
      lcl_xml_doc->render_2_string(
        exporting
        pretty_print = 'X'
        importing
        retcode = v_subrc
        stream = gv_xml ).
    endif.
  endif.
endform.                    " XML_UPLOAD
*&---------------------------------------------------------------------*
*&      Form  file_upload
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_GV_FILENAME  text
*      -->P_GV_XML       text
*----------------------------------------------------------------------*
form file_upload  using    p_gv_filename
                 changing p_gv_xml.

  data :
    filename type string,
    datatab  type table_of_strings.

  filename = p_gv_filename.

  call method cl_gui_frontend_services=>gui_upload
    exporting
      filename                = filename
      filetype                = 'ASC'
    changing
      data_tab                = datatab
    exceptions
      file_open_error         = 1
      file_read_error         = 2
      no_batch                = 3
      gui_refuse_filetransfer = 4
      invalid_type            = 5
      no_authority            = 6
      unknown_error           = 7
      bad_data_format         = 8
      header_not_allowed      = 9
      separator_not_allowed   = 10
      header_too_long         = 11
      unknown_dp_error        = 12
      access_denied           = 13
      dp_out_of_memory        = 14
      disk_full               = 15
      dp_timeout              = 16
      not_supported_by_gui    = 17
      error_no_gui            = 18
      others                  = 19.
  if sy-subrc ne 0.
    perform msg_sys.
  endif.

  read table datatab into p_gv_xml index 1.
endform.                    " XML_UPLOAD
*&---------------------------------------------------------------------*
*&      Form  REP_SET
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
form rep_set tables p_gt_rep structure gt_rep changing p_gv_package.

  loop at p_gt_rep.
    perform code_set using p_gt_rep-program p_gt_rep-type changing p_gv_package p_gt_rep-code.
    perform status_set using p_gt_rep-program p_gv_package p_gt_rep-cua.
    perform text_set using p_gt_rep-program p_gv_package changing p_gt_rep-text.
    perform screen_set tables p_gt_rep-screen2  using p_gt_rep-program p_gv_package. "创建屏幕,屏幕包入请求
    perform doma_set tables p_gt_rep-doma using p_gv_package.
    perform dtel_set tables p_gt_rep-dtel using p_gv_package.
    perform table_set tables p_gt_rep-dict using p_gv_package.
    perform ttyp_set tables p_gt_rep-ttyp using p_gv_package.
    perform lock_set tables p_gt_rep-lock using p_gv_package.
    perform snro_set tables p_gt_rep-snro using p_gv_package.
    perform tcode_set tables p_gt_rep-tcode using p_gv_package.
    perform fugr_set using p_gv_package p_gt_rep-program changing p_gt_rep-fugr.
    perform func_set tables p_gt_rep-func using p_gv_package.
    perform class_set tables p_gt_rep-class using p_gv_package.
    modify p_gt_rep.
  endloop.

  commit work and wait.

endform.                    " REP_SET
*&---------------------------------------------------------------------*
*&      Form  CODE_SET
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_P_GS_REP_CODE  text
*      -->P_P_PROGRM  text
*----------------------------------------------------------------------*
form code_set using p_program p_type changing p_gv_package p_code structure gs_code.

*代码
  if p_code is initial or p_code-node-sel is initial.
    return.
  endif.

*对象条目目录
  if p_type = '1'. "可执行程序才需要、可以创建
    perform object_directory_set using p_program changing p_gv_package. "选择包,创建(修改)对象目录条目并包入请求
  endif.

  perform request_set using p_gv_package 'PROG' p_program changing gv_request gv_rtype gv_rtmsg. "程序包入请求 以SE03为准
  if gv_rtype = 'S'.
*生成程序
    insert report p_program
      from p_code-code
      program type p_type.
    if sy-subrc = 0.
      perform rep_log using gv_request 'S' '成功' changing p_code-node.
    else.
      perform msg_sys_into changing gv_msg.
      perform rep_log using space 'E' gv_msg changing p_code-node.
    endif.
  else.
    perform rep_log using space gv_rtype gv_rtmsg changing p_code-node.
  endif.
endform.                    " CODE_SET
*&---------------------------------------------------------------------*
*&      Form  object_directory_set
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_P_PROGRAM  text
*----------------------------------------------------------------------*
form object_directory_set using p_program changing p_gv_package.

  data:
    fs_tadir    type tadir,        " (Structure) TADIR
    fs_tdevc    type tdevc,        " (Structure) TDEVC
    lv_obj_name like e071-obj_name.

  lv_obj_name = p_program.

*为程序选择包,生成对象目录条目,会弹出请求(只会包进对象目录条目,不会包进程序源代码)
*(无法从请求中删除对象目录条目,删除只是se10看不见了,如果修改包到本地还是会提示对象目录条目被请求锁定)
  call function 'TR_TADIR_POPUP_ENTRY_E071'
    exporting
      wi_e071_pgmid             = 'R3TR'
      wi_e071_object            = 'PROG'
      wi_tadir_devclass         = p_gv_package
      wi_e071_obj_name          = lv_obj_name
    importing
      we_tadir                  = fs_tadir
      es_tdevc                  = fs_tdevc
    exceptions
      display_mode              = 1
      exit                      = 2
      global_tadir_insert_error = 3
      no_repair_selected        = 4
      no_systemname             = 5
      no_systemtype             = 6
      no_tadir_type             = 7
      reserved_name             = 8
      tadir_enqueue_failed      = 9
      devclass_not_found        = 10
      tadir_not_exist           = 11
      object_exists             = 12
      internal_error            = 13
      object_append_error       = 14
      tadir_modify_error        = 15
      object_locked             = 16
      no_object_authority       = 17
      others                    = 18.

  if sy-subrc ne 0.
*    message 'Error while creating TADIR entry' type 'S'.
    message '创建对象条目目录出错' type 'E'.
  else.
    p_gv_package = fs_tadir-devclass.
  endif.                               " IF SY-SUBRC NE 0
endform.                    " object_directory_set
*&---------------------------------------------------------------------*
*&      Form  zip_from_data
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_GS_REP  text
*      <--P_GV_XML  text
*----------------------------------------------------------------------*
form zip_from_data  using p_gt_rep
                  changing p_gv_xml.

  data lo_ref type ref to cx_root. "异常处理
  data lv_text type string.

  data lv_gzip_out type xstring.

*转xml
  call transformation id
    options value_handling = 'MOVE' "防止内表中有N类型dump
    source data = p_gt_rep
    result xml p_gv_xml.

*转xstring(统一编码)
  perform xstring_from_string changing p_gv_xml.

*压缩(现在转了xstring再压缩,不用考虑编码问题了)
*unicode系统只能导出UTF-8,填ANSI会出异常
*非unicode系统导出时可以填UTF-8和ANSI,不填就是默认ANSI
  data lv_abap_encod type abap_encod.
  lv_abap_encod = 'UTF-8'.

  try.
      call method cl_abap_gzip=>compress_text
        exporting
          text_in    = p_gv_xml
          conversion = lv_abap_encod
        importing
          gzip_out   = lv_gzip_out.
    catch cx_root into lo_ref.
      lv_text = lo_ref->get_text( ).
  endtry.

  p_gv_xml = lv_gzip_out.
endform.                    " zip_from_data
*&---------------------------------------------------------------------*
*&      Form  xml_from_data
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_GT_REP   text
*      -->P_GV_XML   text
*----------------------------------------------------------------------*
form xml_from_data  using p_gt_rep
                  changing p_gv_xml.


*转xml
  call transformation id
    options value_handling = 'MOVE' "防止内表中有N类型dump
    source data = p_gt_rep
    result xml p_gv_xml.
endform.                    "xml_from_data
*&---------------------------------------------------------------------*
*&      Form  FILENAME_SET
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      <--P_GV_FILENAME  text
*----------------------------------------------------------------------*
form filename_set using value(p_program) changing p_gv_filename.
*pop
  data:
        lv_def_filename(255),
        v_filename type localfile.

  if p_program is initial.
    read table s_prog index 1.
    p_program = s_prog-low.
  endif.
  concatenate p_program '.LAN' into lv_def_filename.

  call function 'WS_FILENAME_GET'
    exporting
      def_filename     = lv_def_filename
      def_path         = 'C:'
      mask             = ',*.lan ,*.lan.' "待处理
      mode             = 'S'
      title            = '保存repository文件'
    importing
      filename         = v_filename
    exceptions
      inv_winsys       = 1
      no_batch         = 2
      selection_cancel = 3
      selection_error  = 4
      others           = 5.
  if sy-subrc <> 0.
  else.
    p_gv_filename = v_filename.
  endif.

  if p_gv_filename is initial.
    perform msg_and_leave using '选择路径'.
  endif.
endform.                    " FILENAME_SET
*&---------------------------------------------------------------------*
*&      Form  MSG_AND_LEAVE
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
form msg_and_leave using p_msg.
  message p_msg type 'S' display like 'E'.
  leave list-processing and return to screen 0.
endform.                    " MSG_AND_LEAVE
*&---------------------------------------------------------------------*
*&      Form  TEXT_GET
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_PROGRAM  text
*      <--P_GT_TEXT  text
*----------------------------------------------------------------------*
form text_get using  p_program changing p_gs_text structure gs_text.
*  data: lv_len(10) type c.
*
*  types: begin of type_s_txtlang,
*           language type spras,
*         end   of type_s_txtlang.
*
*  data: fs_txtlang type type_s_txtlang,
*        lt_txtlang type table of type_s_txtlang,
*              t_txt   type table of textpool.

**取语言数
*  select language
*    from repotext
*    into table lt_txtlang
*   where progname = p_program.
*  if sy-subrc eq 0.
**遍历不同语言取文本
*    loop at lt_txtlang into fs_txtlang.
*      read textpool p_program into t_txt language fs_txtlang-language.
*      if sy-subrc eq 0.
*        append lines of t_txt to p_gs_text-text.
*      endif.
*    endloop.                           " LOOP AT lt_txtlang
*endif.                               " IF SY-SUBRC EQ 0
  read textpool p_program into p_gs_text-text. "测试可以不指定语言
endform.                    " TEXT_GET
*&---------------------------------------------------------------------*
*&      Form  TEXT_SET
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_P_PROGRAM  text
*      -->P_P_GS_REP_TEXT  text
*----------------------------------------------------------------------*
form text_set  using    p_program p_gv_package changing p_text structure gs_text.
  if p_text is initial or p_text-node-sel is initial.
    return.
  endif.

  perform request_set using p_gv_package 'REPT' p_program changing gv_request gv_rtype gv_rtmsg. "文本请求
  if gv_rtype = 'S'.
    insert textpool p_program from p_text-text.
    if sy-subrc = 0.
      perform rep_log using gv_request 'S' '成功' changing p_text-node.
    else.
      perform msg_sys_into changing gv_msg.
      perform rep_log using space 'E' gv_msg p_text-node.
    endif.
  else.
    perform rep_log using space gv_rtype gv_rtmsg p_text-node.
  endif.
endform.                    " TEXT_SET
*&---------------------------------------------------------------------*
*&      Form  SCREEN_GET
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_GT_SCREEN  text
*      -->P_PROGRAM  text
*----------------------------------------------------------------------*
form screen_get  tables   p_gt_screen structure gt_screen
                 using    p_program.

  data: ls_header               type rpy_dyhead,
        lt_containers           type dycatt_tab,
        lt_fields_to_containers type dyfatc_tab,
        lt_flow_logic           type swydyflow,
        lt_d020s                type table of d020s.

  field-symbols: <ls_d020s>       like line of lt_d020s,
*                 <lv_outputstyle> type scrpostyle,
                 <lv_outputstyle>,                          "兼容r3
                 <ls_field>       like line of lt_fields_to_containers,
                 <ls_dynpro>      like line of gt_screen.


  call function 'RS_SCREEN_LIST'
    exporting
      dynnr     = ''
      progname  = p_program
    tables
      dynpros   = lt_d020s
    exceptions
      not_found = 1
      others    = 2.
  if sy-subrc = 2.

  endif.

* loop dynpros and skip generated selection screens
  loop at lt_d020s assigning <ls_d020s> where type <> 'S'.

    call function 'RPY_DYNPRO_READ'
      exporting
        progname             = p_program
        dynnr                = <ls_d020s>-dnum
      importing
        header               = ls_header
      tables
        containers           = lt_containers
        fields_to_containers = lt_fields_to_containers
        flow_logic           = lt_flow_logic
      exceptions
        cancelled            = 1
        not_found            = 2
        permission_error     = 3
        others               = 4.
    if sy-subrc <> 0.

    endif.

    loop at lt_fields_to_containers assigning <ls_field>.
* output style is a NUMC field, the XML conversion will fail if it contains invalid value
* field does not exist in all versions
      assign component 'OUTPUTSTYLE' of structure <ls_field> to <lv_outputstyle>.
      if sy-subrc = 0 and <lv_outputstyle> = '  '.
        clear <lv_outputstyle>.
      endif.
    endloop.

    append initial line to gt_screen assigning <ls_dynpro>.
    <ls_dynpro>-header     = ls_header.
    <ls_dynpro>-containers = lt_containers.
    <ls_dynpro>-fields     = lt_fields_to_containers.

*    condense_flow( importing et_spaces = <ls_dynpro>-spaces
*                   changing ct_flow = lt_flow_logic ).
    <ls_dynpro>-flow_logic = lt_flow_logic.

  endloop.

endform.                    " SCREEN_GET
*&---------------------------------------------------------------------*
*&      Form  SCREEN_SET
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_P_GS_REP_SCREEN  text
*      -->P_P_PROGRAM  text
*----------------------------------------------------------------------*
form screen_set  tables   p_screen structure gt_screen
                 using    p_object p_gv_package.

  data: ls_dynpro like line of gt_screen.

  if p_screen[] is initial.
    return.
  endif.

* ls_dynpro is changed by the function module, a field-symbol will cause
* the program to dump since gt_screen cannot be changed
  loop at p_screen into ls_dynpro where node-sel = 'X'.
*包入请求(对象不存在都可以包),第一步会自己包入请求,这一步是为了获取请求号
    data:
      lv_object(48),
      lv_prog(40),
      lv_dynm(8).
    lv_prog = p_object.
    lv_dynm = ls_dynpro-header-screen.
*      concatenate lv_prog lv_dynm into lv_object respecting blanks. "debug得来,一个shor8+4,一个long40+8 r3不支持respecting blanks
    lv_object(40) = lv_prog.
    lv_object+40(8) = lv_dynm.
    perform request_set using p_gv_package 'DYNP' lv_object changing gv_request gv_rtype gv_rtmsg.
    if gv_rtype = 'S'.
*生成屏幕
      ls_dynpro-header-program = p_object.
      call function 'RPY_DYNPRO_INSERT'
        exporting
          header                 = ls_dynpro-header
          suppress_exist_checks  = abap_true
        tables
          containers             = ls_dynpro-containers
          fields_to_containers   = ls_dynpro-fields
          flow_logic             = ls_dynpro-flow_logic
        exceptions
          cancelled              = 1
          already_exists         = 2
          program_not_exists     = 3
          not_executed           = 4
          missing_required_field = 5
          illegal_field_value    = 6
          field_not_allowed      = 7
          not_generated          = 8
          illegal_field_position = 9
          others                 = 10.
      if sy-subrc = 0.
        perform rep_log using gv_request 'S' '成功' changing ls_dynpro-node.
*    elseif sy-subrc = 2.
      else.
        perform msg_sys_into changing gv_msg.
        perform rep_log using space 'E' gv_msg changing ls_dynpro-node.
      endif.
    else.
      perform rep_log using space gv_rtype gv_rtmsg changing ls_dynpro-node.
    endif.
    modify p_screen from ls_dynpro.
* todo, RPY_DYNPRO_UPDATE?


  endloop.
endform.                    " SCREEN_SET
*&---------------------------------------------------------------------*
*&      Form  TABLE_GET
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_GT_TABLE  text
*      -->P_PROGRAM  text
*----------------------------------------------------------------------*
form table_get  tables   p_gt_table structure gt_table
                                     p_gt_ttyp structure gt_ttyp
                                     p_gt_dtel structure gt_dtel.

  data: begin of lt_dd02l occurs 0,
          tabname  type dd02l-tabname,
          as4local type dd02l-as4local,
          tabclass type dd02l-tabclass,
        end of lt_dd02l.

  data ls_strcture like line of gt_table-istructure.

  loop at p_gt_table where dd09v is initial. "没取过的
    perform table_definition_get changing p_gt_table.
    modify p_gt_table.

*添加表中的自建数据元素(或结构,如果是结构就需要递归)
    loop at p_gt_table-istructure into ls_strcture where rollname(1) = 'Z'. "字段类型有可能是结构
      perform dict_add tables p_gt_table p_gt_ttyp p_gt_dtel using ls_strcture-rollname.
    endloop.
  endloop.

endform.                    " TABLE_GET

*&---------------------------------------------------------------------*
*&      Form  table_description_get
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->VALUE             text
*      -->(TABLENAME)       text
*      -->TABLEDESCRIPTION  text
*----------------------------------------------------------------------*
form table_description_get using value(tablename)
                                      changing tabledescription.

  select single ddtext
                from dd02t
                into tabledescription
                where tabname = tablename
                 and ddlanguage = sy-langu.
endform.                                                                                          "table_description_get

*----------------------------------------------------------------------------------------------------------------------
*  table_definition_get... Find the structure of a table from the SAP database.
*----------------------------------------------------------------------------------------------------------------------
form table_definition_get changing wa_table like gt_table.

  data gotstate like dcobjif-gotstate.
  data: lt_dd03p type standard table of dd03p with header line.
  data:
    ls_dd02v like dd02v,
    ls_dd09l like dd09v.

  check wa_table-dd09v is initial. "只取没取过的

  call function 'DDIF_TABL_GET'
    exporting
      name          = wa_table-tablename
      state         = 'A'
      langu         = sy-langu
    importing
      gotstate      = gotstate
      dd02v_wa      = ls_dd02v
      dd09l_wa      = ls_dd09l
    tables
      dd03p_tab     = lt_dd03p
    exceptions
      illegal_input = 1
      others        = 2.

  if sy-subrc = 0 and gotstate = 'A'.
    clear:wa_table-dd02v,wa_table-dd09v,wa_table-istructure[].
    move-corresponding ls_dd02v to wa_table-dd02v.
    move-corresponding ls_dd09l to wa_table-dd09v.
    loop at lt_dd03p.
      perform removeleadingzeros changing lt_dd03p-position.
      perform removeleadingzeros changing lt_dd03p-leng.
      append lt_dd03p to wa_table-istructure.
    endloop.
  endif.
endform.                                                                                           "table_definition_get

*&---------------------------------------------------------------------*
*&      Form  removeleadingzeros
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->MYVALUE    text
*----------------------------------------------------------------------*
form removeleadingzeros changing myvalue.

  call function 'CONVERSION_EXIT_ALPHA_OUTPUT'
    exporting
      input  = myvalue
    importing
      output = myvalue
    exceptions
      others = 1.
endform.                                                                             "removeLeadingZeros
*&---------------------------------------------------------------------*
*&      Form  table_set
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_P_GS_REp_table  text
*----------------------------------------------------------------------*
form table_set  tables   p_table structure gt_table using p_gv_package.
*TRANSP    透明表格
*INTTAB    结构
*CLUSTER  簇表
*POOL    共享表格
*VIEW    一般视图结构
*APPEND    附加结构

  data: lv_rc    like sy-subrc,
        ls_dd02v type dd02v,
        ls_dd09l type dd09l,
        lt_dd03p type standard table of dd03p with default key.

  data ls_structure type dd03p.
  data:
    lv_msg1(255),
    lv_msg2(255).

  field-symbols: <ls_dd03p> like line of lt_dd03p.

  if p_table[] is initial.
    return.
  endif.

  loop at p_table where node-sel = 'X'.

*修改属性值
    if p_tab = 'X'.
      clear:gs_popk,gt_pop,gt_pop[],sy-ucomm.
      concatenate '表' p_table-tablename into gs_popk-title.
      pop_key_append 'TABLENAME' '表名' p_table-tablename.
      call screen 2003 starting at 30 10 ending at 100 20.
      if sy-ucomm = 'OK'.
        loop at gt_pop.
          case gt_pop-key.
            when 'TABLENAME'.
              p_table-tablename = gt_pop-value.
              ls_dd02v = p_table-dd02v. "抬头
              ls_dd02v-tabname = gt_pop-value.
              p_table-dd02v = ls_dd02v.
              ls_dd09l = p_table-dd09v. "技术设置
              ls_dd09l-tabname = gt_pop-value.
              p_table-dd09v = ls_dd09l.
              loop at p_table-istructure into ls_structure.
                ls_structure-tabname = gt_pop-value.
                modify p_table-istructure from ls_structure.
              endloop.
          endcase.
        endloop.
      endif.
    endif.

*包入请求(对象不存在都可以包)
    data lv_object(40).
    concatenate 'TABL' p_table-tablename into lv_object.
    perform request_set using p_gv_package 'DICT' lv_object changing gv_request gv_rtype gv_rtmsg. "表、结构请求(debug RS_DD_COPY_OBJ得来)
    if gv_rtype = 'S'.
      clear:ls_dd09l,ls_dd02v,lt_dd03p,lt_dd03p[],lv_msg1,lv_msg2.

      ls_dd02v = p_table-dd02v. "抬头
      ls_dd09l = p_table-dd09v. "技术设置

      loop at p_table-istructure into ls_structure.
        append initial line to lt_dd03p assigning <ls_dd03p>.
        <ls_dd03p> = ls_structure.
      endloop.

      call function 'DDIF_TABL_PUT' "可以新建修改表、结构
        exporting
          name              = p_table-tablename
          dd02v_wa          = ls_dd02v
          dd09l_wa          = ls_dd09l
        tables
          dd03p_tab         = lt_dd03p
        exceptions
          tabl_not_found    = 1
          name_inconsistent = 2
          tabl_inconsistent = 3
          put_failure       = 4
          put_refused       = 5
          others            = 6.
      if sy-subrc <> 0.
        perform msg_sys_into changing lv_msg1.
*    else.
*      lv_msg1 = '生成表成功'.
      endif.

*激活
      call function 'DDIF_TABL_ACTIVATE' "日志在表里
        exporting
          name        = p_table-tablename
          auth_chk    = abap_false
        importing
          rc          = lv_rc
        exceptions
          not_found   = 1
          put_failure = 2
          others      = 3.
      if sy-subrc <> 0 or lv_rc > 4. "rc = 0 成功 = 4 警告 >4 失败
        lv_msg2 = '激活表出错'.
      endif.

*记录日志
      clear gv_msg.
      concatenate lv_msg1 lv_msg2 into gv_msg separated by space.
      if lv_msg1 is initial and lv_msg2 is initial.
        perform rep_log using gv_request 'S' '成功' changing p_table-node.
      else.
        perform rep_log using space 'E' gv_msg changing p_table-node.
      endif.
    else.
      perform rep_log using space gv_rtype gv_rtmsg changing p_table-node.
    endif.
    modify p_table.
  endloop.
endform.                    " table_set
*&---------------------------------------------------------------------*
*&      Form  REQUEST_SELECT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      <--P_GT_REQUEST  text
*----------------------------------------------------------------------*
form request_select  changing p_gt_request type trwbo_request_headers.
  data: lrs_trfunction type trsel_trs_function,
        lv_types       type string,
        ls_ranges      type trsel_ts_ranges.

  " Fill all request types
  lv_types = 'KWTCOEMPDRSXQFG'.
  lrs_trfunction-sign   = 'I'.
  lrs_trfunction-option = 'EQ'.
  while lv_types <> space.
    lrs_trfunction-low = lv_types(1).
    append lrs_trfunction to ls_ranges-request_funcs.
    shift lv_types.
  endwhile.

  call function 'TRINT_SELECT_REQUESTS'
    exporting
      iv_username_pattern    = sy-uname
      iv_via_selscreen       = 'X'
      iv_complete_projects   = ''
      iv_title               = 'abapGit: Transport Request Selection'                                                                                                                                                                            "is_popup = ''
    importing
      et_requests            = gt_request[]
    changing
      cs_ranges              = ls_ranges
    exceptions
      action_aborted_by_user = 1
      others                 = 2.
endform.                    " REQUEST_SELECT
*&---------------------------------------------------------------------*
*&      Form  REQUEST_SET
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_P_GV_PACKAGE  text
*      -->P_1532   text
*      -->P_P_PROGRAM  text
*----------------------------------------------------------------------*
form request_set  using p_gv_package p_type p_program
                           changing ordernum rtype rtmsg.

  data:
    lv_ordernum    like  e070-trkorr,
    lv_devclass    like tadir-devclass,
    lv_global_lock.

  clear:rtype,rtmsg.

  if p_type = 'FUGR' "不加锁在包函数组时会报错:"这一语法是不能用于对象名称"
    or p_type = 'ENQU'
    or p_type = 'NROB'.
    lv_global_lock = 'X'.
  endif.

  free memory id 'RESUL1'. "重复包函数时会返回空请求号,debug找到缓存位置

  call function 'RS_CORR_INSERT'
    exporting
      korrnum             = ordernum
      global_lock         = lv_global_lock
      object              = p_program
      object_class        = p_type
      devclass            = p_gv_package
      master_language     = '1'
*     mode                = 'INSERT' "如果是insert每次都会创建对象条目目录
      mode                = 'I' "20210318更新:测试 I 传入请求号不传包都不会弹框了
*     object_class_supports_ma = 'X'
    importing
      ordernum            = lv_ordernum
      devclass            = lv_devclass
    exceptions
      cancelled           = 1
      permission_failure  = 2
      unknown_objectclass = 3
      others              = 4.
  if sy-subrc ne 0.
    rtype = 'E'.
    perform msg_sys_into changing rtmsg.
  else.

    "如果函数组在请求中,则函数跟随函数组(且请求中只有函数组没有函数,不返回请求号算了)
*    if lv_devclass is initial.
*      lv_devclass = '$TMP'.
*      lv_ordernum = lv_devclass.
*    endif.

*    p_gv_package = lv_devclass.
    ordernum = lv_ordernum.

    rtype = 'S'.
    rtmsg = '创建请求成功'.
  endif.
endform.                    " REQUEST_SET
*&---------------------------------------------------------------------*
*&      Form  DICT_CHECK_EXIST
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_OBJNAME  text
*      -->P_OBJTYPE  text
*----------------------------------------------------------------------*
*form dict_check_exist  using    p_objname
*                                p_objtype.
*  CALL FUNCTION 'INTERN_DD_CHECK_EXIST'
*    EXPORTING
*      objname     = p_objname
*      objtype     = p_objtype
*      err_message = 'X'
*      objstate    = 'A'
*      exists      = 'X'
*    IMPORTING
*      masterlangu = masterlangu
*      proxy_type  = g_proxy_type.
*endform.                    " DICT_CHECK_EXIST
*&---------------------------------------------------------------------*
*&      Form  rep_display
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
form rep_display tables p_gt_rep structure gt_rep.
  if p_gt_rep[] is not initial.
    call screen 100.
  else.
*    message '资源库数据为空' type 'S' display like 'E'.
*    leave to screen 0.
  endif.
endform.                    " rep_display
*&---------------------------------------------------------------------*
*&      Module  PBO  OUTPUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
module pbo_100 output.

  set pf-status 'REP_DIS'.
  set titlebar 'REP_DIS'.

  if g_custom_container is initial.
    perform tree_init tables gt_rep gt_rep_out.

    call method cl_gui_cfw=>flush
      exceptions
        cntl_system_error = 1
        cntl_error        = 2.
    if sy-subrc ne 0.
      call function 'POPUP_TO_INFORM'
        exporting
          titel = '自动化队列出错'(801)
          txt1  = '内部错误:'(802)
          txt2  = '在自动化队列中的方法'(803)
          txt3  = '触发了一个错误.'(804).
    endif.
  endif.

  call method g_alv_tree->column_optimize.
endmodule.                 " PBO  OUTPUT
*&---------------------------------------------------------------------*
*&      Module  PAI  INPUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
module pai_100 input.
  case sy-ucomm.
    when 'EXIT' or 'BACK' or 'CANC'.
      perform program_exit.
    when 'GENERATE'.
      perform tree_checked_items_get tables gt_selected_node using g_alv_tree.
      gv_state = 1.
      perform rep_sel tables gt_rep gt_selected_node.
      perform rep_set tables gt_rep changing gv_package.
      perform tree_refresh tables gt_rep gt_rep_out.
    when 'SEL_ALL' or 'DESEL_ALL'.
      perform tree_refresh tables gt_rep gt_rep_out.
    when 'RENAME'.
      clear:p_func,p_tab,p_tcode.
      call selection-screen 2004 starting at 30 10 ending at 90 20.
    when others.

* Toolbar events are registered in constructur method of
* CL_ALV_TREE_BASE as application events. So the dispatch call
* is a must if you want to use the standard toolbar.
      call method cl_gui_cfw=>dispatch.

  endcase.

  call method cl_gui_cfw=>flush.
endmodule.                 " PAI  INPUT

*&---------------------------------------------------------------------*
*&      Form  tree_init
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
form tree_init tables p_gt_rep structure gt_rep p_gt_rep_out structure gt_rep_out.
*创建容器
  create object g_custom_container
    exporting
      repid                       = sy-repid
      dynnr                       = '100'
      side                        = cl_gui_docking_container=>dock_at_left "容器贴屏幕左边
      extension                   = cl_gui_control=>ws_maximizebox "容器宽度
      style                       = cl_gui_control=>ws_child "可选参数,设置容器是否可用手动拖动大小
    exceptions
      cntl_error                  = 1
      cntl_system_error           = 2
      create_error                = 3
      lifetime_error              = 4
      lifetime_dynpro_dynpro_link = 5
      others                      = 6.

  if sy-subrc <> 0.
    message s001(00) with '屏幕容器初始化失败'.
    leave list-processing.
  endif.

* create tree control
  create object g_alv_tree
    exporting
      parent                      = g_custom_container
      node_selection_mode         = cl_gui_column_tree=>node_sel_mode_single
*     node_selection_mode         = cl_gui_column_tree=>node_sel_mode_multiple
      item_selection              = 'X'
      no_html_header              = 'X'
      no_toolbar                  = ''
    exceptions
      cntl_error                  = 1
      cntl_system_error           = 2
      create_error                = 3
      lifetime_error              = 4
      illegal_node_selection_mode = 5
      failed                      = 6
      illegal_column_name         = 7.
  if sy-subrc <> 0.
    message x208(00) with 'ERROR'.                          "#EC NOTEXT
  endif.

*tree节点标题
  data l_hierarchy_header type treev_hhdr.
  perform tree_hierarchy_header_build changing l_hierarchy_header.
  perform tree_fieldcatalog_build.

  call method g_alv_tree->set_table_for_first_display
    exporting
      is_hierarchy_header = l_hierarchy_header
    changing
      it_fieldcatalog     = gt_fieldcatalog
      it_outtab           = p_gt_rep_out[]. "table must be empty !

*节点
  perform tree_hierarchy_create tables p_gt_rep  p_gt_rep_out.
  perform tree_events_register.

* Send data to frontend.
  call method g_alv_tree->frontend_update.

endform.                               " tree_init

*&---------------------------------------------------------------------*
*&      Form  tree_hierarchy_header_build
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_HIERARCHY_HEADER  text
*----------------------------------------------------------------------*
form tree_hierarchy_header_build changing
                               p_hierarchy_header type treev_hhdr.

  clear p_hierarchy_header.
  p_hierarchy_header-heading = '对象名'(300).
  p_hierarchy_header-tooltip = '程序、屏幕、表等对象'(400).
  p_hierarchy_header-width = 35.
  p_hierarchy_header-width_pix = ''.

endform.                               " tree_hierarchy_header_build

*&---------------------------------------------------------------------*
*&      Form  tree_fieldcatalog_build
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
form tree_fieldcatalog_build.
  data: ls_fieldcatalog type lvc_s_fcat.

  clear:gt_fieldcatalog,gt_fieldcatalog[].

  perform fieldcat_build tables gt_fieldcatalog using 'OTYPE' '对象类型' space space space space space space space.
*  perform fieldcat_build tables gt_fieldcatalog using 'DESCP' '描述' space space space space space space space.
  perform fieldcat_build tables gt_fieldcatalog using 'RTYPE' '消息类型' space space space space space space space.
  perform fieldcat_build tables gt_fieldcatalog using 'RTMSG' '消息文本' space space space space space space space.
  perform fieldcat_build tables gt_fieldcatalog using 'REQUEST' '请求' space space space space space space space.

* Now change the fieldcatalog to hide fields and to determine
* some initial calculations for chosen fields.
  loop at gt_fieldcatalog into ls_fieldcatalog.
    case ls_fieldcatalog-fieldname.
      when 'PLANETYPE'.
        ls_fieldcatalog-icon = 'X'.
    endcase.
    modify gt_fieldcatalog from ls_fieldcatalog.
  endloop.

endform.                               " tree_fieldcatalog_build

*&---------------------------------------------------------------------*
*&      Form  tree_hierarchy_create
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
form tree_hierarchy_create tables p_gt_rep structure gt_rep p_gt_rep_out structure gt_rep_out.
  data:
    l_top_key    type lvc_nkey,
    l_new_key    type lvc_nkey,
    p_node_text  type lvc_value,
    p_item_image type tv_image.

  data:
    ls_sta    type ty_sta,
    ls_screen like gt_screen,
    ls_dict   like gt_table,
    ls_dtel   like gt_dtel,
    ls_ttyp   like gt_ttyp,
    ls_doma   like gt_doma,
    ls_lock   like gt_lock,
    ls_snro   like gt_snro,
    ls_tcode  type ty_tcode,
    ls_func   type ty_func,
    ls_class  like gt_class.

*资源库数据输出转换
  loop at p_gt_rep.

*插入文件夹
    clear:p_gt_rep_out.
    p_gt_rep_out-otype = p_gt_rep-typet.
*    p_gt_rep_out-descp = p_gt_rep-descp. "有空了再做
    p_node_text = p_gt_rep-program.
    if p_gt_rep-type = 'F'. "函数组去掉SAPL
      shift p_node_text left by 4 places.
    endif.
    perform tree_add_a_folder using p_gt_rep_out space p_node_text space
                         changing l_top_key.
    p_gt_rep-node-key = l_top_key.

*插入节点
    if p_gt_rep-code is not initial.
      clear:p_gt_rep_out.
      p_node_text = p_gt_rep-program.
      p_gt_rep_out-otype = '源代码'.
      move-corresponding p_gt_rep-code-node to p_gt_rep_out.
      if gv_state = 0. "只上传未执行
        perform object_exsit_check using p_gt_rep-program 'PROGRAM' changing p_gt_rep_out.
      endif.
      perform tree_add_a_node using  p_gt_rep_out l_top_key p_node_text
                                space p_item_image
                         changing l_new_key.
      p_gt_rep-code-node-key = l_new_key.
    endif.

    if p_gt_rep-text is not initial.
      clear:p_gt_rep_out.
      p_node_text = p_gt_rep-program.
      p_gt_rep_out-otype = '文本池'.
      move-corresponding p_gt_rep-text-node to p_gt_rep_out.
      if gv_state = 0. "只上传未执行 "还没执行过
        perform object_exsit_check using p_gt_rep-program 'REPT' changing p_gt_rep_out.
      endif.
      perform tree_add_a_node using  p_gt_rep_out l_top_key p_node_text
                                space p_item_image
                         changing l_new_key.
      p_gt_rep-text-node-key = l_new_key.
    endif.

    if p_gt_rep-cua is not initial.
      loop at p_gt_rep-cua-sta into ls_sta.
        clear:p_gt_rep_out.
        p_node_text = ls_sta-sta-code.
        p_gt_rep_out-otype = '状态栏'.
        move-corresponding ls_sta-node to p_gt_rep_out.
        perform tree_add_a_node using  p_gt_rep_out l_top_key p_node_text
                                  space p_item_image
                           changing l_new_key.
        ls_sta-node-key = l_new_key.
        modify p_gt_rep-cua-sta from ls_sta.
      endloop.
    endif.

    if p_gt_rep-screen2  is not initial.
      loop at p_gt_rep-screen2  into ls_screen.
        clear:p_gt_rep_out.
        p_node_text = ls_screen-header-screen.
        p_gt_rep_out-otype = '屏幕'.
        move-corresponding ls_screen-node to p_gt_rep_out.
        perform tree_add_a_node using  p_gt_rep_out l_top_key p_node_text
                                  space p_item_image
                           changing l_new_key.
        ls_screen-node-key = l_new_key.
        modify p_gt_rep-screen2  from ls_screen.
      endloop.
    endif.

*表类型
    loop at p_gt_rep-ttyp into ls_ttyp.
      perform tree_node_add using ls_ttyp-typename '表类型' 'TTYP' l_top_key
                                           changing ls_ttyp.
      modify p_gt_rep-ttyp from ls_ttyp.
    endloop.

    if p_gt_rep-dict is not initial.
      clear:p_gt_rep_out.
      loop at p_gt_rep-dict into ls_dict.
        clear:p_gt_rep_out.
        p_node_text = ls_dict-tablename.
        case ls_dict-dd02v-tabclass.
          when 'TRANSP'.
            p_gt_rep_out-otype = '表'.
          when 'INTTAB'.
            p_gt_rep_out-otype = '结构'.
        endcase.
        move-corresponding ls_dict-node to p_gt_rep_out.
        if gv_state = 0. "只上传未执行 "还没执行过
          perform object_exsit_check using ls_dict-tablename 'DD02L' changing p_gt_rep_out.
        endif.
        perform tree_add_a_node using  p_gt_rep_out l_top_key p_node_text
                                  space p_item_image
                           changing l_new_key.
        ls_dict-node-key = l_new_key.
        modify p_gt_rep-dict from ls_dict.
      endloop.
    endif.

    if p_gt_rep-dtel is not initial.
      loop at p_gt_rep-dtel into ls_dtel.
        clear:p_gt_rep_out.
        p_node_text = ls_dtel-name.
        p_gt_rep_out-otype = '数据元素'.
        move-corresponding ls_dtel-node to p_gt_rep_out.
        if gv_state = 0. "只上传未执行 "还没执行过
          perform object_exsit_check using ls_dtel-name 'DTEL' changing p_gt_rep_out.
        endif.
        perform tree_add_a_node using  p_gt_rep_out l_top_key p_node_text
                                  space p_item_image
                           changing l_new_key.
        ls_dtel-node-key = l_new_key.
        modify p_gt_rep-dtel from ls_dtel.
      endloop.
    endif.

    if p_gt_rep-doma is not initial.
      loop at p_gt_rep-doma into ls_doma.
        clear:p_gt_rep_out.
        p_node_text = ls_doma-name.
        p_gt_rep_out-otype = '域'.
        move-corresponding ls_doma-node to p_gt_rep_out.
        if gv_state = 0. "只上传未执行 "还没执行过
          perform object_exsit_check using ls_doma-name 'DOMA' changing p_gt_rep_out.
        endif.
        perform tree_add_a_node using  p_gt_rep_out l_top_key p_node_text
                                  space p_item_image
                           changing l_new_key.
        ls_doma-node-key = l_new_key.
        modify p_gt_rep-doma from ls_doma.
      endloop.
    endif.

    if p_gt_rep-lock is not initial.
      loop at p_gt_rep-lock into ls_lock.
        clear:p_gt_rep_out.
        p_node_text = ls_lock-name.
        p_gt_rep_out-otype = '锁对象'.
        move-corresponding ls_lock-node to p_gt_rep_out.
        if gv_state = 0. "只上传未执行 "还没执行过
          perform object_exsit_check using ls_lock-name 'LOCK' changing p_gt_rep_out.
        endif.
        perform tree_add_a_node using  p_gt_rep_out l_top_key p_node_text
                                  space p_item_image
                           changing l_new_key.
        ls_lock-node-key = l_new_key.
        modify p_gt_rep-lock from ls_lock.
      endloop.
    endif.

    if p_gt_rep-snro is not initial.
      loop at p_gt_rep-snro into ls_snro.
        clear:p_gt_rep_out.
        p_node_text = ls_snro-object.
        p_gt_rep_out-otype = '编号范围对象'.
        move-corresponding ls_snro-node to p_gt_rep_out.
        if gv_state = 0. "只上传未执行 "还没执行过
          perform object_exsit_check using ls_snro-object 'SNRO' changing p_gt_rep_out.
        endif.
        perform tree_add_a_node using  p_gt_rep_out l_top_key p_node_text
                                  space p_item_image
                           changing l_new_key.
        ls_snro-node-key = l_new_key.
        modify p_gt_rep-snro from ls_snro.
      endloop.
    endif.

    if p_gt_rep-tcode is not initial.
      loop at p_gt_rep-tcode into ls_tcode.
        clear:p_gt_rep_out.
        p_node_text = ls_tcode-tstc-tcode.
        p_gt_rep_out-otype = '事务码'.
        move-corresponding ls_tcode-node to p_gt_rep_out.
        if gv_state = 0. "只上传未执行 "还没执行过
          perform object_exsit_check using ls_tcode-tstc-tcode 'TCODE' changing p_gt_rep_out.
        endif.
        perform tree_add_a_node using  p_gt_rep_out l_top_key p_node_text
                                  space p_item_image
                           changing l_new_key.
        ls_tcode-node-key = l_new_key.
        modify p_gt_rep-tcode from ls_tcode.
      endloop.
    endif.

*类
    loop at p_gt_rep-class into ls_class.
      perform tree_node_add using ls_class-clsname '类' 'CLASS' l_top_key
                                           changing ls_class.
      modify p_gt_rep-class from ls_class.
    endloop.

*函数组
    if p_gt_rep-fugr-area is not initial.
      perform tree_node_add using p_gt_rep-fugr-area '函数组' 'FUGR' l_top_key
                                           changing p_gt_rep-fugr.
    endif.

*函数模块
    loop at p_gt_rep-func into ls_func.
      perform tree_node_add using ls_func-functionname '函数模块' 'FUNC' l_top_key
                                           changing ls_func.
      modify p_gt_rep-func from ls_func.
    endloop.

    modify p_gt_rep.

    call method g_alv_tree->expand_node
      exporting
        i_node_key = l_top_key.
  endloop.
endform.                               " tree_hierarchy_create

*&---------------------------------------------------------------------*
*&      Form  tree_events_register
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
form tree_events_register.
  data: lt_events type cntl_simple_events,
        l_event   type cntl_simple_event.

* Frontend registration: do not forget to register (for ALV Tree
* mandatory) tree events.
*................................................................
* The following four tree events registers ALV Tree in the constructor
* method itself.
*    - cl_gui_column_tree=>eventid_expand_no_children
* (needed to load data to frontend when a user expands a node)
*    - cl_gui_column_tree=>eventid_header_context_men_req
* (needed for header context menu)
*    - cl_gui_column_tree=>eventid_header_click
* (allows selection of columns (only when item selection activated))
*   - cl_gui_column_tree=>eventid_item_keypress
* (needed for F1-Help (only when item selection activated))
*
* Nevertheless you have to provide their IDs again if you register
* additional events with SET_REGISTERED_EVENTS (see below).
* To do so, call first method  GET_REGISTERED_EVENTS (this way,
* all already registered events remain registered, even your own):
  call method g_alv_tree->get_registered_events
    importing
      events = lt_events.

* (If you do not these events will be deregistered!!!).
* You do not have to register events of the toolbar again.

*注册事件
  l_event-eventid = cl_gui_simple_tree=>eventid_node_double_click. "双击
*  l_event-appl_event = 'X'. " process PAI if event occurs
  append l_event to lt_events.
  l_event-eventid = cl_gui_column_tree=>eventid_checkbox_change. "勾选checkbox
  append l_event to lt_events.

*给事件分配处理器
  create object g_application.
  set handler g_application->handle_node_double_click for g_alv_tree.

* register events on frontend
  call method g_alv_tree->set_registered_events
    exporting
      events                    = lt_events
    exceptions
      cntl_error                = 1
      cntl_system_error         = 2
      illegal_event_combination = 3.
  if sy-subrc <> 0.
    message x208(00) with 'ERROR'.                          "#EC NOTEXT
  endif.
*--------------------

endform.                               " tree_events_register

*&---------------------------------------------------------------------*
*&      Form  program_exit
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
form program_exit.

  call method g_alv_tree->free.
  clear g_alv_tree.

  call method g_custom_container->free.
  clear g_custom_container.

  leave to screen 0.

endform.                               " program_exit

*&---------------------------------------------------------------------*
*&      Form  tree_add_a_folder
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_RELAT_KEY   text
*      -->P_NODE_TEXT   text
*      -->P_NODE_IMAGE  text
*      -->P_NEW_KEY     text
*----------------------------------------------------------------------*
form tree_add_a_folder using p_gt_rep_out p_relat_key type lvc_nkey
                         p_node_text type lvc_value
                         p_node_image type tv_image
                changing p_new_key.

  data: l_layout_node type lvc_s_layn.
  data: lt_item_layout type lvc_t_layi.

  l_layout_node-isfolder = 'X'.   "=>add a folder, NOT a leaf
  l_layout_node-n_image = p_node_image. "=>Display an icon

** set item-layout
*  ls_item_layout-fieldname = g_alv_tree->c_hierarchy_column_name.
*  ls_item_layout-class   = cl_gui_column_tree=>item_class_checkbox.
*  ls_item_layout-editable = 'X'.
*  if gv_state = 0.
*    ls_item_layout-chosen   = 'X'.
*  endif.
*  append ls_item_layout to lt_item_layout.

  call method g_alv_tree->add_node
    exporting
      i_relat_node_key = p_relat_key
      i_relationship   = cl_gui_column_tree=>relat_last_child
      i_node_text      = p_node_text
      is_outtab_line   = p_gt_rep_out
      is_node_layout   = l_layout_node
      it_item_layout   = lt_item_layout
    importing
      e_new_node_key   = p_new_key.

endform.                    "tree_add_a_folder

*&---------------------------------------------------------------------*
*&      Form  insert_icons
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->PT_SFLIGHT text
*----------------------------------------------------------------------*
form insert_icons tables pt_sflight structure sflight.
  data: ls_sflight type sflight.
*§C2.Provide icons for this column. In this example column
*    planetype is taken for icon output. The text is replaced.
  loop at pt_sflight into ls_sflight.
    case ls_sflight-planetype.
      when 'DC-10-10'.
        ls_sflight-planetype = '@7T@'.
      when 'DC-8-72'.
        ls_sflight-planetype = '@AV@'.
      when others.
        concatenate '@' ls_sflight-planetype+1(2) '@'
               into ls_sflight-planetype.
    endcase.
    modify pt_sflight from ls_sflight.
  endloop.

endform.                    " INSERT_ICONS

*&---------------------------------------------------------------------*
*&      Form  tree_add_a_node
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_SFLIGHT     text
*      -->P_RELAT_KEY   text
*      -->P_NODE_TEXT   text
*      -->P_NODE_IMAGE  text
*      -->P_ITEM_IMAGE  text
*      -->P_NEW_KEY     text
*----------------------------------------------------------------------*
form tree_add_a_node using  p_rep_out like gt_rep_out
                       p_relat_key type lvc_nkey
                       p_node_text type lvc_value
                       p_node_image type tv_image
                       p_item_image type tv_image
              changing p_new_key.

  data: l_layout_node type lvc_s_layn.
  data: lt_item_layout type lvc_t_layi,
        ls_item_layout type lvc_s_layi.

* set item-layout
  ls_item_layout-fieldname = g_alv_tree->c_hierarchy_column_name.
  ls_item_layout-class   = cl_gui_column_tree=>item_class_checkbox.
  ls_item_layout-editable = 'X'.
  if gv_state = 0.
    ls_item_layout-chosen   = 'X'.
  endif.

*全选/取消全选按钮
  if sy-ucomm = 'SEL_ALL'.
    ls_item_layout-chosen   = 'X'.
  elseif sy-ucomm = 'DESEL_ALL'.
    ls_item_layout-chosen   = ''.
  endif.

  append ls_item_layout to lt_item_layout.

*  l_layout_node-n_image = p_node_image.
*  if not p_item_image is initial.
*    ls_item_layout-fieldname = 'CARRID'.
*    ls_layout_item-t_image = p_item_image.
*    append ls_layout_item to lt_layout_item.
*  endif.

  call method g_alv_tree->add_node
    exporting
      i_relat_node_key = p_relat_key
      i_relationship   = cl_gui_column_tree=>relat_last_child
      i_node_text      = p_node_text
      is_outtab_line   = p_rep_out
      is_node_layout   = l_layout_node
      it_item_layout   = lt_item_layout
    importing
      e_new_node_key   = p_new_key.

endform.                    "tree_add_a_node

*&---------------------------------------------------------------------*
*&      Form  fieldcat_build
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->LT_FIELDCAT       text
*      -->FIELDNAME         text
*      -->COLTEXT           text
*      -->REF_TAB           text
*      -->REF_FIELD         text
*      -->CONVEXIT          text
*      -->DROP_DOWN_HANDLE  text
*      -->F4AVAILABL        text
*      -->CHECKTABLE        text
*      -->EDIT              text
*----------------------------------------------------------------------*
form fieldcat_build tables lt_fieldcat structure lvc_s_fcat
  using fieldname coltext ref_tab ref_field convexit drop_down_handle f4availabl checktable edit.
  clear lt_fieldcat.
  lt_fieldcat-fieldname = fieldname.
  lt_fieldcat-coltext = coltext.
  lt_fieldcat-ref_table = ref_tab.
  lt_fieldcat-ref_field = ref_field.
  lt_fieldcat-convexit  = convexit.
  lt_fieldcat-drdn_field = drop_down_handle.
  lt_fieldcat-f4availabl = f4availabl.
  lt_fieldcat-checktable = checktable.
  lt_fieldcat-edit = edit.

  append lt_fieldcat.
endform.                    "fieldcat_build

*&---------------------------------------------------------------------*
*&      Form  object_exsit_check
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_3697   text
*      <--P_P_GT_REP_OUT_EXSIT  text
*----------------------------------------------------------------------*
form object_exsit_check  using p_object p_type
                  changing p_gt_rep_out like gt_rep_out.

*  data:
*        lv_progname type reposrc-progname,
*        ls_dd02l like dd02l,
*        ls_dd04l like dd04l,
*        ls_dd01v  like dd01v,
*        ls_dd25l like dd25l,
*        ls_nriv like nriv,
*        ls_tstc like tstc.
  clear:p_gt_rep_out-rtype,p_gt_rep_out-rtmsg.

  case p_type.
    when 'PROGRAM'.
      sql_exsit_check reposrc progname.
    when 'REPT'.
*      read textpool p_object into t_txt.
    when 'DD02L'.
      sql_exsit_check dd02l tabname.
    when 'DTEL'.
      sql_exsit_check dd04l rollname.
    when 'TTYP'.
      sql_exsit_check dd40l typename.
    when 'DOMA'.
      sql_exsit_check dd01v domname.
    when 'LOCK'.
      sql_exsit_check dd25l viewname.
    when 'SNRO'.
      sql_exsit_check tnro  object.
    when 'TCODE'.
      sql_exsit_check tstc tcode.
    when 'FUGR'.
      sql_exsit_check tlibt area.
    when 'FUNC'.
      sql_exsit_check tfdir funcname.
    when 'CLASS'.
      sql_exsit_check seoclass  clsname.
    when others.
  endcase.

  if p_gt_rep_out-exsit = 'X'.
    p_gt_rep_out-rtype = 'W'.
    if p_type = 'F'. "不更新函数组了(就一个描述)
      p_gt_rep_out-rtmsg = '存在同名对象,不会执行更新'.
    else.
      p_gt_rep_out-rtmsg = '存在同名对象,执行将会直接覆盖'.
    endif.
  endif.

endform.                    " object_exsit_check
*&---------------------------------------------------------------------*
*&      Form  TREE_REFRESH
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_GT_REP  text
*      -->P_GT_REP_OUT  text
*----------------------------------------------------------------------*
form tree_refresh  tables   p_gt_rep structure gt_rep
                            p_gt_rep_out structure gt_rep_out.
  call method g_alv_tree->delete_all_nodes.
  perform tree_hierarchy_create tables p_gt_rep  p_gt_rep_out.
  call method g_alv_tree->frontend_update.
endform.                    " TREE_REFRESH
*&---------------------------------------------------------------------*
*&      Form  DTEL_ADD
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_P_GT_DTEL  text
*      -->P_ls_table_TABLENAME  text
*----------------------------------------------------------------------*
form dtel_add  tables   p_gt_dtel structure gt_dtel
               using    p_name.
  data lv_exsit.

  read table p_gt_dtel transporting no fields with key name = p_name.
  if sy-subrc ne 0.
    loop at gt_rep.
      read table gt_rep-dtel transporting no fields with key name = p_name.
      if sy-subrc = 0 .
        lv_exsit = 'X'.
        exit.
      endif.
    endloop.
    if lv_exsit is initial.
      p_gt_dtel-name = p_name.
      append p_gt_dtel.
    endif.
  endif.
endform.                    " DTEL_ADD
*&---------------------------------------------------------------------*
*&      Form  DTEL_GET
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_GT_DTEL  text
*      -->P_PROGRAM  text
*----------------------------------------------------------------------*
form dtel_get  tables   p_gt_dtel structure gt_dtel.
  data gotstate type ddgotstate.
  data dd04v_wa type dd04v.
  data tpara_wa type tpara.

  loop at p_gt_dtel.
    call function 'DDIF_DTEL_GET'
      exporting
        name          = p_gt_dtel-name
        state         = 'A'
        langu         = '1'
      importing
        gotstate      = gotstate
        dd04v_wa      = dd04v_wa
        tpara_wa      = tpara_wa
      exceptions
        illegal_input = 1.
    p_gt_dtel-dd04v = dd04v_wa.
    p_gt_dtel-tpara = tpara_wa.
    modify p_gt_dtel.
  endloop.

endform.                    " DTEL_GET
*&---------------------------------------------------------------------*
*&      Form  DTEL_SET
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_P_GS_REP_DTEL  text
*      -->P_P_GV_PACKAGE  text
*----------------------------------------------------------------------*
form dtel_set  tables   p_dtel structure gt_dtel
               using    p_gv_package.

  data:
    lv_rc        like sy-subrc,
    lv_msg1(255),
    lv_msg2(255).

  if p_dtel[] is initial.
    return.
  endif.

  loop at p_dtel where node-sel = 'X'.
*包入请求(对象不存在都可以包)
    data lv_object(40).
    concatenate 'DTEL' p_dtel-name into lv_object.
    perform request_set using p_gv_package 'DICT' lv_object changing gv_request gv_rtype gv_rtmsg. "表、结构请求(debug RS_DD_COPY_OBJ得来)
    if gv_rtype = 'S'.
      call function 'DDIF_DTEL_PUT'
        exporting
          name              = p_dtel-name
          dd04v_wa          = p_dtel-dd04v
        exceptions
          dtel_not_found    = 1
          name_inconsistent = 2
          dtel_inconsistent = 3
          put_failure       = 4
          put_refused       = 5.
      if sy-subrc <> 0.
        perform msg_sys_into changing lv_msg1.
*    else.
*      lv_msg1 = '生成数据元素成功'.
      endif.

*激活
      call function 'DDIF_DTEL_ACTIVATE'
        exporting
          name        = p_dtel-name
          auth_chk    = abap_false
*         PRID        = -1
        importing
          rc          = lv_rc
        exceptions
          not_found   = 1
          put_failure = 2.
      if sy-subrc <> 0 or lv_rc > 4. "rc = 0 成功 = 4 警告 >4 失败
        lv_msg2 = '激活数据元素出错'.
      endif.

*记录日志
      clear gv_msg.
      concatenate lv_msg1 lv_msg2 into gv_msg separated by space.
      if lv_msg1 is initial and lv_msg2 is initial.
        perform rep_log using gv_request 'S' '成功' changing p_dtel-node.
      else.
        perform rep_log using space 'E' gv_msg changing p_dtel-node.
      endif.
    else.
      perform rep_log using space gv_rtype gv_rtmsg changing p_dtel-node.
    endif.
    modify p_dtel.
  endloop.
endform.                    " DTEL_SET

*&---------------------------------------------------------------------*
*&      Form  class_set
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_CLASS       text
*      -->P_GV_PACKAGE  text
*----------------------------------------------------------------------*
form class_set  tables   p_class structure gt_class
               using    p_gv_package.

  data:
        lo_source type ref to cl_oo_source.
  data:
    ls_clskey type seoclskey,
    lt_source type standard table of string with default key.
  data:
    lv_msg1(255),
    lv_msg2(255),
    lv_msg3(255).
  data lo_ref type ref to cx_root. "异常处理
  data lv_text type string.

  if p_class[] is initial.
    return.
  endif.

  loop at p_class where node-sel = 'X'.
*包入请求(对象不存在都可以包)
    data lv_object(40).
    lv_object = p_class-clsname.
    perform request_set using p_gv_package 'CLAS' lv_object changing gv_request gv_rtype gv_rtmsg. "表、结构请求(debug RS_DD_COPY_OBJ得来)
    if gv_rtype = 'S'.
*创建class
      call function 'SEO_CLASS_CREATE_COMPLETE'
        exporting
          version         = 1 "激活
          devclass        = p_gv_package
          overwrite       = 'X'
        changing
          class           = p_class-class
        exceptions
          existing        = 1
          is_class        = 2
          db_error        = 3
          component_error = 4
          no_access       = 5
          other           = 6
          others          = 7.
      if sy-subrc <> 0.
        message id sy-msgid
          type sy-msgty
          number sy-msgno
          with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4 into lv_msg1.
      endif.

*写入source
      ls_clskey-clsname = p_class-clsname.
      lt_source = p_class-t_source.
*先试新方法
      try.
          data:
            lo_factory    type ref to object,
            lo_source_new type ref to object,
            lo_settings   type ref to object,
            lr_settings   type ref to data.

          field-symbols <lg_settings> type any.

          call function 'SEO_BUFFER_INIT'.
          call function 'SEO_BUFFER_REFRESH'
            exporting
              cifkey  = ls_clskey
              version = seoc_version_inactive.

          call method ('CL_OO_FACTORY')=>('CREATE_INSTANCE')
            receiving
              result = lo_factory.

          call method lo_factory->('CREATE_SETTINGS')
            exporting
              modification_mode_enabled = abap_true
            receiving
              result                    = lo_settings.

          create data lr_settings type ref to ('IF_OO_CLIF_SOURCE_SETTINGS').
          assign lr_settings->* to <lg_settings>.

          <lg_settings> ?= lo_settings.

          call method lo_factory->('CREATE_CLIF_SOURCE')
            exporting
              clif_name = ls_clskey-clsname
              settings  = <lg_settings>
            receiving
              result    = lo_source_new.

          try.
              call method lo_source_new->('IF_OO_CLIF_SOURCE~LOCK').
            catch cx_oo_access_permission.
          endtry.

          call method lo_source_new->('IF_OO_CLIF_SOURCE~SET_SOURCE')
            exporting
              source = lt_source.
          call method lo_source_new->('IF_OO_CLIF_SOURCE~SAVE').
          call method lo_source_new->('IF_OO_CLIF_SOURCE~UNLOCK').
        catch cx_root into lo_ref.
          lv_text = lo_ref->get_text( ).
*老的方法
          create object lo_source
            exporting
              clskey             = ls_clskey
            exceptions
              class_not_existing = 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 into lv_msg2.
          else.

            try.
                lo_source->access_permission( seok_access_modify ).
                lo_source->set_source( lt_source ).
                lo_source->save( ).
                lo_source->access_permission( seok_access_free ).
              catch cx_root into lo_ref.
                lv_msg3 = lo_ref->get_text( ).
            endtry.
          endif.
      endtry.

*激活
      data lt_objects               type standard table of dwinactiv with header line.
      data lv_str like dwinactiv-obj_name.
      lv_str = lv_object && '%'.

      select *
        into corresponding fields of table lt_objects
        from dwinactiv "未激活的对象,SE24 debug来
        where obj_name like lv_str and object in ('CLSD','CPRI','CPRO','CPUB','METH')
        .

      call function 'RS_WORKING_OBJECTS_ACTIVATE'
        tables
          objects                = lt_objects
        exceptions
          excecution_error       = 1
          cancelled              = 2
          insert_into_corr_error = 3.
      if sy-subrc ne 0.
        data lv_rtmsg type bapi_msg.
        message id sy-msgid
          type sy-msgty
          number sy-msgno
          with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4 into lv_rtmsg.
      endif.
      if lv_rtmsg is initial.
        lv_rtmsg = '成功'.
      else.
        lv_rtmsg = '创建成功,激活失败:' && lv_rtmsg.
      endif.
*      data(lv_rtmsg) = '创建成功,激活没做,请手工激活'.

*记录日志
      clear gv_msg.
      concatenate lv_msg1 lv_msg2 lv_msg3 into gv_msg separated by space.
      if lv_msg1 is initial and lv_msg2 is initial and lv_msg3 is initial.
        perform rep_log using gv_request 'S' lv_rtmsg changing p_class-node.
      else.
        perform rep_log using space 'E' gv_msg changing p_class-node.
      endif.
    else.
      perform rep_log using space gv_rtype gv_rtmsg changing p_class-node.
    endif.
    modify p_class.
    clear lv_rtmsg.
  endloop.
endform.                    " DTEL_SET

*&---------------------------------------------------------------------*
*&      Form  ttyp_set
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_TTYP        text
*      -->P_GV_PACKAGE  text
*----------------------------------------------------------------------*
form ttyp_set  tables   p_ttyp structure gt_ttyp
               using    p_gv_package.

  data:
    lv_rc        like sy-subrc,
    lv_msg1(255),
    lv_msg2(255).

  if p_ttyp[] is initial.
    return.
  endif.

  loop at p_ttyp where node-sel = 'X'.
*包入请求(对象不存在都可以包)
    data lv_object(40).
    concatenate 'TTYP' p_ttyp-typename into lv_object.
    perform request_set using p_gv_package 'DICT' lv_object changing gv_request gv_rtype gv_rtmsg.
    if gv_rtype = 'S'.
      call function 'DDIF_TTYP_PUT'
        exporting
          name              = p_ttyp-typename
          dd40v_wa          = p_ttyp-dd40v_wa
        tables
          dd42v_tab         = p_ttyp-dd42v_tab
*         dd43v_tab         = p_ttyp-dd43v_tab "国际营销没有这个参数
        exceptions
          ttyp_not_found    = 1
          name_inconsistent = 2
          ttyp_inconsistent = 3
          put_failure       = 4
          put_refused       = 5
          others            = 6.
      if sy-subrc <> 0.
        perform msg_sys_into changing lv_msg1.
*    else.
*      lv_msg1 = '生成数据元素成功'.
      endif.

*激活
      call function 'DDIF_TTYP_ACTIVATE'
        exporting
          name        = p_ttyp-typename
*         auth_chk    = abap_false
*         PRID        = -1
        importing
          rc          = lv_rc
        exceptions
          not_found   = 1
          put_failure = 2.
      if sy-subrc <> 0 or lv_rc > 4. "rc = 0 成功 = 4 警告 >4 失败
        lv_msg2 = '激活表类型出错'.
      endif.

*记录日志
      clear gv_msg.
      concatenate lv_msg1 lv_msg2 into gv_msg separated by space.
      if lv_msg1 is initial and lv_msg2 is initial.
        perform rep_log using gv_request 'S' '成功' changing p_ttyp-node.
      else.
        perform rep_log using space 'E' gv_msg changing p_ttyp-node.
      endif.
    else.
      perform rep_log using space gv_rtype gv_rtmsg changing p_ttyp-node.
    endif.
    modify p_ttyp.
  endloop.
endform.                    " DTEL_SET
*&---------------------------------------------------------------------*
*&      Form  DOMA_GET
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_GT_DOMA  text
*      -->P_PROGRAM  text
*----------------------------------------------------------------------*
form doma_get  tables   p_gt_dtel structure gt_dtel
                                        p_gt_doma structure gt_doma.
  data gotstate type ddgotstate.
  data dd01v_wa type dd01v.
  data: lt_dd07v_tab type standard table of dd07v.

*从数据元素中获取域
  loop at p_gt_dtel where dd04v-domname(1) = 'Z'.
    p_gt_doma-name = p_gt_dtel-dd04v-domname.
    append p_gt_doma.
  endloop.

  loop at p_gt_doma.
    call function 'DDIF_DOMA_GET'
      exporting
        name          = p_gt_doma-name
        state         = 'A'
        langu         = sy-langu
      importing
        gotstate      = gotstate
        dd01v_wa      = dd01v_wa
      tables
        dd07v_tab     = lt_dd07v_tab
      exceptions
        illegal_input = 1.
    p_gt_doma-dd01v = dd01v_wa.
    p_gt_doma-t_dd07v_tab = lt_dd07v_tab.
    modify p_gt_doma.
  endloop.

endform.                    " DOMA_GET
*&---------------------------------------------------------------------*
*&      Form  DOMA_SET
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_P_GS_REP_DOMA  text
*      -->P_P_GV_PACKAGE  text
*----------------------------------------------------------------------*
form doma_set  tables   p_doma structure gt_doma
               using    p_gv_package.

  data:
    lv_rc        like sy-subrc,
    lv_msg1(255),
    lv_msg2(255).

  if p_doma[] is initial.
    return.
  endif.

  loop at p_doma where node-sel = 'X'.
*包入请求(对象不存在都可以包)
    data lv_object(40).
    concatenate 'DOMA' p_doma-name into lv_object.
    perform request_set using p_gv_package 'DICT' lv_object changing gv_request gv_rtype gv_rtmsg. "表、结构请求(debug RS_DD_COPY_OBJ得来)
    if gv_rtype = 'S'.
      call function 'DDIF_DOMA_PUT'
        exporting
          name              = p_doma-name
          dd01v_wa          = p_doma-dd01v
        tables
          dd07v_tab         = p_doma-t_dd07v_tab
        exceptions
          doma_not_found    = 1
          name_inconsistent = 2
          doma_inconsistent = 3
          put_failure       = 4
          put_refused       = 5.
      if sy-subrc <> 0.
        perform msg_sys_into changing lv_msg1.
*    else.
*      lv_msg1 = '生成域成功'.
      endif.

*激活
      call function 'DDIF_DOMA_ACTIVATE'
        exporting
          name        = p_doma-name
          auth_chk    = abap_false
*         PRID        = -1
        importing
          rc          = lv_rc
        exceptions
          not_found   = 1
          put_failure = 2.
      if sy-subrc <> 0 or lv_rc > 4. "rc = 0 成功 = 4 警告 >4 失败
        lv_msg2 = '激活域出错'.
      endif.

*记录日志
      clear gv_msg.
      concatenate lv_msg1 lv_msg2 into gv_msg separated by space.
      if lv_msg1 is initial and lv_msg2 is initial.
        perform rep_log using gv_request 'S' '成功' changing p_doma-node.
      else.
        perform rep_log using space 'E' gv_msg changing p_doma-node.
      endif.
    else.
      perform rep_log using space gv_rtype gv_rtmsg changing p_doma-node.
    endif.
    modify p_doma.
  endloop.
endform.                    " DOMA_SET
*&---------------------------------------------------------------------*
*&      Form  REP_SCAN
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_GT_REP  text
*----------------------------------------------------------------------*
form rep_scan  tables   p_gt_rep structure gt_rep using p_program.

*查找主程序include程序
  perform rep_scan_include tables p_gt_rep using p_program '1'.

*主程序
  clear p_gt_rep.
  p_gt_rep-program = p_program.
  select single subc as type
    into corresponding fields of  p_gt_rep
    from trdir
    where name = p_gt_rep-program.
  if sy-subrc = 0.
    append p_gt_rep.
  endif.

*函数池及函数模块和include(这一步会解析代码,也会取到代码中submit的程序)
  perform rep_scan_function_pool tables p_gt_rep.

*程序类型描述
  data lt_dd07v type table of dd07v with header line.
  call function 'DD_DOMVALUES_GET'
    exporting
      domname   = 'SUBC'
      text      = 'X' "TEXT 参数必填,否则默认只取域值不取文本
    tables
      dd07v_tab = lt_dd07v.
  loop at p_gt_rep.
    read table lt_dd07v with key domvalue_l = p_gt_rep-type.
    if sy-subrc = 0.
      p_gt_rep-typet = lt_dd07v-ddtext.
      modify p_gt_rep.
    endif.
  endloop.
endform.                    " REP_SCAN
*&---------------------------------------------------------------------*
*&      Form  MSG_SYS
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
form msg_sys .
  message id sy-msgid
    type sy-msgty
    number sy-msgno
    with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endform.                    " MSG_SYS
*&---------------------------------------------------------------------*
*&      Form  LOCK_GET
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_GT_CODE  text
*      -->P_GT_LOCK  text
*----------------------------------------------------------------------*
form lock_get  tables p_gt_lock structure gt_lock.

  data gotstate  type ddgotstate.
  loop at p_gt_lock.
    call function 'DDIF_ENQU_GET'
      exporting
        name          = p_gt_lock-name
*       STATE         = 'A'
*       LANGU         = ' '
      importing
        gotstate      = gotstate
        dd25v_wa      = p_gt_lock-dd25v
      tables
        dd26e_tab     = p_gt_lock-dd26e
        dd27p_tab     = p_gt_lock-dd27p
        ddena_tab     = p_gt_lock-ddena
      exceptions
        illegal_input = 1.
    modify p_gt_lock.
  endloop.

endform.                    " LOCK_GET
*&---------------------------------------------------------------------*
*&      Form  CODE_ANALYZE
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_GT_CODE  text
*      -->P_GT_LOCK  text
*----------------------------------------------------------------------*
form code_analyze  tables   p_gt_code structure gs_codes
                            p_gt_lock structure gt_lock
                            p_gt_snro structure gt_snro
                            p_gt_func structure gt_func
                            p_gt_table structure gt_table
                            p_gt_ttyp structure gt_ttyp
                            p_gt_dtel structure gt_dtel
                            p_gt_w3mi structure gt_w3mi
                            p_gt_prog structure gt_prog.

  data: begin of keywords occurs 10,
          key(20),
        end of keywords.
  data:  begin of token occurs 1000.
           include structure stokex.
         data:  end of token.

  data:  begin of statements occurs 1000.
           include structure sstmnt.
         data:  end of statements.
  data: overflow(65535).    "überlaufbereich f. Token
  data lv_len type i.
  data lv_exsit.


*抓CALL
  keywords = 'CALL'. "只能用一个关键词(不能两个)
  append keywords.

  scan abap-source p_gt_code
    keywords from keywords
    tokens into token
    statements into statements
    overflow into overflow
    with analysis.

  loop at statements.
    clear lv_exsit.
    statements-from = statements-from + 1.
    read table token index statements-from.
    case token-str.
      when 'FUNCTION'.
        statements-from = statements-from + 1.
        read table token index statements-from.
        lv_len = strlen( token-str ) - 2. "去掉引号
        if token-str+1(10) = 'ENQUEUE_EZ'. "自建锁对象
          lv_len = lv_len - 8.                              "去掉前8位
          clear p_gt_lock.
          p_gt_lock-name = token-str+9(lv_len).
          object_add lock name p_gt_lock-name.

        elseif token-str+1(lv_len) = 'NUMBER_GET_NEXT'. "编号对象
          do.
            statements-from = statements-from + 1.
            read table token index statements-from.
            if token-str = 'OBJECT'.
              exit.
            endif.
          enddo.
          statements-from = statements-from + 2.
          read table token index statements-from.
          lv_len = strlen( token-str ) - 2. "去掉引号
          clear p_gt_snro.
          p_gt_snro-object = token-str+1(lv_len).
          object_add snro object p_gt_snro-object.

*        elseif token-str+1(lv_len) = 'DOWNLOAD_WEB_OBJECT'. "WEB对象(动态传值,目前没有比较好的方法)
*          do.
*            statements-from = statements-from + 1.
*            read table token index statements-from.
*            if token-str = 'KEY'.
*              exit.
*            endif.
*          enddo.
*          statements-from = statements-from + 2.
*          read table token index statements-from.
*          lv_len = strlen( token-str ) - 2. "去掉引号
*          p_gt_w3mi-objid = token-str+1(lv_len).
*          perform rep_exsit_check using 'W3MI' 'OBJID' p_gt_w3mi-objid changing lv_exsit.
*          if lv_exsit is initial.
*            append p_gt_w3mi.
*          endif.

        elseif token-str+1(1) = 'Z' or token-str+1(1) = 'Y'. "自建函数
*          READ TABLE statements INTO ls_statements
          clear p_gt_func.
          p_gt_func-functionname = token-str+1(lv_len).
          object_add func functionname p_gt_func-functionname.
        endif.
    endcase.
  endloop.

*抓submit
  clear:keywords[],token[],statements[],overflow.
  keywords = 'SUBMIT'. "只能用一个关键词(不能两个)
  append keywords.

  scan abap-source p_gt_code
    keywords from keywords
    tokens into token
    statements into statements
    overflow into overflow
    with analysis.

  loop at statements.
    statements-from = statements-from + 1.
    read table token index statements-from.
    p_gt_prog-program = token-str.
    append p_gt_prog.
  endloop.

*锁明细数据(为了抓锁中的表结构,这一步提前了)
  perform lock_get tables gt_lock. "同时检索锁对象中的表结构

*锁中的表结构
  loop at p_gt_lock.
    clear p_gt_table.
    p_gt_table-tablename = p_gt_lock-dd25v-roottab.
    perform dict_add tables p_gt_table p_gt_ttyp p_gt_dtel using p_gt_table-tablename.
  endloop.

**抓TABLES语句
*  perform code_scan_tables tables p_gt_code p_gt_table.
*
**抓LIKE和TYPE
*  perform code_scan_likeortype tables p_gt_code p_gt_table p_gt_ttyp p_gt_dtel.
*
**抓sql 增删改查(D010TAB中没有函数的)
*  perform code_scan_sql tables p_gt_code p_gt_table.

endform.                    " CODE_ANALYZE
*&---------------------------------------------------------------------*
*&      Form  LOCK_SET
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_P_GT_REP_LOCK  text
*      -->P_P_GV_PACKAGE  text
*----------------------------------------------------------------------*
form lock_set  tables   p_lock structure gt_lock
               using    p_package.

  data:
    lv_rc        like sy-subrc,
    lv_msg1(255),
    lv_msg2(255).
*DATA NAME      TYPE DDOBJNAME.
*DATA DD25V_WA  TYPE DD25V.
*DATA DD26E_TAB TYPE STANDARD TABLE OF DD26E.
*DATA DD27P_TAB TYPE STANDARD TABLE OF DD27P.

  if p_lock[] is initial.
    return.
  endif.

  loop at p_lock where node-sel = 'X'.
*包入请求(对象不存在都可以包)
    perform request_set using p_package 'ENQU' p_lock-name changing gv_request gv_rtype gv_rtmsg. "表、结构请求(debug RS_DD_COPY_OBJ得来)
    if gv_rtype = 'S'.
      call function 'DDIF_ENQU_PUT'
        exporting
          name              = p_lock-name
          dd25v_wa          = p_lock-dd25v
        tables
          dd26e_tab         = p_lock-dd26e
          dd27p_tab         = p_lock-dd27p
        exceptions
          enqu_not_found    = 1
          name_inconsistent = 2
          enqu_inconsistent = 3
          put_failure       = 4
          put_refused       = 5.
      if sy-subrc <> 0.
        perform msg_sys_into changing lv_msg1.
      endif.

*激活
*DATA NAME TYPE DDOBJNAME.
*DATA PRID TYPE SY-TABIX.
*DATA RC   TYPE SY-SUBRC.

      call function 'DDIF_ENQU_ACTIVATE'
        exporting
          name        = p_lock-name
*         PRID        = -1
        importing
          rc          = lv_rc
        exceptions
          not_found   = 1
          put_failure = 2.
      if sy-subrc <> 0 or lv_rc > 4. "rc = 0 成功 = 4 警告 >4 失败
        lv_msg2 = '激活出错'.
      endif.

*记录日志
      clear gv_msg.
      concatenate lv_msg1 lv_msg2 into gv_msg separated by space.
      if lv_msg1 is initial and lv_msg2 is initial.
        perform rep_log using gv_request 'S' '成功' changing p_lock-node.
      else.
        perform rep_log using space 'E' gv_msg changing p_lock-node.
      endif.
    else.
      perform rep_log using space gv_rtype gv_rtmsg changing p_lock-node.
    endif.
    modify p_lock.
  endloop.

endform.                    " LOCK_SET
*&---------------------------------------------------------------------*
*&      Form  REP_EXSIT_CHECK
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_6205   text
*      -->P_P_GT_SNRO_OBJECT  text
*      <--P_LV_EXSIT  text
*----------------------------------------------------------------------*
form rep_exsit_check  using p_table
                               p_field
                               p_object
                      changing p_exsit.
  field-symbols <lv_fs> type standard table.

  clear p_exsit.
  loop at gt_rep.
    assign component p_table of structure gt_rep to <lv_fs>.
    read table <lv_fs> transporting no fields with key (p_field) = p_object.
    if sy-subrc = 0.
      p_exsit = 'X'.
      exit.
    endif.
  endloop.
endform.                    " REP_EXSIT_CHECK
*&---------------------------------------------------------------------*
*&      Form  SNRO_GET
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_GT_SNRO  text
*----------------------------------------------------------------------*
form snro_get  tables   p_gt_snro structure gt_snro p_gt_dtel structure gt_dtel.

  data ls_interval like inriv . "编号间隔范围

  loop at p_gt_snro.
    call function 'NUMBER_RANGE_OBJECT_READ'
      exporting
*       language          = sy-langu
        object            = p_gt_snro-object
      importing
        interval_exists   = p_gt_snro-interval_exists
        object_attributes = p_gt_snro-object_attributes
        object_text       = p_gt_snro-object_text
      exceptions
        object_not_found  = 1.
    if p_gt_snro-interval_exists = 'X'.
      call function 'NUMBER_RANGE_INTERVAL_LIST'
        exporting
*         NR_RANGE_NR1               = ' '
*         NR_RANGE_NR2               = ' '
          object                     = p_gt_snro-object
*         SUBOBJECT                  = ' '
*         CLEAR_LOCAL_MEMORY         = ' '
        tables
          interval                   = p_gt_snro-interval
        exceptions
          nr_range_nr1_not_found     = 1
          nr_range_nr1_not_intern    = 2
          nr_range_nr2_must_be_space = 3
          nr_range_nr2_not_extern    = 4
          nr_range_nr2_not_found     = 5
          object_not_found           = 6
          subobject_must_be_space    = 7
          subobject_not_found        = 8.
      loop at p_gt_snro-interval into ls_interval. "重置编号范围状态
        ls_interval-nrlevel = ls_interval-fromnumber.
        modify p_gt_snro-interval from ls_interval.
      endloop.
    endif.

    modify p_gt_snro.
  endloop.

*添加编号对象中的自建数据元素
  loop at p_gt_snro.
    if p_gt_snro-object_attributes-domlen(1) = 'Z'.
      perform dtel_add tables p_gt_dtel using p_gt_snro-object_attributes-domlen.
    endif.
  endloop.

endform.                    " SNRO_GET
*&---------------------------------------------------------------------*
*&      Form  SNRO_SET
*&---------------------------------------------------------------------*
*       text
*--------------------------------------------------`--------------------*
*      -->P_P_GT_REP_NRO  text
*      -->P_P_GV_PACKAGE  text
*----------------------------------------------------------------------*
form snro_set  tables   p_snro structure gt_snro
               using  p_package.

*DATA OBJECT              TYPE TNRO-OBJECT.
*DATA CHECK_AT_ALL_EVENTS TYPE C.
*DATA ERROR               TYPE INRER.
  data error_iv            type standard table of inriv.
  data ls_interval            type  inriv.
  data lv_indicator.
  data lt_rep_out like gt_rep_out.

  data:
    lv_rc        type c,
    lv_msg1(255),
    lv_msg2(255),
    lt_errors    like table of inoer with header line.

  if p_snro[] is initial.
    return.
  endif.

  loop at p_snro where node-sel = 'X'.
*包入请求(对象不存在都可以包)
    perform request_set using p_package 'NROB' p_snro-object changing gv_request gv_rtype gv_rtmsg. "表、结构请求(debug RS_DD_COPY_OBJ得来)
    if gv_rtype = 'S'.
*更新编号对象
      perform object_exsit_check using p_snro-object 'SNRO' changing lt_rep_out.
      if lt_rep_out-rtype = 'W'.
        lv_indicator = 'U'.
      else.
        lv_indicator = 'I'.
      endif.
      call function 'NUMBER_RANGE_OBJECT_UPDATE'
        exporting
          indicator                 = lv_indicator
          object_attributes         = p_snro-object_attributes
          object_text               = p_snro-object_text
        importing
          returncode                = lv_rc
        tables
          errors                    = lt_errors
        exceptions
          object_already_exists     = 1
          object_attributes_missing = 2
          object_not_found          = 3
          object_text_missing       = 4
          wrong_indicator           = 5.
      if sy-subrc <> 0 or lv_rc = 'E'. "lv_rc可能返回E
        perform msg_sys_into changing lv_msg1.
      endif.

*更新编号范围
      loop at p_snro-interval into ls_interval.
        select count( * )
          from nriv
          where object = p_snro-object and nrrangenr = ls_interval-nrrangenr.
        if sy-subrc = 0.
          lv_indicator = 'U'.
        else.
          lv_indicator = 'I'.
        endif.
        ls_interval-procind = lv_indicator.
        modify p_snro-interval from ls_interval.
      endloop.
      call function 'NUMBER_RANGE_INTERVAL_UPDATE'
        exporting
          object           = p_snro-object
        tables
          error_iv         = error_iv
          interval         = p_snro-interval
        exceptions
          object_not_found = 1.

      call function 'NUMBER_RANGE_UPDATE_CLOSE' "不调用close修改不生效
        exporting
          object                 = p_snro-object
        exceptions
          no_changes_made        = 1
          object_not_initialized = 2
          others                 = 3.
      if sy-subrc <> 0.
      endif.

*传输编号范围(传输请求可以取到,不过没有回写了)
*      if gs_rfcsi-rfcsaprl > 470. "ecc
*        perform transport_intervalls in program sapmsnum using p_snro-object space ' '.
*      else. "r3
*        perform transport_intervals in program sapmsnum using p_snro-object space ' '.
*      endif.
      perform transport_intervalls in program sapmsnum if found using p_snro-object space ' '. "R3
      perform transport_intervals in program sapmsnum if found using p_snro-object space ' '. "ECC

*修改对象之后确保调用对象的地方都得到更新
      call function 'NUMBER_RANGE_OBJECT_CLOSE'
        exporting
          object                 = p_snro-object
        exceptions
          object_not_initialized = 1.
      if sy-subrc <> 0.
        perform msg_sys_into changing lv_msg2.
      endif.

*记录日志
      clear gv_msg.
      concatenate lv_msg1 lv_msg2 into gv_msg separated by space.
      if lv_msg1 is initial and lv_msg2 is initial.
        perform rep_log using gv_request 'S' '成功(编号范围在定制请求里,请求号见左下角消息)' changing p_snro-node.
      else.
        perform rep_log using space 'E' gv_msg changing p_snro-node.
      endif.
    else.
      perform rep_log using space gv_rtype gv_rtmsg changing p_snro-node.
    endif.
    modify p_snro.
  endloop.

endform.                    " SNRO_SET
*&---------------------------------------------------------------------*
*&      Form  TREE_CHECKED_ITEMS_GET
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_G_ALV_TREE  text
*      -->P_LT_SELECTED_NODE  text
*----------------------------------------------------------------------*
form tree_checked_items_get
*                                              tables p_rep_out structure gt_rep_out
                                              tables pt_selected_node structure gt_selected_node
                                              using    p_alv_tree type ref to cl_gui_alv_tree.

  data lt_selected_node type lvc_t_chit.

  call method p_alv_tree->get_checked_items
    importing
      et_checked_items = lt_selected_node.
  pt_selected_node[] = lt_selected_node.

  if pt_selected_node[] is initial.
    message '至少选中一行' type 'E'.
  endif.

*  loop at lt_selected_node into ls_selected_node.
** this method gets the line correspondent to a node code
*    call method p_alv_tree->get_outtab_line
*      exporting
*        i_key    = ls_selected_node-nodekey
*      importing
*        e_outtab_line = p_rep_out.
*    append p_rep_out.
*  endloop.

endform.                    " TREE_CHECKED_ITEMS_GET
*&---------------------------------------------------------------------*
*&      Form  REP_SEL
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_GT_REP  text
*      -->P_GT_SELECTED_NODE  text
*----------------------------------------------------------------------*
form rep_sel  tables   p_gt_rep structure gt_rep
                       p_gt_node structure gt_selected_node.

  data:
    ls_sta    type ty_sta,
    ls_screen like gt_screen,
    ls_dict   like gt_table,
    ls_dtel   like gt_dtel,
    ls_doma   like gt_doma,
    ls_lock   like gt_lock,
    ls_snro   like gt_snro,
    ls_tcode  type ty_tcode.

  sort p_gt_node by nodekey.

  loop at p_gt_rep.
*文件夹
    if p_gt_rep is not initial.
      read table p_gt_node with key nodekey = p_gt_rep-node-key binary search.
      if sy-subrc = 0.
        p_gt_rep-node-sel = 'X'.
      else.
        p_gt_rep-node-sel = space.
      endif.
    endif.

*源代码
    if p_gt_rep-code is not initial.
      read table p_gt_node with key nodekey = p_gt_rep-code-node-key binary search.
      if sy-subrc = 0.
        p_gt_rep-code-node-sel = 'X'.
      else.
        p_gt_rep-code-node-sel = space.
      endif.
    endif.

*文本池
    if p_gt_rep-text is not initial.
      read table p_gt_node with key nodekey = p_gt_rep-text-node-key binary search.
      if sy-subrc = 0.
        p_gt_rep-text-node-sel = 'X'.
      else.
        p_gt_rep-text-node-sel = space.
      endif.
    endif.

*状态栏
    loop at p_gt_rep-cua-sta into ls_sta.
      if ls_sta is not initial.
        read table p_gt_node with key nodekey =  ls_sta-node-key binary search.
        if sy-subrc = 0.
          ls_sta-node-sel = 'X'.
        else.
          ls_sta-node-sel = ''.
        endif.
        modify p_gt_rep-cua-sta from ls_sta.
      endif.
    endloop.

*屏幕
    loop at p_gt_rep-screen2  into ls_screen.
      if ls_screen is not initial.
        read table p_gt_node with key nodekey =  ls_screen-node-key binary search.
        if sy-subrc = 0.
          ls_screen-node-sel = 'X'.
        else.
          ls_screen-node-sel = ''.
        endif.
        modify p_gt_rep-screen2  from ls_screen.
      endif.
    endloop.

*表类型
    tab_rep_sel_t ttyp.

*表结构
    loop at p_gt_rep-dict into ls_dict.
      if ls_dict is not initial.
        read table p_gt_node with key nodekey =  ls_dict-node-key binary search.
        if sy-subrc = 0.
          ls_dict-node-sel = 'X'.
        else.
          ls_dict-node-sel = ''.
        endif.
        modify p_gt_rep-dict from ls_dict.
      endif.
    endloop.

*数据元素
    loop at p_gt_rep-dtel into ls_dtel.
      if ls_dtel is not initial.
        read table p_gt_node with key nodekey =  ls_dtel-node-key binary search.
        if sy-subrc = 0.
          ls_dtel-node-sel = 'X'.
        else.
          ls_dtel-node-sel = ''.
        endif.
        modify p_gt_rep-dtel from ls_dtel.
      endif.
    endloop.

*域
    loop at p_gt_rep-doma into ls_doma.
      if ls_doma is not initial.
        read table p_gt_node with key nodekey =  ls_doma-node-key binary search.
        if sy-subrc = 0.
          ls_doma-node-sel = 'X'.
        else.
          ls_doma-node-sel = ''.
        endif.
        modify p_gt_rep-doma from ls_doma.
      endif.
    endloop.

*锁对象
    loop at p_gt_rep-lock into ls_lock.
      if ls_lock is not initial.
        read table p_gt_node with key nodekey =  ls_lock-node-key binary search.
        if sy-subrc = 0.
          ls_lock-node-sel = 'X'.
        else.
          ls_lock-node-sel = ''.
        endif.
        modify p_gt_rep-lock from ls_lock.
      endif.
    endloop.

*编号对象
    loop at p_gt_rep-snro into ls_snro.
      if ls_snro is not initial.
        read table p_gt_node with key nodekey =  ls_snro-node-key binary search.
        if sy-subrc = 0.
          ls_snro-node-sel = 'X'.
        else.
          ls_snro-node-sel = ''.
        endif.
        modify p_gt_rep-snro from ls_snro.
      endif.
    endloop.

*tcode
    loop at p_gt_rep-tcode into ls_tcode.
      if ls_tcode is not initial.
        read table p_gt_node with key nodekey =  ls_tcode-node-key binary search.
        if sy-subrc = 0.
          ls_tcode-node-sel = 'X'.
        else.
          ls_tcode-node-sel = ''.
        endif.
        modify p_gt_rep-tcode from ls_tcode.
      endif.
    endloop.

*函数组
    tab_rep_sel_s fugr.
*函数模块
    tab_rep_sel_t func.
*类
    tab_rep_sel_t class..

    modify p_gt_rep.
  endloop.

endform.                    " REP_SEL
*&---------------------------------------------------------------------*
*&      Form  TCODE_GET
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_GT_TCODE  text
*      -->P_LS_REP_PROGRAM  text
*----------------------------------------------------------------------*
form tcode_get  tables   p_gt_tcode structure gt_tcode
                using    p_program.

  data lt_tstc like table of tstc with header line.

*RPY_TRANSACTION_READ 也可以

  select *
    into corresponding fields of table lt_tstc
    from tstc
    where pgmna = p_program.

  delete lt_tstc where tcode(1) ne 'Z' and tcode(1) ne 'Y'.

  loop at lt_tstc.
    gt_tcode-tstc = lt_tstc.
    select single *
      into gt_tcode-tstcc
      from tstcc
      where tcode = lt_tstc-tcode.
    select single *
      into gt_tcode-tstcp
      from tstcp
      where tcode = lt_tstc-tcode.
    select *
      into table gt_tcode-tstct
      from tstct
      where tcode = lt_tstc-tcode.
    select *
      into table gt_tcode-tstca
      from tstca
      where tcode = lt_tstc-tcode.
    select *
      into table gt_tcode-usott
      from usott
      where name = lt_tstc-tcode and type = 'TR'.
    append gt_tcode.
  endloop.

endform.                    " TCODE_GET
*&---------------------------------------------------------------------*
*&      Form  TCODE_SET
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_P_GT_REP_TCODE  text
*      -->P_P_GV_PACKAGE  text
*----------------------------------------------------------------------*
form tcode_set  tables p_gt_tcode structure gt_tcode
                using    p_package.

  data:
    ls_tstct type tstct,
    ls_tstca type tstca.

  loop at p_gt_tcode where node-sel = 'X'.
*修改属性值(不清楚一共改哪些东西,后面测试看看)
    if p_tcode = 'X'.
      clear:gs_popk,gt_pop,gt_pop[],sy-ucomm.
      concatenate '事务码' p_gt_tcode-tstc-tcode into gs_popk-title.
      pop_key_append 'TCODE' '事务码' p_gt_tcode-tstc-tcode.
      call screen 2003 starting at 30 10 ending at 100 20.
      if sy-ucomm = 'OK'.
        loop at gt_pop.
          case gt_pop-key.
            when 'TCODE'.
              p_gt_tcode-tstc-tcode = gt_pop-value.
              if  p_gt_tcode-tstcp-tcode is not initial.
                p_gt_tcode-tstcp-tcode = gt_pop-value.
              endif.
              if  p_gt_tcode-tstcc-tcode is not initial.
                p_gt_tcode-tstcc-tcode = gt_pop-value.
              endif.
              loop at p_gt_tcode-tstct into ls_tstct.
                ls_tstct-tcode = gt_pop-value.
                modify p_gt_tcode-tstct from ls_tstct.
              endloop.
              loop at p_gt_tcode-tstca into ls_tstca.
                ls_tstca-tcode = gt_pop-value.
                modify p_gt_tcode-tstca from ls_tstca.
              endloop.
          endcase.
        endloop.
      endif.
    endif.

*包入请求(对象不存在都可以包)
    perform request_set using p_package 'TRAN' p_gt_tcode-tstc-tcode changing gv_request gv_rtype gv_rtmsg. "表、结构请求(debug RS_DD_COPY_OBJ得来)
    if gv_rtype = 'S'.

*debug se93 复制得来
*删除
      delete from tstct where tcode = p_gt_tcode-tstc-tcode.
      delete from tstcp where tcode = p_gt_tcode-tstc-tcode.
      delete from tstca where tcode = p_gt_tcode-tstc-tcode.
      delete from tstc  where tcode = p_gt_tcode-tstc-tcode.
      delete from tstcc where tcode = p_gt_tcode-tstc-tcode.
      delete from usott where name  = p_gt_tcode-tstc-tcode and type = 'TR'.
*    perform transaction_authorities_delete(lseukf01) using p_gt_tcode-tstc-tcode.

*插入
      insert tstc from p_gt_tcode-tstc.
      insert tstcp from p_gt_tcode-tstcp.
      insert tstcc from p_gt_tcode-tstcc.
      insert tstct from table p_gt_tcode-tstct.
      insert tstca from table p_gt_tcode-tstca.
      insert usott from table p_gt_tcode-usott.

*添加对象列表
      call function 'RS_TREE_OBJECT_PLACEMENT'
        exporting
          object    = p_gt_tcode-tstc-tcode
          operation = 'INSERT'
          type      = 'OT'
          program   = p_gt_tcode-tstc-pgmna.
*
*    perform transaction_authorities_copy(lseukf01) using p_gt_tcode-tstc-tcode.
*记录日志
      clear gv_msg.
      perform rep_log using gv_request 'S' '成功' changing p_gt_tcode-node.
    else.
      perform rep_log using gv_request gv_rtype gv_rtmsg changing p_gt_tcode-node.
    endif.
    modify p_gt_tcode.
  endloop.

endform.                    " TCODE_SET
*&---------------------------------------------------------------------*
*&      Form  FUNC_GET
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_GT_FUNC  text
*----------------------------------------------------------------------*
form func_get  tables   p_gt_func structure gt_func
                                    p_gt_table structure gt_table
                                    p_gt_ttyp structure gt_ttyp
                                    p_gt_dtel structure gt_dtel.

  data:
    ls_import_parameter   like rsimp,
    ls_changing_parameter like rscha,
    ls_export_parameter   like rsexp,
    ls_tables_parameter   like rstbl.

  data:begin of lt_dbfield occurs 0,
         dbfield type likefield,
       end of lt_dbfield.
  loop at p_gt_func where short_text is initial. "只抓没取过的
    call function 'RPY_FUNCTIONMODULE_READ_NEW'
      exporting
        functionname       = p_gt_func-functionname
      importing
        global_flag        = p_gt_func-global_flag
        remote_call        = p_gt_func-remote_call
        update_task        = p_gt_func-update_task
        short_text         = p_gt_func-short_text
        function_pool      = p_gt_func-function_pool "有bug
*       remote_basxml_supported = p_gt_func-remote_basxml_supported
      tables
        import_parameter   = p_gt_func-import_parameter
        changing_parameter = p_gt_func-changing_parameter
        export_parameter   = p_gt_func-export_parameter
        tables_parameter   = p_gt_func-tables_parameter
        exception_list     = p_gt_func-exception_list
        documentation      = p_gt_func-documentation
        source             = p_gt_func-source "source长度只有72,超过72时source是空的,在new_source中
      changing
        new_source         = p_gt_func-new_source
      exceptions
        error_message      = 1
        function_not_found = 2
        invalid_name       = 3.
    if sy-subrc ne 0. "取不到(可能是destination)
      delete p_gt_func.
      continue.
    endif.

    select single pname
      into p_gt_func-function_pool "fm取出来的函数组有Bug,会少几个字符
      from tfdir
      where funcname = p_gt_func-functionname.
    shift p_gt_func-function_pool left by 4 places.
    modify p_gt_func.

*参数中的数据字典
    loop at p_gt_func-import_parameter into ls_import_parameter.
      lt_dbfield-dbfield = ls_import_parameter-typ.
      append lt_dbfield.
    endloop.
    loop at p_gt_func-changing_parameter into ls_changing_parameter.
      lt_dbfield-dbfield = ls_changing_parameter-typ.
      append lt_dbfield.
    endloop.
    loop at p_gt_func-export_parameter into ls_export_parameter.
      lt_dbfield-dbfield = ls_export_parameter-typ.
      append lt_dbfield.
    endloop.
    loop at p_gt_func-tables_parameter into ls_tables_parameter.
      lt_dbfield-dbfield = ls_tables_parameter-dbstruct.
      append lt_dbfield.
    endloop.
    delete lt_dbfield where dbfield(1) ne 'Z'.
    sort lt_dbfield by dbfield.
    delete adjacent duplicates from lt_dbfield.

    loop at lt_dbfield.
      perform dict_add tables p_gt_table p_gt_ttyp p_gt_dtel using lt_dbfield-dbfield.
    endloop.

    loop at p_gt_table.
      perform table_definition_get changing p_gt_table. "取表字段(参考的数据元素)
      modify p_gt_table.
    endloop.
  endloop.
endform.                    " FUNC_GET
*&---------------------------------------------------------------------*
*&      Form  TREE_NODE_ADD
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_5403   text
*      -->P_P_GT_REP_FUNC_FUNCTIONNAME  text
*      -->P_5405   text
*      -->P_5406   text
*      <--P_P_GT_REP_FUNC  text
*----------------------------------------------------------------------*
form tree_node_add  using
                             p_value"对象值
                             p_text "对象类型文本
                             p_mtype "标识(判断是否存在)
                             p_top_key
                    changing p_object. "结构

  data:
    ls_rep_out   like line of gt_rep_out,
    ls_node      type ty_node,
    lv_new_key   type lvc_nkey,
    lv_node_text type lvc_value.
  field-symbols:
    <ls_struc>,
    <lv_var>.

*准备数据
  lv_node_text = p_value.
  ls_rep_out-otype = p_text.
  assign component 'NODE' of structure p_object to <ls_struc>.
  ls_node = <ls_struc>.
  move-corresponding ls_node to ls_rep_out.

*检查对象是否存在
  if gv_state = 0. "只上传未执行 "还没执行过
    perform object_exsit_check using p_value p_mtype changing ls_rep_out.
  endif.

*添加树节点
  perform tree_add_a_node using  ls_rep_out p_top_key lv_node_text
                            space space
                     changing lv_new_key.

*回写node_key
  assign component 'KEY' of structure <ls_struc> to <lv_var>.
  <lv_var> = lv_new_key.

endform.                    " TREE_NODE_ADD
*&---------------------------------------------------------------------*
*&      Form  FUNC_SET
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_P_GT_REP_FUNC  text
*      -->P_P_GV_PACKAGE  text
*----------------------------------------------------------------------*
form func_set  tables   p_gt_func structure gt_func
               using    p_package.

  data:
    function_include like  rs38l-include,
    corrnum_e        like  e071-trkorr,
    lv_line          type i,
    lv_include       type rs38l-include.
  data ls_new_source like line of p_gt_func-new_source.
  data lo_ref type ref to cx_root. "异常处理
  data lv_text type string.

  clear gv_msg.

  loop at p_gt_func where node-sel = 'X'.

*修改属性值
    if p_func = 'X'.
      clear:gs_popk,gt_pop,gt_pop[],sy-ucomm.
      concatenate '函数' p_gt_func-functionname into gs_popk-title.
      pop_key_append 'FUNCTION_POOL' '函数组' p_gt_func-function_pool.
      pop_key_append 'FUNCTIONNAME' '函数名' p_gt_func-functionname.
      call screen 2003 starting at 30 10 ending at 100 20.
      if sy-ucomm = 'OK'.
        loop at gt_pop.
          case gt_pop-key.
            when 'FUNCTIONNAME'.
              p_gt_func-functionname = gt_pop-value.
            when 'FUNCTION_POOL'.
              p_gt_func-function_pool = gt_pop-value.
          endcase.
        endloop.
      endif.
    endif.

*包入请求(对象不存在都可以包)
    perform request_set using p_package 'FUNC' p_gt_func-functionname changing gv_request gv_rtype gv_rtmsg.
    if gv_rtype = 'S'.
      if p_gt_func-source[] is not initial.
*删掉头尾两行,不知道为啥insert函数不自动去掉
        describe table p_gt_func-source lines lv_line.
        delete p_gt_func-source index lv_line.
        delete p_gt_func-source index 1.
*去掉参数部分的注释
        delete p_gt_func-source where line(2) = '*"'.
      else.
*删掉头尾两行,不知道为啥insert函数不自动去掉
        describe table p_gt_func-new_source lines lv_line.
        delete p_gt_func-new_source index lv_line.
        delete p_gt_func-new_source index 1.
*去掉参数部分的注释
        loop at p_gt_func-new_source  into ls_new_source.
          try. "防止字符为空 string长度为0时,偏移dump
              if ls_new_source(2) = '*"'.
                delete p_gt_func-new_source .
              endif.
            catch cx_root into lo_ref.
              lv_text = lo_ref->get_text( ).
          endtry.
        endloop.
      endif.

*判断函数是否存在
      call function 'FUNCTION_EXISTS'
        exporting
          funcname           = p_gt_func-functionname
        importing
          include            = lv_include
        exceptions
          function_not_exist = 1.
      if sy-subrc = 0.
        call function 'FUNCTION_DELETE'
          exporting
            funcname      = p_gt_func-functionname
*           suppress_success_message = abap_true
          exceptions
            error_message = 1
            others        = 2.
        if sy-subrc <> 0.
          perform msg_sys_into changing gv_msg.
        endif.
      endif.

      if gv_msg is initial.
*插入函数
        call function 'RS_FUNCTIONMODULE_INSERT'
          exporting
            funcname                = p_gt_func-functionname
            function_pool           = p_gt_func-function_pool
            interface_global        = p_gt_func-global_flag
            remote_call             = p_gt_func-remote_call
            short_text              = p_gt_func-short_text
*           SUPPRESS_CORR_CHECK     = 'X'
            update_task             = p_gt_func-update_task
*           CORRNUM                 = ' '
            namespace               = ' '
*           SUPPRESS_LANGUAGE_CHECK = 'X'
*           AUTHORITY_CHECK         = 'X'
            save_active             = 'X'
            new_source              = p_gt_func-new_source
            exception_class         = ' '
*           SUPPRESS_UPGRADE_CHECK  = ' '
*           remote_basxml_supported = p_gt_func-remote_basxml_supported
          importing
            function_include        = function_include
            corrnum_e               = corrnum_e
          tables
            import_parameter        = p_gt_func-import_parameter
            export_parameter        = p_gt_func-export_parameter
            tables_parameter        = p_gt_func-tables_parameter
            changing_parameter      = p_gt_func-changing_parameter
            exception_list          = p_gt_func-exception_list
            parameter_docu          = p_gt_func-documentation
            source                  = p_gt_func-source
          exceptions
            double_task             = 1
            error_message           = 2
            function_already_exists = 3
            invalid_function_pool   = 4
            invalid_name            = 5
            too_many_functions      = 6
            no_modify_permission    = 7
            no_show_permission      = 8
            enqueue_system_failure  = 9
            canceled_in_corr        = 10.
*记录日志
        clear gv_msg.
        if sy-subrc = 0.
          perform rep_log using gv_request 'S' '成功' changing p_gt_func-node.
        else. "插入函数失败
          perform msg_sys_into changing gv_msg.
          perform rep_log using space 'E' gv_msg changing p_gt_func-node.
        endif.
      else. "删除函数失败
        perform rep_log using space 'E' gv_msg changing p_gt_func-node.
      endif.
    else. "未包请求
      perform rep_log using gv_request gv_rtype gv_rtmsg changing p_gt_func-node.
    endif.
    modify p_gt_func.
  endloop.
endform.                    " FUNC_SET
*&---------------------------------------------------------------------*
*&      Form  rep_scan_function_pool
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_P_GT_REP  text
*----------------------------------------------------------------------*
form rep_scan_function_pool  tables   p_gt_rep structure gt_rep.
  data:
    ls_code  like gs_code,
    lt_lock  type table of ty_lock with header line,
    lt_snro  type table of ty_snro with header line,
    lt_func  type table of ty_func with header line, "程序中的函数
    lt_func2 type table of ty_func with header line, "函数中的函数
    lt_table type table of ty_table with header line,
    lt_ttyp  type table of ty_ttyp with header line,
    lt_dtel  type table of ty_dtel with header line,
    lt_w3mi  type table of ty_w3mi with header line,
    lv_pname type tfdir-pname,
    lv_tabix like sy-tabix,
    ls_func  like lt_func,
    lt_code  type table of ty_codes,
    lt_prog  type table of ty_prog with header line.

  loop at p_gt_rep.
    clear:ls_code,lt_lock,lt_lock[],lt_snro,lt_snro[],lt_func,lt_func[],lt_table,lt_table[],lt_dtel,lt_dtel[].
    if p_gt_rep-type = 'F'. "函数池
      perform rep_scan_include tables p_gt_rep using p_gt_rep-program 'F'.
    else. "可执行程序和包含程序(函数模块在这一步递归到底)
*取代码
      perform code_get using p_gt_rep-program changing ls_code.
*分析代码
      perform code_analyze tables ls_code-code
                                               lt_lock
                                               lt_snro
                                               lt_func
                                               lt_table
                                               lt_ttyp
                                               lt_dtel
                                               lt_w3mi
                                               lt_prog.

      loop at lt_func.
*递归函数中调用的函数
        clear:lt_func2,lt_func2[],ls_func.
        call function 'RPY_FUNCTIONMODULE_READ_NEW'
          exporting
            functionname       = lt_func-functionname
          tables
            import_parameter   = ls_func-import_parameter
            changing_parameter = ls_func-changing_parameter
            export_parameter   = ls_func-export_parameter
            tables_parameter   = ls_func-tables_parameter
            exception_list     = ls_func-exception_list
            documentation      = ls_func-documentation
            source             = ls_func-source
          changing
            new_source         = ls_func-new_source
          exceptions
            error_message      = 1
            function_not_found = 2
            invalid_name       = 3.
        if ls_func-source is not initial.
          lt_code = ls_func-source.
        else.
          lt_code = ls_func-new_source.
        endif.

*        perform code_analyze tables ls_func-source
        perform code_analyze tables lt_code
                                                 lt_lock
                                                 lt_snro
                                                 lt_func2
                                                 lt_table
                                                 lt_ttyp
                                                 lt_dtel
                                                 lt_w3mi
                                                 lt_prog.
        loop at lt_func2. "防止重复操作和死循环
          read table lt_func transporting no fields with key functionname = lt_func2-functionname.
          if sy-subrc ne 0.
            append lt_func2 to lt_func.
          endif.
        endloop.

*追加函数组和函数模块
        clear p_gt_rep.
        select single pname
          into lv_pname
          from tfdir
          where funcname = lt_func-functionname.
        if sy-subrc = 0.
          read table p_gt_rep with key program = lv_pname.
          if sy-subrc = 0. "已有函数池文件夹
            lv_tabix = sy-tabix.
            append lt_func to p_gt_rep-func.
            modify p_gt_rep index lv_tabix.
          else.
            p_gt_rep-program = lv_pname.
            p_gt_rep-type = 'F'. "函数池
            shift lv_pname left by 4 places.
            select single area areat
              into corresponding fields of p_gt_rep-fugr
              from tlibt
              where area = lv_pname and spras = 1.
            append lt_func to p_gt_rep-func.
            append p_gt_rep.
          endif.
        endif.
      endloop.
*追加submit的程序
      clear p_gt_rep.
      loop at lt_prog.
        read table p_gt_rep with key program = lt_prog-program.
        if sy-subrc ne 0.
          p_gt_rep-program = lt_prog-program.
          select single subc as type
            into corresponding fields of  p_gt_rep
            from trdir
            where name = lt_prog-program.
          append p_gt_rep.
        endif.

      endloop.
    endif.
  endloop.


endform.                    " rep_scan_function_pool

*&---------------------------------------------------------------------*
*&      Form  rep_scan_include
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_GT_REP   text
*      -->P_PROGRAM  text
*----------------------------------------------------------------------*
form rep_scan_include  tables p_gt_rep structure gt_rep using value(p_program) value(p_type).
  data: begin of lt_includes occurs 50,
          name like progdir-name,
        end of lt_includes.
  data functab       type standard table of rs38l_incl with header line.
  data function_pool  like  tlibg-area.

  clear p_gt_rep. "p_program是工作区p_gt_rep的字段

*取所有include(函数池不包含XX)
  call function 'RS_GET_ALL_INCLUDES'
    exporting
      program      = p_program
    tables
      includetab   = lt_includes
    exceptions
      not_existent = 1
      no_program   = 2.
*  if sy-subrc ne 0 and sy-subrc ne 2. "1可能是include
*    perform msg_sys.
*    leave program.
*  endif.
  if sy-subrc = 1..
    message '请检查程序名是否正确' type 'S' display like 'E'.
    leave list-processing and return to screen 0.
  endif.

  if p_type = 'F'.
*函数池下函数对应的include名
    function_pool = p_program.
    shift function_pool left by 4 places. "去掉SAPL
    call function 'RS_FUNCTION_POOL_CONTENTS'
      exporting
        function_pool           = function_pool
      tables
        functab                 = functab
      exceptions
        function_pool_not_found = 1.

*排除函数模块生成的include
    loop at functab.
      delete lt_includes where name = functab-include.
    endloop.
  endif.

*作为文件夹添加到rep
  loop at lt_includes where name(1) = 'Z'. "只抓Z开头的include
    read table p_gt_rep transporting no fields with key program = lt_includes-name.
    if sy-subrc ne 0.
      p_gt_rep-program = lt_includes-name.
      p_gt_rep-type = 'I'.
      append p_gt_rep.
    endif.
  endloop.
endform.                    "rep_scan_include
*&---------------------------------------------------------------------*
*&      Form  FUGR_SET
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_P_GV_PACKAGE  text
*      <--P_P_GT_REP_FUGR  text
*----------------------------------------------------------------------*
form fugr_set  using    p_gv_package p_program
               changing p_fugr structure gs_fugr.

  data:
    corrnum    like  e071-trkorr,
    short_text like  tftit-stext.

  if p_fugr is initial or p_fugr-node-sel is initial.
    return.
  endif.

  perform request_set using p_gv_package 'FUGR' p_fugr-area changing gv_request gv_rtype gv_rtmsg.
  if gv_rtype = 'S'.
    short_text = p_fugr-areat.
    call function 'RS_FUNCTION_POOL_INSERT'
      exporting
        function_pool           = p_fugr-area
        short_text              = short_text
*       namespace               = lv_namespace
        devclass                = p_gv_package
      importing
        corrnum                 = corrnum
      exceptions
        name_already_exists     = 1
        name_not_correct        = 2
        function_already_exists = 3
        invalid_function_pool   = 4
        invalid_name            = 5
        too_many_functions      = 6
        no_modify_permission    = 7
        no_show_permission      = 8
        enqueue_system_failure  = 9
        canceled_in_corr        = 10
        undefined_error         = 11
        others                  = 12.
    if sy-subrc = 0.
      perform rep_log using gv_request 'S' '成功' changing p_fugr-node.
    elseif sy-subrc = 1.
      perform rep_log using gv_request 'S' '没有修改' changing p_fugr-node.
    else.
      perform msg_sys_into changing gv_msg.
      perform rep_log using space 'E' gv_msg p_fugr-node.
    endif.
  else.
    perform rep_log using space gv_rtype gv_rtmsg p_fugr-node.
  endif.

endform.                    " FUGR_SET
*&---------------------------------------------------------------------*
*&      Form  CODE_SCAN_TABLES
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_P_GT_TABLE  text
*      -->P_P_GT_DTEL  text
*      -->P_P_GT_CODE  text
*----------------------------------------------------------------------*
form code_scan_tables  tables
                                p_gt_code structure gs_codes
                                p_gt_table structure gt_table.

  data: lt_tokens type standard table of stokes with header line.
  data: lt_statements type standard table of sstmnt with header line.
  data: lt_keywords type standard table of text20 with header line.
  data: ls_table type ty_table.
  data lt_ttyp type table of ty_ttyp with header line.
  data lt_dtel type table of ty_dtel with header line.

  append 'TABLES' to lt_keywords.

  scan abap-source p_gt_code
  tokens into lt_tokens
  statements into lt_statements
  keywords from lt_keywords.

  sort lt_tokens ascending by str.
  delete lt_tokens where str = 'TABLES'.

  loop at lt_tokens.
    try.
        if ( lt_tokens-str+0(1) <> 'Y' and lt_tokens-str+0(1) <> 'Z' ).
          continue.
        endif.
      catch cx_sy_range_out_of_bounds into cx_root.
    endtry.
    ls_table-tablename = lt_tokens-str.
    perform dict_add tables p_gt_table lt_ttyp lt_dtel using ls_table-tablename. "lt_ttyp和lt_dtel只是为了凑数
  endloop.

endform.                    " CODE_SCAN_TABLES
*&---------------------------------------------------------------------*
*&      Form  CODE_SCAN_LIKEORTYPE
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_P_GT_CODE  text
*      -->P_P_GT_TABLE  text
*      -->P_P_GT_DTEL  text
*----------------------------------------------------------------------*
form code_scan_likeortype  tables   p_gt_code structure gs_codes
                                    p_gt_table structure gt_table
                                    p_gt_ttyp structure gt_ttyp
                                    p_gt_dtel structure gt_dtel.


  data: lv_head type string.
  data: lv_tail type string.
  data: lv_no_use type string.
  data: lv_line type string.
  data: lv_linetype type string.
  data: lv_len type i value 0.
  data: ls_table type ty_table.
  loop at p_gt_code.
    lv_len = strlen( p_gt_code ).
    if lv_len > 0.
      if p_gt_code(1) = '*'.
        continue.
      endif.

      translate p_gt_code to upper case.

      shift p_gt_code up to 'LIKE'.
      if sy-subrc = 0.
        lv_linetype = 'LIKE'.
      else.
        shift p_gt_code up to 'TYPE'.
        if sy-subrc = 0.
          find 'BEGIN OF' in p_gt_code.
          if sy-subrc <> 0.
            find 'END OF' in p_gt_code.
            if sy-subrc <> 0.
              find 'VALUE' in p_gt_code.
              if sy-subrc <> 0.
                lv_linetype = 'TYPE'.
              endif.
            endif.
          endif.
        else.
          shift p_gt_code up to 'INCLUDE'.
          if sy-subrc = 0.
            split p_gt_code at space into lv_no_use lv_line.
          endif.

          shift p_gt_code up to 'STRUCTURE'.
          if sy-subrc = 0.
            lv_linetype = 'STRUCTURE'.
          else.
            continue.
          endif.
        endif.
      endif.

      case lv_linetype.
        when 'LIKE' or 'TYPE' or 'STRUCTURE'.
          shift p_gt_code up to space.
          shift p_gt_code left deleting leading space.
          if p_gt_code cs 'TABLE'.
            split p_gt_code at 'TABLE' into lv_head lv_tail.
            split lv_tail at 'OF' into lv_head lv_tail.
            split lv_tail at 'WITH' into lv_tail lv_head. "还有with要处理掉
            split lv_tail at 'OCCURS' into lv_tail lv_head. "OCCURS
            p_gt_code = lv_tail.
            shift p_gt_code left deleting leading space.
          endif.

          try.
              if p_gt_code+0(1) = 'Y' or p_gt_code+0(1) = 'Z' .
              else.
                lv_linetype = ''.
                continue.
              endif.
            catch cx_sy_range_out_of_bounds into cx_root.
          endtry.

          if p_gt_code cs ','.
            split p_gt_code at ',' into lv_head lv_tail.
            if p_gt_code cs '-'.
              split lv_head at '-' into lv_head lv_tail.
            endif.
            if p_gt_code cs 'OCCURS'.
              split p_gt_code at space into lv_head lv_tail.
            endif.
          else.
            if p_gt_code cs '.'.
              split p_gt_code at '.' into lv_head lv_tail.
              if p_gt_code cs '-'.
                split lv_head at '-' into lv_head lv_tail.
              endif.
              if p_gt_code cs 'OCCURS'.
                split p_gt_code at space into lv_head lv_tail.
              endif.
            else.
              split p_gt_code at space into lv_head lv_tail.
              if p_gt_code cs '-'.
                split lv_head at '-' into lv_head lv_tail.
              endif.
            endif.
          endif.

          if not lv_head is initial.
            clear ls_table.
            ls_table-tablename = lv_head.
            perform dict_add tables p_gt_table p_gt_ttyp p_gt_dtel using ls_table-tablename.
          endif.
          lv_linetype = ''.
      endcase.
    endif.
  endloop.

endform.                    " CODE_SCAN_LIKEORTYPE
*&---------------------------------------------------------------------*
*&      Form  DICT_ADD
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_P_GT_TABLE  text
*      -->P_P_GT_DTEL  text
*      -->P_LT_DBFIELD_DBFIELD  text
*----------------------------------------------------------------------*
form dict_add  tables
                        p_gt_table structure gt_table
                        p_gt_ttyp structure gt_ttyp
                        p_gt_dtel structure gt_dtel
               using    p_object.
  data:
    ls_table   type ty_table,
    lv_exsit,
    lv_type(4).

*判断对象类型
  perform dict_check using p_object changing lv_type.

  case lv_type.
    when 'TAB'.
      ls_table-tablename = p_object.
      read table p_gt_table transporting no fields with key tablename = ls_table-tablename.
      if sy-subrc ne 0.
        perform rep_exsit_check using 'DICT' 'TABLENAME' ls_table-tablename changing lv_exsit.
        if lv_exsit ne 'X'.
          append ls_table to p_gt_table.
        endif.
      endif.
    when 'TTYP'.
      object_add ttyp typename p_object.
    when 'DTEL'.
*数据元素
*      perform dtel_add tables p_gt_dtel using p_object.
      object_add dtel name p_object.
  endcase.

endform.                    " DICT_ADD
*&---------------------------------------------------------------------*
*&      Form  dict_class_add
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_GT_TABLE text
*      -->P_GT_TTYP  text
*      -->P_GT_DTEL  text
*      -->P_GT_CLASS text
*      -->P_OBJECT   text
*----------------------------------------------------------------------*
form dict_class_add  tables
                        p_gt_table structure gt_table
                        p_gt_ttyp structure gt_ttyp
                        p_gt_dtel structure gt_dtel
                        p_gt_class structure gt_class
               using    p_object.
  data:
    ls_table   type ty_table,
    lv_exsit,
    lv_type(4).

*判断对象类型
  perform dict_check using p_object changing lv_type.

  case lv_type.
    when 'TAB'.
      ls_table-tablename = p_object.
      read table p_gt_table transporting no fields with key tablename = ls_table-tablename.
      if sy-subrc ne 0.
        perform rep_exsit_check using 'DICT' 'TABLENAME' ls_table-tablename changing lv_exsit.
        if lv_exsit ne 'X'.
          append ls_table to p_gt_table.
        endif.
      endif.
    when 'TTYP'.
      object_add ttyp typename p_object.
    when 'DTEL'.
*数据元素
*      perform dtel_add tables p_gt_dtel using p_object.
      object_add dtel name p_object.
    when 'CLAS'.
      object_add class clsname p_object.
  endcase.

endform.                    " DICT_ADD
*&---------------------------------------------------------------------*
*&      Form  REP_INFO_SET
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
*form rep_pac .
*  if p_repnam is initial.
*    read table s_prog index 1.
*    p_repnam = s_prog-low. "过时
*  endif.
*  gs_rep_pac-info-rep_name = p_repnam.
*  gs_rep_pac-info-zip = p_zip.
*  gs_rep_pac-info-text = p_text.
*  gs_rep_pac-info-url = p_url.
**  gs_rep_pac-info-datum = sy-datum.
**  gs_rep_pac-info-uzeit = sy-uzeit.
*  gs_rep_pac-rep = gt_rep[].
*endform.                    " REP_INFO_SET
*&---------------------------------------------------------------------*
*&      Form  REP_COMMIT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_GS_INFO  text
*      -->P_GT_REP[]  text
*----------------------------------------------------------------------*
form rep_commit  using p_gt_rep.
  data:
    lv_url type text132 value '/acc/code/commit',
    lv_par type string.

  concatenate gv_namespace lv_url into lv_url.

*数据格式转换
  perform rep_to_json using p_gt_rep changing lv_par.

*发送post请求
  perform http_post using lv_url lv_par.
endform.                    " REP_COMMIT
*&---------------------------------------------------------------------*
*&      Form  HTTP_POST
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_GV_XML  text
*----------------------------------------------------------------------*
form http_post  using lv_url lv_par.
  gv_url = lv_url.
  gv_par = lv_par.
  call screen 2002  starting at 30 10 ending at 90 13.
endform.                    " HTTP_POST
*&---------------------------------------------------------------------*
*&      Form  HTML_VIEWER_INIT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      <--P_LO_HTML_VIEWER  text
*----------------------------------------------------------------------*
form html_viewer_init  changing p_lo_html_viewer type ref to cl_gui_html_viewer.

  types : begin of ty_ls_form_field,
            name  type string,
            value type string,
          end of ty_ls_form_field.

  data:
    myevent_tab type cntl_simple_events,
    myevent     type cntl_simple_event.

  data: evt_receiver type ref to cl_myevent_handler.

*创建容器
  if go_docking is initial.
    create object go_docking
      exceptions
        others = 6.

    if p_debug is initial.
      call method go_docking->set_visible
        exporting
          visible           = ' '
        exceptions
          cntl_error        = 1
          cntl_system_error = 2
          others            = 3.
    endif.
  endif.

*创建浏览器
  create object p_lo_html_viewer
    exporting
      parent               = go_docking
      query_table_disabled = 'X' "不传这个参数返回的数据太长的话就会出异常CNTL_ERROR
    exceptions
      cntl_error           = 1
      cntl_install_error   = 2
      dp_install_error     = 3
      dp_error             = 4.

*注册事件(form post to sap)
  myevent-eventid = p_lo_html_viewer->m_id_sapevent.
  myevent-appl_event = 'X'.
  append myevent to myevent_tab.
  call method p_lo_html_viewer->set_registered_events
    exporting
      events = myevent_tab.

  create object evt_receiver.
  set handler evt_receiver->on_sapevent
              for p_lo_html_viewer.

endform.                    " HTML_VIEWER_INIT
*&---------------------------------------------------------------------*
*&      Form  HTML_FORM_INIT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_P_LO_HTML_VIEWER  text
*      -->P_ACTION  text
*      -->P_L_PARAMS  text
*      -->P_METHOD  text
*      <--P_ASSIGNED_URL  text
*----------------------------------------------------------------------*
form html_form_init  using
                              p_url
                              p_par
                     changing p_assigned_url.

  data l_string type string.
  data lt_data type table of text132.

  concatenate
  `<html>`
  `<head>`
  `<script language="javascript">`
  `function autostart() {`
*  `alert({&PARAMS})` "传入参数
  `post_to_url("&URL", {&PARAMS}, "&METHOD");`
  `}`
  `function post_to_url(path, params, method) {`
  `    var form = document.createElement("form");`
  `    form.setAttribute("method", method);`
  `    form.setAttribute("action", path);`
  `    for(var key in params) {`
  `        var hiddenField = document.createElement("input");`
  `        hiddenField.setAttribute("type", "hidden");`
  `        hiddenField.setAttribute("name", key);`
  `        hiddenField.setAttribute("value", params[key]);`
  `        form.appendChild(hiddenField);`
  `    }`
  `    document.body.appendChild(form);`
  `    form.submit();`
  `}`
  `</script>`
  `</head>`
  `<body onload="autostart()"></body>`
  `<ml>` into l_string
  .
  replace '&URL' in l_string with p_url.
  replace '&PARAMS' in l_string with p_par.
  replace '&METHOD' in l_string with 'POST'.

*  l_string = '<!DOCTYPE html><html><body><script>alert();</script></body><ml>'.

  call function 'SWA_STRING_TO_TABLE'
    exporting
      character_string           = l_string
    importing
      character_table            = lt_data
    exceptions
      no_flat_charlike_structure = 1
      others                     = 2.

  call method go_html_viewer->load_data
    importing
      assigned_url         = p_assigned_url
    changing
      data_table           = lt_data
    exceptions
      dp_invalid_parameter = 1
      dp_error_general     = 2
      cntl_error           = 3
      others               = 4.
endform.                    " HTML_FORM_INIT
*&---------------------------------------------------------------------*
*&      Form  JSON_FROM_DATA
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_P_GS_REP_PAC  text
*      <--P_LV_REQ  text
*----------------------------------------------------------------------*
form rep_to_json  using    p_gt_rep type ty_t_rep
  changing p_lv_par.

  field-symbols <lv_value>.
  data:begin of lt_keys occurs 0,
         key(20),
         map(20),
       end of lt_keys.
  data lv_sep.
  data lv_xml type string.
  data:
    ls_rep  type ty_rep,
    ls_text type textpool.

*数据检查
  if p_uname is initial or p_passwd is initial.
    message '用户名和密码不能为空' type 'S' display like 'E'.
    leave list-processing and return to screen 0.
  endif.

*程序描述
  if p_text is initial.
    loop at p_gt_rep into ls_rep.
      read table ls_rep-text-text into ls_text with key id = 'R'.
      if sy-subrc = 0.
        p_text = ls_text-entry.
        exit.
      endif.
    endloop.
  endif.

  if p_repnam is initial.
    read table s_prog index 1.
    p_repnam = s_prog-low.
  endif.

*转info
  lt_keys-key = 'P_REPNAM'.lt_keys-map = 'name'. append lt_keys.
  lt_keys-key = 'P_TEXT'.lt_keys-map = 'text'. append lt_keys.
  lt_keys-key = 'P_TAG'.lt_keys-map = 'tag'. append lt_keys.
  lt_keys-key = 'P_URL'.lt_keys-map = 'url'. append lt_keys.
  lt_keys-key = 'P_UNAME'.lt_keys-map = 'uname'. append lt_keys.
  lt_keys-key = 'P_PASSWD'.lt_keys-map = 'passwd'. append lt_keys.

  loop at lt_keys.
    replace all occurrences of '"' in lt_keys-key with '"'.
    assign (lt_keys-key)  to <lv_value>.
    concatenate p_lv_par lv_sep lt_keys-map ':"' <lv_value> '"' into p_lv_par. "js内层双引号转义
    lv_sep = ','.
  endloop.

*转rep_pac
  perform zip_from_data using p_gt_rep changing lv_xml.

  concatenate p_lv_par lv_sep 'object' ':"' lv_xml '"' into p_lv_par. "第二层引号转义了

*封装rep
  concatenate '{' p_lv_par '}' into p_lv_par.

*转xstring(统一编码格式)
  perform xstring_from_string  changing p_lv_par.

  concatenate 'post_str:"' p_lv_par '"' into p_lv_par.

endform.                    " JSON_FROM_DATA
*&---------------------------------------------------------------------*
*&      Module  STATUS_2002  OUTPUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
module status_2002 output.
  set pf-status '2002'.

*POST请求
  data lv_assigned_url(255).

  if go_html_viewer is initial.
    perform html_viewer_init changing go_html_viewer.
  endif.

*初始化表单
  perform html_form_init using gv_url gv_par
        changing lv_assigned_url.

*加载表单(必须在PBO里执行,否则执行了代码不会有效果----PBO代码执行完了才开始渲染)
  call method go_html_viewer->show_data
    exporting
      url        = lv_assigned_url
    exceptions
      cntl_error = 1.

endmodule.                 " STATUS_2002  OUTPUT
*&---------------------------------------------------------------------*
*&      Module  USER_COMMAND_2002  INPUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
module user_command_2002 input.
  if sy-ucomm = 'CANCEL'.
    leave to screen 0.
*    leave SCREEN.
  endif.
endmodule.                 " USER_COMMAND_2002  INPUT
*&---------------------------------------------------------------------*
*&      Form  REP_SEL_ALL
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      <--P_GT_REP[]  text
*----------------------------------------------------------------------*
form rep_sel_all  tables p_gt_rep structure gs_rep.
  data lt_node like table of gt_selected_node with header line.


  lt_node-nodekey = 0.
  append lt_node.

  perform rep_sel tables p_gt_rep lt_node.
endform.                    " REP_SEL_ALL

*&SPWIZARD: DECLARATION OF TABLECONTROL 'T1' ITSELF
controls: t1 type tableview using screen 2003.

*&SPWIZARD: LINES OF TABLECONTROL 'T1'
data:     g_t1_lines  like sy-loopc.

*&SPWIZARD: OUTPUT MODULE FOR TC 'T1'. DO NOT CHANGE THIS LINE!
*&SPWIZARD: UPDATE LINES FOR EQUIVALENT SCROLLBAR
module t1_change_tc_attr output.
  describe table gt_pop lines t1-lines.
endmodule.                    "T1_CHANGE_TC_ATTR OUTPUT

*&SPWIZARD: OUTPUT MODULE FOR TC 'T1'. DO NOT CHANGE THIS LINE!
*&SPWIZARD: GET LINES OF TABLECONTROL
module t1_get_lines output.
  g_t1_lines = sy-loopc.
endmodule.                    "T1_GET_LINES OUTPUT

*&SPWIZARD: INPUT MODULE FOR TC 'T1'. DO NOT CHANGE THIS LINE!
*&SPWIZARD: MODIFY TABLE
module t1_modify input.
  modify gt_pop
    from gt_pop
    index t1-current_line.
endmodule.                    "T1_MODIFY INPUT

*&SPWIZARD: INPUT MODULE FOR TC 'T1'. DO NOT CHANGE THIS LINE!
*&SPWIZARD: PROCESS USER COMMAND
module t1_user_command input.
  ok_code = sy-ucomm.
  perform user_ok_tc using    'T1'
                              'GT_POP'
                              ' '
                     changing ok_code.
  sy-ucomm = ok_code.
endmodule.                    "T1_USER_COMMAND INPUT

*----------------------------------------------------------------------*
*   INCLUDE TABLECONTROL_FORMS                                         *
*----------------------------------------------------------------------*

*&---------------------------------------------------------------------*
*&      Form  USER_OK_TC                                               *
*&---------------------------------------------------------------------*
form user_ok_tc using    p_tc_name type dynfnam
                         p_table_name
                         p_mark_name
                changing p_ok      like sy-ucomm.

*&SPWIZARD: BEGIN OF LOCAL DATA----------------------------------------*
  data: l_ok     type sy-ucomm,
        l_offset type i.
*&SPWIZARD: END OF LOCAL DATA------------------------------------------*

*&SPWIZARD: Table control specific operations                          *
*&SPWIZARD: evaluate TC name and operations                            *
  search p_ok for p_tc_name.
  if sy-subrc <> 0.
    exit.
  endif.
  l_offset = strlen( p_tc_name ) + 1.
  l_ok = p_ok+l_offset.
*&SPWIZARD: execute general and TC specific operations                 *
  case l_ok.
    when 'INSR'.                      "insert row
      perform fcode_insert_row using    p_tc_name
                                        p_table_name.
      clear p_ok.

    when 'DELE'.                      "delete row
      perform fcode_delete_row using    p_tc_name
                                        p_table_name
                                        p_mark_name.
      clear p_ok.

    when 'P--' or                     "top of list
         'P-'  or                     "previous page
         'P+'  or                     "next page
         'P++'.                       "bottom of list
      perform compute_scrolling_in_tc using p_tc_name
                                            l_ok.
      clear p_ok.
*     WHEN 'L--'.                       "total left
*       PERFORM FCODE_TOTAL_LEFT USING P_TC_NAME.
*
*     WHEN 'L-'.                        "column left
*       PERFORM FCODE_COLUMN_LEFT USING P_TC_NAME.
*
*     WHEN 'R+'.                        "column right
*       PERFORM FCODE_COLUMN_RIGHT USING P_TC_NAME.
*
*     WHEN 'R++'.                       "total right
*       PERFORM FCODE_TOTAL_RIGHT USING P_TC_NAME.
*
    when 'MARK'.                      "mark all filled lines
      perform fcode_tc_mark_lines using p_tc_name
                                        p_table_name
                                        p_mark_name   .
      clear p_ok.

    when 'DMRK'.                      "demark all filled lines
      perform fcode_tc_demark_lines using p_tc_name
                                          p_table_name
                                          p_mark_name .
      clear p_ok.

*     WHEN 'SASCEND'   OR
*          'SDESCEND'.                  "sort column
*       PERFORM FCODE_SORT_TC USING P_TC_NAME
*                                   l_ok.

  endcase.

endform.                              " USER_OK_TC

*&---------------------------------------------------------------------*
*&      Form  FCODE_INSERT_ROW                                         *
*&---------------------------------------------------------------------*
form fcode_insert_row
              using    p_tc_name           type dynfnam
                       p_table_name             .

*&SPWIZARD: BEGIN OF LOCAL DATA----------------------------------------*
  data l_lines_name       like feld-name.
  data l_selline          like sy-stepl.
  data l_lastline         type i.
  data l_line             type i.
  data l_table_name       like feld-name.
  field-symbols <tc>                 type cxtab_control.
  field-symbols <table>              type standard table.
  field-symbols <lines>              type i.
*&SPWIZARD: END OF LOCAL DATA------------------------------------------*

  assign (p_tc_name) to <tc>.

*&SPWIZARD: get the table, which belongs to the tc                     *
  concatenate p_table_name '[]' into l_table_name. "table body
  assign (l_table_name) to <table>.                "not headerline

*&SPWIZARD: get looplines of TableControl                              *
  concatenate 'G_' p_tc_name '_LINES' into l_lines_name.
  assign (l_lines_name) to <lines>.

*&SPWIZARD: get current line                                           *
  get cursor line l_selline.
  if sy-subrc <> 0.                   " append line to table
    l_selline = <tc>-lines + 1.
*&SPWIZARD: set top line                                               *
    if l_selline > <lines>.
      <tc>-top_line = l_selline - <lines> + 1 .
    else.
      <tc>-top_line = 1.
    endif.
  else.                               " insert line into table
    l_selline = <tc>-top_line + l_selline - 1.
    l_lastline = <tc>-top_line + <lines> - 1.
  endif.
*&SPWIZARD: set new cursor line                                        *
  l_line = l_selline - <tc>-top_line + 1.

*&SPWIZARD: insert initial line                                        *
  insert initial line into <table> index l_selline.
  <tc>-lines = <tc>-lines + 1.
*&SPWIZARD: set cursor                                                 *
  set cursor line l_line.

endform.                              " FCODE_INSERT_ROW

*&---------------------------------------------------------------------*
*&      Form  FCODE_DELETE_ROW                                         *
*&---------------------------------------------------------------------*
form fcode_delete_row
              using    p_tc_name           type dynfnam
                       p_table_name
                       p_mark_name   .

*&SPWIZARD: BEGIN OF LOCAL DATA----------------------------------------*
  data l_table_name       like feld-name.

  field-symbols <tc>         type cxtab_control.
  field-symbols <table>      type standard table.
  field-symbols <wa>.
  field-symbols <mark_field>.
*&SPWIZARD: END OF LOCAL DATA------------------------------------------*

  assign (p_tc_name) to <tc>.

*&SPWIZARD: get the table, which belongs to the tc                     *
  concatenate p_table_name '[]' into l_table_name. "table body
  assign (l_table_name) to <table>.                "not headerline

*&SPWIZARD: delete marked lines                                        *
  describe table <table> lines <tc>-lines.

  loop at <table> assigning <wa>.

*&SPWIZARD: access to the component 'FLAG' of the table header         *
    assign component p_mark_name of structure <wa> to <mark_field>.

    if <mark_field> = 'X'.
      delete <table> index syst-tabix.
      if sy-subrc = 0.
        <tc>-lines = <tc>-lines - 1.
      endif.
    endif.
  endloop.

endform.                              " FCODE_DELETE_ROW

*&---------------------------------------------------------------------*
*&      Form  COMPUTE_SCROLLING_IN_TC
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_TC_NAME  name of tablecontrol
*      -->P_OK       ok code
*----------------------------------------------------------------------*
form compute_scrolling_in_tc using    p_tc_name
                                      p_ok.
*&SPWIZARD: BEGIN OF LOCAL DATA----------------------------------------*
  data l_tc_new_top_line     type i.
  data l_tc_name             like feld-name.
  data l_tc_lines_name       like feld-name.
  data l_tc_field_name       like feld-name.

  field-symbols <tc>         type cxtab_control.
  field-symbols <lines>      type i.
*&SPWIZARD: END OF LOCAL DATA------------------------------------------*

  assign (p_tc_name) to <tc>.
*&SPWIZARD: get looplines of TableControl                              *
  concatenate 'G_' p_tc_name '_LINES' into l_tc_lines_name.
  assign (l_tc_lines_name) to <lines>.


*&SPWIZARD: is no line filled?                                         *
  if <tc>-lines = 0.
*&SPWIZARD: yes, ...                                                   *
    l_tc_new_top_line = 1.
  else.
*&SPWIZARD: no, ...                                                    *
    call function 'SCROLLING_IN_TABLE'
      exporting
        entry_act      = <tc>-top_line
        entry_from     = 1
        entry_to       = <tc>-lines
        last_page_full = 'X'
        loops          = <lines>
        ok_code        = p_ok
        overlapping    = 'X'
      importing
        entry_new      = l_tc_new_top_line
      exceptions
*       NO_ENTRY_OR_PAGE_ACT  = 01
*       NO_ENTRY_TO    = 02
*       NO_OK_CODE_OR_PAGE_GO = 03
        others         = 0.
  endif.

*&SPWIZARD: get actual tc and column                                   *
  get cursor field l_tc_field_name
             area  l_tc_name.

  if syst-subrc = 0.
    if l_tc_name = p_tc_name.
*&SPWIZARD: et actual column                                           *
      set cursor field l_tc_field_name line 1.
    endif.
  endif.

*&SPWIZARD: set the new top line                                       *
  <tc>-top_line = l_tc_new_top_line.


endform.                              " COMPUTE_SCROLLING_IN_TC

*&---------------------------------------------------------------------*
*&      Form  FCODE_TC_MARK_LINES
*&---------------------------------------------------------------------*
*       marks all TableControl lines
*----------------------------------------------------------------------*
*      -->P_TC_NAME  name of tablecontrol
*----------------------------------------------------------------------*
form fcode_tc_mark_lines using p_tc_name
                               p_table_name
                               p_mark_name.
*&SPWIZARD: EGIN OF LOCAL DATA-----------------------------------------*
  data l_table_name       like feld-name.

  field-symbols <tc>         type cxtab_control.
  field-symbols <table>      type standard table.
  field-symbols <wa>.
  field-symbols <mark_field>.
*&SPWIZARD: END OF LOCAL DATA------------------------------------------*

  assign (p_tc_name) to <tc>.

*&SPWIZARD: get the table, which belongs to the tc                     *
  concatenate p_table_name '[]' into l_table_name. "table body
  assign (l_table_name) to <table>.                "not headerline

*&SPWIZARD: mark all filled lines                                      *
  loop at <table> assigning <wa>.

*&SPWIZARD: access to the component 'FLAG' of the table header         *
    assign component p_mark_name of structure <wa> to <mark_field>.

    <mark_field> = 'X'.
  endloop.
endform.                                          "fcode_tc_mark_lines

*&---------------------------------------------------------------------*
*&      Form  FCODE_TC_DEMARK_LINES
*&---------------------------------------------------------------------*
*       demarks all TableControl lines
*----------------------------------------------------------------------*
*      -->P_TC_NAME  name of tablecontrol
*----------------------------------------------------------------------*
form fcode_tc_demark_lines using p_tc_name
                                 p_table_name
                                 p_mark_name .
*&SPWIZARD: BEGIN OF LOCAL DATA----------------------------------------*
  data l_table_name       like feld-name.

  field-symbols <tc>         type cxtab_control.
  field-symbols <table>      type standard table.
  field-symbols <wa>.
  field-symbols <mark_field>.
*&SPWIZARD: END OF LOCAL DATA------------------------------------------*

  assign (p_tc_name) to <tc>.

*&SPWIZARD: get the table, which belongs to the tc                     *
  concatenate p_table_name '[]' into l_table_name. "table body
  assign (l_table_name) to <table>.                "not headerline

*&SPWIZARD: demark all filled lines                                    *
  loop at <table> assigning <wa>.

*&SPWIZARD: access to the component 'FLAG' of the table header         *
    assign component p_mark_name of structure <wa> to <mark_field>.

    <mark_field> = space.
  endloop.
endform.                                          "fcode_tc_mark_lines
*&---------------------------------------------------------------------*
*&      Module  USER_COMMAND_2003  INPUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
module user_command_2003 input.
  if sy-ucomm is not initial.
    leave to screen 0.
  endif.
endmodule.                 " USER_COMMAND_2003  INPUT
*&---------------------------------------------------------------------*
*&      Module  STATUS_2003  OUTPUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
module status_2003 output.
  set pf-status '2003'.
*  SET TITLEBAR 'xxx'.
endmodule.                 " STATUS_2003  OUTPUT
*&---------------------------------------------------------------------*
*&      Form  DICT_CHECK
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_P_OBJECT  text
*      <--P_LV_TYPE  text
*----------------------------------------------------------------------*
form dict_check  using    p_object
                 changing p_lv_type.
  data:
    ls_table    type ty_table,
    ls_dd40l    type dd40l,
    ls_dd04l    type dd04l,
    ls_seoclass type seoclass.

  clear p_lv_type.

  ls_table-tablename = p_object.
  perform table_description_get using ls_table-tablename changing ls_table-tabletitle.
  if sy-subrc = 0. "表、结构
    p_lv_type = 'TAB'.
  else.
    select single *
      into ls_dd40l
      from dd40l
      where typename = p_object.
    if sy-subrc = 0. "表类型
      p_lv_type = 'TTYP'.
    else.
      select single *
        into ls_dd04l
        from dd04l
        where rollname = p_object.
      if sy-subrc = 0.
        p_lv_type = 'DTEL'.
      else.
        select single *
          into ls_seoclass
          from seoclass
          where clsname = p_object.
        if sy-subrc = 0.
          p_lv_type = 'CLAS'.
        endif.
      endif.
    endif.
  endif.

endform.                    " DICT_CHECK
*&---------------------------------------------------------------------*
*&      Form  TTYP_GET
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_GT_TTYP  text
*----------------------------------------------------------------------*
form ttyp_get  tables
                                  p_gt_ttyp structure gt_ttyp
                                  p_gt_table structure gt_table.

  data:
    lv_name type ddobjname,
    lt_ttyp like table of gt_ttyp,
    lt_dtel like table of gt_dtel.

  loop at p_gt_ttyp where dd40v_wa is initial. "只取没取过的

    lv_name = p_gt_ttyp-typename.
    call function 'DDIF_TTYP_GET'
      exporting
        name          = lv_name
*       state         = 'A'
*       langu         = mv_language
      importing
        dd40v_wa      = p_gt_ttyp-dd40v_wa
      tables
        dd42v_tab     = p_gt_ttyp-dd42v_tab
*       dd43v_tab     = p_gt_ttyp-dd43v_tab
      exceptions
        illegal_input = 1
        others        = 2.
    if sy-subrc <> 0.
    endif.
    modify p_gt_ttyp.

*加结构(行类型)
    perform dict_add tables p_gt_table lt_ttyp lt_dtel using p_gt_ttyp-dd40v_wa-rowtype.

  endloop.

endform.                    " TTYP_GET
*&---------------------------------------------------------------------*
*&      Form  REP_FROM_SERVER
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      <--P_GT_REP[]  text
*----------------------------------------------------------------------*
form rep_from_server  changing p_gt_rep.
  data:
    lv_url      type text132 value '/acc/code/get_latest',
    lv_post_str type string.
  data lt_fields like table of gs_fields with header line.

  concatenate gv_namespace lv_url into lv_url.

*生成post数据
  if p_id is initial and ( p_repnam is initial or p_uname is initial ) and gv_init is initial.
    message '请使用 ID 或 资源库名+用户名 导入' type 'S' .
    leave list-processing and return to screen 0.
  endif.

  if p_id is initial.
    p_id = 0. "防止jsonObject异常
  endif.

  lt_fields-key = 'id'. lt_fields-value = p_id. append lt_fields.
  if gv_init = 'X'. "初始化
    lt_fields-key = 'name'. lt_fields-value = 'ZLAN_ACC'. append lt_fields.
    lt_fields-key = 'uname'. lt_fields-value = '小懒'. append lt_fields.
  else.
    lt_fields-key = 'name'. lt_fields-value = p_repnam. append lt_fields.
    lt_fields-key = 'uname'. lt_fields-value = p_uname. append lt_fields.
  endif.
  perform post_str_generate tables lt_fields changing lv_post_str.

*发送post请求
  perform http_post using lv_url lv_post_str.
endform.                    " REP_FROM_SERVER
*&---------------------------------------------------------------------*
*&      Form  POST_STR_GENERATE
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_LT_FIELDS  text
*      <--P_LV_POST_STR  text
*----------------------------------------------------------------------*
form post_str_generate  tables   p_lt_fields structure gs_fields
                        changing cv_str.
  data lv_sep.

  loop at p_lt_fields.
    concatenate cv_str lv_sep p_lt_fields-key ':\"' p_lt_fields-value '\"' into cv_str. "js内层双引号转义
    lv_sep = ','.
  endloop.

  concatenate 'post_str:"{' cv_str '}"' into cv_str.
endform.                    " POST_STR_GENERATE
*&---------------------------------------------------------------------*
*&      Form  REP_SEARCH
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
form rep_search .
  data:
    lv_url      type text132 value '/acc/code/search',
    lv_post_str type string.
  data lt_fields like table of gs_fields with header line.

  concatenate gv_namespace lv_url into lv_url.

*数据处理
  replace all occurrences of:
   '*' in p_id with '%',
   '*' in p_repnam with '%',
   '*' in p_text with '%',
   '*' in p_url with '%'.

*后面改动,不用标签和url作为查询条件了
  clear:p_tag,p_url.

*生成post数据
  lt_fields-key = 'id'. lt_fields-value = p_id. append lt_fields.
  lt_fields-key = 'text'. lt_fields-value = p_text. append lt_fields.
  lt_fields-key = 'url'. lt_fields-value = p_url. append lt_fields.
  lt_fields-key = 'tag'. lt_fields-value = p_tag. append lt_fields.
  lt_fields-key = 'name'. lt_fields-value = p_repnam. append lt_fields.
  lt_fields-key = 'uname'. lt_fields-value = p_uname. append lt_fields.

  perform post_str_generate tables lt_fields changing lv_post_str.

*发送post请求
  perform http_post using lv_url lv_post_str.

endform.                    " REP_SEARCH
*&---------------------------------------------------------------------*
*&      Form  RESPONSE_PARSE
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
form response_parse tables postdata using uv_action.
  data:
    ls_postdata   type cnht_post_data_line,
    lv_rtype,
    lv_rtmsg(256),
    lv_rep        type string,
    lv_string1    type string, "拼接的数据
    lv_string2    type string, "拆分临时数据
    lv_string3    type string, "拆分临时数据
    lv_result     type string, "查询返回的list集合
    lv_notif      type string. "通知

  data:begin of ls_notif,
         notif_time(30),
         c1(72),
         c2(72),
         c3(72),
         c4(72),
         c5(72),
       end of ls_notif.

  data lv_c value '&'. "r3的宏不能写 '&'

  case uv_action.
    when 'RESPONSE'.
*解析form数据
      loop at postdata into ls_postdata.
        concatenate lv_string1 ls_postdata into lv_string1.
      endloop.

      key_parse 'rtype=' lv_rtype.
      key_parse 'rtmsg=' lv_rtmsg.
      key_parse 'rep=' lv_rep.
      key_parse 'notif=' lv_notif.
      key_parse 'result=' lv_result.
*      call method cl_http_utility=>decode_base64 "表单提交会自动encode,返回时需要手动decode
*        exporting
*          encoded = lv_string1
*        receiving
*          decoded = lv_string1.
      replace all occurrences of '%26' in  lv_result with '&'. "不知道为什么base64会乱码 ,且不能在第一步替换

*通知
      split lv_notif at '*lan' into ls_notif-notif_time ls_notif-c1 ls_notif-c2 ls_notif-c3 ls_notif-c4 ls_notif-c5.
      export ls_notif = ls_notif
          to database indx(zz) id 'ZLAN_ACC_NOTIF'.

*消息
      message lv_rtmsg type 'S' display like lv_rtype .
      if lv_rtype = 'E'.
        leave to screen 0.
      endif.

*数据回写
      case 'X'.
*导入
        when p_import or gv_init.

          perform zip_to_data using lv_rep  changing gt_rep[].

*查询
        when p_search.
          do.
            split lv_result at '#lan' into lv_string2 lv_string3.
            split lv_string2 at '*lan' into gt_result-id gt_result-name gt_result-text gt_result-url gt_result-datum gt_result-uzeit
            gt_result-tag gt_result-uname gt_result-count.
            if gt_result-id is not initial.
              append gt_result.
            endif.

            if lv_string3 is initial.
              exit.
            else.
              lv_result = lv_string3.
            endif.
          enddo.
          sort gt_result by datum descending uzeit descending.
          loop at gt_result where url is not initial.
            gt_result-detail = icon_display_text.
            modify gt_result.
          endloop.
        when others.
      endcase.

    when others.

  endcase.

*销毁浏览器对象,否则可能出现卡死(测试发现是否卡死与是否debug有关)
  go_html_viewer->free(
    exceptions
      cntl_error        = 1
      cntl_system_error = 2
         ).
  if sy-subrc <> 0.
* Implement suitable error handling here
  endif.
  clear go_html_viewer.

  leave to screen 0. "触发事件相当于进了PAI
endform.                    " RESPONSE_PARSE
*&---------------------------------------------------------------------*
*&      Form  RESULT_OUTPUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
form result_output .
  if gt_result[] is initial.
    message '没有查询到数据' type 'S'.
    return.
  endif.

  perform fieldcat_build tables gt_fieldcat using 'ID' 'ID' space space space space space space space.
  perform fieldcat_build tables gt_fieldcat using 'NAME' '名称' space space space space space space space.
  perform fieldcat_build tables gt_fieldcat using 'TEXT' '描述' space space space space space space space.
  perform fieldcat_build tables gt_fieldcat using 'TAG' '标签' space space space space space space space.
  perform fieldcat_build tables gt_fieldcat using 'DETAIL' '长文本' space space space space space space space.
  perform fieldcat_build tables gt_fieldcat using 'UNAME' '用户' space space space space space space space.
  perform fieldcat_build tables gt_fieldcat using 'COUNT' '访问量' space space space space space space space.
  perform fieldcat_build tables gt_fieldcat using 'DATUM' '日期' space space space space space space space.
  perform fieldcat_build tables gt_fieldcat using 'UZEIT' '时间' space space space space space space space.

  loop at gt_fieldcat.
    if gt_fieldcat-fieldname = 'DETAIL'.
      gt_fieldcat-hotspot = 'X'.
      gt_fieldcat-icon = 'X'.
      modify gt_fieldcat.
    endif.
  endloop.

  gs_layout-cwidth_opt = 'X'.
  gs_layout-sel_mode = 'A'.
  gs_layout-zebra = 'X'.
  gs_layout-box_fname = 'SEL'.

  gs_grid_settings-edt_cll_cb = 'X'.

  call function 'REUSE_ALV_GRID_DISPLAY_LVC'
    exporting
      i_callback_program       = sy-repid
*     I_GRID_TITLE             = '错误检查'
      i_callback_pf_status_set = 'ALV_SET_STATUS'
      i_callback_user_command  = 'ALV_USER_COMMAND'
*     i_callback_top_of_page   = 'I_CALLBACK_TOP_OF_PAGE'
      i_grid_settings          = gs_grid_settings
      is_layout_lvc            = gs_layout
      it_fieldcat_lvc          = gt_fieldcat[]
      i_save                   = 'A'
      it_sort_lvc              = gt_sort[]
*     IT_EVENTS                = GT_EVENTS[]
*     IT_EVENT_EXIT            = GT_EVENT_EXIT[]
    tables
      t_outtab                 = gt_result.
endform.                    " RESULT_OUTPUT

*&---------------------------------------------------------------------*
*&      FORM  FRM_SET_STATUS
*&---------------------------------------------------------------------*
*       TEXT
*----------------------------------------------------------------------*
*      -->IT_EXTAB   TEXT
*----------------------------------------------------------------------*
form alv_set_status using it_extab type slis_t_extab.
  set pf-status 'RESULT_OUTPUT'.
endform.                    "FRM_SET_STATUS

*&---------------------------------------------------------------------*
*&      Form  ALV_USER_COMMAND
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->L_UCOMM          text
*      -->LV_DES_SELFIELD  text
*----------------------------------------------------------------------*
form alv_user_command using l_ucomm like sy-ucomm
      lv_des_selfield type slis_selfield.

  data lv_url type string.
  case l_ucomm.
    when '&IC1'. "双击
      read table gt_result index lv_des_selfield-tabindex.

      if lv_des_selfield-fieldname ne 'DETAIL'. "导入
        perform par_init.
        p_id = gt_result-id.
        p_import = 'X'.

        perform rep_from_server changing gt_rep[].
        perform rep_display tables gt_rep.
      else. "打开链接
        lv_url = gt_result-url.
        call method cl_gui_frontend_services=>execute
          exporting
            document = lv_url
          exceptions
            others   = 1.
      endif.

    when 'DELETE'.
      perform rep_delete.
  endcase.

  lv_des_selfield-col_stable = 'X'.
  lv_des_selfield-row_stable = 'X'.
  lv_des_selfield-refresh = 'X'.
endform.                    "ALV_USER_COMMAND
*&---------------------------------------------------------------------*
*&      Form  PAR_INIT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
form par_init .
  clear:p_id,p_repnam,p_text,p_url,p_search,p_export,p_import.
endform.                    " PAR_INIT
*&---------------------------------------------------------------------*
*&      Form  XSTRING_FROM_STRING
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_P_LV_PAR  text
*      <--P_LV_XSTRING  text
*----------------------------------------------------------------------*
form xstring_from_string  changing p_lv_par.
  data lv_xstring type xstring.

  call function 'SCMS_STRING_TO_XSTRING'
    exporting
      text     = p_lv_par
      encoding = '8400' "GBK
    importing
      buffer   = lv_xstring
    exceptions
      failed   = 1
      others   = 2.

  p_lv_par = lv_xstring.
endform.                    " XSTRING_FROM_STRING
*&---------------------------------------------------------------------*
*&      Form  XSTRING_TO_STRING
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      <--P_LV_TEXT_OUT  text
*----------------------------------------------------------------------*
form xstring_to_string  changing p_lv_string.
  data:
    lv_xstring type xstring,
    length     type i,
    l_cntbin   type sdokcntbins.

  lv_xstring = p_lv_string.

*转二进制
  call function 'SCMS_XSTRING_TO_BINARY'
    exporting
      buffer        = lv_xstring
    importing
      output_length = length
    tables
      binary_tab    = l_cntbin.
  if sy-subrc = 0.
*转string
    if gv_codepage = '8400'.
      call function 'SCMS_BINARY_TO_STRING'
        exporting
*         encoding      = '8400' "R3没有这个参数
          input_length  = length
        importing
          text_buffer   = p_lv_string
          output_length = length
        tables
          binary_tab    = l_cntbin
        exceptions
          failed        = 1
          others        = 2.
    else. "ecc和国际营销是4102
      call function 'SCMS_BINARY_TO_STRING'
        exporting
          encoding      = '8400' "R3没有这个参数
          input_length  = length
        importing
          text_buffer   = p_lv_string
          output_length = length
        tables
          binary_tab    = l_cntbin
        exceptions
          failed        = 1
          others        = 2.
    endif.

  endif.
endform.                    " XSTRING_TO_STRING
*&---------------------------------------------------------------------*
*&      Form  REP_OBJECT_DISPLAY
*&---------------------------------------------------------------------*
* 展示rep单个对象
*----------------------------------------------------------------------*
*      -->P_NODE_KEY  text
*----------------------------------------------------------------------*
form object_display  using    p_node_key.

*代码编辑器
  data:
    abaptext_tab  like abaptxt255 occurs 0 with header line,
    titletext(80) type c.

*其他
  data:
    ls_func type ty_func,
    ls_dict type ty_table.

  loop at gt_rep.
    if gt_rep-code-node-key = p_node_key. "程序
      concatenate '程序' gt_rep-program into titletext.
      abaptext_tab[] = gt_rep-code-code.
      exit.
    else. "其他对象
      loop at gt_rep-func into ls_func where node-key = p_node_key. "函数
        concatenate '函数' ls_func-functionname into titletext.
        abaptext_tab[] = ls_func-new_source.
        exit.
      endloop.
      loop at gt_rep-dict into ls_dict where node-key = p_node_key. "表
*        data(lv_type) = 'DICT'.
      endloop.
    endif.
  endloop.

  if titletext is not initial. "代码
*    editor-call for abaptext_tab  title titletext display-mode.
    insert report 'ZLAN_ACC_TMP_CODE'
      from abaptext_tab[].
    call function 'EDITOR_PROGRAM'
      exporting
        appid   = 'PG'
        display = 'X'
        program = 'ZLAN_ACC_TMP_CODE'
        message = 'lan:仅展示代码,如要执行需生成对象'.
*  elseif lv_type = 'DICT'. "表、结构、视图
*    perform table_display tables gt_rep-dict using '$TMP'.
  else.
    message '只做了程序和函数的代码展示,其他对象还没做' type 'S'.
  endif.

endform.                    " REP_OBJECT_DISPLAY
*&---------------------------------------------------------------------*
*&      Form  INITIALIZE
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
form initialization .
  data:
    lt_callstack type sys_callst.

  perform data_initialize.

*数据初始化
  sscrfields-functxt_01 = '@6C@ 注册'. "查找图标名称:SE11 TYPE-POOLS:ICON

  if p_debug = 'X'.
    gv_namespace = 'http://lan.s1.natapp.cc'.
  else.
    gv_namespace = 'http://47.104.139.116:8080/'.
  endif.

*初始化
  perform screen_get tables gt_screen using 'ZLAN_ACC'.
  read table gt_screen with key header-screen = '2002'.
  if sy-subrc ne 0.
*初始化
    perform rep_init.
    clear:gt_screen,gt_screen[].
  endif.

endform.                    " INITIALIZE
*&---------------------------------------------------------------------*
*&      Form  INIT_SCREEN_SET
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
form init_screen_set .
  data:
    lv_program    like gt_rep-program,
    lv_package    like gv_package,
    lt_screen     type table of ty_dynpro with header line,
    ls_flow_logic type line of swydyflow.

  lv_program = sy-repid.

  lt_screen-header-program = lv_program.
  lt_screen-header-screen = '2002'.
  lt_screen-header-type = 'M'.
  lt_screen-header-lines = '6'.
  lt_screen-header-columns = '51'.

  ls_flow_logic = 'PROCESS BEFORE OUTPUT.'.
  append ls_flow_logic to lt_screen-flow_logic.
  ls_flow_logic = 'MODULE STATUS_2002.'.
  append ls_flow_logic to lt_screen-flow_logic.
  ls_flow_logic = 'PROCESS AFTER INPUT.'.
  append ls_flow_logic to lt_screen-flow_logic.
  ls_flow_logic = 'MODULE USER_COMMAND_2002.'.
  append ls_flow_logic to lt_screen-flow_logic.

  lt_screen-node-sel = 'X'.
  append lt_screen.

  perform screen_set tables  lt_screen using lv_program lv_package. "创建屏幕,屏幕包入请求
endform.                    " INIT_SCREEN_SET
*&---------------------------------------------------------------------*
*&      Form  selection_screen_pbo
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
form selection_screen_pbo .

  data itab type table of sy-ucomm.
  data:begin of ls_notif,
         notif_time(30),
         c1(72),
         c2(72),
         c3(72),
         c4(72),
         c5(72),
       end of ls_notif.
  data lo_ref type ref to cx_root. "异常处理
  data lv_text type string.

*屏幕字段
  case sy-dynnr.
    when '1000'.
      loop at screen.
*密码不可见
        if screen-name = 'P_PASSWD'.
          screen-invisible  = '1'.
        endif.
*必输
        if p_export = 'X' and ( screen-name = 'S_PROG-LOW' or screen-group1 = 'M3' ).
          screen-required = '2'.
        endif.
*隐藏
        case 'X'.
          when p_search.
            if screen-group1 is not initial and screen-group1 ne 'M1' and screen-group1 ne 'M3'
            and screen-group1 ne 'M4'
              or screen-name = 'P_FILE'.
              screen-active = 0.
            endif.
            p_server = 'X'.
            p_file = ''.
          when p_export.
            if screen-group1 is not initial and screen-group1 ne 'M2' and screen-group1 ne 'M4'.
              screen-active = 0.
            endif.
            if p_server = 'X' and screen-group1 = 'M3'. "导出云端需要输入用户名密码
              screen-active = 1.
            endif.
            if p_file = 'X' and screen-group1 = 'M4'. "导出本地不需要输入描述
              screen-active = 0.
            endif.
          when p_import.
            if screen-group1 is not initial.
              screen-active = 0.
            endif.
          when others.
        endcase.

        modify screen.
      endloop.
    when '2005'. "注册
*去掉弹出选择屏幕按钮
      append 'GET' to itab. "获取变式
*执行
      call function 'RS_SET_SELSCREEN_STATUS'
        exporting
          p_status  = '2005'
        tables
          p_exclude = itab.
    when others.
  endcase.

*通知
  try.
      import ls_notif = ls_notif
          from database indx(zz) id 'ZLAN_ACC_NOTIF'.
    catch cx_root into lo_ref.
      lv_text = lo_ref->get_text( ).
      message '获取 关于 异常' type 'S'.
  endtry.
  gv_c1 = ls_notif-c1.
  gv_c2 = ls_notif-c2.
  gv_c3 = ls_notif-c3.
  gv_c4 = ls_notif-c4.
  gv_c5 = ls_notif-c5.
  gv_notif_time = ls_notif-notif_time.


endform.                    " selection_screen_pbo
*&---------------------------------------------------------------------*
*&      Form  USER_REGISTER
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
form user_register .
  data:
    lv_url      type text132,
    lv_post_str type string.
  data lt_fields like table of gs_fields with header line.

  if gv_uname is initial or gv_paswd is initial
    or gv_phone is initial or gv_email is initial.
    message '必填数据不能为空' type 'E'.
  endif.

*生成post数据
  lt_fields-key = 'uname'. lt_fields-value = gv_uname. append lt_fields.
  lt_fields-key = 'passwd'. lt_fields-value = gv_paswd. append lt_fields. "注意这里少一个w
  lt_fields-key = 'phone'. lt_fields-value = gv_phone. append lt_fields.
  lt_fields-key = 'email'. lt_fields-value = gv_email. append lt_fields.
  perform post_str_generate tables lt_fields changing lv_post_str.

  concatenate gv_namespace '/acc/user/register' into lv_url.

*发送post请求
  perform http_post using lv_url lv_post_str.

endform.                    " USER_REGISTER
*&---------------------------------------------------------------------*
*&      Form  USER_CHECK
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
form user_check .
  data:
    lv_url      type text132,
    lv_post_str type string.
  data lt_fields like table of gs_fields with header line.

*生成post数据
  lt_fields-key = 'uname'. lt_fields-value = gv_uname. append lt_fields.
  perform post_str_generate tables lt_fields changing lv_post_str.

  concatenate gv_namespace '/acc/user/check' into lv_url.

*发送post请求
  perform http_post using lv_url lv_post_str.
endform.                    " USER_CHECK
*&---------------------------------------------------------------------*
*&      Form  SELECTION_SCREEN_PAI
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
form selection_screen_pai .
  case sy-dynnr.
    when  '1000'.
      if sy-ucomm = 'FC01'. "调用注册屏幕
        call selection-screen 2005.
*  starting at 30 10 ending at 120 20.
      endif.
    when '2005'.
      perform email_validate.

      if sy-ucomm = 'CHECK'. "检查
        perform user_check.
      elseif sy-ucomm = 'CRET'. "创建
        perform user_register.
      endif.
    when others.
  endcase.


endform.                    " SELECTION_SCREEN_PAI
*&---------------------------------------------------------------------*
*&      Form  EMAIL_VALIDATE
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
form email_validate .

endform.                    " EMAIL_VALIDATE
*&---------------------------------------------------------------------*
*&      Form  REP_DELETE
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_LT_REPID  text
*----------------------------------------------------------------------*
form rep_delete .

  data:
    lv_url      type text132,
    lv_post_str type string.
  data lt_repid like table of gt_repid with header line.

*提示确认
  call function 'POPUP_TO_CONFIRM'
    exporting
      titlebar       = '确认删除'
      text_question  = '删除后不可恢复,是否确认'
      text_button_1  = '是'
      icon_button_1  = ' '
      text_button_2  = '否'
      icon_button_2  = ' '
    exceptions
      text_not_found = 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.
  if sy-ucomm = 'OPT1'. " If you click 'YES' button it will execute
*    elseif sy-ucomm = 'OPT2'. " If you click 'NO' button it will execute
  else. " If you click 'CANCEL' button it will execute
    return..
  endif.

  if p_passwd is initial.
    message '密码不能为空' type 'E'.
  endif.

  loop at gt_result where sel = 'X'.
    if gt_result-uname ne p_uname.
      message '只能删除自己的资源库' type 'E'.
    endif.

    lt_repid-id = gt_result-id.
    append lt_repid.

    delete gt_result.
  endloop.

  if lt_repid[] is initial.
    message '至少选中一行' type 'E'.
  endif.

*生成post数据
  concatenate gv_namespace '/acc/code/delete' into lv_url.

  concatenate p_uname ',' into lv_post_str. "前两行用用户名密码
  concatenate lv_post_str p_passwd ',' into lv_post_str.
  loop at lt_repid.
    concatenate lv_post_str lt_repid-id ',' into lv_post_str.
  endloop.
  shift lv_post_str right deleting trailing ','.
  condense lv_post_str.
  concatenate 'post_str:"' lv_post_str '"' into lv_post_str.


*发送post请求
  perform http_post using lv_url lv_post_str.

endform.                    " REP_DELETE
*&---------------------------------------------------------------------*
*&      Form  CODE_SCAN_SQL
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_P_GT_CODE  text
*      -->P_P_GT_TABLE  text
*----------------------------------------------------------------------*
form code_scan_sql  tables
                                  p_gt_code structure gs_codes
                                  p_gt_table structure gt_table.

  data: lt_tokens type standard table of stokes with header line.
  data: lt_statements type standard table of sstmnt with header line.
  data: lt_keywords type standard table of text20 with header line.
  data: ls_table type ty_table.
  data lt_ttyp type table of ty_ttyp with header line.
  data lt_dtel type table of ty_dtel with header line.

  append 'INSERT' to lt_keywords.
  append 'MODIFY' to lt_keywords.
  append 'UPDATE' to lt_keywords.
  append 'DELETE' to lt_keywords.
  append 'SELECT' to lt_keywords.

  scan abap-source p_gt_code
  tokens into lt_tokens
  statements into lt_statements
  keywords from lt_keywords.

  sort lt_tokens ascending by str.
  delete lt_tokens where str = 'TABLES'.

  loop at lt_tokens.
    try.
        if ( lt_tokens-str+0(1) <> 'Y' and lt_tokens-str+0(1) <> 'Z' ).
          continue.
        endif.
      catch cx_sy_range_out_of_bounds into cx_root.
    endtry.
    ls_table-tablename = lt_tokens-str.
    perform dict_add tables p_gt_table lt_ttyp lt_dtel using ls_table-tablename. "lt_ttyp和lt_dtel只是为了凑数
  endloop.

endform.                    " CODE_SCAN_SQL
*&---------------------------------------------------------------------*
*&      Form  REP_DICT_NAME_GET
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_GT_TABLE  text
*      -->P_GT_TTYP  text
*      -->P_GT_DTEL  text
*      -->P_LS_REP_PROGRAM  text
*----------------------------------------------------------------------*
form rep_dict_name_get  tables
                        p_gt_table structure gt_table
                        p_gt_ttyp structure gt_ttyp
                        p_gt_dtel structure gt_dtel
                        p_gt_class structure gt_class
                        using p_ls_rep type ty_rep.

*按程序和函数抓
  data lt_wbcrossgt  like table of wbcrossgt  with header line.
  data ls_func like gt_func.
  data lv_include   type rs38l-include.

  if p_ls_rep-type = 'F'.
    loop at p_ls_rep-func into ls_func.
      call function 'FUNCTION_INCLUDE_INFO'
        changing
          funcname            = ls_func-functionname
          include             = lv_include
        exceptions
          function_not_exists = 1
          include_not_exists  = 2
          group_not_exists    = 3
          no_selections       = 4
          no_function_include = 5.

      perform dict_name_get_by_progname tables lt_wbcrossgt using lv_include.
    endloop.
  elseif p_ls_rep-type = 'C'. "class
    concatenate p_ls_rep-program '=%' into p_ls_rep-program.
    select *
    from wbcrossgt
    appending corresponding fields of table lt_wbcrossgt
    where include like p_ls_rep-program and otype = 'TY'.
  else. "程序
    perform dict_name_get_by_progname tables lt_wbcrossgt using p_ls_rep-program.
  endif.

  loop at lt_wbcrossgt.
    if lt_wbcrossgt-name cs '\' or ( lt_wbcrossgt-name(1) ne 'Z' and lt_wbcrossgt-name(1) ne 'Y' ).
      continue.
    endif.
*    perform dict_add tables p_gt_table p_gt_ttyp p_gt_dtel using lt_wbcrossgt-name.
    perform dict_class_add tables p_gt_table p_gt_ttyp p_gt_dtel p_gt_class using lt_wbcrossgt-name.
  endloop.

**按程序和函数组抓
*  data lt_d010tab  like table of d010tab  with header line.
*
*  select *
*    into corresponding fields of table lt_d010tab
*    from d010tab
*    where master = p_program.
*
*  loop at lt_d010tab.
*    if lt_d010tab-tabname(1) ne 'Z'.
*      continue.
*    endif.
*    perform dict_add tables p_gt_table p_gt_ttyp p_gt_dtel using lt_d010tab-tabname.
*  endloop.

endform.                    " REP_DICT_NAME_GET
*&---------------------------------------------------------------------*
*&      Form  DICT_NAME_GET_BY_PROGNAME
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_LT_WBCROSSGT  text
*      -->P_LV_INCLUDE  text
*----------------------------------------------------------------------*
form dict_name_get_by_progname  tables   p_lt_wbcrossgt structure wbcrossgt
                                using    p_lv_include.

  select *
      appending corresponding fields of table p_lt_wbcrossgt
      from wbcrossgt
      where otype = 'TY' and include = p_lv_include.

endform.                    " DICT_NAME_GET_BY_PROGNAME
*&---------------------------------------------------------------------*
*&      Form  REP_INIT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
form rep_init .
  data:
    lv_package  like tadir-devclass value '$TMP',
    lv_ques(50).

  lv_ques = '即将开始程序初始化,请选择同步服务器还是本地文件?'.
  call function 'POPUP_TO_CONFIRM'
    exporting
      titlebar       = '初始化'
      text_question  = lv_ques
      text_button_1  = '服务器(推荐)'
      icon_button_1  = ' '
      text_button_2  = '本地文件'
      icon_button_2  = ' '
    exceptions
      text_not_found = 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.
  if sy-ucomm = 'OPT1'.
    p_server = 'X'.
  elseif sy-ucomm = 'OPT2'.
    p_file = 'X'.
  else. " If you click 'CANCEL' button it will execute
    message '已取消操作' type 'S'.
    return.
  endif.

  gv_init = 'X'.
  if p_file = 'X'.
    perform rep_upload changing gt_rep[].
  elseif p_server = 'X'.
*创建post屏幕
    perform init_screen_set.
    perform rep_from_server changing gt_rep[].
  endif.
  perform rep_sel_all tables gt_rep.
  perform rep_set tables gt_rep changing lv_package.

  message '初始化完毕' type 'S'.
  call transaction 'SE38'.

  clear gv_init.
endform.                    " REP_INIT

*&---------------------------------------------------------------------*
*&      Form  EXEC_CHECK
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
form exec_check .
  if p_comp = 'X'. "编译
    leave program.
  endif.
endform.                    " EXEC_CHECK

*&---------------------------------------------------------------------*
*&      Form  CLASS_GET
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_GT_CLASS  text
*----------------------------------------------------------------------*
form class_get  tables   p_gt_class structure gt_class.

  data: lo_source type ref to cl_oo_source.
  data: lo_source_new type ref to object,
        lo_instance   type ref to object.
  data:
    ls_clskey type seoclskey,
    lt_source type standard table of string with default key.

  loop at p_gt_class.
    ls_clskey-clsname = p_gt_class-clsname.

*描述
    call function 'SEO_CLIF_GET'
      exporting
        cifkey       = ls_clskey
        version      = seoc_version_active
      importing
        class        = p_gt_class-class
      exceptions
        not_existing = 1
        deleted      = 2
        model_only   = 3
        others       = 4.
    if sy-subrc = 1.
      return. " in case only inactive version exists
    elseif sy-subrc <> 0.
    endif.

*source
*-------------------------------------------------------
*18.03.2021 13:53:16 chenyl for 之前测试ok,s4升级之后不让用这个了? SAP_ABA  75D 0004
    data lo_ref type ref to cx_root. "异常处理
    data lv_text type string.
    try .
*新的方法
        call method ('CL_OO_FACTORY')=>('CREATE_INSTANCE')
          receiving
            result = lo_instance.

        call method lo_instance->('CREATE_CLIF_SOURCE')
          exporting
            clif_name = ls_clskey-clsname
            version   = 'A'
          receiving
            result    = lo_source_new.

        call method lo_source_new->('GET_SOURCE')
          importing
            source = lt_source.
      catch cx_root into lo_ref.
        lv_text = lo_ref->get_text( ).
*老的方法
        " Do not use this class any more! Use cl_oo_factory=>create_instance( )->create_clif_source( ) instead! Thanks!
        create object lo_source
          exporting
            clskey             = ls_clskey
          exceptions
            class_not_existing = 1
            others             = 2.
        if sy-subrc <> 0.
*      lcx_exception=>raise( 'error from CL_OO_SOURCE' ).
        endif.
        lo_source->read( 'A' ).
        lt_source = lo_source->get_old_source( ).
    endtry.
*-------------------------------------------------------
    p_gt_class-t_source = lt_source.
    modify p_gt_class.
  endloop.

endform.                    "class_get
*&---------------------------------------------------------------------*
*& Form SCREEN_CHECK
*&---------------------------------------------------------------------*
*& text
*&---------------------------------------------------------------------*
*& -->  p1        text
*& <--  p2        text
*&---------------------------------------------------------------------*
form screen_check .
  if p_export = 'X' and ( s_prog[] is initial ).
    message '填写必输字段' type 'S' display like 'E'.
    leave list-processing and return to screen 0.
  endif.
endform.                    "screen_check


SAP-Garson
原文链接:https://blog.csdn.net/cylcylcylcylwo/article/details/122408219

文章来自于网络,如果侵犯了您的权益,请联系站长删除!

上一篇:win7系统数据库服务器,win7安装数据库服务器
下一篇:那个网站的服务器不限制内容,不限内容的服务器
评论列表

发表评论

评论内容
昵称:
关联文章

ZLAN_ACC代码
ZLAN_ACC V1.5 使用说明
SAP BAPI_ACC_DOCUMENT_POST增强字段
SAP ABAP BAPI_ACC_DOCUMENT_POST 创建会计凭证
【ABAP系列】SAP ABAP 资产类BAPI过账 BAPI_ACC_DOCUMENT_POST
抓取代码代码
HANA VIEW多行内容合并到一列--STRING_ACC函数
SAP ABAP BAPI_ACC_DOCUMENT_POST创建会计凭证常见错误:1.借贷不平衡;2.FI/CO接口:多次输入的行项目
SAP-ABAP-代码扫描
ABAP Editor - 代码编辑
SAP 代码搜索程序
隐藏ABAP代码
ABAP 事务代码
SAP中锁定事务代码
SAP GUI设置显示键值 技术代码 TCODE代码
SAP ABAP代码下载 备份
JS逆向|JavaScript代码改写成Python代码之小试牛刀
SAP常用事务代码
SAP 程序下载代码1
sap 常用事务代码

热门标签
CBP 问题处理 # ALV # 【SAP | 前世今生】 # 1.moonsec-2020-[持续更新] # ABAP # ABAP-接口 # abap学习路线 # ALV # AVRCP协议 # bdc # BMS项目实战记录 # BW # ClickHouse # crud 框架 (mybatis-plus/ jpa等) # dynpro # ERP # JCo3.0 # PyRFC # Python数据分析与机器学习 # SAP ABAP # SAP FICO # SAP FTP # SAP HANA # SAP MM # SAP-Restful # SAP消息号A类 # sap应用技巧 # 工具使用 # 数据库 # 网安神器篇 # 优化篇 # 语法 # 筑基08:渗透测试综合实验 (path.Combinee(rootDir, "nwrfcsdk", "icuuc50")) ,ides .NET .NET 6 .NET Core .NET Remoting和WebServices .net(C#) .NET/C# .netcore .NET技术 .NET连接SAP .UD选择集 /h /ui2/cl_json @click.prevent _E8_AE_BA_E6_96_87 ~ { ABAP} ~ ~{一起学ABAP}~ “SAP.Middleware.Connector.RfcConfigParameters”的类型初 《ABAP专栏》 《SAP ABAP基础通关百宝书》【从入门到精通】 《测绘程序设计精品案例合集》 《计算机网络自顶向下方法》学习笔记 【Azure 应用服务】 【SAP】ABAP-CDSVIEW 【速成之路】SQLserver 0.0-SAP BW学习 001-计算机基础 01检验类型 1 10.Abap 10.ABAP-CTS 102 1024程序员节 103 1155服务器装系统 12.SAP-SKILL 122 13台根服务器位置 15行 1809 1909 1核1g1m服务器相当于什么性能 2003服务器修改ftp密码 2010 2012服务器系统安装数据库 2012服务器系统安装数据库吗 2018年终总结 2019 2019java专科 2019年终总结之SAP项目实践篇 2022跨年烟花代码 2022年 2023云数据库技术沙龙 2023云数据库技术沙龙 “MySQL x ClickHouse” 专场 2-step picking 2-step拣配 2月一次的flyback 321 32位服务器系统安装教程 3D 40 408 408——计算机网络 408学习笔记 40位 478g+ 虚拟服务器 4hana 545移动类型 5G 6.824 60.技术开发 6------SAP 701 711 740新语法 7------SAP A a2dp AA AB01 ABAP ABAP 语法 ABAP AES加密解密 ABAP ALV abap alv 更改数据 abap alv新增行数据 ABAP AMDP abap bapi ABAP BAPI分享 ABAP BASE64加解密 ABAP BC400 ABAP CDS ABAP checkbox ABAP Dialog开发 ABAP DOI ABAP EXCEL ABAP Expression ABAP GUID ABAP Handy program abap hr ABAP IDOC abap java ABAP JSON ABAP JSON大小写 ABAP JSON驼峰 abap me21n增强 abap mm后台表 ABAP Modify 的用法 ABAP New ABAP REST API ABAP REST JSON ABAP RSA PSE ABAP RSA 加密解密 ABAP SAP ABAP SESSION传递 ABAP SMARTFORMS 默认 WORD 编辑 ABAP Table ABAP Toolbar ABAP tools ABAP wait abap xml 日期格式 ABAP 报错 ABAP 笔记 ABAP 常见错误 ABAP 程序开发 abap 程序模板 ABAP 初级技术 abap 创建出口历程 abap 调用java abap 发送json报文 ABAP 关键字 ABAP 基础知识 ABAP 技巧 ABAP 接口 ABAP 开发 ABAP 乱乱记 ABAP 内表 ABAP 内表 排序 abap 内表 条件查找 ABAP 配置相关 ABAP 批量创建货源清单 ABAP 屏幕开发激活显示 ABAP 人事模块 abap 上传excel数字去除千分符 ABAP 实用程序记录 ABAP 事务代码 ABAP 数据字典 ABAP 替换 ABAP 替换字符 ABAP 条件断点 DEBUG ABAP 未按大小排序 ABAP 销售模块 ABAP 新语法 ABAP 选择屏幕 ABAP 学习 ABAP 学习笔记 ABAP 一些常用技巧 ABAP 语法备忘 ABAP 增强 abap 指定长度服务器上传数据 ABAP 中级技术 abap 转换成字符串 ABAP 字符查找 abap 字符串操作 ABAP  屏幕流 ABAP 开发模块 ABAP/4 ABAP_01 ABAP_02 ABAP_BASIS ABAP_FUNCTION MODULE ABAP_OTHERS ABAP_SYNTAX ABAP_各路小技能 ABAP2XLSX ABAP4 ABAP7.50 ABAP740新语法 abapdata定义方法 abaper ABAP-FICO ABAP报表程序结构框架 ABAP报错 abap捕获当前功能键sy ABAP查找代码块 ABAP常用代码段 ABAP程序例子 ABAP初级 ABAP创建搜索帮助 ABAP打印 ABAP的BAPI ABAP调优 LOOP ABAP定时job abap动态变量 ABAP动态修改屏幕 abap读取sap服务器文件名 abap对接外围系统 abap分页 ABAP工具 ABAP关键字 ABAP函数 abap获取日期 ABAP基础 abap基础入门 ABAP基础语法 ABAP基础知识 ABAP技能树 ABAP技巧之游标 ABAP技术 abap技术栈 ABAP加密 ABAP-接口 ABAP开发 ABAP开发回顾总结 ABAP开发随便记录 ABAP开发学习 ABAP开发语言 abap开发注释快捷键 ABAP开源项目清单 ABAP快捷键 abap连接mysql ABAP模块 ABAP内表汇总 abap判断包含字符当中包含小数点 ABAP屏幕相关 ABAP其他增强 ABAP入门 ABAP时间戳 ABAP实例分享 ABAP使用技巧 abap视图字段限制 ABAP数据库删除 abap数据类型转换 ABAP四代增强 ABAP四舍五入 ABAP随笔 ABAP提取汉字 abap文件上传 abap文件下载导出 ABAP问题记录 abap系列 ABAP相关 ABAP小工具 ABAP小记 ABAP小技巧 ABAP校验时间日期格式 abap新语法 ABAP新语法汇总 ABAP新语法收集整理 ABAP修改删除数据 ABAP选择屏幕 ABAP选择屏幕开发 ABAP学习 ABAP学习记录 ABAP学习实用网址 abap语法 ABAP语法优化 ABAP语言 ABAP增强 ABAP知识点总结 ABAP指针 ABAP中RANGES的用法 ABAP中的同步和异步调用 abap字符串值变量 Abaqus ABLDT ABLDT_OI ABMA AC_DOCUMENT Account Group ACDOCA Activate ADD NEW FONT ADO.NET Adobe Form ADT AES AFAB/AFABN AFAMA AG1280 AirByte AJAB ajax AL11 ALE all in one Allocation Rule ALV ALV List ALV SEL_MODE alv 刷新 ALV报表 ALV横列单元格颜色 ALV模板 ALV鼠标右键 alv下拉 alv显示基础 ALV知识点 AMDP amp AMS系列产品 android android studio Android9设备打开WIFI热点 android不同版本风格 android模拟器 android热点流程 Android网络接入框架分析 Android系统开发 Angular angular.js ANSYS Ant Anywhere数据库监控 AO25 aof apache Apache DolphinScheduler API api document APM APO APO函数 APO开发 app App Service for Window application app测试 app服务器设计文档 app服务器数据库文件夹下 aps APT Architecture Archiving Area Menu arm arraylist ar路由器的虚拟服务器 ASAP asp.net asp.net MVC Assortment ATO Attribute AuCs authorization Automatic AutomaticScrg automation AVForamt AW01N Awesome Java awk awr AWS AWS SAP AWS SAP认证 aws认证 AWS战报 Azure Azure Storage B2B增长 Backflush BADI BANK Bank Account BAPI bapi sap 创建物料 BASE base64 bash BASIS Basis Consultant Questionnaire BASIS基础知识 BASIS模块 BASIS系统配置及操作 BASIS中遇到的问题 batch Batch Data Conversion BD87 BDC bdv021-clickHouse Beginning WF 4.0翻译 BGP路由器协议排错 bgRFC BI BI+BW+BO仓库管理 big data BigData ble bluetooth BO BOBF bom bom成本分析模型 bom更改编号 sap books bookv001——navigationing Boost完整实战教程 bootstrap BOPF BP BPC BPC开发 BP共用编码 BP和客商关联后台表 BP-客商 BP配置 bp配置 sap BP文档 break BRF+ BRFplus BSP BSTAT=U bt BTE BTEs BTP BUG BUG问题解决 BulkStorage BurpSuite插件 Business Suite BusinessPartner BUT000 BW BW/4 HANA BW4 bw4/ hana BW4/HANA BW4HANA BW报表使用操作手册 BW技术 BW建模 BW实施 ByteDance C# C# IO相关 C# sap集成 C# WPF C# 编程 C# 窗体应用 C# 读取txt文本数据 C# 读取文本每行每列数据 C# Stopwatch C#Winform C#编程 C#高级 C#格式转化 C#基础 C#基础知识 C#教程 C#入门经典 C#算法演义 c#学习 C#知识点笔记 C/4 C/4HANA c/c++ C++ C4C CA CS CO cad项目数据库服务器 Calculation CapacityCheck case when Cash Management cast CA周记 CBS CCNP题库 CDISC CDS CDS View CDS Views CDS视图 Cell Popin centos certificate CertificateType Change Log ChatGPT CHECK_ACCESS_KEYS CHECKBOX CheckBoxGroup Check按钮 chrome CI & CD CIO ci上传文件到不同服务器 cj20n sap 报错未知列的名称 CKM3 CKMLCP CL_GUI_ALV_GRID cl_ukm_facade Class ClickHouse clickhouse数据库 Client Copy CLIENTCOPY Cloud Cloud Native Cloud Platform CloudFoundry CMS CMU15-445 (Fall 2019) CO CO01 co88 sap 实际结算 COCA单词表 COCA高频单词 COCA核心词汇 COCA英语分频词汇 COCA英语语料库 CO-CCA CODE COGI COKEY Commerce Commvault Commvault技术知识点 Configuration connect_by_path ContentServer continue Control ControlQuantity CONV Conversion COPA COPC COPY来源 Cording Block Core Data Service(CDS View) CO控制 CO配置 CPI CPI技术小知识 CPLD CPM cpu CRM CRM系统 crm系统服务器要求 cross warehouse Crystal Reports CS CSharp CSI SAP2000 CSI SAP2000安装教程 css css3 CSV认证 CTCM ctf CTF-MISC CTF-Misc-wp CTS Customers CVI_CUST_LINK CVI_VEND_LINK C和C++Everything教程 C语言 C语言程序设计 Dapr Data Services Data sources database datagridview dataTable交换列 dataTable列操作 DATAX date DateNavigator DB DB LUW DB2 dba DBA 实战系列 DBCO DD08V DDIC DDS算法 debian debian云服务器项目 Debug debug方法 DEBUG改SAP表数据 Decal Decline demo DEMO程序 des DESADV DESTINATION DestinationProvider devexpress v22.1 devops DevSecOps DIalog Dictionary Encoding Diff discuz服务器系统 disk dms dns怎么修改默认服务器 docker docker容器 dom dont show this message again Driver E5调用API E5开发者 E5续订 EBS Ecc ECC_常用标准函数标准方法 ECC6 ECC6是否支持linux7 echarts eclips Eclipse eclipse报错 ECM ecmascript ECM企业管理 ecn EDI EDIT Ehancement EHP EHP4 EHP8 elasticsearch elementui ELT emqx English Enhancement enhancement MBCF0007 Enterprise Servers and Development Entity Linking Enumeration EOS空项目添加服务器 EPIC EPIC_PROC epoll EPPM erp erp oracle数据库连接失败 ERP 增强 erp5 ERP-SAP erp服务器系统分区多大 ERP供应链 ERP实施 erp无线架设服务器 ERP系统 erp系统 服务器在哪里的 ERP项目 ERP小讲堂 es6 esb ESP8266 esri ESXI ETBAS二次开发 eth节点计划服务器维护 ETL etl工程师 ETL工具 ETL开发规范 ETL社区版 ETL数据集成 ETO events EWM EWM模块 Example examples EXCEL Excel服务器数据库修改 Exception EXCLUDING express F.13 F-02 F110 F5080 FAA_CMP_LDT FAGL_FC_VAL FAGLGVTR FB05 FBB1 FBL1N ffmpeg FI FI01 FI12 FI12_HBANK FI-AA FICO fico bapi FICO Integration FICO-AA FICO模块 FICO-年结 FICO问题点 FICO-月结 FICO增强 field-symbols fifaol服务器不稳定 file Fine finereport FINSC_LEDGER Fiori fiori 2.0 fiori app configuration fiori launchpad Fiori-Web FIORI配置 Fixed point arithmetic FixedStorageBin FI财务 FI金额 FI配置 FLCU00 flex FLVN00 FM Focus FONT FONTS For FOR ALL ENTRIES IN FPGA fpga开发 FPGA项目例子总结 FPM framework freemarker Freight标签页 freshman to ABAP FS15会计科目扩充 FTP ftp 网页如何上传到服务器 ftp传输文件到其他服务器 ftp服务器存放文档 ftp服务器端文件大小设置 ftp服务器设置上文件大小 ftp服务器生成xml文件 FTP服务器收不到传送的文件 ftp服务器数据存放位置 ftp服务器文件路径怎么写 ftp服务器限制文件大小 function Function ALV Function Modules functional programming Functions Game Gartner Gateway GATEWAY100 GBase gdal GeneXus GeneXus 2021 gentoo 安装php7 GeoTools GET Parameter GIS Git github Gizmos gnu go google Google 微软 亚马逊 阿里 腾讯 字节跳动面试总结 GR GR Date GR/IR GR/IR余额清单 GRaph Process groovy GroupNumber gui GUI STATUS gui740的消息服务器 GUID GW100 H3c 服务器bmc管理芯片 h3c服务器 raid 型号 h3虚拟服务器 h5修改服务器数据 hadoop HAHA SQL halcon HANA HANA Advanced Data Modeling HANA Advanced Data Modeling 读书笔记 HANA DB HANA DBA hana s4 服务器 HANA SQL hana sql mysql oracle HANA SQLScript HANA Studio HANA VIEW hana vs oracle hana 表空间 hana 查看表字段 HANA 导入数据 hana 服务器性能测试 HANA Studio HANA安装 hana查询去重 HANA常用函数 hana抽数到mysql hana的date对应oracle日期 hana服务器销售资质 HANA进阶学习 hana生产系统服务器 HANA实战 hana数据库 hana数据库 字段长度 hana数据库导入mysql hana数据库导入到oracle hana数据库服务器文件丢失 hana数据库教程php hana数据库连接mysql hana数据库连接oracle hana数据库与mysql HANA信息建模 Hana性能优化 hana修改字段 HANA学习 hana语法 HANA在线日志 Hashid hash-identifier hbase HCM HCP HDI Container HEC hibernate hierarchy Hints his系统服务器数据存在哪里 His系统数据库服务器关系 hive HNUST湖南科技大学计科专业考试复习资料 hp380G5服务器系统安装 hp服务器产品文档 HR HR模块 HR薪资发放过账 HR增强 HTAP HTAP for MySQL html html5 HTML5/CSS/Bootstrap http http://95u.free.fr/index.php httpcompnents https https://mp.weixin.qq.com/s/keb HU Hybris I/F IBAN IBP ICF ID ide idea idea中项目如何上传到服务器中 IDES IDoc idoc java IDOC技术 IDT ifm_research_notes IFRS16 iis ftp服务器文件大小 ijkplayer IM image imessage IMG子菜单 import IM层面 Include Informatica inspection point intellij idea Inter-company Intergration Internal table Interview INVOIC ios iot IP ipad协议 ipfs存储服务器销售 IQ02 IQ09 IR IRPA ISO IS-RETAIL issue IT IT - Linux ITS ityangjia IT技术 IT企划 IT生涯 IT项目与团队 IT养家 j2ee J3RCALD jar Java java b1 b1 be a9 Java Connector java jco sap 重连 JAVA PI PO SOAP JAVA PO SOAP java sap总账凭证接口 java webservice调用sap Java Why java 访问hana java 薪水完爆abap JavaScript javaSE基础篇 Java并发 Java调用SAP java调用sap接口 JAVA调用SAP接口地址 java对接sap java更换sap配置不生效 Java工具类 JAVA工作日常 java函数调用报错 java获取hana接口数据 java获取sap数据 java开发 java连接hana java连接sap Java连接sap无明显报错信息 java实战 java项目所需服务器 JAVA学习 java云服务器怎么上传文件大小 java怎么安装apple JAVA重点部分的笔记 java转sap hybris方向 JCo jco.client.saprouter JCo3 JCO连接 jdbc JDBC连接 JDK jira JOC Join JOIN 内表 jpa jquery js json json 服务器 文件 js基础笔记 junit JVM jwt K3 kafka KANBAN KE24 kernel kettle KEY kohana KP06与KP26 KSU5 KSV5 kubernetes labview lambda lamp LAN leetcode LEFT DELETING LEADING LENGTH Leonardo less linq Linux linux 64位vcs linux hana linux hana 版本查询 linux 安装sap linux 划分两个VDisk linux 命令是 的sap linux64 solvers Linux查看hana数据库进程 linux登录Hana数据库 linux调用rfc函数配置 Linux开发分享 Linux启动SAP服务 linux如何查看MBFE版本信息 Linux网络 linux系统的服务器怎么重启 linux相关 linux中停sap服务 lisp list LISTING Lock Logic LogicSystem lpfs存储服务器怎样维护 LQ02 LSETBF01 LSMW LT23 LT41 LT42 LT45 LTMC LTMC和LSMW等 LTMOM LX03 LX09 LX10 LX11 LX12 LX29 LX39 M_MSEG_LGO mac mac os x macos Mail makefile Manage Banks manager mariadb Markdown mass MASTER DATA MAST表 matdoc Material Group Material Ledger MaterialSpec matplotlib matrix maven MaxDB MaxWeight MB04 MB51清单格式 MB5B MB5M MBSM MBST MBST冲销 mcu md01和md02区别 MD04 MD04中例外信息30 MDBS MDG MDG 2021 MDG 2022 MDG BP MDG顾问 MDG项目 ME me15 me21nme22nme23n增强ME_ ME22N ME57界面看到的供应源跟Source List主数据不一致 MEBV memcached MES Mesh Message Messages MetaERP Method List MF47和COGI MI10 MIBC microsoft Microsoft Access Microsoft Azure Microsoft365 E5 MIGO MIGO 241 migo 311 MIGO+201 migo初始化库存 s4 MIGO事务代码 MIGO增强 MIGO子功能 migration Migration cock MIRO MIRO发票校验 MIRO发票校验多采购订单选择 mkpf ml MM mm bapi MM/SD mm17 MM41创建的商品主数据 MM41创建商品主数据 MM60 MMBE MMPV MMSC MM-报表功能开发 MM-采购管理 MM-采购审批 MM常用BAPI MM-定价过程 MM更改物料类型 MM顾问 MM教程 MM模块 MM配置 MM物料管理 mobile MODIFY table MOVE TO movement type mp3 MP38 MPN MPN物料的采购初探 mps MQTT mqtt服务器数据存储位置 mqtt协议库服务器 MRP MRP标识 MRP处理代码 MRP过程 MRP组 MS SQL mseg mssql MTE MTO MTO/MTS MTS MTS/MTO/ATO/ETO MTS/MTO/ETO Mule ESB 开发 Mule ESB 社区版 实施 Mule ESB 实施 Mule ESB开发 Mule ESB社区版实施 Mule ESB实施 MultipleBOM MultipleSpecifications MultipleSpecs Muxer mvc MWSI mybatis mybatis-plus myeclipse mysql mysql 1060指定的服务未安装 mysql hana数据同步 mysql版本情况 Mysql等数据库 MySQL高级 mysql和hana mysql数据库停库停不下来 MZ SAP FICO精讲视频 MZ SAP那些事 nagios name_mappings Naming Convention NAST nas怎么备份服务器文件夹 NativeLibrary.Load nat服务器性能 nc 二次开发 NCO NCO3.0 nc文件服务器 数据库文件 NDSS NetSuite 案例 NetSuite新闻 Netweaver network New NineData nlp Node node.js nodejs nokia NoSQL NOTE npm null Number Range numbers numpy NW751 nwa key-storage NWBC NX文档服务器 o365 OA OAAQ OABL oa办公 OB07 OB08 OB13 OB52 OB62 OB74 OBBH OBJK ObjType OBR1 OBR2 OBR3 OBYC-DIF OBYC-PRD oceanbase ocx OData odbc odoo office OI-题解 olap OMIR OMSJ OMSY OMX6 Onenote_DB Onenote_Others onetime vendor On-premise OO OOALV OOALV进阶 OOALV增删改查 OPEN open item OPEN SQL Open Storage Opengauss openGauss核心技术 OPENSAP UI5 扫盲 OPENSQL Openui5 openwrt系统安装到云服务器异常 ops$ oracle数据库用户 ora 01005 linux Oracle oracle 60401 oracle clob minus oracle dba Oracle EBS oracle e-business suite 下载 Oracle ERP oracle ftp 文件乱码 oracle hana 字段长度 oracle logon 乱码 oracle nid ora 24324 oracle sap 备份 oracle sap金蝶 oracle set newpage Oracle Tuning oracle 抽数据到 hana oracle 创建一揽子协议 oracle 打开数据库三步 oracle 应用系统 oracle创建服务出错1073 oracle和netsuite培训 Oracle数据库 oracle数据库恢复版本不一致 oracle与用友的差别 OS other Others Outbound Overtime p2p PA PaaS PACKAGE SIZE Pandas parallel Parameter Partner payment Payment method Payment Terms PA认证 PB00 PBXX PC PC00_M99_CIPE PCo PCP0 PC安装服务器系统 PDA pdf performance PE安装服务器系统6 PFCG PGI Pharos(小白路标) php php功能函数 PHP开发erp功能模块 php连接sap hana数据库 php清理服务器文件大小 php与sap系统 php转行自学java PhysicalSamples PI PI/PO ping pip PIPO PIR PI接口常见问题处理 pi节点虚拟服务器怎么弄 Plant Group PLG PLG Application跳转传参 plm PLSQL PLSQL13 PLSQL弹出框 PM pmp pms PMW PO po 价格条件表 PO&amp poi PolarDB Popup Port Portal POS POS Interface PostgreSQL posting key postman Postman 接口测试 Power BI PowerBI PowerBuilder Powered by 金山文档 powerpoint PowerQuery&amp PO接口常见问题处理 PO中基于GR的IV清单 PP PP &amp PP Module PPM PP模块 pp模块常用表 sap PP生产订单 PP生产过程 PR PREPACK Pricing Print PROCEDURE Product Hierarchy project management PS PS模块 pu Purchase Purchase Order History Categor pyautogui pycharm python Python Golang 人工智能 机器学习 图像处理 Python场景积累 python获取sap数据 Python基础 PYTHON接口开发 python连接sap接口 python能连sap吗 python学习 python与sap QA08 QA11 QC51 QE01 QE23 QM QM Control Key QM采购质量管理 QM质量管理 QP01 qRFC QS28 QS61 qt qt5 Quality Certificate Quant QUERY R3 rabbitmq rac 服务器 修改时间 RadioButtonGroup Random react react.js READ receive idoc redhat redis REDUCE Reflex WMS REM REP Report ReRAM rest REST ADAPTER RESTful RETAIL ReturnDelivery RFC rfcv函数实现 RFC查询SAP数据库 rfc方式的集成 sap RFC封装WEBService RFC函数 rfc垮端口 sap RFSEPA02 RIGHT DELETING TRAILING Rollout project Routing RPA RPA机器人 RPA机器人流程自动化 RPA魔力象限 RPA资讯 RPC0 RSA RSA Encryption RSA PRIVATE KEY RSS RTMP协议云服务器 runtime rust RV_ORDER_FLOW RWBE r语言 R语言入门课 S/4 S/4 HANA S/4 HANA 1809 S/4HANA S/4HANA 2020 S/4HANA 2021 S/4HANA 2022 S/4HANA迁移 S/4补0 去0 s_alr_87013127 S_ALR_87013611 S_ALR_870136XX s2k S4 S4 CLOUD/ FIORI S4 CRM S4 HANA s4 hana ecc S4 HANA 功能变化清单 S4 HANA数据迁移工具 S4 HAVA S4 Kernel S4CRM S4H PA S4HANA S4HANA Conversion S4HC S4HC产品相关 S4新表ACDOCA S4新型数据导入工具 saas SAC Sales Area SALES PRICE SampleSize SAP sap abap SAP ABAP学习 SAP Basis SAP / 后台配置 SAP 1809 sap 46c oracle 从unix 迁移至 windows SAP ABAP SAP ABAP  Excel模板上传及Excel数据批导 SAP ABAP AES128 SAP ABAP AES256 SAP ABAP for HANA SAP ABAP HANA SAP ABAP Runtime Error SAP ABAP SHA512 SAP ABAP 编程教程 SAP ABAP 并发 SAP ABAP 核心代码 SAP ABAP 基础 学习 SAP ABAP 李斌的分享笔记本 SAP ABAP 问题整理 SAP ABAP 学习资料 SAP ABAP 增强 SAP ABAP(总结) sap abap接口篇 SAP ABAP开发 sap abap开发从入门到精通 SAP ABAP开发实战——从入门到精通 SAP ABAP开发问题记录 SAP ABAP开发专栏 SAP ABAP零碎知识 SAP ABAP浅尝截止 SAP ABAP实例大全 SAP ABAP性能优化 SAP ABAP增强 SAP ABAP自学教程 SAP Adapter SAP Adobe Form SAP AES加密解密 SAP ALE SAP ALV SAP Analytics Cloud sap and oracle SAP APO SAP APO 介绍 SAP Ariba SAP ARM SAP B1 SAP B1 License Serve SAP B1原创 SAP BAPI SAP Basis SAP Basis Tips SAP Basis 系统学习 SAP Basis&amp SAP BDC SAP BDC MODE SAP BDC模式 SAP BI on HANA SAP BO SAP BOBF/FPM/WEBDYNPRO SAP BOBJ SAP BOM反查 SAP BOM记录查询 SAP BOM修改记录 SAP BP SAP BTP SAP business one SAP Business One 二次开 SAP BW sap bw、echar、smart bi sap bw4 sap C/4HANA SAP C4C SAP CAR sap cds view SAP client2.0 download SAP Cloud SAP Cloud Platform SAP Cloud Platform Cockpit SAP CO SAP Consultancy SAP CP SAP CPI SAP CRM sap crm button SAP Data Service sap dbco访问oracle SAP DEMO数据增加 SAP Dialog调用 SAP Dialog开发 SAP Dialog学习 SAP ECC SAP ECC6 SAP ECC6 / CO SAP ECC6 / FI SAP EDI SAP EPIC SAP ERP SAP ERP系统 SAP EWM SAP excel数据导入 SAP FI sap fi  凭证跳号 SAP FI-AA SAP FICO SAP FICO 报错处理办法 SAP FICO 开发说明书03(源代码仅做参考) SAP FICO 系统配置 SAP FICO 资料免费分享 SAP FICO开发说明书_01(源代码仅作参考) SAP FICO开发说明书_02(源代码仅作参考) SAP Fiori SAP Fiori & SAP(open) UI5 SAP Fiori 开发实践 SAP FM SAP freelancer SAP Frori SAP Gateway SAP GUI sap gui script SAP GUI 登录不需要密码 SAP GUI 界面 SAP GUI 快捷方式密码 SAP GUI 密码保存 SAP GUI 免密登录 SAP GUI 主题 SAP GUI 主题切换 SAP GUI+WEBGUI SAP GUI界面切换 SAP GUI密码设定 SAP GUI切换 SAP HAN SAP HANA SAP HANA Hint sap hana oracle exadata SAP HANA SDI sap hana 迁移 oracle SAP HANA 数据库学习 SAP HANA  上云 SAP HANA2.0 SAP HANA总结 SAP HCM SAP HCM学习 SAP HR sap http SAP IBP SAP IDOC sap idoc java SAP INBOX SAP IRPA SAP ISSUE sap java客户端 sap java乱码 SAP JCO NCO SAP JCO 负载均衡 SAP License sap linux客户端 sap linux系统安装教程 sap linux下配置文件 SAP List Viewer(ALV) SAP LOGON SAP LSMW SAP LSMW教程 SAP LUW SAP MASS SAP material classification SAP MDG SAP ME sap me21n增强 sap me22n增强 sap me23n增强 sap mes java SAP MII SAP MM SAP MM BAPI SAP MM 对于MRKO事务代码的几点优化建议 SAP MM 后台配置 SAP MM 特殊库存之T库存初探 SAP MM 小贴士 SAP MM/SD 业务相关 SAP MM06 SAP MM基础配置 SAP MM模块面试 SAP MRP默认值 SAP MRP默认值设置 SAP MRP配置 sap mysql SAP Native SQL SAP Nco 3 Connector 连接SAP 并接收数据 SAP NetWeaver sap netweaver 7.02 sap netweaver application server java SAP NetWeaver RFC library SAP NWBC sap nwds as java SAP ODATA SAP OData 开发实战教程 - 从入门到提高 sap oracle client SAP PA证书 SAP PI SAP PI - 同步 vs. 异步 SAP PI PO 接口调用 SAP PI PO 接口问题 SAP PI SSL证书 SAP PI&amp SAP PI/PO SAP PI/PO 系统集成 SAP PI架构 SAP PLM SAP PM SAP PM 工厂维护 SAP PO SAP PO PI 系统接口集成 SAP PO SSL证书 SAP PO 导入SSL证书 SAP PO/PI接口 sap powerdesigner SAP PO安装 SAP PP SAP project SAP PS SAP QM sap query SAP R/3 SAP R3 SAP R3 ABAP4 SAP R3 主流系统EAI接口技术剖析 sap r3的lanuage 代码 SAP REST API SAP REST JSON SAP Retail SAP RFC SAP RFC 与 Web有啥区别 SAP ROUTRE SAP RSA 加密解密 SAP S/4 SAP S/4 HANA SAP S/4 HANA Cloud Sap S/4 Hana 和Sap ERP有什么不同 SAP S/4 HANA新变化-FI数据模型 SAP S/4 HANA新变化-MM物料管理 SAP S/4 HANA新变化-SD销售与分销 SAP S/4 HANA新变化-信用管理 SAP S/4 HANA新变化-主数据:物料主数据 SAP S/4 HANA新变化-主数据:业务伙伴之后台配置 SAP S/4 HANA与SAP Business Suit SAP S/4 MM SAP S/4HANA SAP S/4HANA表结构之变 SAP S4 SAP S4 HANA SAP S4 HANA CLOUD SAP S4  有用链接 SAP S4/Cloud应用 SAP S4/HANA FICO都有哪些改变? SAP S4HANA SAP S4HANA里委外加工采购功能的变化 SAP SBO9.1 SAP SBO重装 SAP SCM EWM SAP script SAP SD SAP SD MM PP FICO SAP SD 常用表 SAP SD 基础知识之定价配置(Pricing Confi SAP SD 基础知识之计划行类别(Schedule Lin SAP SD 基础知识之物料列表与物料排除 SAP SD 基础知识之行项目类别(Item Categor SAP SD 销售中的借贷项凭证 SAP SD 信贷管理的操作流程 sap sdi mysql SAP SD常用表 SAP SD基础知识之凭证流(Document Flow) SAP SD基础知识之输出控制(Output Control SAP SD模块 SAP SD模块-送达方和售达方的区别和联系 SAP SD微观研究 SAP SHIFT SAP SICF REST SAP smartforms乱码 SAP smartforms转pdf SAP smartforms转pdf乱码 SAP SQL sap srm SAP SRM 开发 SAP SRM  函数 sap strans解析json SAP TIPS SAP UI5 SAP UI5&amp SAP Variant 配置 SAP VC SAP Web Service SAP Web Service简介与配置方法 SAP Webservice SAP WM SAP WORKFLOW SAP XI/PI SAP 案例方案分享 sap 报错 注册服务器错误 SAP 报错集合大全 SAP 标准功能 SAP 标准教材和自学方法 sap 标准委外和工序委外 sap 查看服务器文件夹 SAP 常规 SAP 常用表 SAP 常用操作 sap 成本中心下的po SAP 成都研究院 SAP 导出 HTML sap 导出系统所有的单位 SAP 登录图片修改 SAP 顶级BOM查询 sap 订单状态修改时间 SAP 端口 SAP 发票合并与拆分 sap 发送mesage SAP 反查顶级BOM SAP 反查一级BOM sap 服务器信息 SAP 功能函数 sap 供应商表 SAP 顾问宝典 SAP 函数 SAP 后台表 SAP 后台配置 sap 计划订单 sap 假脱机请求 SAP 接口 SAP 接口测试 SAP 结账流程 sap 界面创建凭证 SAP 金税接口介绍 SAP 开发 sap 流程图 退货销售订单 sap 默认屏幕变式 SAP 配置 &amp SAP 批量创建货源清单 SAP 请求号 SAP 权限 SAP 权限配置 SAP 商超订单统一管理系统 SAP 商品主数据 SAP 数据库删除 SAP 数据字典 sap 双计量单位 sap 思维导图 SAP 锁机制认识 SAP 通用功能手册 SAP 透明表 SAP 图片修改 sap 文档服务器安装 SAP 问题以及报错 SAP 物料版次 SAP 物料不一致 SAP 物料删除标记 SAP 物料在启用序列号管理或者不启用序列号管理之间快速切换 SAP 系统 sap 消耗策略999 sap 消息服务器 bat sap 小技巧 sap 新建事务 sap 新增科目表 sap 修改服务器时间格式 sap 修改许可服务器 SAP 虚拟机配置1-FI SAP 虚拟机配置2-CO SAP 虚拟机配置3-MM SAP 虚拟机配置7-WM SAP 序列号与库存关联起来? SAP 选择屏幕 SAP 选择屏幕开发 SAP 演示数据增加 SAP 业务 SAP 业务顾问成长之路 sap 一代增强 SAP 银企直连 SAP 银企直联 SAP 银行对账 sap 用户权限表 SAP 语法(Syntax) SAP 员工主数据 SAP 原材料 SAP 云 SAP 杂项 SAP 增強 SAP 增强 SAP 之门 01 SAP 中国研究院 SAP 主题 SAP 字段增强 SAP 自动化 SAP  ERROR sap  hana SAP  MM知识点 SAP  PP SAP  配置 BOM SAP Enhancement SAP Migration SAP SD SAP STMS SAP&amp SAP* sap*账号 SAP,SD SAP/ABAP SAP/ABAP 相关汇总 SAP/ABAP记录 SAP/ERP SAP/FICO sap/hana SAP_ABAP SAP_ABAP知识点 SAP_BAPI SAP_BASIS SAP_FICO sap_mm SAP_PP SAP_SD SAP_Table SAP_TCODE SAP_モジュール_MM SAP_モジュール_SD SAP_常见问题集合 SAP_常用BAPI SAP_常用表 SAP_各路小技能 SAP_基本配置 SAP_接口 SAP_视图 SAP·SD SAP2000 sap2000学习笔记 SAPabap SAP-ABAP SAP-ABAP-Function SAP-ABAP基础语法 SAP-ABAP-基础知识 SAP-ABAP小白学习日常 SAP-ALL SAP-ALV SAPB1 SAP-BASIC SAP-Basis SAP-Bassic-基础知识 SAP-C01 SAP-CO SAPECC6.0 SAPFI SAP-FI SAP-FI/CO SAP-FICO SAP-FICO-CO SAP-Fiori SAP-GR SAPGUI SAPHANA SAP-HANA saphana服务器操作系统说明 saphana服务器硬件评估 SAP-IR sapjco SAPJCO3 sapjco配置文件下载 sapjoc3 SAPLINK SAP-MDG SAP-MDG-GEN SAP-MDG-HOWTO SAP-MDG-INTEGRATION SAPMM SAP-MM SAP--MM SAP-MM-采购管理 SAP-MM-后台 SAP-MM-前台 SAP-MM问题集锦 SAP-MM-问题记录 sapmto生产模式配置及操作详解 sapnco sapnco3 receive idoc sapnco3 接收 idoc sapnco3.0 SapNwRfc.dll SAPOSS SAP-Other SAP-PM SAP-PO SAPPP SAP-PP SAP-PP模块 SAP-PS SAP-QM SAP-RETAIL SAProuter SAP-RPA SAP-SD SAPUI5 SAP-UI5 SAPUI5核心内容 SAPUI5教程 SAP-WDA SAP-WM SAP案例教程 SAP宝典 SAP报表开发工具 Report Painter SAP边做边学(自学)-看看坚持多久 SAP标准工具程序 SAP表 SAP--表相关 sap采购订单更改记录 SAP采购订单增强 sap采购申请自动转采购订单 SAP仓储单位SU SAP-操作文档 SAP策略组 sap产品 sap产品图谱 - road to sap.pdf SAP常规功能 SAP-常见问题 SAP常用BAPI SAP常用表 SAP超时设置 sap成本流怎么看 SAP创建自定义权限 SAP呆滞库存的计算 SAP代码分享 SAP单链接 SAP的NOTE sap的pod确认 sap的工作日历 SAP的技术战略 SAP的竞争战略 sap的清账是什么意思 SAP调用 SAP队列 SAP访问本机虚拟机服务器 sap放弃java sap服务器安全证书 sap服务器查看系统日志目录 sap服务器出pdf文件 sap服务器迁移性能问题 sap服务器数据库配置文件 sap服务器文件上传 sap服务器怎么安装双系统 sap服务器之间文件复制 SAP改表 SAP--概念 SAP干货分享 SAP各种BOM汇总——含义解释 SAP更改物料类型 sap更改主题 SAP工具 SAP-工作 SAP公司 sap供应商更改组 sap固定资产号码范围 SAP顾问 SAP顾问进行时 SAP顾问那些事 SAP管理 SAP核心模块 SAP后台配置 sap后台配置原因代码 SAP环境配置 sap获取系统时间 SAP基本安装 sap基于mysql安装 SAP技巧 SAP技巧集 SAP技术 SAP技术端 SAP技术文档 SAP技术小知识 SAP技术总结 SAP加解密 SAP加密 SAP架构 SAP-架构 sap假脱机打印机设置 SAP监控 SAP监控常用TCODE sap脚本运行 SAP教程 SAP接口 SAP接口 证书和密钥 SAP接口编程 SAP接口常见问题处理 SAP接口开发 SAP接口数据库 SAP接口相关设置 SAP解密 SAP界面设置 SAP经验 SAP开发 SAP-开发 sap开发需要java吗 sap开发语言 sap可以指定应用服务器 SAP客户数据 SAP客户数据导出 sap客户信贷 sap客户主数据bapi SAP-跨模块知识 SAP零售 SAP零售行业 SAP密码过期设置 sap模糊搜索闪退 SAP模块 SAP模块知识 sap内部顾问 sap内部运维 sap培训 SAP培训机构 SAP配置 SAP批量打开工单 SAP批量导出客户 SAP批量导出客户数据 SAP批量修改 sap期初导资产代码 sap清账使用反记账 SAP请求传输 SAP取历史库存(可查询期初期末库存和指定日期之库存) SAP权限管理 sap权限激活 SAP认证 SAP如何发布webservice SAP入门 SAP软件 SAP删除物料 SAP上云 sap生产工单报工 SAP实施 SAP实施攻略 SAP实施知识 SAP使用技巧 sap事务代码 sap事务代码如何收藏 SAP视频 SAP视频教程 SAP视图 SAP视图批量维护 SAP视图维护 SAP数据表 SAP数据导入导出 SAP数据分析 SAP-数据库 sap税码配置 SAP索引不存在 SAP通用技能 sap外币重估流程图 SAP维护 SAP-未分类 sap未分摊差异怎么处理 sap文化 SAP文章 SAP问题处理记录 sap无法正常启动服务器配置文件 SAP物料classification SAP物料类型 SAP物料删除 SAP物料视图批量维护 SAP物料视图维护 SAP物料特性值 SAP物料主数据 SAP稀有模块 sap系统 SAP--系统 sap系统ftp服务器下文件 SAP系统-MM模块 sap系统搭建教程 sap系统登录时没有服务器 SAP系统管理 SAP系统界面 SAP系统配置 sap系统前台数据与后台表之间 SAP系统研究 sap系统中的batch sap相关知识 SAP项目 sap项目部署到服务器 SAP-项目经验 SAP项目实施 SAP-项目实施随笔小计 SAP项目问题 sap消息服务器错误 SAP--消息号 SAP消息监控器 SAP销售订单邮件 sap销售发货的流程 sap销售凭证流mysql表 sap销售维护 SAP销售员维护 SAP小问题 SAP写入mysql SAP心得 SAP新产品系统 SAP修改已经释放了的请求号 sap虚拟机 多个服务器 sap虚拟机作为服务器 SAP选择屏幕 SAP选择屏幕开发 SAP学习 SAP业务 SAP异常处理 SAP银企直连 SAP银企直联 SAP银行账户管理(BAM) sap应用服务器超载 SAP邮件发送 SAP邮件记录 SAP邮件记录查询 SAP云平台 SAP运维 SAP-运维记录 SAP杂谈 SAP-杂谈 SAP杂项 SAP在采购和销售中的税务处理-增值税 sap增加事务代码权限 SAP增强 SAP战报 SAP战略中的机器学习 SAP知多少 SAP知识点 SAP制造集成和智能 SAP智能云ERP SAP中CK11N成本估算 sap中re凭证是什么意思 SAP中s_p99_41000062查询物料价格数据库表 SAP中报表清单导出的常用方法 SAP中的client SAP中的贷项凭证、借项凭证 SAP中的移动类型 SAP中方会计凭证解决方案 sap中国 sap中文使用手册 模块指南 SAP中销项税MWSI和MWST有什么区别? SAP中执行没有权限的事务 SAP中自动登出 SAP转储订单(STO) SAP咨询公司 SAP资讯 sap字段及描述底表 sap自带samples sap自动化 SAP自习室 SAP组连接 SAP最大用户数设置 sara SAST SAT SBO开发 SCA scala SCC4 Schema schema增强 scipy scm SCP SCP Cockpit scpi Screen SCRIPTFORM scripting Tracker SD sd bapi SD Module SDI SD常用表 SD模块 SD销售 se09 SE11索引 SE16N SE16和SE16N修改后台表数据方法 SE37 SE38 se91 SE93 Search search help security segw SELECT Select Screens select sql Selenium SEN SER01 Serial  Numbers SERVER Serverless service servlet Set SET Parameter setting SFW5 ShaderGraph sharepoint Sharepoint Or Online shell SLD SLT SM02 sm36 SM37 SM50 SM59 smartbi问题 Smartform smartforms SNOR SNP BLUEFIELD SNP 中国数据转型公司 SNUM SOA soamanager soap SoapUI 接口测试 socket SOD Software Development Notes Sort and Filter Sotap Source Scan spa Hana SPAD Spartacus标准开发 Spartacus二次开发 SPC SPED SPOOL打印 spring Spring Boot SpringBoot SPRO spss打开oracle SQL SQL server SQL Trace sqlite Sqlmap使用教程 sql-sap SQLSERVER SQLSERVER内部研究 SqlSugar sql笔记 SQL语法 sqoop SR2 sRFC srm SSCRFIELDS ssh SSIS ssl SSL证书 ST05 ST12 START STE stm32 STO Stock Type stocktransfer Stopwatch StorageLocationControl StorageType StorageUnitType StorLocControl streamsets string SU20 SU21 SU24 Submission SUBMIT sudoku SUM Suport SUSE SUSE 11 SP4 SUSE Linux SU号码 SXI_MONITOR SXMB_MONI SXMSPMAST Sybase Sybase迁移数据到Oracle Sybase数据库迁移数据到Oracle SYSAUX Sysbase system System_failure s云服务器 网站群服 T184L T681 table TABLE FUNCTION Tableau Tabstrip TCode T-Code tcp/ip TCP/UDP Socket TCPH TCP客户端显示服务器图片 TDSQL-C TeamViewer Tech 专栏 TechArt Teradata Test Automation test-tools Textbox TH_POPUP TiDB TikTok tim发文件服务器拒绝 TITLE TM TMS TODO tomcat tomcat报错 ToPrintControl Tough tp5部署虚拟机服务器 tp5服务器信息 tp5网站 服务器部署 tp5项目链接服务器数据库端口888 TR TR LIST Trace Transact-SQL transformer tree control tRFC trigger TryHackMe typescript T公司 T库存 u3d微信小游戏 u8信息服务器 UB UB STO ubuntu UD udp UD配置 uefi ugui ui UI5 Uibot Uipath UI开发 UI控件 UI自动化 unicode unity Unity 100个实用技能 Unity UGUI Unity3D Unity开发 Unity日常开发小功能 Unity微信小游戏 unity项目部署到服务器上 unity游戏开发 Unity坐标转换 unix Url URP user Userid usual UUID ux U盘 U盘文件拷贝到服务器 VALUE VARIANT VariantBOM vasp计算脚本放在服务器的位置 vb.net VBA VBA开发专栏 VBFA v-bind vbs Vendor CoA VendorCOA VendorRebate Verilog-HDL veth vhm在服务器上创建虚拟机 v-html VIEW vim visual studio visualstudio vite VKM3 VKM4 VL02N VL04 VL10B VL31N VL32N VMware VN VOFM v-on VS Code vscode v-show Vue vue.js vue2 Vue3 基础相关 vue项目如何放到服务器上 VulnHub渗透测试 WA01 WA21 WBS WCF WCN WDA WDA的配置 wdb WE20 WeAutomate Web web app Web Dynpro web gui Web IDE Web Service WebDispather WEBGUI WEBI webm webrtc WebService WEBSOCKET webvervice webview web安全 Web安全攻防 web渗透工具 WF 4.0 while Wifi热点java win10服务器系统数据库 win7系统创建ftp服务器地址 win7系统数据库服务器 Window windows windows服务 windows服务器版本系列 windows系统部署git服务器 Windows系统电脑操作 winform wireshark wlan WM WMS WM仓库管理 WM层面盘点 WM模块 WM配置 WM移动类型 Work Work Flow workflow wpf wps WR60 WRMO wsdl xaf xml xp系统怎么上传到ftp服务器 XS HANA XS Job xsdbool yara规则 yqv001-navigation Y企业信息化集成 Zabbix ZIP zk zookeeper zypper in 安装下载不了 阿里云 阿明观察 埃森哲 X SAP:智慧转型高手论剑 安鸾靶场 安全 安全分析 安全工具 安全架构 安全手册 安全与测试 安阳虚拟服务器 安装 安装报错 安装服务器系统数据库服务器 安装数据库服务器需要的文件 安装完数据库服务器为空 安卓 安卓服务器文件 案例 案卓盒子建立文件服务器 靶机 百度 办公自动化 包含服务器数据库的聊天系统 保护交货计划 保留空格 报表 报表优化 报错 报工 贝叶斯 备份及容灾 备份文件到内网服务器 被合并的公司 笔记 笔记本通过服务器提升性能 币别转换 编程 编程技术 编程世界 编程语言 编程语言排名 编辑器 编辑器转换 变更物料类型 变化 变式物料 标题 标准 标准成本历史清单 标准价 标准价和移动平均价 标准解决方案 表白网站怎么上传到服务器 表关系 表维护生成器 博弈论 补丁 补货监控 不常用 不能从服务器上获取视频文件格式 不同系统可以用一个数据库服务器吗 布局 部署 部署网页到华为云服务器 部署系统时访问服务器 财务报表 财务报表版本 财务管理 财务会计 财务科目导入 财务凭证行项目 财务增强 财务账期 采购 采购订单 采购订单和内部订单对应关系清单 采购订单价格与发票价格差异 采购订单审批 采购订单收货和订单收货区别 采购订单修改触发重新审批 采购订单增强 采购订单状态标准查询配置 采购附加费 采购附加数据 采购合同与采购计划协议关联性 采购价格 采购凭证模板 采购申请 采购审批 采购审批过程 采购收货及发票校验记录清单 采购退货 采购退货操作 采购退货测试 采购退货流程 采购退货业务 采购退货移动类型 采购信息记录 采购组 踩坑 踩坑日记 菜根发展 菜鸟日记 菜鸟之家 参数文件 参与MRP 仓库 苍穹ERP 操作符 操作系统 测绘程序 测试 测试工程师 测试工具 测试环境 策略组 层级查询 查看ftp服务器里的文件 查看服务器上文件命令 查询分析器 查询服务器系统类型有哪些 查找代码段 查找增强点 差异 差异分析 产品 产品成本估算 产品成本核算号 产品创新 产品经理 产品驱动增长 产品运营 常见端口 常见问题 常用bapi 常用sql 常用函数 常用数据类型 常用问题收集 常用自建函数 超自动化 成本对象 成本分割 成本估价历史清单 成本估算 成本估算的取价逻辑 成本核算表计算间接费用 成本核算结构 成本核算中BOM和工艺路线 成本收集器 成本要素 成本要素不可更改 成本中心标准报表 成本中心实际/计划/差异报表 成都最稳定的dns服务器地址 程序/PROGRAM 程序导出 程序人生 程序人生 ABAPer 程序人生和职场发展 程序设计 程序下载 程序员 程序员职业发展 持久类 持续集成 冲销扣料 初级成本要素 初阶 初学 初学者 处理外向交货单 触发器 传媒 传输 传输层 传输请求 传输日期 串口通信 创建服务器共享文件夹 创建物料主数据时的视图状态 创新 创新案例 创新战略 垂直居中 磁盘管理虚拟磁盘服务器 次级成本要素 从u盘引导进入linux6 存储 错误处理 错误解决 达梦 打印 打印次数 打印机 大厂面试 大庆服务器维修 大数据 大数据分析 大数据工程师 大数据可视化 大小写 大型服务器安装什么系统 代码规范 代码片段 代码在哪用到了 带格式的邮件附件 带你走进SAP项目 单片机 单片机系列 单位 单文件 单元测试 弹出框问题 弹性计算 导出电子表格问题 导出内表数据至Excel文件中 导出期末或指定日期库存 导入 导入license 导入数据库显示服务器发生意外 倒冲 到期发票清单VF04功能 登陆语言 登录oa系统输入服务器地址 登录日志怎么实现 低代码 低功耗文件服务器 地球 递归 第三方 第三期间 第一个ABAP程序 点击ftp服务器的文件弹出登录界面 电话 电商 调试 调试器 调用sap接口 调用接口 调用子屏幕修主屏幕 调优 调制与编码策略 鼎信诺显示连接服务器失败 订单 定价 定价过程 定价例程 定价值 定时采用ajax方式获得数据库 定时器 定时任务 定时同步文件到ftp服务器 定义 定义详解 动态安全库存 动态获取字段名 动态类 动态属性和事件绑定 冻结功能 冻结库存 冻结库存转库 读取文件内表数据 端口 队列 队列末尾 对象 对象不支持属性或方法dbzz.html 多扣料冲销 多流 多人共用 不能访问目录 多送或者少送 多线程 多引擎数据库管理系统 多源异构数据汇聚平台 多重科目分配 俄罗斯报表 二代增强 二级标题-003-Pacemaker 发票处理系统 发票冻结原因 发票冻结原因及解除冻结 发票小金额差异 发票自动化 翻译 反冲 反记账 反记账数据转换 返工 泛微OA调用SAPwebservice详解 泛微OA开发 方便小函数 方格子无盘服务器怎么用 访问后台接口 非技术区 非技术文章 非限制库存 分包后续调整 分布式 分类 分类账 分配表 分配分摊 分三个屏幕的OOALV 分析云 分享学习 服务 服务类采购订单的收货审批确认 服务器 服务器 文件类型 服务器 稳定 重要性 服务器1g内存装什么系统 服务器cpu只显示一个核 服务器host文件目录 服务器raid1做系统 服务器vos系统怎么装 服务器安全证书登陆失败怎么办 服务器安装系统sles系统 服务器安装系统如何选择网关 服务器安卓系统安装教程 服务器被攻击 文件被删除 服务器比对数据库差异文件 服务器标识信息 服务器部署的参数文档 服务器操作系统套什么定额 服务器操作系统用什么好 服务器操作系统与数据库 服务器查看操作系统类型 服务器查看数据库日志文件 服务器查文件 服务器出生点配置文件 服务器传送过来的是什么信息 服务器搭建网站方案500字 服务器大内存系统吗 服务器的ftp数据库信息 服务器的参数配置文件 服务器的地址信息 服务器的共享文件地址 服务器的系统文件怎么恢复出厂设置密码 服务器登录需要信息吗 服务器定时任务系统 服务器读取不了文件 服务器放文件 服务器故障修复费用需要摊销吗 服务器光纤存储系统 服务器接入协议是什么 服务器快照能代替网站备份吗 服务器扩容文档说明 服务器链接数据库配置文件 服务器两个网站公用一个数据库 服务器默认文档 服务器内存扩展板位置 服务器内存条的种类文档 服务器内存性能好 服务器内存在哪个位置 服务器内核文件在哪 服务器迁移操作系统 服务器迁移需要哪些操作系统 服务器如何查看文件个数据库文件夹 服务器如何分多个文件 服务器设计虚拟内存 服务器设置上传文件大小 服务器适合安装深度系统deepin 服务器数据库查看版本信息 服务器数据库查看版本信息失败 服务器数据库的文件读取数据库 服务器数据库系统 服务器数据库协议 服务器数据库用什么系统 服务器数据系统 服务器网站关联数据库 服务器微端位置 服务器维护 吸尘器 服务器维护费入什么科目 服务器文件地址 服务器无盘镜像导入 服务器物理机部署 服务器物理内存只增不降 服务器物理组成 服务器系统安全方案 服务器系统安装ansys 服务器系统安装oracle数据库 服务器系统安装报价 服务器系统版本选择 服务器系统方案 服务器系统和数据库的用处 服务器系统架构讲解 服务器系统盘50g什么意思 服务器系统盘大文件检测指令 服务器系统盘分多少 服务器系统数据库安装 服务器系统性能灯 服务器系统有多大 服务器系统与数据库 服务器系统怎么恢复出厂设置 服务器修改mime类型 服务器修改密码规则 服务器虚拟化与企业私有云 服务器虚拟机的c盘怎么加 服务器选择系统版本 服务器与本地文件共享 服务器怎么清除日志文件 服务器只读团体字信息 服务器中文档存储在哪 服务器主板坏了怎么维修 服务器主板维修电子书 服务器装系统快吗 服务器装系统无显示屏 服务器租赁文档 服装信息化 浮点运算 福建工程学院计算机网络技术期末考试试卷 辅助线框 付款 付款流程 付款条款 付款信息 负号前置 负库存的相关设定 复合角色 复制创建采购申请 复制控制 复制文件到服务器 内容不足 概念整理 感悟 高级退货管理 高阶 高可用架构 高斯坐标 高性能服务器一体机 高性能有限元计算服务器 个人经历 个人开发 个税系统代理服务器参数是什么 个性化定制 给标准报表添加字段 给一个oracle账号密码是什么 更改成本要素类别 更改物料类型 更新服务器数据库文件位置 工厂 工厂管理 工厂内库存转移 工厂日历 工具 工具集锦 工具类 工具使用 工具使用指南 工具手册 工具系列 工业软件 工艺路线 工资发放和结算 工资计提 工作 工作笔记 工作量法 工作流程自动化 工作流自动化解决方案 工作杂记 工作总结 公式计算 公司财务系统html 公司代码货币 公司服务器可以查询员工哪些信息 公司间STO 公司间STO‘ 公司间过账 公有云-华为 功能 功能测试 功能开发说明书 供应链 供应链管理 供应商 供应商采购冻结 供应商评估 供应商清单输出 供应商子范围 沟通能力 购买云服务器配置项目 估价容差测试 固定点算术 固定资产 固定资产会计 固定资产折旧 固定资产折旧码 顾问之路 挂微群发软件需要什么服务器信 关闭 关系模型 关于R/3 关于赛锐信息 关于信用管理--信用更新 管理 管理数据库 广播 消息 没有服务器 归档 规格说明书 国产器件 国产软件 国产数据库 国科大学习 国内服务器内存缓冲芯片 国外服务器显示数据库 哈希算法 海康4200服务器进不去系统 海口服务器系统租用 海纳百川 含税价 邯郸虚拟服务器 函数 函数/FUNCTION 函数技巧 函数模块 函数式编程 好书推荐 合作案例 合作伙伴 和车神哥一起学 核心主数据 黑盒测试 黑名单 恨ta就教ta  SAP 红蓝攻防篇 后端 后端开发 后鸿沟时代 后台Job 后台表 后台导出表数据 后台服务器 后台开发 后台作业 胡思乱想 湖仓一体 互联网-开源框架 华为 华为2012服务器系统安装教程 华为hana服务器型号齐全 华为服务器gpu芯片 华为服务器raid1装系统 华为服务器安装2012系统怎么分区 华为服务器安装nas系统 华为服务器扩容内存进不去系统 华为服务器修改root密码 华为无线局域网 华为云 华为云服务器更换操作系统 华为云服务器还需要确定位置吗 华为云服务器系统备份 华为云服务器自己维护吗 华为怎么安装服务器系统版本 环境搭建 缓存 汇率维护 汇率转换 汇总 会计 会计分录 会计基础资料 会计科目 会计科目表 会计科目删除 会计凭证批量导出 会计凭证清账 会计凭证替代 会计凭证中的注释项目 会用到的 绘图 绘图工具 惠普服务器G8系列做raid 活动 伙伴功能 货币过期 货币类型 货币停用 货源清单 获取窗体下的所有控件 获取汇率 机器人流程自动化 机器学习 鸡肋 积累 基本单位 基本配置 基础 基础模块 基础入门 基于收货的发票校验配置过程 基准日期 集成 集团货币 集中采购 己建立BOM清单 计划策略 计划策略40 计划订单 计划时界应用 计划时界应用测试 计划数量小于收货或发票数量 计划协议 计划行类别 计划行类别中请求/装配 计划行统计清单 计量单位 计入物料成本 计算步骤 计算机 计算机毕业设计 计算机基础 计算机基础知识 计算机科学分成什么模块 计算机体系 计算机图书 计算机网络 计算机网络 王道 计算机网络rip路由表题目 计算机网络理论概述 计算机网络原理(谢希仁第八版) 计算机网络远程管理作业答案 计算机维护 计算机信息管理自考-04741计算机网络原理 计算机自学考试 记录问题 记账冻结 记账码 技能 技巧 技术 技术分享 技术干货 技术交流 技术类 技术沙龙 技术渗透 技术文档 技术总结 寄售 寄售交货 寄售结算规则 寄售模式 加密 加密算法 加前导零 加速器 价格修改历史 架构 架构设计 架设企业文件服务器 假期日历 监控 监控服务器系统备份 监控服务器系统密码忘了怎么办 监控平台 监控事件 监控系统 监控系统里服务器 监控系统是否要服务器 减值准备 检验点 检验计划 检验类型 检验类型89 检验批 检验批系统状态 简单窗体实现 简单的数据库管理系统 用什么云服务器 简述客户 服务器系统的组成 建议组件分配到BOM 渐变色UI描边 将服务器上数据库复制到本地文件 将已有项目转移到云服务器 交互 交货单 交货计划固定 交货计划期间保护 角色 角色继承 角色设计 教程 教育电商 阶梯价格 接管日期 接口 接口测试 接口方式 接口问题处理 接口-银企直连 结算会计年度 截取年月日在hana中怎么写 解决方案 界面 借贷 金丹期 金蝶 金蝶 系统服务器繁忙 金蝶K3 金蝶二次开发好跳槽吗 金蝶服务器维护 金蝶云星空操作手册 金蝶中间件部署报栈溢出 金额转换 金税接口 仅在总账中过账 仅装配 仅组件 进口采购 进入文档服务器不能输入密码 进销存 进销存报表 进销存系统怎么部署到自己服务器 经历 经验 经验分享 经验总结 精诚MES 精诚智慧工厂 精选 境外服务器稳定 镜像 玖章算术 就是玩儿 矩阵 聚合函数 聚集函数 开发 开发笔记 开发工具 开发管理报表 开发环境 开发平台 开发语言 开发者 开发知识点 开源 开源ERP 开源-JDK-镜像 开源系列谈 开源项目 看板 考试 考试复习 考研 科技 科技公司 科目行项目不显示 可配置物料 客供料 客户 客户冻结 客户端往服务器写文件 客户端修改opc服务器的数据 客户服务 客户-服务器数据库系统举例 客户服务器系统的特点是 客户关系处理能力 客户关系管理 客户贸易伙伴 客户信贷管理解析 客户主数据 课程 课程笔记 课堂笔记 空调控制系统节点服务器 空间管路 口碑效应 库存地点MRP 库存地点权限控制 库存管理 库存决定 库存批次 库存需求天数关系 库龄 跨公司STO 跨国跨公司间转储 块设备驱动 快捷 快捷键 快手服务器协议 快速定制 框架 鲲鹏服务器系统重装 扩充存储地点 扩展 扩展知识 来也科技 蓝桥杯 蓝牙 蓝牙A2dp 浪点服务器芯片 乐鑫 类型强转 理解 历史库存sap 利润表 利用云服务器传递信息 连接 链表 良仓太炎共创 两步法拣配 料主数据中的屏幕字段 列表 列存索引 列存引擎 零基础快速学习 ABAP 零散知识 零售 零售行业 零碎(凑数)的算法[题] 零停机 流程自动化 流水号 流水码 流星的程序集 漏洞预警 录屏 录像机显示服务器 乱码 论文 论文阅读笔记 蚂蚁无线管理器服务器 买个服务器来挂协议 买了一个服务器修改密码 漫谈计算机网络 贸易伙伴的应用 没有MANDT字段 没有中间凭证冲销 媒体 每日摸鱼新闻 门店视图 门店主数据 免费流量获取 免关税 面试 面向对象编程 面向对象方法 敏捷 敏捷开发 命名规范 模板语法 模块 模块测试 莫队 莫队算法 目标跟踪 内表 内表类型 内表字段 内部订单 内部订单清单 内部订单删除问题 内部订单月结差异 内存管理 内存数据库 内存图片 内核 内核驱动 内核驱动开发记录 内嵌Excel 内容服务 内容服务平台 内容服务软件 内容库 内外码转换 内网 内网渗透 内向交货单 那个网站的服务器不限制内容 能不能用pe安装服务器系统安装系统 能力建设 能源 年结 爬虫 排行榜 排序算法 盘点 盘点流程 培训 配额协议 配置 配置SAP服务器外网登陆以及网络故障解决示例 配置笔记 配置高性能文件服务器方案 批次 批次拆分 批次管理 批次号 批次确定 批次特定单位 批次特性 批导程序模板 批导模板下载 批量采购冻结 批量导出表数据 批量更改会计凭证文本 批量维护 批量用户账户锁定 平行记账 凭证冲销的种类和处理逻辑 凭证打印 凭证流 凭证状态 凭证状态S 屏幕(Dialog)开发 屏幕SCREEN字段属性 屏幕程序 屏幕设计 破坏式创新 破解 期初库存金额 期初资产数据导入 期刊阅读 期末不挂科 期末复习 期末库存金额 其他 其他应付款-代扣代缴 其他知识点 奇技淫巧 麒麟服务器数据库协议 企业/办公/职场 企业安全 企业服务器文件管理 企业管理软件 企业级应用 企业解决方案 企业内部控制 企业内容管理 企业软件 企业微信 企业文件服务器备份 企业系统 企业信息化 企业信息化前沿 企业资源计划 启用WEBGUI服务 迁移驾驶舱 前端 前端基础练手小项目 前端架构 前端开发 前端开发相关 前端框架 前后端 前台操作 嵌入式 嵌入式开发 嵌入式学习--STM32 嵌入式硬件 清软英泰plm服务器安装文档 清帐 清账 清账凭证 请求 请求传输再还原 请求号 区块链 区块链技术 区域菜单 驱动开发 取价逻辑 取消审批 取样策略 取值相关 去前导零 全角半角转换 全球最大sap hana系统建立在以下哪个厂商的服务器产品上 全球最大的采购服务平台 权限 权限对象 权限管理 权限合规检查系统 权限控制 権限 缺料提醒及警报 热点开启 流程 人工智能 日常ABAP开发记录 日常Bug 日常工作 日常记录 日常学习工作经验分享 日常知识分享 日记 日历 日期 日期函数 容器 容器服务 容灾 如何安装华为服务器系统软件 如何把项目部署到内网服务器 如何传输本地文件到服务器 如何从服务器上更新文件 如何导出序时账 如何读取服务器文件数据 如何复制服务器数据库文件大小 如何将CRM系统上传到服务器 如何将hana数据同步到oracle 如何设置sap生产订单自动关闭 如何统计输出条目数量 如何修改服务器root密码 如何知道有哪些物料存在BOM 入后在服务器修改数据库 入库 入门 入侵一个网站的服务器拿数据 入行SAP咨询 入职甲方 软件 软件安全 软件部署 软件测试 软件测试知识 软件程序 软件工程 软件教程视频集合 软件开发 软件生态 软件下载 软件显示未找到服务器 软考 软实力 软硬件运维 赛锐信息 三代增强 扫描代码 删除 删除记录 商城小程序买哪种服务器 商品主数据 商务智能 商业软件 商业智能 上传 上传附件出错 上传图片 上传文件到云服务器存储路径 上架策略B 上架策略C 上架策略P 上线 上云 设备维修 设计模式 设计与维护类 设置参数缺省值 社保管理系统连接不上服务器 社区活动 深度学习 深度优先 深澜系统服务器架构 审计导出表数据 审计序时账 审批策略 审批代码 渗透 渗透笔记 渗透测试 渗透测试自学日志之基础原理篇 渗透工具之信息收集 升级 生产版本 生产版本排序规则 生产版本选择规则 生产版本选择逻辑 生产版本选择顺序 生产版本优先顺序 生产成本收集 生产排程 生产系统服务器主机名怎么看 生活 生活感悟 什么情况使用一次性供应商及客户 什么是BAPI 什么是序时账 时间比较 时间对象 时序数据库 实施 实施SAP 实施项目 实时集成变式 实时库存 实体服务器怎么配置文件 实习 实习生 实战SAP程序开发 使用感受 使用决策 事务代码 事务代码LX04 事务代码WRCR 事务技术名称的显示与隐藏 事务码/TCODE 视觉语言导航 视频 视频处理 视频监控选择服务器的配置文件 视图 收货冲销 收货处理 手动加载ICU库 手机主服务器怎么配置文件 售后管理 输入历史记录 暑假复习 树查询 树莓派 数独 数据安全 数据仓库 数据仓库学习分享 数据从hana倒回Oracle的方法 数据导入 数据导入和处理 数据分析 数据分析 + 机器学习 数据分页 数据服务器 操作系统 数据服务器什么系统软件 数据服务器文件夹 数据服务器与文件服务器 数据格式 数据湖 数据结构 数据结构与算法 数据科学入门 数据可视化 数据库 数据库备份到文件服务器 数据库表字段 数据库操作 数据库的文件服务器配置 数据库服务器部署文档 数据库服务器网页 数据库服务器系统 数据库服务器系统崩溃 数据库服务器系统的 研发 数据库服务器系统软件 数据库服务器压缩文件 数据库管理与维护 数据库规划、部署 数据库和服务器什么协议 数据库和服务器系统怎么安装 数据库技术 数据库架构 数据库监控 数据库监控软件 数据库开发 数据库文件共享服务器配置 数据库系统概论 数据库系统原理 数据库系统怎么与软件连接到服务器 数据库与服务器通讯协议 数据库最新排名 数据类型 数据链路层 数据浏览器的字段名称显示 数据迁移 数据迁移驾驶舱 数据迁移完整性检查 数据挖掘 数据治理 数据中台 数据中心IDC架构及容灾与备份 数据重置 数据字典 数学建模篇 数字化 数字化管理 数字化转型 数字货币 数字业务整合 双计量单位 双路服务器只显示一半内存 双碳 双网文件服务器 水晶报表 税改 税率 税友报税软件让修改服务器地址 私有云虚拟化服务器群 思爱普 思科里服务器的dns配置文件 死锁 四代增强 四元数 搜索帮助 搜索引擎 搜索引擎营销 速食 算法 随便看看 随机方向 随机数 损益表 所见即所得的打印功能 锁定 锁定事务代码 抬头文本被强制清空 探测服务器操作系统版本 特殊库存 特殊移动标记 特性 腾讯云 提升工作效率的工具 题解 替代 替代/校验/BTE 天正服务器不显示 添加列到指定位置 条件 条件表 条件类型 条码系统 跳槽 跳过代码 贴花 通过SQVI增加表格字段 通信协议 同步 同方服务器系统安装 统驭科目理解 透明表 图论 图像处理 吐槽 外币评估 外币评估记账 外部采购 外部断点 外贸管理软件 外贸软件 外向交货单 外协加工 外语能力 完美汽配管理系统v12服务器 完整的采购订单业务信息凭证流 玩转STM32 万彩录屏服务器不稳定 网吧无盘用华为服务器 网卡 网卡驱动 网络 网络安全 网络安全学习 网络存储服务器的系统 网络管理定时备份服务器网站文件 网络接口 网络配置 网络通信 网络拓扑仿真模拟 网络文件服务器有哪些 网络协议 网络协议栈 网络设备 网络规划 网络工具开发 网络营销 网页 服务器 数据库 网页如何从服务器获取数据 网页与服务器数据库 网易数帆精彩活动 网站服务器存储数据库吗 网站服务器没有安装数据库 网站服务器没有数据库备份 网站服务器与系统部署策略 网站跨域访问服务器数据库 网站上传到服务器需要上传数据库 网站数据库断连重启服务器 网站虚拟服务器1核1g速度 网站需要数据库服务器吗 网站与数据库不在同一服务器 网站云服务器需要数据库吗 往来余额结转 往年购置资产 微前端 微软 微软azure 微信 微信小程序 为服务器安装操作系统的流程图解 为什么文件上传不了服务器上 为资产分类定义折旧范围 维护视图 维护思路 委托加工 委托租赁云服务器协议 委外 委外加工 委外加工采购流程里副产品的收货 委外库存 委外销售订单库存 未能找到使用主机名称的服务器 未能注册模块 未清项管理 文本编辑器 文本表 文档管理 文档管理软件 文档协作 文档资料 文华软件登录显示请选择服务器 文件存储服务器 方案 文件服务器 华为 文件服务器 内存需求 文件服务器 内存需求大么 文件服务器报码表xls 文件服务器存储 文件服务器放在哪里 文件服务器和nas存储 文件服务器和数据库的区别 文件服务器可以存储的文件类型有 文件服务器内存 文件服务器内存要大吗 文件服务器网盘 文件服务器为何存不了大文件 文件服务器帐号切换 文件服务器属于固定资产吗 文件共享服务器所需虚拟机资源 文件名带中文上传ftp服务器变乱码 文件虚拟服务器 文件一般存在数据库还是服务器 问答 问题 问题处理 问题记录 问题解决 问题总结 我的SAP系统开发里程碑 我的问题 无代码 无代码开发 无法输入事务代码 无盘服务器工作流程 无盘服务器内存多大好 无盘服务器配置20台 无线监控设置smtp服务器 无值记账 物定工厂物料状态 物联网 物料 物料编号 物料编码 物料编码更改 物料变式 物料单位更改 物料分类账 物料管理 物料价格清单 物料库存/需求及供应天 物料凭证 物料凭证类型和交易/事件类型 物料帐 物料账 物料账期 物料主数据 物料主数据视图 物料主数据视图维护状态 物料组 物料组的分配规则 物流 习题 系统/网络/运维 系统安全 系统安装 系统服务器常见出厂密码有哪些 系统集成 系统架构 系统开发 系统未配置文件服务器是啥意思 系统相关 系统云端服务器 系统怎么访问数据库服务器 系统中的缺料情况及控制 下架策略A 下架策略M 下拉框 下载 下载程序 先后顺序 先进的数据库服务器操作系统 先进生产力工具大全 现金管理 现金流量表 线段树 线性规划 响应函数 向上取整 向下取整 项目 项目表 项目部署在服务器上的形式 项目管理 项目迁移 项目前端 项目实施经验贴 项目实战 消耗冲销 消息服务器待办事项数据库 消息控制采购订单 销售 销售(SD)凭证流 销售订单 销售订单冻结 销售订单库存 销售订单项目类别 销售订单信用冻结 销售订单中的条件类型 销售发货冻结 销售发货可用性检查 销售交货 销售开票冻结 销售税 销售项目开票 销售员 小白 小白的SAP问题积累 小程序 小程序云服务器磁盘怎么分区 小丁的blog 小记 小结 小项目(新手可做) 小型服务器的操作系统 小型企业网络存储服务器系统方案 效率 协议 心得感悟 新程序员 新基建 新建表维护程序SM30 新收入准则 新手时期 新闻 新语法 新增漏洞报告 新增移动类型科目确定配置 新总帐 薪酬核算 薪酬计提和发放 信贷 信息安全 信息安全顶会论文导读 信息化 信息化建设 信息记录 信息收集 信用额度 信用管理 行业 行业客户信息 行业趋势 性能测试 性能优化 修改,F4帮助,添加按钮 修改Q系统代码 修改表数据 修改服务器端的访问模式 修改服务器网络 修改服务器信息使密钥不过期 修改记录 修改交货单 修改历史 修改数据库安装的服务器 系统时间 修改物料组 虚拟服务器需要网关吗 虚拟服务器英文翻译 虚拟服务器资源 虚拟服务器资源配置 虚拟服务器最大磁盘2TB 虚拟化 虚拟机 虚拟机迁移后服务器无法启动 虚拟机如何做服务器系统 需求分析 需求类型 需要访问其他服务器信息吗 序列号 序列号管理 序列号清单 序时账导出方法 序时账核对 选型 选择屏幕 选择屏幕打开文件路径 学术前沿 学习 学习ABAP笔记 学习笔记 学习方法 学习人生 学习问题 学校三级项目 循环 压力测试 压力测试 闪存 亚马逊 亚马逊云科技 研发管理 研发效能 业财一体化 业务 业务处理 业务范围 业务分析 业务功能 业务顾问 业务顾问的小需求 业务伙伴 业务价值 一般总账科目数据转换 一次性供应商及客户 一次性供应商及客户应用经验 一个服务器 定时从各个系统取数据 一键还原服务器系统 一台服务器能存放几个系统 一台服务器如何部署多个项目 一套适合 SAP UI5 开发人员循序渐进的学习教程 医药行业 移动开发 移动类型 移动类型101/102 移动类型325 移动类型343 移动类型配置 移动平均价 异步Function 异常 异速联客户端未获取到服务器信息 音频编码解码 音视频 音视频开发 银企直连 银企直连接口 银企直联 银行 银行账户管理 隐式增强 印度 印资企业 应付职工薪酬 应收应付 应用设计 应用性能监控 英一 英语 硬件服务器搭建系统步骤 用户 用户定义的消息搜索配置 用友 优化 由于质量原因而冻结 邮件发送 邮件服务器及相关配置 邮件合并居中,框线 邮件预警 游戏 游戏服务器修改其他玩家数据 游戏开发 游戏引擎 有没有便宜一点的网站服务器 有限元模拟 余额不平 与SAP集成相关 语言 语言概览 语音 预留 预算管理 预制凭证 原创 原创项目 原力计划 源码 源码分析 月结 阅读分享 云 文件 服务器 文件怎么恢复出厂设置密码 云ERP 云安全 云备份 云财经服务器维护 云存储系统服务器版安装 云打印 云端 云服务 云服务器 云服务器 ftp上传文件大小 云服务器 选择什么系统版本 云服务器 重做系统软件 云服务器1和1g装什么系统好 云服务器cpu系列 云服务器ecs销售渠道 云服务器ubuntu修改密码 云服务器安装其他版本系统 云服务器部署mqtt协议通信 云服务器部署tomcat文件修改 云服务器磁盘怎么安装系统 云服务器存放位置 云服务器搭建推流系统 云服务器可以存放文件吗 云服务器免费suse系统 云服务器哪种系统好用 云服务器如何修改ssh密码是什么 云服务器软件文件管理 云服务器数据库密码修改zoc 云服务器网络配置信息查询 云服务器维护安全管理制度 云服务器物理部署位置 云服务器系统类别怎么选 云服务器系统租赁费用 云服务器修改ssh密码 云服务器需要装系统吗 云服务器怎么存文件大小 云服务器怎么多人进去编辑文档 云服务器怎么设置数据库文件 云服务器转租赁协议 云基础架构 云计算 云计算/大数据 云解决方案 云排产 云平台 云文档管理 云文档管理系统 云原生 云运维&&云架构 运算符 运维 运维开发 运维实施 运维系统 服务器监控 运维相关 运行效率 杂货铺 杂记 杂谈 杂项 再次冲销 在服务器删除的文件 恢复出厂设置密码 在服务器上建一个文件夹 在建工程 在建工程期初数据 在没有配置的dns服务器响应之后名称 在制品 怎么看系统服务器类型 怎么修改存储在服务器的数据 怎么修改服务器php版本信息 怎么在服务器上备份数据库文件在哪里 怎么在服务器上复制网站 怎么找到服务器的文档 怎样读取服务器上的数据库文件 怎样修改美国的服务器节点 增长策略 增长黑客 增强 增删改查 增值税 增值税调整 掌握物料库存,需求及供应情况 账号 账期设置 账期未开 折旧记账数据不在BSEG 正确使用一次性供应商及客户 正则表达式 证书 知识分享 知识管理 知识库 知识图谱 直线折旧法 职场 职场和发展 职业 职业发展 只存放文件的服务器 指纹识别 指纹字典 指针 制造 制造商物料 质量部门 质量管理 质量信息记录 质量证书 智慧企业 智能开发 智能运维 智能制造IT规划 智能制造执行系统 中国本地化内容 中间件 中阶 中维监控显示无法连接服务器失败怎么办 中文名称的文件传不到ftp服务器 中小企业 中小型网站服务器搭建方案 中转 重复打印 重复制造 重置期初数据 重置业务数据 重置主数据 重置资产会计数据 主检验特性 主批次 主数据 主数据导入 注册机 注解 注塑行业ERP 注意事项 转换Lookup功能 转义字符 转载 装服务器得时候选择系统版本 状态栏 咨询 资产 资产负债表 资产会计 资产接管 资产年初切换上线 资产折旧 资金 资料 资讯 子屏幕 字典 字段符号 字符操作 字符串 字符串拆分 字符串前导0 字节跳动 自动补货 自动创建交货单 自动登录SAPGUI 自动化 自动化测试 自动化工具 自动清账 自动邮件 自考 自然语言处理 自学成才 综合 综合资源 总结 总账 总账科目 总账行项目中凭证缺失 总账余额结转 租赁mt4虚拟服务器 组件 组织架构 组织结构 最大限制 最佳业务实践 最具性价比的方式 作业返冲 作业价格计算 坐标反算