SAP 开发查找增强程序

news2024/11/26 22:53:05

参考文章https://blog.csdn.net/SAPmatinal/article/details/129987722?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522169949816116800225559526%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fblog.%2522%257D&request_id=169949816116800225559526&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2blogfirst_rank_ecpm_v1~rank_v31_ecpm-2-129987722-null-null.nonecase&utm_term=%E4%BB%A3%E7%A0%81%E7%9B%B4%E6%8E%A5&spm=1018.2226.3001.4450
效果:
在这里插入图片描述

在这里插入图片描述
双击增强名可以跳转到对应界面
源代码:

*&---------------------------------------------------------------------*
*& Report ZCYCLE061
*&---------------------------------------------------------------------*
*&
*&---------------------------------------------------------------------*
REPORT zcycle061 NO STANDARD PAGE HEADING LINE-SIZE 201.
*&--------------------------------------------------------------------&*
*& PJA Consultancy Services (www.pjas.com) &*
*&--------------------------------------------------------------------&*
*& This report attmpts to find Enhancements, Program-Exits, BADIs &*
*& and Business Transaction Events in a particular program/tcode. &*
*& Last updated: 09 May 2007 &*
*&--------------------------------------------------------------------&*
*& Selection Texts:
*& P_ALV ALV format
*& P_AUTH Include authority-check search
*& P_BADI Display BADIs
*& P_BTE Display business trans events
*& P_DEVC Show development class exits
*& P_EXIT Display user exits
*& P_FUNC Show function modules
*& P_LIMIT Limit no. of submits to search
*& P_LST Standard list format
*& P_PNAME Program name
*& P_PROG Display program exits
*& P_SUBM Show submits
*& P_TCODE Transaction code
*& P_TEXT Search for text
*& P_WFLOW Display workflow links
*&--------------------------------------------------------------------&*
*& Text symbols:
*& M01 Enter TCode or program
*& M02 Enter at least one scope criteria
*& S01 Selection data (TCode takes precedence over program name)
*& S02 Scope criteria
*& S03 Display criteria
*&--------------------------------------------------------------------&*


TABLES: sxs_attr,
        tobjt,
        tstct, "TCode texts
        trdirt, "Program texts
        sxc_exit. "BADI exits
TYPE-POOLS: slis. "Globale Typen fьr generische Listbausteine

DATA: tabix         LIKE sy-tabix,
      w_linnum      TYPE i,
      w_off         TYPE i,
      w_index       LIKE sy-tabix,
      w_include     LIKE trdir-name,
      w_prog        LIKE trdir-name,
      w_incl        LIKE trdir-name,
      w_area        LIKE rs38l-area,
      w_level,
      w_str(50)     TYPE c,
      w_cnt(2)      TYPE c,
      w_funcname    LIKE tfdir-funcname,
      w_fsel        LIKE sy-ucomm, " Determination of screen field
      w_gridtxt(70) TYPE c. "ALV grid title

CONSTANTS: c_fmod(40) TYPE c VALUE 'Function modules searched: ',
           c_subm(40) TYPE c VALUE 'Submit programs searched: ',
           c_devc(60) TYPE c VALUE 'User-exits from development classes in function modules',
           c_col1(12) TYPE c VALUE 'Enhanmt Type',
           c_col2(40) TYPE c VALUE 'Enhancement',
           c_col3(30) TYPE c VALUE 'Program/Include',
           c_col4(20) TYPE c VALUE 'Enhancement Name',
           c_col5(40) TYPE c VALUE 'Enhancement Description',
           c_col6(8)  TYPE c VALUE 'Project',
           c_col7(1)  TYPE c VALUE 'S',
           c_col8(12) TYPE c VALUE 'ChangeName',
           c_col9(10) TYPE c VALUE 'ChangeDate',
           c_x        TYPE c VALUE 'X'.

* Work Areas: ABAP Workbench
DATA: BEGIN OF wa_d010inc.
DATA: master TYPE d010inc-master.
DATA: END OF wa_d010inc.

DATA: BEGIN OF wa_tfdir.
DATA: funcname TYPE tfdir-funcname,
      pname    TYPE tfdir-pname,
      include  TYPE tfdir-include.
DATA: END OF wa_tfdir.

DATA: BEGIN OF wa_tadir.
DATA: devclass TYPE tadir-devclass.
DATA: END OF wa_tadir.

DATA: BEGIN OF wa_tstc.
DATA: pgmna TYPE tstc-pgmna.
DATA: END OF wa_tstc.

DATA: BEGIN OF wa_tstcp.
DATA: param TYPE tstcp-param.
DATA: END OF wa_tstcp.

DATA: BEGIN OF wa_enlfdir.
DATA: area TYPE enlfdir-area.
DATA: END OF wa_enlfdir.

* Work Areas: BADIs
DATA: BEGIN OF wa_sxs_attr.
DATA: exit_name TYPE sxs_attr-exit_name.
DATA: END OF wa_sxs_attr.

DATA: BEGIN OF wa_sxs_attrt.
DATA: text TYPE sxs_attrt-text.
DATA: END OF wa_sxs_attrt.

* Work Areas: Enhancements
DATA: BEGIN OF wa_modsap.
DATA: member TYPE modsap-member.
DATA: END OF wa_modsap.

DATA: BEGIN OF wa_modsapa.
DATA: name TYPE modsapa-name.
DATA: END OF wa_modsapa.

DATA: BEGIN OF wa_modsapt.
DATA: modtext TYPE modsapt-modtext.
DATA: END OF wa_modsapt.

* Work Areas: Business Transaction Events
DATA: BEGIN OF wa_tbe01t.
DATA: text1 TYPE tbe01t-text1.
DATA: END OF wa_tbe01t.

DATA: BEGIN OF wa_tps01t.
DATA: text1 TYPE tps01t-text1.
DATA: END OF wa_tps01t.

* user-exits
TYPES: BEGIN OF ty_mod,
         member LIKE modact-member,
         name   LIKE modact-name,
         status LIKE modattr-status,
         anam   LIKE modattr-anam,
         adat   LIKE modattr-adat,
       END OF ty_mod.
DATA: w_mod TYPE ty_mod.

TYPES: BEGIN OF t_userexit,
         type(12)    TYPE c,
         pname       LIKE trdir-name,
         txt(300),
         level       TYPE c,
         modname(30) TYPE c,
         modtext(60) TYPE c,
         modattr     TYPE ty_mod,
         colour(4)   TYPE c,
       END OF t_userexit.
DATA: i_userexit TYPE STANDARD TABLE OF t_userexit WITH HEADER LINE.

* Function module developmnet classes
TYPES: BEGIN OF t_devclass,
         clas LIKE trdir-clas,
       END OF t_devclass.
DATA: i_devclass TYPE STANDARD TABLE OF t_devclass WITH HEADER LINE.

* Submit programs
TYPES: BEGIN OF t_submit,
         pname LIKE trdir-name,
         level,
         done,
       END OF t_submit.
DATA: i_submit TYPE STANDARD TABLE OF t_submit WITH HEADER LINE.

* Source code
TYPES: BEGIN OF t_sourcetab,                        "#EC * (SLIN lьgt!)
         line(400),                                 "#EC * (SLIN lьgt!)
       END OF t_sourcetab.                          "#EC * (SLIN lьgt!)
