首页 > 编程语言 >SAP dialog 自定义搜索帮助 案例+源码

SAP dialog 自定义搜索帮助 案例+源码

时间:2024-01-26 11:14:17浏览次数:43  
标签:matnr &---------------------------------------------------------------------

同之前的blog一样,新建一个9000的屏幕,元素清单配好ok_code即可

前置准备

准备一个屏幕,具体步骤和之前一样,这边也按步骤做一下

状态栏

因为这个只是用于搜索帮助的演示,所以不需要应用应用程序工具栏,只需要设置功能键方便返回测试即可

标题

9000程序

PROCESS BEFORE OUTPUT.
  MODULE status_9000.
*
PROCESS AFTER INPUT.
  MODULE user_command_9000.
  MODULE user_exit_9000 AT EXIT-COMMAND.

PBO

MODULE status_9000 OUTPUT.
 SET PF-STATUS 'SRANDARD_9000'.
 SET TITLEBAR 'TITLE_9000'.
ENDMODULE.

PAI

MODULE user_command_9000 INPUT.
  save_ok = ok_code.
  CLEAR:ok_code.

  CASE save_ok.
    WHEN '$BACK'.
      LEAVE TO SCREEN 0.
    WHEN '$ROLL'.
      LEAVE TO SCREEN 0.
    WHEN OTHERS.
  ENDCASE.
ENDMODULE.

MODULE user_exit_9000 INPUT.
  LEAVE PROGRAM.
ENDMODULE.

单个选择搜索帮助

布局构建

9000程序

PROCESS BEFORE OUTPUT.
  MODULE status_9000.
*
PROCESS AFTER INPUT.
  MODULE user_command_9000.
  MODULE user_exit_9000 AT EXIT-COMMAND.

PROCESS ON VALUE-REQUEST.
  FIELD gv_matnr MODULE get_matnr.

POV

编写POV程序

MODULE get_matnr INPUT.

  "获取搜索搜索帮助
  select
    from makt
  FIELDS
    makt~matnr,
    makt~maktx
  INTO CORRESPONDING FIELDS OF TABLE @gt_makt.

  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
      retfield        = 'MATNR'
      dynpprog        = sy-repid
      dynpnr          = sy-dynnr
      dynprofield     = 'GV_MATNR'
      value_org       = 'S'
    TABLES
      value_tab       = gt_makt
    EXCEPTIONS
      parameter_error = 1
      no_values_found = 2
      OTHERS          = 3.
ENDMODULE.

展示如下

子屏幕范围选择搜索帮助

构建屏幕

构建子屏幕

在主程序中添加子屏幕

SELECTION-SCREEN BEGIN OF SCREEN 9001 AS SUBSCREEN.
  SELECTION-SCREEN: BEGIN OF BLOCK blk1 WITH FRAME.
    SELECT-OPTIONS:
      s_matnr FOR mara-matnr.
  SELECTION-SCREEN: END OF BLOCK blk1.
SELECTION-SCREEN END OF SCREEN 9001.

9000程序

PROCESS BEFORE OUTPUT.
  CALL SUBSCREEN: subscreen INCLUDING sy-repid dynn_9001.
  MODULE status_9000.
*
PROCESS AFTER INPUT.
  CALL SUBSCREEN: subscreen.
  MODULE user_command_9000.
  MODULE user_exit_9000 AT EXIT-COMMAND.

添加搜索帮助代码

在子屏幕下方添加如下代码

"搜索帮助
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_matnr-low.
  PERFORM frm_create_help.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_matnr-high.
  PERFORM frm_create_help.

例程frm_create_help

FORM frm_create_help .

  "获取搜索搜索帮助
  SELECT
    FROM makt
  FIELDS
    makt~matnr,
    makt~maktx
  INTO CORRESPONDING FIELDS OF TABLE @gt_makt.

  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
      retfield        = 'MATNR'
      dynpprog        = sy-repid
      dynpnr          = sy-dynnr
      dynprofield     = 'S_MATNR-LOW'
      value_org       = 'S'
    TABLES
      value_tab       = gt_makt
    EXCEPTIONS
      parameter_error = 1
      no_values_found = 2
      OTHERS          = 3.

ENDFORM.

结果展示

表控件搜索帮助并回填

表空间的搜索帮助会有点不一样,因为需要刷新表数据来进行呈现,否则是不会展现出来的

屏幕构建

建议使用带向导的表控件

9000屏幕

主要看最后一行,其他多余的代码都是通过向导表控件生成的

PROCESS BEFORE OUTPUT.
*&SPWIZARD: PBO FLOW LOGIC FOR TABLECONTROL 'MAKT_TABLE'
  MODULE makt_table_change_tc_attr.
*&SPWIZARD: MODULE MAKT_TABLE_CHANGE_COL_ATTR.
  LOOP AT   gt_table_makt
       INTO gs_table_makt
       WITH CONTROL makt_table
       CURSOR makt_table-current_line.
*&SPWIZARD:   MODULE MAKT_TABLE_CHANGE_FIELD_ATTR
  ENDLOOP.

  CALL SUBSCREEN: subscreen INCLUDING sy-repid dynn_9001.
  MODULE status_9000.
*
PROCESS AFTER INPUT.
*&SPWIZARD: PAI FLOW LOGIC FOR TABLECONTROL 'MAKT_TABLE'
  LOOP AT gt_table_makt.
    CHAIN.
      FIELD gs_table_makt-matnr.
      FIELD gs_table_makt-maktx.
      MODULE makt_table_modify ON CHAIN-REQUEST.
    ENDCHAIN.
  ENDLOOP.
*&SPWIZARD: MODULE MAKT_TABLE_CHANGE_TC_ATTR.
*&SPWIZARD: MODULE MAKT_TABLE_CHANGE_COL_ATTR.

  CALL SUBSCREEN: subscreen.
  MODULE user_command_9000.
  MODULE user_exit_9000 AT EXIT-COMMAND.

PROCESS ON VALUE-REQUEST.
  FIELD gv_matnr MODULE get_matnr.
  FIELD gs_table_makt-matnr MODULE get_table_matnr.

get_table_matnr

MODULE get_table_matnr INPUT.

  "获取搜索搜索帮助
  SELECT
    FROM makt
  FIELDS
    makt~matnr,
    makt~maktx
  INTO CORRESPONDING FIELDS OF TABLE @gt_table_makt.

  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
      retfield        = 'MATNR'
      dynpprog        = sy-repid
      dynpnr          = sy-dynnr
      dynprofield     = 'GS_TABLE_MAKT-MATNR'
      value_org       = 'S'
    TABLES
      value_tab       = gt_table_makt
    EXCEPTIONS
      parameter_error = 1
      no_values_found = 2
      OTHERS          = 3.

ENDMODULE.

展现

数据回填

如果不只是想要物料号回填上来,还要自动把物料描述带出来要怎么做呢

更新get_table_matnr

获取选择行 以及在搜索帮助的函数中新增两个导入参数,并在最后对表格进行刷新展现

  DATA: lt_return TYPE STANDARD TABLE OF ddshretval,
        ls_return TYPE ddshretval.

  DATA: lv_row LIKE sy-tabix.

  "获取屏幕行
  CLEAR lv_row.
  CALL FUNCTION 'DYNP_GET_STEPL'
    IMPORTING
      povstepl = lv_row.

  "获取搜索搜索帮助
  SELECT
    FROM makt
  FIELDS
    makt~matnr,
    makt~maktx
  INTO CORRESPONDING FIELDS OF TABLE @gt_table_makt.

  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
      retfield         = 'MATNR'
      dynpprog         = sy-repid
      dynpnr           = sy-dynnr
      dynprofield      = 'GS_TABLE_MAKT-MATNR'
      value_org        = 'S'
      callback_program = sy-repid
      callback_form    = 'FRM_RETURN_INFO'
    TABLES
      value_tab        = gt_table_makt
      return_tab       = lt_return
    EXCEPTIONS
      parameter_error  = 1
      no_values_found  = 2
      OTHERS           = 3.

  IF sy-subrc EQ 0.
    LOOP AT lt_return INTO ls_return.
      CASE ls_return-fieldname.
        WHEN 'F0002'.
          gs_table_makt-maktx = ls_return-fieldval. 
        WHEN OTHERS.
      ENDCASE.
    ENDLOOP.
  ENDIF.

  "POV 不经过 PBO PAI 所以需要手动进行数据更新
  PERFORM frm_refresh_table USING lv_row.

例程:FRM_RETURN_INFO

将自定义搜索帮助的数据 回填到上一个函数中的lt_return