DATA: sourcetab TYPE STANDARD TABLE OF t_sourcetab WITH HEADER LINE.
DATA c_overflow(30000) TYPE c.
* Description of an ABAP/4 source analysis token
DATA: i_stoken TYPE STANDARD TABLE OF stokex WITH HEADER LINE.
DATA wa_stoken LIKE i_stoken.
* Description of an ABAP/4 source analysis statement
DATA: i_sstmnt TYPE STANDARD TABLE OF sstmnt WITH HEADER LINE. "#EC NEEDED

* keywords for searching ABAP code
TYPES: BEGIN OF t_keywords,
         word(30),
       END OF t_keywords.
DATA: keywords TYPE STANDARD TABLE OF t_keywords WITH HEADER LINE.

* function modules within program
TYPES: BEGIN OF t_fmodule,
         name   LIKE rs38l-name,
         pname  LIKE trdir-name,
         pname2 LIKE trdir-name,
         level,
         bapi,
         done,
       END OF t_fmodule.
DATA: i_fmodule TYPE STANDARD TABLE OF t_fmodule WITH HEADER LINE.

* ALV definitions
DATA i_fieldcat TYPE slis_t_fieldcat_alv WITH HEADER LINE.
DATA i_layout TYPE slis_layout_alv.
DATA i_sort TYPE slis_t_sortinfo_alv WITH HEADER LINE.

*&--------------------------------------------------------------------&*
*& Selection Options &*
*&--------------------------------------------------------------------&*
SELECTION-SCREEN BEGIN OF BLOCK selscr1 WITH FRAME TITLE TEXT-s01.
  PARAMETER: p_pname LIKE trdir-name,
  p_tcode LIKE syst-tcode,
  p_limit(4) TYPE n DEFAULT 500.
  SELECTION-SCREEN SKIP.
SELECTION-SCREEN END OF BLOCK selscr1.

SELECTION-SCREEN BEGIN OF BLOCK selscr2 WITH FRAME TITLE TEXT-s02.
  PARAMETER: p_badi AS CHECKBOX DEFAULT c_x,
  p_bte AS CHECKBOX DEFAULT c_x,
  p_exit AS CHECKBOX DEFAULT c_x,
  p_prog AS CHECKBOX DEFAULT c_x,
  p_wflow AS CHECKBOX,
  p_auth AS CHECKBOX.
  SELECTION-SCREEN SKIP.
  PARAMETER: p_text(40) TYPE c.
SELECTION-SCREEN END OF BLOCK selscr2.

SELECTION-SCREEN BEGIN OF BLOCK selscr3 WITH FRAME TITLE TEXT-s03.
  PARAMETER: p_alv RADIOBUTTON GROUP rad1 DEFAULT 'X',
  p_lst RADIOBUTTON GROUP rad1.
  SELECTION-SCREEN SKIP.
  PARAMETER: p_devc LIKE rihea-dy_ofn DEFAULT ' ' MODIF ID a01,
  p_func LIKE rihea-dy_ofn DEFAULT ' ' MODIF ID a01,
  p_subm LIKE rihea-dy_ofn DEFAULT ' ' MODIF ID a01.
SELECTION-SCREEN END OF BLOCK selscr3.

*&--------------------------------------------------------------------&*
*& START-OF-SELECTION &*
*&--------------------------------------------------------------------&*
START-OF-SELECTION.

  IF p_pname IS INITIAL AND p_tcode IS INITIAL.
    MESSAGE i000(g01) WITH TEXT-m01.
    STOP.
  ENDIF.

  IF p_badi IS INITIAL AND
  p_exit IS INITIAL AND
  p_bte IS INITIAL AND
  p_wflow IS INITIAL AND
  p_auth IS INITIAL AND
  p_prog IS INITIAL.
    MESSAGE i000(g01) WITH TEXT-m02.
    STOP.
  ENDIF.

* ensure P_LIMIT is not zero.
  IF p_limit = 0.
    p_limit = 1.
  ENDIF.

  PERFORM data_select.
  PERFORM get_submit_data.
  PERFORM get_fm_data.
  PERFORM get_additional_data.
  PERFORM data_display.

*&--------------------------------------------------------------------&*
*& Form DATA_SELECT &*
*&--------------------------------------------------------------------&*
*& &*
*&--------------------------------------------------------------------&*
FORM data_select.

* data selection message to sap gui
  CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
    DESTINATION 'SAPGUI'
    KEEPING LOGICAL UNIT OF WORK
    EXPORTING
      text = 'Get programs/includes' "#EC NOTEXT
             EXCEPTIONS
             system_failure
             communication_failure
    . "#EC *

* get TCode name for ALV grid title
  CLEAR w_gridtxt.
  IF NOT p_tcode IS INITIAL.
    SELECT SINGLE * FROM tstct WHERE tcode = p_tcode
    AND sprsl = sy-langu.
    CONCATENATE 'TCode:' p_tcode tstct-ttext INTO w_gridtxt
    SEPARATED BY space.
  ENDIF.
* get program name for ALV grid title
  IF NOT p_pname IS INITIAL.
    SELECT SINGLE * FROM trdirt WHERE name = p_pname
    AND sprsl = sy-langu.
    CONCATENATE 'Program:' p_pname tstct-ttext INTO w_gridtxt
    SEPARATED BY space.
  ENDIF.

* determine search words
  keywords-word = 'CALL'.
  APPEND keywords.
  keywords-word = 'FORM'.
  APPEND keywords.
  keywords-word = 'PERFORM'.
  APPEND keywords.
  keywords-word = 'SUBMIT'.
  APPEND keywords.
  keywords-word = 'INCLUDE'.
  APPEND keywords.
  keywords-word = 'AUTHORITY-CHECK'.
  APPEND keywords.

  IF NOT p_tcode IS INITIAL.
* get program name from TCode
    SELECT SINGLE pgmna FROM tstc INTO wa_tstc-pgmna
    WHERE tcode EQ p_tcode.
    IF NOT wa_tstc-pgmna IS INITIAL.
      p_pname = wa_tstc-pgmna.
* TCode does not include program name, but does have reference TCode
    ELSE.
      SELECT SINGLE param FROM tstcp INTO wa_tstcp-param
      WHERE tcode EQ p_tcode.
      IF sy-subrc = 0.
        CHECK wa_tstcp-param(1) = '/'.
        CHECK wa_tstcp-param+1(1) = '*'.
        IF wa_tstcp-param CA ' '.
        ENDIF.
        w_off = sy-fdpos + 1.
        SUBTRACT 2 FROM sy-fdpos.
        IF sy-fdpos GT 0.
          p_tcode = wa_tstcp-param+2(sy-fdpos).
        ENDIF.
        SELECT SINGLE pgmna FROM tstc INTO wa_tstc-pgmna
        WHERE tcode EQ p_tcode.
        p_pname = wa_tstc-pgmna.
        IF sy-subrc <> 0.
          MESSAGE s110(/saptrx/asc) WITH 'No program found for: ' p_tcode. "#EC NOTEXT
          STOP.
        ENDIF.
      ELSE.
        MESSAGE s110(/saptrx/asc) WITH 'No program found for: ' p_tcode. "#EC NOTEXT
        STOP.
      ENDIF.

    ENDIF.
  ENDIF.