FORM frm_return_info TABLES record_tab STRUCTURE seahlpres
                     CHANGING shlp TYPE shlp_descr_t
                              callcontrol LIKE ddshf4ctrl.

  DATA: interface LIKE LINE OF shlp-interface.


  READ TABLE shlp-interface INTO interface INDEX 1.

  CLEAR interface.
  interface-shlpfield = 'F0002'. "这里的编号就是搜索帮助上的顺序
  interface-valfield = 'GS_TABLE_MAKT-MAKTX'.
  APPEND interface TO shlp-interface.
ENDFORM.

例程:frm_refresh_table

FORM frm_refresh_table USING lv_row LIKE sy-tabix.

  DATA: lt_systems TYPE STANDARD TABLE OF dynpread,
        ls_systems TYPE dynpread.

  CLEAR:lt_systems.

  CLEAR ls_systems.
  ls_systems-fieldname = 'GS_TABLE_MAKT-MATNR'.
  ls_systems-stepl = lv_row.
  ls_systems-fieldvalue = gs_table_makt-matnr.
  APPEND ls_systems TO lt_systems.


  CLEAR ls_systems.
  ls_systems-fieldname = 'GS_TABLE_MAKT-MAKTX'.
  ls_systems-stepl = lv_row.
  ls_systems-fieldvalue = gs_table_makt-maktx.
  APPEND ls_systems TO lt_systems.


  CALL FUNCTION 'DYNP_VALUES_UPDATE'
    EXPORTING
      dyname               = sy-repid
      dynumb               = sy-dynnr
    TABLES
      dynpfields           = lt_systems
    EXCEPTIONS
      invalid_abapworkarea = 1
      invalid_dynprofield  = 2
      invalid_dynproname   = 3
      invalid_dynpronummer = 4
      invalid_request      = 5
      no_fielddescription  = 6
      undefind_error       = 7
      OTHERS               = 8.

ENDFORM.

展现

完成上述操作后,点击搜索帮助就会发现 除了物料号,物料描述也带出来了

源码

以上的三种搜索帮助在一起,使用的时候记得区分,注意:部分源码时使用dialog的时候自动生成的

主程序

*&---------------------------------------------------------------------*
*& Report Y_PNJ_DEMO16
*&---------------------------------------------------------------------*
*&
*&---------------------------------------------------------------------*
REPORT y_pnj_demo16.

INCLUDE y_pnj_demo16_top.
INCLUDE y_pnj_demo16_pbo.
INCLUDE y_pnj_demo16_pai.
INCLUDE y_pnj_demo16_pov.
INCLUDE y_pnj_demo16_per.

TABLES: mara.

"定义 9001的选择屏幕
SELECTION-SCREEN BEGIN OF SCREEN 9001 AS SUBSCREEN.
  SELECTION-SCREEN: BEGIN OF BLOCK blk1 WITH FRAME.
    SELECT-OPTIONS:
      s_matnr FOR mara-matnr.
  SELECTION-SCREEN: END OF BLOCK blk1.
SELECTION-SCREEN END OF SCREEN 9001.

"搜索帮助
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_matnr-low.
  PERFORM frm_create_help.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_matnr-high.
  PERFORM frm_create_help.

*&---------------------------------------------------------------------*
*&INITIALIZATION/选择屏幕前初始化(选择屏幕展示之前执行)
*&---------------------------------------------------------------------*
INITIALIZATION .

*&---------------------------------------------------------------------*
*& AT SELECTION-SCREEN OUTPUT/选择屏幕控制(第二屏输出)
*&---------------------------------------------------------------------*
AT SELECTION-SCREEN OUTPUT .

*&---------------------------------------------------------------------*
*& AT SELECTION-SCREEN/选择屏幕执行(参数输入检查)
*&---------------------------------------------------------------------*
AT SELECTION-SCREEN .

*&---------------------------------------------------------------------*
*& START-OF-SELECTION/开始选择屏幕(点击执行按钮之后执行的语块)
*&---------------------------------------------------------------------*
START-OF-SELECTION .
  CALL SCREEN 9000.

*&---------------------------------------------------------------------*
*& END-OF-SELECTION/结束选择屏幕(程序结束处理,输出等)
*&---------------------------------------------------------------------*
END-OF-SELECTION .

包含文件Y_PNJ_DEMO16_PAI

*&---------------------------------------------------------------------*
*& 包含               Y_PNJ_DEMO16_PAI
*&---------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*&      Module  USER_COMMAND_9000  INPUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
MODULE user_command_9000 INPUT.
  save_ok = ok_code.
  CLEAR:ok_code.

  CASE save_ok.
    WHEN '$BACK'.
      LEAVE TO SCREEN 0.
    WHEN '$ROLL'.
      LEAVE TO SCREEN 0.
    WHEN OTHERS.
  ENDCASE.
ENDMODULE.
*&---------------------------------------------------------------------*
*&      Module  USER_EXIT_9000  INPUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
MODULE user_exit_9000 INPUT.
  LEAVE PROGRAM.
ENDMODULE.

*&SPWIZARD: INPUT MODULE FOR TC 'MAKT_TABLE'. DO NOT CHANGE THIS LINE!
*&SPWIZARD: MODIFY TABLE
MODULE MAKT_TABLE_MODIFY INPUT.
  MODIFY GT_TABLE_MAKT
    FROM GS_TABLE_MAKT
    INDEX MAKT_TABLE-CURRENT_LINE.
ENDMODULE.

包含文件Y_PNJ_DEMO16_PBO

*&---------------------------------------------------------------------*
*& 包含               Y_PNJ_DEMO16_PBO
*&---------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*& Module STATUS_9000 OUTPUT
*&---------------------------------------------------------------------*
*&
*&---------------------------------------------------------------------*
MODULE status_9000 OUTPUT.
 SET PF-STATUS 'STANDARD_9000'.
 SET TITLEBAR 'TITLE_9000'.
ENDMODULE.

*&SPWIZARD: OUTPUT MODULE FOR TC 'MAKT_TABLE'. DO NOT CHANGE THIS LINE!
*&SPWIZARD: UPDATE LINES FOR EQUIVALENT SCROLLBAR
MODULE MAKT_TABLE_CHANGE_TC_ATTR OUTPUT.
  DESCRIBE TABLE GT_TABLE_MAKT LINES MAKT_TABLE-lines.
ENDMODULE.

包含文件Y_PNJ_DEMO16_PER

*&---------------------------------------------------------------------*
*& 包含               Y_PNJ_DEMO16_PER
*&---------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*& Form frm_create_help
*&---------------------------------------------------------------------*
*& text
*&---------------------------------------------------------------------*
*& -->  p1        text
*& <--  p2        text
*&---------------------------------------------------------------------*
FORM frm_create_help .

  "获取搜索搜索帮助
  SELECT
    FROM makt
  FIELDS
    makt~matnr,
    makt~maktx
  INTO CORRESPONDING FIELDS OF TABLE @gt_makt.

  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
      retfield        = 'MATNR'
      dynpprog        = sy-repid
      dynpnr          = sy-dynnr
      dynprofield     = 'S_MATNR-LOW'
      value_org       = 'S'
    TABLES
      value_tab       = gt_makt
    EXCEPTIONS
      parameter_error = 1
      no_values_found = 2
      OTHERS          = 3.

ENDFORM.

*&---------------------------------------------------------------------*
*& Form FRM_RETURN_INFO
*&---------------------------------------------------------------------*
*& text
*&---------------------------------------------------------------------*
*& -->  p1        text
*& <--  p2        text
*&---------------------------------------------------------------------*
FORM frm_return_info TABLES record_tab STRUCTURE seahlpres
                     CHANGING shlp TYPE shlp_descr_t
                              callcontrol LIKE ddshf4ctrl.

  DATA: interface LIKE LINE OF shlp-interface.


  READ TABLE shlp-interface INTO interface INDEX 1.

  CLEAR interface.
  interface-shlpfield = 'F0002'.
  interface-valfield = 'GS_TABLE_MAKT-MAKTX'.
  APPEND interface TO shlp-interface.