* Call customer-function aus Program coding
  READ REPORT p_pname INTO sourcetab.
  IF sy-subrc > 0.
    MESSAGE e017(enhancement) WITH p_pname RAISING no_program. "#EC *
  ENDIF.
  SCAN ABAP-SOURCE sourcetab TOKENS INTO i_stoken STATEMENTS INTO i_sstmnt KEYWORDS FROM keywords OVERFLOW INTO c_overflow WITH INCLUDES WITH ANALYSIS. "#EC
  IF sy-subrc > 0. "keine/syntakt. falsche Ablauflog./Fehler im Skanner
    MESSAGE e130(enhancement) RAISING syntax_error. "#EC
  ENDIF.

* check I_STOKEN for entries
  CLEAR w_linnum.
  DESCRIBE TABLE i_stoken LINES w_linnum.
  IF w_linnum GT 0.
    w_level = '0'.
    w_prog = ''.
    w_incl = ''.
    PERFORM data_search TABLES i_stoken USING w_level w_prog w_incl.
  ENDIF.

ENDFORM. "DATA_SELECT
*&--------------------------------------------------------------------&*
*& Form GET_FM_DATA ? &*
*&--------------------------------------------------------------------&*
*& &*
*&--------------------------------------------------------------------&*
FORM get_fm_data.
* data selection message to sap gui
  CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
    DESTINATION 'SAPGUI'
    KEEPING LOGICAL UNIT OF WORK
    EXPORTING
      text = 'Get function module data' "#EC NOTEXT
             EXCEPTIONS
             system_failure
             communication_failure
    . "#EC *
* Function module data
  SORT i_fmodule BY name.
  DELETE ADJACENT DUPLICATES FROM i_fmodule COMPARING name.
  LOOP AT i_fmodule WHERE done NE c_x.
    CLEAR: i_stoken, i_sstmnt, sourcetab, wa_tfdir, w_include .
    REFRESH: i_stoken, i_sstmnt, sourcetab.
    CLEAR wa_tfdir.
    SELECT SINGLE funcname pname include FROM tfdir INTO wa_tfdir
    WHERE funcname = i_fmodule-name.
    CHECK sy-subrc = 0.
    CALL FUNCTION 'FUNCTION_INCLUDE_SPLIT'
      EXPORTING
        program = wa_tfdir-pname
      IMPORTING
        group   = w_area.
    CONCATENATE 'L' w_area 'U' wa_tfdir-include INTO w_include.
    i_fmodule-pname = w_include.
    i_fmodule-pname2 = wa_tfdir-pname.
    MODIFY i_fmodule.
    READ REPORT i_fmodule-pname INTO sourcetab.
    IF sy-subrc = 0.
      SCAN ABAP-SOURCE sourcetab TOKENS INTO i_stoken
      STATEMENTS INTO i_sstmnt
      KEYWORDS FROM keywords
      WITH INCLUDES WITH ANALYSIS.
      IF sy-subrc > 0.
        MESSAGE e130(enhancement) RAISING syntax_error.
      ENDIF.
* check i_stoken for entries
      CLEAR w_linnum.
      DESCRIBE TABLE i_stoken LINES w_linnum.
      IF w_linnum GT 0.
        w_level = '1'.
        w_prog = i_fmodule-pname2.
        w_incl = i_fmodule-pname.
        PERFORM data_search TABLES i_stoken USING w_level w_prog w_incl.
      ENDIF.
    ENDIF.
  ENDLOOP.
* store development classes
  IF p_devc = c_x.
    LOOP AT i_fmodule.
      CLEAR: wa_tadir, wa_enlfdir.
      SELECT SINGLE area FROM enlfdir INTO wa_enlfdir-area
      WHERE funcname = i_fmodule-name.
      CHECK NOT wa_enlfdir-area IS INITIAL.
      SELECT SINGLE devclass INTO wa_tadir-devclass
      FROM tadir WHERE pgmid = 'R3TR'
      AND object = 'FUGR'
      AND obj_name = wa_enlfdir-area.
      CHECK NOT wa_tadir-devclass IS INITIAL.
      MOVE wa_tadir-devclass TO i_devclass-clas.
      APPEND i_devclass.
      i_fmodule-done = c_x.
      MODIFY i_fmodule.
    ENDLOOP.
    SORT i_devclass.
    DELETE ADJACENT DUPLICATES FROM i_devclass.
  ENDIF.
ENDFORM. "GET_FM_DATA
*&--------------------------------------------------------------------&*
*& Form GET_SUBMIT_DATA &*
*&--------------------------------------------------------------------&*
*& &*
*&--------------------------------------------------------------------&*
FORM get_submit_data.

* data selection message to sap gui
  CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
    DESTINATION 'SAPGUI'
    KEEPING LOGICAL UNIT OF WORK
    EXPORTING
      text = 'Get submit data' "#EC NOTEXT
             EXCEPTIONS
             system_failure
             communication_failure
    . "#EC *

  SORT i_submit.
  DELETE ADJACENT DUPLICATES FROM i_submit COMPARING pname.
  w_level = '0'.

  LOOP AT i_submit WHERE done NE c_x.

    CLEAR: i_stoken, i_sstmnt, sourcetab.
    REFRESH: i_stoken, i_sstmnt, sourcetab.

    READ REPORT i_submit-pname INTO sourcetab.
    IF sy-subrc = 0.

      SCAN ABAP-SOURCE sourcetab TOKENS INTO i_stoken
      STATEMENTS INTO i_sstmnt
      KEYWORDS FROM keywords
      WITH INCLUDES WITH ANALYSIS.
      IF sy-subrc > 0.
* message e130(enhancement) raising syntax_error.
        CONTINUE.
      ENDIF.

* check i_stoken for entries
      CLEAR w_linnum.
      DESCRIBE TABLE i_stoken LINES w_linnum.
      IF w_linnum GT 0.
        w_prog = i_submit-pname.
        w_incl = ''.
        PERFORM data_search TABLES i_stoken USING w_level w_prog w_incl.
      ENDIF.
    ENDIF.

* restrict number of submit program selected for processing
    DESCRIBE TABLE i_submit LINES w_linnum.
    IF w_linnum GE p_limit.
      w_level = '1'.
    ENDIF.
    i_submit-done = c_x.
    MODIFY i_submit.
  ENDLOOP.

ENDFORM. "GET_SUBMIT_DATA
*&--------------------------------------------------------------------&*
*& Form DATA_SEARCH &*
*&--------------------------------------------------------------------&*
*& &*
*&--------------------------------------------------------------------&*
FORM data_search TABLES p_stoken STRUCTURE stoken
USING p_level l_prog l_incl.
  LOOP AT p_stoken.
    CLEAR i_userexit.
* Workflow
    IF p_wflow = c_x.
      IF p_level EQ '1'. " do not perform for function modules (2nd pass)
        IF p_stoken-str+1(16) CS 'SWE_EVENT_CREATE'.
          REPLACE ALL OCCURRENCES OF '''' IN p_stoken-str WITH ''.
          i_userexit-type = 'WorkFlow'.
          i_userexit-txt = p_stoken-str.
          CONCATENATE l_prog '/' l_incl INTO i_userexit-pname.
          APPEND i_userexit.
        ENDIF.
      ENDIF.
    ENDIF.

    tabix = sy-tabix + 1.
    i_userexit-level = p_level.
    IF i_userexit-level = '0'.
      IF l_incl IS INITIAL.
        i_userexit-pname = p_pname.
      ELSE.
        CONCATENATE p_pname '-' l_incl INTO i_userexit-pname.
      ENDIF.
    ELSE.
      IF l_incl IS INITIAL.
        i_userexit-pname = l_prog.
      ELSE.
        CONCATENATE l_prog '-' l_incl INTO i_userexit-pname.
      ENDIF.
    ENDIF.

* AUTHORITY-CHECKS
    IF p_auth = c_x.
      IF p_stoken-str EQ 'AUTHORITY-CHECK'.
        CHECK p_level EQ '0'. " do not perform for function modules (2nd pass)
        w_index = sy-tabix + 2.
        READ TABLE p_stoken INDEX w_index INTO wa_stoken.
        CHECK NOT wa_stoken-str CS 'STRUCTURE'.
        CHECK NOT wa_stoken-str CS 'SYMBOL'.
        READ TABLE i_submit WITH KEY pname = wa_stoken-str.
        IF sy-subrc <> 0.
          i_userexit-pname = i_submit-pname.
          i_userexit-type = 'AuthCheck'.
          i_userexit-txt = wa_stoken-str.
          REPLACE ALL OCCURRENCES OF '''' IN i_userexit-txt WITH space.
          CLEAR tobjt.
          SELECT SINGLE * FROM tobjt WHERE object = i_userexit-txt
          AND langu = sy-langu.
          i_userexit-modname = 'AUTHORITY-CHECK'.
          i_userexit-modtext = tobjt-ttext.
          APPEND i_userexit.
        ENDIF.
      ENDIF.
    ENDIF.
* Text searches
    IF NOT p_text IS INITIAL.
      IF p_stoken-str CS p_text.
        i_userexit-pname = i_submit-pname.
        i_userexit-type = 'TextSearch'.
        i_userexit-txt = wa_stoken-str.
        i_userexit-modname = 'Text Search'.
        i_userexit-modtext = p_stoken-str.
        APPEND i_userexit.
      ENDIF.
    ENDIF.
* Include (SE38)
    IF p_stoken-str EQ 'INCLUDE'.
      CHECK p_level EQ '0'. " do not perform for function modules (2nd pass)
      w_index = sy-tabix + 1.
      READ TABLE p_stoken INDEX w_index INTO wa_stoken.
      CHECK NOT wa_stoken-str CS 'STRUCTURE'.
      CHECK NOT wa_stoken-str CS 'SYMBOL'.
      READ TABLE i_submit WITH KEY pname = wa_stoken-str.
      IF sy-subrc <> 0.
        i_submit-pname = wa_stoken-str.
        i_submit-level = p_level.
        APPEND i_submit.
      ENDIF.
    ENDIF.

* Enhancements (SMOD)
    IF p_exit = c_x.
      IF p_stoken-str EQ 'CUSTOMER-FUNCTION'.
        CLEAR w_funcname.
        READ TABLE p_stoken INDEX tabix.
        TRANSLATE p_stoken-str USING ''' '.
        CONDENSE p_stoken-str.
        IF l_prog IS INITIAL.
          CONCATENATE 'EXIT' p_pname p_stoken-str INTO w_funcname
          SEPARATED BY '_'.
        ELSE.
          CONCATENATE 'EXIT' l_prog p_stoken-str INTO w_funcname
          SEPARATED BY '_'.
        ENDIF.
        SELECT SINGLE member FROM modsap INTO wa_modsap-member
        WHERE member = w_funcname.
        IF sy-subrc = 0. " check for valid enhancement
          i_userexit-type = 'Enhancement'.
          i_userexit-txt = w_funcname.
          APPEND i_userexit.
        ELSE.
          CLEAR wa_d010inc.
          SELECT SINGLE master INTO wa_d010inc-master
          FROM d010inc
          WHERE include = l_prog.
          CONCATENATE 'EXIT' wa_d010inc-master p_stoken-str INTO w_funcname
          SEPARATED BY '_'.
          i_userexit-type = 'Enhancement'.
          i_userexit-txt = w_funcname.
        ENDIF.
      ENDIF.
    ENDIF.
* BADIs (SE18)
    IF p_badi = c_x.
      IF p_stoken-str CS 'cl_exithandler='.
        w_index = sy-tabix + 4.
        READ TABLE p_stoken INDEX w_index INTO wa_stoken.
        i_userexit-txt = wa_stoken-str.
        REPLACE ALL OCCURRENCES OF '''' IN i_userexit-txt WITH space.
        i_userexit-type = 'BADI'.
        CLEAR sxs_attr. " ensure a real BADI
        SELECT SINGLE * FROM sxs_attr WHERE exit_name = i_userexit-txt.
        IF sy-subrc = 0.
          APPEND i_userexit.
        ENDIF.
      ENDIF.
    ENDIF.

* Business transaction events (FIBF)
    IF p_bte = c_x.
      IF p_stoken-str CS 'OPEN_FI_PERFORM'.
        i_userexit-type = 'BusTrEvent'.
        i_userexit-txt = p_stoken-str.
        REPLACE ALL OCCURRENCES OF '''' IN i_userexit-txt WITH space.
        i_userexit-modname = i_userexit-txt+16(8).
        CASE i_userexit-txt+25(1).
          WHEN 'E'.
            CLEAR wa_tbe01t.
            SELECT SINGLE text1 INTO wa_tbe01t-text1 FROM tbe01t
            WHERE event = i_userexit-txt+16(8)
            AND spras = sy-langu.
            IF wa_tbe01t-text1 IS INITIAL.
              i_userexit-modtext = '<Not active>'.          "#EC NOTEXT
            ELSE.
              i_userexit-modtext = wa_tbe01t-text1.
            ENDIF.
            i_userexit-modname+8 = '/P&S'.                  "#EC NOTEXT
          WHEN 'P'.
            CLEAR wa_tps01t.
            SELECT SINGLE text1 INTO wa_tps01t-text1 FROM tps01t
            WHERE procs = i_userexit-txt+16(8)
            AND spras = sy-langu.
            i_userexit-modtext = wa_tps01t-text1.
            i_userexit-modname+8 = '/Process'.
        ENDCASE.

        APPEND i_userexit.
      ENDIF.
    ENDIF.

* Program exits (SE38)
    IF p_prog = c_x.
      IF p_stoken-str CS 'USEREXIT_'.
        CHECK NOT p_stoken-str CS '-'. " ensure not USEREXIT_XX-XXX
        CHECK NOT p_stoken-str CS '('. " ensure not SUBMIT_XX(X)
        i_userexit-type = 'Program Exit'.
        i_userexit-txt = p_stoken-str.
        REPLACE ALL OCCURRENCES OF '''' IN i_userexit-txt WITH space.
        APPEND i_userexit.
      ENDIF.
    ENDIF.