ENDFORM.
*&---------------------------------------------------------------------*
*& Form frm_refresh_table
*&---------------------------------------------------------------------*
*& text
*&---------------------------------------------------------------------*
*&      --> LV_ROW
*&---------------------------------------------------------------------*
FORM frm_refresh_table USING lv_row LIKE sy-tabix.

  DATA: lt_systems TYPE STANDARD TABLE OF dynpread,
        ls_systems TYPE dynpread.

  CLEAR:lt_systems.

  CLEAR ls_systems.
  ls_systems-fieldname = 'GS_TABLE_MAKT-MATNR'.
  ls_systems-stepl = lv_row.
  ls_systems-fieldvalue = gs_table_makt-matnr.
  APPEND ls_systems TO lt_systems.


  CLEAR ls_systems.
  ls_systems-fieldname = 'GS_TABLE_MAKT-MAKTX'.
  ls_systems-stepl = lv_row.
  ls_systems-fieldvalue = gs_table_makt-maktx.
  APPEND ls_systems TO lt_systems.


  CALL FUNCTION 'DYNP_VALUES_UPDATE'
    EXPORTING
      dyname               = sy-repid
      dynumb               = sy-dynnr
    TABLES
      dynpfields           = lt_systems
    EXCEPTIONS
      invalid_abapworkarea = 1
      invalid_dynprofield  = 2
      invalid_dynproname   = 3
      invalid_dynpronummer = 4
      invalid_request      = 5
      no_fielddescription  = 6
      undefind_error       = 7
      OTHERS               = 8.

ENDFORM.

包含文件Y_PNJ_DEMO16_POV

*&---------------------------------------------------------------------*
*& 包含               Y_PNJ_DEMO16_POV
*&---------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*&      Module  GET_MATNR  INPUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
MODULE get_matnr INPUT.

  "获取搜索搜索帮助
  SELECT
    FROM makt
  FIELDS
    makt~matnr,
    makt~maktx
  INTO CORRESPONDING FIELDS OF TABLE @gt_makt.

  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
      retfield        = 'MATNR'
      dynpprog        = sy-repid
      dynpnr          = sy-dynnr
      dynprofield     = 'GV_MATNR'
      value_org       = 'S'
    TABLES
      value_tab       = gt_makt
    EXCEPTIONS
      parameter_error = 1
      no_values_found = 2
      OTHERS          = 3.
ENDMODULE.
*&---------------------------------------------------------------------*
*&      Module  GET_TABLE_MATNR  INPUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
MODULE get_table_matnr INPUT.

  DATA: lt_return TYPE STANDARD TABLE OF ddshretval,
        ls_return TYPE ddshretval.

  DATA: lv_row LIKE sy-tabix.

  "获取屏幕行
  CLEAR lv_row.
  CALL FUNCTION 'DYNP_GET_STEPL'
    IMPORTING
      povstepl = lv_row.

  "获取搜索搜索帮助
  SELECT
    FROM makt
  FIELDS
    makt~matnr,
    makt~maktx
  INTO CORRESPONDING FIELDS OF TABLE @gt_table_makt.

  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
      retfield         = 'MATNR'
      dynpprog         = sy-repid
      dynpnr           = sy-dynnr
      dynprofield      = 'GS_TABLE_MAKT-MATNR'
      value_org        = 'S'
      callback_program = sy-repid
      callback_form    = 'FRM_RETURN_INFO'
    TABLES
      value_tab        = gt_table_makt
      return_tab       = lt_return
    EXCEPTIONS
      parameter_error  = 1
      no_values_found  = 2
      OTHERS           = 3.

  IF sy-subrc EQ 0.
    LOOP AT lt_return INTO ls_return.
      CASE ls_return-fieldname.
        when 'F0001'.
          gs_table_makt-matnr = ls_return-fieldval.
        WHEN 'F0002'.
          gs_table_makt-maktx = ls_return-fieldval.
        WHEN OTHERS.
      ENDCASE.
    ENDLOOP.
  ENDIF.
*
  "POV 不经过 PBO PAI 所以需要手动进行数据更新
  PERFORM frm_refresh_table USING lv_row.

ENDMODULE.

包含文件Y_PNJ_DEMO16_TOP

*&---------------------------------------------------------------------*
*& 包含               Y_PNJ_DEMO16_TOP
*&---------------------------------------------------------------------*
*&---Variable
DATA: ok_code TYPE sy-ucomm, " 用于接收屏幕操作
      save_ok TYPE sy-ucomm. " 接入屏幕操作 并清空ok_code

DATA: gv_matnr TYPE mara-matnr.

TYPES: BEGIN OF ty_makt,
         matnr TYPE makt-matnr,
         maktx TYPE makt-maktx,
       END OF ty_makt.

DATA: gt_makt TYPE STANDARD TABLE OF ty_makt,
      gs_makt TYPE ty_makt.

DATA: gt_table_makt TYPE STANDARD TABLE OF ty_makt,
      gs_table_makt TYPE ty_makt.