* Submit programs (SE38)
    IF p_stoken-str CS 'SUBMIT'.
      CHECK p_level EQ '0'. " do not perform for function modules (2nd pass)
      CHECK NOT p_stoken-str CS '_'. " ensure not SUBMIT_XXX
      w_index = sy-tabix + 1.
      READ TABLE p_stoken INDEX w_index INTO wa_stoken.
      CHECK NOT wa_stoken-str CS '_'. " ensure not SUBMIT_XXX
      REPLACE ALL OCCURRENCES OF '''' IN wa_stoken-str WITH space.
      READ TABLE i_submit WITH KEY pname = wa_stoken-str.
      IF sy-subrc <> 0.
        i_submit-pname = wa_stoken-str.
        i_submit-level = p_level.
        APPEND i_submit.
      ENDIF.
    ENDIF.
* Perform routines (which reference external programs)
    IF p_stoken-str CS 'PERFORM'.
      CHECK p_level EQ '0'. " do not perform for function modules (2nd pass)
      w_index = sy-tabix + 1.
      READ TABLE p_stoken INDEX w_index INTO wa_stoken.
      IF NOT wa_stoken-ovfl IS INITIAL.
        w_off = wa_stoken-off1 + 10.
        w_str = c_overflow+w_off(30).
        FIND ')' IN w_str MATCH OFFSET w_off.
        IF sy-subrc = 0.
          w_off = w_off + 1.
          wa_stoken-str = w_str(w_off).
        ENDIF.
      ENDIF.

      CHECK wa_stoken-str CS '('.
      w_off = 0.
      WHILE sy-subrc = 0.
        IF wa_stoken-str+w_off(1) EQ '('.
          REPLACE SECTION OFFSET w_off LENGTH 1 OF wa_stoken-str WITH ''.
          REPLACE ALL OCCURRENCES OF ')' IN wa_stoken-str WITH space.
          READ TABLE i_submit WITH KEY pname = wa_stoken-str.
          IF sy-subrc <> 0.
            i_submit-pname = wa_stoken-str.
            APPEND i_submit.
          ENDIF.
          EXIT.
        ELSE.
          REPLACE SECTION OFFSET w_off LENGTH 1 OF wa_stoken-str WITH ''.
          SHIFT wa_stoken-str LEFT DELETING LEADING space.
        ENDIF.
      ENDWHILE.
    ENDIF.

* Function modules (SE37)
    IF p_stoken-str CS 'FUNCTION'.

      CLEAR i_fmodule.
      IF p_level EQ '0'. " do not perform for function modules (2nd pass)
        w_index = sy-tabix + 1.
        READ TABLE p_stoken INDEX w_index INTO wa_stoken.
        IF wa_stoken-str CS 'BAPI'.
          i_fmodule-bapi = c_x.
        ENDIF.
        REPLACE FIRST OCCURRENCE OF '''' IN wa_stoken-str WITH space.
        REPLACE FIRST OCCURRENCE OF '''' IN wa_stoken-str WITH space.
        IF sy-subrc = 4. " didn't find 2nd quote (ie name truncated)
          CLEAR wa_tfdir.
          CONCATENATE wa_stoken-str '%' INTO wa_stoken-str.
          SELECT SINGLE funcname INTO wa_tfdir-funcname FROM tfdir
          WHERE funcname LIKE wa_stoken-str.
          IF sy-subrc = 0.
            i_fmodule-name = wa_tfdir-funcname.
          ELSE.
            CONTINUE.
          ENDIF.
        ELSE.
          i_fmodule-name = wa_stoken-str.
        ENDIF.
        i_fmodule-level = p_level.
        APPEND i_fmodule.
      ENDIF.
    ENDIF.
  ENDLOOP.
ENDFORM. "DATA_SEARCH
*&--------------------------------------------------------------------&*
*& Form GET_ADDITIONAL_DATA &*
*&--------------------------------------------------------------------&*
*& &*
*&--------------------------------------------------------------------&*
FORM get_additional_data.
* data selection message to sap gui
  CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
    DESTINATION 'SAPGUI'
    KEEPING LOGICAL UNIT OF WORK
    EXPORTING
      text = 'Get additional data' "#EC NOTEXT
             EXCEPTIONS
             system_failure
             communication_failure
    . "#EC *
  LOOP AT i_userexit.
* Workflow
    IF i_userexit-type EQ 'WorkFlow'.
      CONTINUE.
    ENDIF.
* Enhancement data
    IF i_userexit-type CS 'Enh'.
      CLEAR: wa_modsapa.
      SELECT SINGLE name INTO wa_modsapa-name FROM modsap
      WHERE member = i_userexit-txt.
      CHECK sy-subrc = 0.
      i_userexit-modname = wa_modsapa-name.
      CLEAR wa_modsapt.
      SELECT SINGLE modtext INTO wa_modsapt-modtext FROM modsapt
      WHERE name = wa_modsapa-name
      AND sprsl = sy-langu.
      i_userexit-modtext = wa_modsapt-modtext.
* Get the CMOD project name
      CLEAR w_mod.
      SELECT SINGLE modact~member modact~name modattr~status
      modattr~anam modattr~adat
      INTO w_mod
      FROM modact
      INNER JOIN modattr
      ON modattr~name = modact~name
      WHERE modact~member = wa_modsapa-name
      AND modact~typ = space.
      IF sy-subrc = 0.
        i_userexit-modattr = w_mod.
      ENDIF.
    ENDIF.
* BADI data
    IF i_userexit-type EQ 'BADI'.
      CLEAR wa_sxs_attr.
      SELECT SINGLE exit_name INTO wa_sxs_attr-exit_name FROM sxs_attr
      WHERE exit_name = i_userexit-txt.
      IF sy-subrc = 0.
        i_userexit-modname = i_userexit-txt.
      ELSE.
        i_userexit-modname = 'Dynamic call'.                "#EC NOTEXT
      ENDIF.
      CLEAR wa_sxs_attrt.
      SELECT SINGLE text INTO wa_sxs_attrt-text FROM sxs_attrt
      WHERE exit_name = wa_sxs_attr-exit_name
      AND sprsl = sy-langu.
      i_userexit-modtext = wa_sxs_attrt-text.
    ENDIF.
* BADI Implementation
    IF i_userexit-type EQ 'BADI'.
      CLEAR sxc_exit.
      SELECT COUNT( * ) FROM sxc_exit WHERE exit_name = i_userexit-txt.
      w_cnt = sy-dbcnt.
* determine id BADI is for interal or external use
      CLEAR sxs_attr.
      SELECT SINGLE * FROM sxs_attr WHERE exit_name = i_userexit-txt.
      IF sxs_attr-internal = 'X'.
        wa_sxs_attrt-text = 'SAP '.
      ELSE.
        wa_sxs_attrt-text = 'CUST'.
      ENDIF.
* concatenate wa_sxs_attrt-text w_cnt into i_userexit-modattr-name
* separated by space.
      WRITE wa_sxs_attrt-text TO i_userexit-modattr-name.
      WRITE w_cnt TO i_userexit-modattr-name+5.
    ENDIF.
    MODIFY i_userexit.
  ENDLOOP.
* get enhancements via program package
  CLEAR wa_tadir.
  SELECT SINGLE devclass INTO wa_tadir-devclass FROM tadir
  WHERE pgmid = 'R3TR'
  AND object = 'PROG'
  AND obj_name = p_pname.
  IF sy-subrc = 0.
    CLEAR: wa_modsapa, wa_modsapt.
    SELECT name FROM modsapa INTO wa_modsapa-name
    WHERE devclass = wa_tadir-devclass.
      SELECT SINGLE modtext FROM modsapt INTO wa_modsapt-modtext
      WHERE name = wa_modsapa-name
      AND sprsl = sy-langu.
      CLEAR i_userexit.
      READ TABLE i_userexit WITH KEY modname = wa_modsapa-name.
      IF sy-subrc <> 0.
        i_userexit-modtext = wa_modsapt-modtext.
        i_userexit-type = 'Enhancement'.                    "#EC NOTEXT
        i_userexit-modname = wa_modsapa-name.
        i_userexit-txt = 'Determined from program DevClass'. "#EC NOTEXT
        i_userexit-pname = 'Unknown'.                       "#EC NOTEXT
        APPEND i_userexit.
      ENDIF.
    ENDSELECT.
  ENDIF.
* set row colour.
  LOOP AT i_userexit.
    CASE i_userexit-type.
      WHEN 'BADI'.
        i_userexit-colour = 'C601'.
      WHEN 'Enhancement'.
        i_userexit-colour = 'C501'.
      WHEN 'Program Exit'.
        i_userexit-colour = 'C401'.
      WHEN 'WorkFlow'.
        i_userexit-colour = 'C301'.
      WHEN 'BusTrEvent'.
        i_userexit-colour = 'C201'.
    ENDCASE.
    MODIFY i_userexit.
  ENDLOOP.
ENDFORM. "GET_ADDITIONAL_DATA
*&--------------------------------------------------------------------&*
*& Form DATA_DISPLAY &*
*&--------------------------------------------------------------------&*
*& &*
*&--------------------------------------------------------------------&*
FORM data_display.
* data selection message to sap gui
  CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
    DESTINATION 'SAPGUI'
    KEEPING LOGICAL UNIT OF WORK
    EXPORTING
      text = 'Prepare screen for display' "#EC NOTEXT
             EXCEPTIONS
             system_failure
             communication_failure
    . "#EC *
  SORT i_userexit BY type txt modname.
  DELETE ADJACENT DUPLICATES FROM i_userexit COMPARING txt pname modname.
* ensure records selected.
  DESCRIBE TABLE i_userexit LINES w_linnum.
  IF w_linnum = 0.
    MESSAGE s003(g00). "No data records were selected
    EXIT.
  ENDIF.
  IF p_alv = ' '.
* format headings
    WRITE: 'Enhancements from main program: ', p_pname.
    WRITE: 'Enhancements from TCode: ', p_tcode.
    WRITE: 201''.
    ULINE.
    FORMAT COLOR COL_HEADING.
    WRITE: / sy-vline,
    (12) c_col1, "Enhanmt Type
    sy-vline,
    (40) c_col2, "Enhancement
    sy-vline,
    (30) c_col3, "Program/Include
    sy-vline,
    (20) c_col4, "Enhancement name
    sy-vline,
    (40) c_col5, "Enhancement description
    sy-vline,
    (8) c_col6, "Project
    sy-vline,
    (1) c_col7, "S
    sy-vline,
    (12) c_col8, "ChangeName
    sy-vline,
    (10) c_col9, "ChangeDate
    sy-vline.
    FORMAT RESET.
    ULINE.
* format lines
    LOOP AT i_userexit.
* set line colour
      CASE i_userexit-type.
        WHEN 'Enhancement'.
          FORMAT COLOR 3 INTENSIFIED OFF.
        WHEN 'BADI'.
          FORMAT COLOR 4 INTENSIFIED OFF.
        WHEN 'BusTrEvent'.
          FORMAT COLOR 5 INTENSIFIED OFF.
        WHEN 'Program Exit'.
          FORMAT COLOR 6 INTENSIFIED OFF.
        WHEN OTHERS.
          FORMAT RESET.
      ENDCASE.
      WRITE: / sy-vline,
      i_userexit-type,
      sy-vline,
      i_userexit-txt(40),
      sy-vline,
      i_userexit-pname(30),
      sy-vline,
      i_userexit-modname(20),
      sy-vline,
      i_userexit-modtext(40),
      sy-vline.
      WRITE: i_userexit-modattr-name,
      sy-vline,
      i_userexit-modattr-status,
      sy-vline,
      i_userexit-modattr-anam,
      sy-vline,
      i_userexit-modattr-adat NO-ZERO,
      sy-vline.
      HIDE: i_userexit-modname, i_userexit-type, i_userexit-modattr-name.
    ENDLOOP.
    FORMAT RESET.
    ULINE.
* user-exits from development class of function modules
    IF p_devc = c_x.
      WRITE: /.
      WRITE: / c_devc.
      WRITE: 201''.
      ULINE (90).
      WRITE: 201''.
      LOOP AT i_devclass.
        CLEAR wa_modsapa.
        SELECT name FROM modsapa INTO wa_modsapa
        WHERE devclass = i_devclass-clas.
          SELECT SINGLE name modtext INTO CORRESPONDING FIELDS OF wa_modsapt
          FROM modsapt
          WHERE name = wa_modsapa-name
          AND sprsl = sy-langu.
          FORMAT COLOR 3 INTENSIFIED OFF.
          WRITE: / sy-vline,
          (12) 'Enhancement',
          sy-vline,
          wa_modsapa-name,
          sy-vline,
          wa_modsapt-modtext,
          sy-vline.
        ENDSELECT.
      ENDLOOP.
      WRITE: 201''.
      ULINE (90).
      FORMAT RESET.
    ENDIF.
* display fuction modules used in program
    WRITE /.
    DESCRIBE TABLE i_fmodule LINES w_linnum.
    WRITE: / c_fmod , AT 35 w_linnum.                       "#EC NOTEXT
    WRITE: 201''.
    IF p_func = c_x.
      ULINE (38).
      WRITE: 201''.
      LOOP AT i_fmodule.
        WRITE: sy-vline,
        i_fmodule-name,
        sy-vline,
        i_fmodule-bapi,
        sy-vline.
        WRITE: 201''.
      ENDLOOP.
      WRITE: 201''.
      ULINE (38).
    ENDIF.
* display submit programs used in program
    WRITE /.
    DESCRIBE TABLE i_submit LINES w_linnum.
    WRITE: / c_subm , AT 35 w_linnum.                       "#EC NOTEXT
    WRITE: 201''.
    IF p_subm = c_x.
      ULINE (44).
      WRITE: 201''.
      LOOP AT i_submit.
        WRITE: sy-vline,
        i_submit-pname,
        sy-vline.
        WRITE: 201''.
      ENDLOOP.
      WRITE: 201''.
      ULINE (44).
    ENDIF.
* issue message with number of user-exits displayed
    DESCRIBE TABLE i_userexit LINES w_linnum.
    MESSAGE s697(56) WITH w_linnum.
  ELSE. " Show in alv format
* issue message with number of user-exits displayed
    DESCRIBE TABLE i_userexit LINES w_linnum.
    MESSAGE s697(56) WITH w_linnum.
* Create field catalog
    PERFORM create_field_catalog USING 'TYPE' 'T_USEREXIT' ' ' 'Type'.
    PERFORM create_field_catalog USING 'PNAME' 'T_USEREXIT' ' ' 'Prog?am name'.
    PERFORM create_field_catalog USING 'TXT' 'T_USEREXIT' ' ' 'Enhancement'.
    PERFORM create_field_catalog USING 'LEVEL' 'T_USEREXIT' c_x 'Level'.
    PERFORM create_field_catalog USING 'MODNAME' 'T_USEREXIT' ' ' 'Enhancement name'.
    PERFORM create_field_catalog USING 'MODTEXT' 'T_USEREXIT' ' ' 'Enhancement text'.
    PERFORM create_field_catalog USING 'MODATTR-MEMBER' 'T_USEREXIT' c_x 'Member'.
    PERFORM create_field_catalog USING 'MODATTR-NAME' 'T_USEREXIT' ' ' 'Project'.
    PERFORM create_field_catalog USING 'MODATTR-STATUS' 'T_USEREXIT' ' ' 'Status'.
    PERFORM create_field_catalog USING 'MODATTR-ANAM' 'T_USEREXIT' ' ' 'Changed by'.
    PERFORM create_field_catalog USING 'MODATTR-ADAT' 'T_USEREXIT' ' ' 'Change date'.
* Layout
    CLEAR i_layout.
    i_layout-colwidth_optimize = c_x.
    i_layout-info_fieldname = 'COLOUR'.
* Sort
    CLEAR i_sort.
    i_sort-fieldname = 'TYPE'.
    i_sort-tabname = 'T_USEREXIT'.
    i_sort-up = c_x.
    APPEND i_sort.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
      EXPORTING
        i_callback_program      = sy-cprog
        i_callback_user_command = 'USER_COMMAND'
        is_layout               = i_layout
        it_fieldcat             = i_fieldcat[]
        it_sort                 = i_sort[]
        i_default               = c_x
        i_save                  = 'A'
        i_grid_title            = w_gridtxt
      TABLES
        t_outtab                = i_userexit.
  ENDIF.
* issue message with number of user-exits displayed
  DESCRIBE TABLE i_userexit LINES w_linnum.
  MESSAGE s697(56) WITH w_linnum.
ENDFORM. "DATA_DISPLAY
*&---------------------------------------------------------------------&*
*& Form CREATE_FIELD_CATALOG &*
*&---------------------------------------------------------------------&*
FORM create_field_catalog USING p_fieldname
      p_tabname
      p_hide
      p_text.
  i_fieldcat-fieldname = p_fieldname.
  i_fieldcat-tabname = p_tabname.
  i_fieldcat-no_out = p_hide.
  i_fieldcat-seltext_l = p_text.
  APPEND i_fieldcat.
ENDFORM. " CREATE_FIELD_CATALOG
*&---------------------------------------------------------------------&*
*& Form CREATE_FIELD_CATALOG &*
*&---------------------------------------------------------------------&*
FORM user_command USING r_ucomm LIKE sy-ucomm
      rs_selfield TYPE slis_selfield.
  READ TABLE i_userexit INDEX rs_selfield-tabindex.
  CHECK sy-subrc = 0.
  CASE r_ucomm.
    WHEN '&IC1'.
      CASE rs_selfield-sel_tab_field.
        WHEN 'T_USEREXIT-MODNAME'.
          READ TABLE i_userexit INDEX rs_selfield-tabindex.
          CASE i_userexit-type.
            WHEN 'Enhancement'.
              SET PARAMETER ID 'MON' FIELD i_userexit-modname.
              CALL TRANSACTION 'SMOD'.
            WHEN 'BADI'.
              SET PARAMETER ID 'EXN' FIELD i_userexit-modname.
              CALL TRANSACTION 'SE18' AND SKIP FIRST SCREEN.
            WHEN 'BusTrEvent'.
              SUBMIT rfopfi00 WITH event = i_userexit-modname(8) AND RETURN.
            WHEN OTHERS.
              MESSAGE s030(cj). "Navigation not possible
          ENDCASE.
        WHEN 'T_USEREXIT-MODATTR-NAME'.
          IF NOT i_userexit-modattr-name IS INITIAL.
            SET PARAMETER ID 'MON_KUN' FIELD i_userexit-modattr-name.
            CALL TRANSACTION 'CMOD'.
          ELSE.
            MESSAGE s030(cj)."Navigation not possible
          ENDIF.
        WHEN OTHERS.
          MESSAGE s030(cj)."Navigation not possible
      ENDCASE.
  ENDCASE.
ENDFORM. "user_command
*&--------------------------------------------------------------------&*
*& AT LINE-SELECTION ?*
*&--------------------------------------------------------------------&*
AT LINE-SELECTION.
  GET CURSOR FIELD w_fsel.
  CASE w_fsel.
    WHEN 'I_USEREXIT-MODNAME'.
      CASE i_userexit-type.
        WHEN 'Enhancement'.
          SET PARAMETER ID 'MON' FIELD i_userexit-modname.
          CALL TRANSACTION 'SMOD'.
        WHEN 'BADI'.
          SET PARAMETER ID 'EXN' FIELD i_userexit-modname.
          CALL TRANSACTION 'SE18' AND SKIP FIRST SCREEN.
        WHEN 'BusTrEvent'.
          SUBMIT rfopfi00 WITH event = i_userexit-modname(8) AND RETURN.
        WHEN OTHERS.
          MESSAGE s030(cj)."Navigation not possible
      ENDCASE.
    WHEN 'I_USEREXIT-MODATTR-NAME'.
      IF NOT i_userexit-modattr-name IS INITIAL.
        SET PARAMETER ID 'MON_KUN' FIELD i_userexit-modattr-name.
        CALL TRANSACTION 'CMOD'.
      ELSE.
        MESSAGE s030(cj)."Navigation not possible
      ENDIF.
    WHEN OTHERS.
      MESSAGE s030(cj)."Navigation not possible
  ENDCASE.
*&--------------------------------------------------------------------&*
*& AT SELECTION-SCREEN &*
*&--------------------------------------------------------------------&*
AT SELECTION-SCREEN ON RADIOBUTTON GROUP rad1.
* grey-out checkboxes if ALV selected
AT SELECTION-SCREEN OUTPUT.
  LOOP AT SCREEN.
    IF p_alv = c_x.
      IF screen-group1 = 'A01'.
        screen-input = '0'.
        MODIFY SCREEN.
      ENDIF.
    ELSE.
      IF screen-group1 = 'A01'.
        screen-input = '1'.
        MODIFY SCREEN.
      ENDIF.
    ENDIF.
  ENDLOOP.

在这里插入图片描述

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1188554.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

为什么冰酒会被视为珍品?

在某些年份&#xff0c;珍贵稀有的葡萄酒让酿酒师有了冒险的意愿&#xff0c;葡萄比平时在藤上停留更长时间&#xff0c;需要等待至少-7℃的温度&#xff0c;酿酒师需要与自然玩游戏&#xff0c;可以持续到1月&#xff0c;在罕见的情况下可以持续到2月。对于酿酒师来说&#xf…

雷电防护在线检测(监测)平台应用方案

雷电防护在线检测&#xff08;监测&#xff09;平台是一种利用云计算、物联网、传感器、智能算法等技术&#xff0c;对雷电防护设施进行实时监测、预警、分析和管理的系统。该系统可以有效提高防雷安全水平&#xff0c;降低雷电灾害风险&#xff0c;为各行各业提供全面的雷电防…

RT-Thread 12. BSP根目录下SConscript分析

(1)menuconfig 命令通过读取工程的各个Kconfig 文件&#xff0c;生成配置界面供用户配置内核&#xff0c;最后所有配置相关的宏定义都会自动保存到 BSP 目录里的rtconfig.h 文件中&#xff0c;每一个 BSP 都有一个 rtconfig.h 文件&#xff0c;也就是这个 BSP 的配置信息。 (2)…

计算机网络期末复习-Part1

1、列举几种接入网技术&#xff1a;ADSL&#xff0c;HFC&#xff0c;FTTH&#xff0c;LAN&#xff0c;WLAN ADSL&#xff08;Asymmetric Digital Subscriber Line&#xff09;&#xff1a;非对称数字用户线路。ADSL 是一种用于通过电话线连接到互联网的技术&#xff0c;它提供…

JS 处理文档选择和范围创建【createRange | getSelection】

介绍 1、const selection window.getSelection(); 说明&#xff1a; 1、用于获取用户当前文档选择的对象&#xff1b; 2、它返回一个 Selection 对象&#xff0c;该对象代表了用户选择的文本范围&#xff08;可以包含一个或多个范围&#xff0c;因为用户可以同时选择多个不相…

Ubuntu LTS 坚持 10 年更新不动摇

导读Linux 内核开发者 Jonathan Corbet 此前在欧洲开源峰会上宣布&#xff0c;LTS 内核的支持时间将从六年缩短至两年&#xff0c;原因在于缺乏使用和缺乏支持。稳定版内核维护者 Greg Kroah-Hartman 也表示 “没人用 LTS 内核”。 近日&#xff0c;Ubuntu 开发商 Canonical 发…

mybatis嵌套查询子集合只有一条数据

我们再用mybatis做嵌套查询时&#xff0c;有时会遇到子集合只有1条数据的情况&#xff0c;例如下这样&#xff1a; 数据库查询结果 xml <resultMap id"userMap" type"com.springboot.demo.test.entity.User"><id column"uid" property…

拓展认知边界:如何给大语言模型添加额外的知识

Integrating Knowledge in Language Models P.s.这篇文章大部分内容来自Stanford CS224N这门课Integrating Knowledge in Language Models这一节&#x1f601; 为什么需要给语言模型添加额外的知识 1.语言模型会输出看似make sense但实际上不符合事实的内容 语言模型在生成…

抓包工具fiddler的基础知识详解

一、简介 fiddler是位于客户端和服务端之间的http代理 1、作用 监控浏览器所有的http/https流量查看、分析请求内容细节伪造客户端请求和服务器请求测试网站的性能解密https的web会话全局、局部断电功能第三方插件 2、使用场景 接口调试、接口测试、线上环境调试、web性能分…

Git的简介以及基本使用

目录 一.Git的简介 拓展&#xff1a;Git与SVN的区别&#xff08;各自的优点与缺点&#xff09; 二.Git文件的4种状态 三.Git的常用命令 搭建完成之后&#xff0c;将项目文件也上传之后&#xff0c;现在模拟其他人来下载这个代码 今天就分享到这啦&#xff01;&#xff01;…

XX公司数字化项目管理办法

XX公司数字化项目管理办法 Ver2.0 第一章 总则 为规范XX公司项目从立项到结项的过程管理&#xff0c;明确各阶段建设主要工作及交付标准&#xff0c;提升数字化项目总体交付质量&#xff0c;特制定本管理制度。 本制度适用于数字化项目范围内咨询服务类、软硬件实施类项目。…

Power Apps-组件属性

图片组件兼容性 可以选择右侧属性面板中的图像位置&#xff0c;更改为匹配度&#xff0c;兼容性更好 按钮点击事件 Navigate(屏幕名)//跳转到某个页面 Back()//返回上一个页面

GZ038 物联网应用开发赛题第1套

2023年全国职业院校技能大赛 高职组 物联网应用开发 任 务 书 (第1套卷) 工位号:______________ 第一部分 竞赛须知 一、竞赛要求 1、正确使用工具,操作安全规范; 2、竞赛过程中如有异议,可向现场考评人员反映,不得扰乱赛场秩序; 3、遵守赛场纪律,尊重考评人员…

4.Swin Transformer目标检测——训练数据集

1.centos7 安装显卡驱动、cuda、cudnn-CSDN博客 2.安装conda python库-CSDN博客 3.Cenots Swin-Transformer-Object-Detection环境配置-CSDN博客 步骤1&#xff1a;准备待训练的coco数据集 下载地址&#xff1a;https://download.csdn.net/download/malingyu/88519420 htt…

基于GoogleNet深度学习网络的花朵类型识别matlab仿真

目录 1.算法运行效果图预览 2.算法运行软件版本 3.部分核心程序 4.算法理论概述 4.1. GoogleNet网络结构 4.2. 基于GoogleNet的花朵类型识别 5.算法完整程序工程 1.算法运行效果图预览 2.算法运行软件版本 matlab2022a 3.部分核心程序 .............................…

PostgreSql中解析JSON字段和解析TEXT中的JSON字段

初始化操作 创建表 CREATE TABLE orders ( "ID" int8 NOT NULL,"info_j" json NOT NULL,"info_t" text NOT NULL );初始化表 INSERT INTO orders("ID", "info_j","info_t") VALUES (1, {"name":&qu…

基于公共业务提取的架构演进——外部依赖防腐篇

背景 有了前两篇的帐号权限提取和功能设置提取的架构演进后&#xff0c;有一个问题就紧接着诞生了&#xff0c;对于诸多业务方来说&#xff0c;关键数据源的迁移如何在各个产品落地&#xff1f; 要知道这些数据都很关键&#xff1a; - 对于帐号&#xff0c;获取不到帐号信息是…

番外篇:Linux中好玩的指令(Ubuntu环境)

前言 我知道&#xff0c;Linux的学习总是枯燥乏味的&#xff0c;今天给大家带来一些好玩的指令&#xff0c;供大家娱乐开心&#xff0c;整理不易&#xff0c;希望大家能够多多支持一下。 1. lolcat指令 输入以下命令即可安装lolcat&#xff1a; sudo apt-get install lolcat 安…

sql注入学习笔记

sql注入原理 掌握sql注入漏洞的原理掌握sql注入漏洞的分类 万能用户名 777 or 11 #原句 select userid from cms_users where username ".$username." and password".md5 ( $password ) ."输入过后为 select userid from cms_users where username …

8-1、T型加减速控制【51单片机控制步进电机-TB6600系列】

摘要&#xff1a;本节介绍步进电机T型加减速的控制方法&#xff0c;本小节主要内容为该控制方法的推导与计算。目前各平台对该控制方法介绍的文章目前较多&#xff0c;但部分关键参数并未给出推导过程&#xff0c;例如误差系数0.676的推导等&#xff0c;本节在现有文章框架下&a…