DATA: dynn_9001(4) VALUE '9001'.

*&SPWIZARD: DECLARATION OF TABLECONTROL 'MAKT_TABLE' ITSELF
CONTROLS: MAKT_TABLE TYPE TABLEVIEW USING SCREEN 9000.

标签:matnr,&---------------------------------------------------------------------
From: https://www.cnblogs.com/pnj-owowa/p/17986288

相关文章

  • 自定义模板中数据标签
    笔记数据标签(DataTag)只是一种辨识度比较高的文本字符串,样式完全由开发人员自己说了算。比如这样的数据标签“【##日期$$】”,编写代码openDataTag("【##日期$$】")即可返回数据标签对象,进而可以对此数据标签填充数据或设置样式等操作。在实际的Word文档开发中,经常需要自动填充......
  • 如何获取微信的版本号详解【附完整源码】
    前两天群里有人问到这个问题,我想着在网上找个教程发给他,没想到这玩意还挺新鲜?网上基本上找不到实质性的回答...关于这个问题,其实挺简单的,微信的版本号其实就写在注册表中,读取它就完事了~打开注册列表找到【计算机\HKEY_CURRENT_USER\Software\Tencent\WeChat】,就看的到版本号......
  • Spring源码导入IDEA记录
    一、首先Spring源码是gradle搭建,gradle会和jdk版本、IDEA产生兼容问题参考【学不完@根本学不完】的文章:SpringBoot版本与Spring、java、maven、gradle版本对应汇总=>由于本地JDK是1.8对应Java8,按照尽可能看新版本查找=>对应表格里面gradle7.x二、gradle安装步骤gradle历......
  • 【C语言进阶篇】模拟实现通讯录 (内附源码)
    (文章目录)......
  • 记windows自定义bat脚本自启动
    自定义Windows启动脚本简化版在本指南中,我们将使用一个简化的批处理文件(.bat)来演示如何创建自定义的Windows启动脚本。以下是一个基本的模板,您只需根据需要在:begin部分添加您的代码。@echooffif"%1"=="h"gotobeginrem获取脚本路径set"scriptPath=%~dp0"rem......
  • 通达信涨停柱副图指标,红涨停,兰跌停源码
    C2:=REF(C,1);涨停:=IF((C-C2)100/C2>=(10-0.01100/C2),1,0);STICKLINE(涨停,OPEN,CLOSE,2,0),COLOR0000FF;STICKLINE(涨停,H,L,0,0),COLOR0000FF;跌停:=IF((C2-C)100/C2>=(10-0.01100/C2),1,0);STICKLINE(跌停,OPEN,CLOSE,2,0),COLORGREEN;STICKLINE(跌停,H,L,0,1),COLORGR......
  • 通达信金牌MACD副图提示顶底源码
    XA:=DATE<=20240115;DIF:(EMA(C,12)XA-EMA(C,26))XA,COLORF0F0F0;DEA:EMA(DIF,9)XA,COLOR00DCDC;MACD:2(DIF-DEA)XA,COLORSTICK;STICKLINE(MACD>REF(MACD,1)ANDMACD>=0,MACD,0,10/3,0),COLORRED;STICKLINE(MACD>REF(MACD,1)ANDMACD<0,MACD,0,10/3,1),......
  • 解密在线教育系统源码:定制化企业培训的利器
    当下,在线教育系统的出现,不仅突破了时空的束缚,更为企业提供了灵活、高效的培训方式。解密在线教育系统源码,对于企业而言,就如同拥有了一把定制化企业培训的利器。一、解析在线教育系统源码1.前端技术栈的选择在搭建在线教育系统时,选择合适的前端技术栈至关重要。通过深度定制前端界面......
  • 源码分析:线程池里新增一个线程的流程是什么
    1、先判断新线程是不是为空,为空就报空指针错误否则就往下运行;2、判断是否小于核心线程数,小于则直接新增线程否则就往下运行;3、尝试新增到工作队列中,添加成功就等待调用否则就往下运行;4、再次尝试新增线程,如果当前线程池的线程数大于线程池容量或最大线程数就触发拒绝策略。......
  • 源码文件阅读---hooks的使用---使用文心一言读代码
    import{CommonFormTypes}from'globalConstants';import{createContext,useCallback,useState}from'react';import{BoardType}from'../../../DashBoardPage/pages/Board/slice/types';import{VizType}from'./slic......