ABAP报表开发总结---采购排产表

news2024/11/25 13:22:33

1.动态创建内表

1.1首先维护好一个子例程

FORM frm_add_fcat USING value1 value2 value3 value4.
  wa_fcat-fieldname = value1.
  wa_fcat-inttype = value2.
  wa_fcat-reptext = value3.
  wa_fcat-intlen = value4.
  APPEND wa_fcat TO it_fcat.
  CLEAR: wa_fcat.
ENDFORM. "frm_add_fcat

1.2调用子例程创建静态部分

  "静态主表部分
  PERFORM frm_add_fcat USING: 'AUART'  afpo-dauat '订单类型' '10'.
  PERFORM frm_add_fcat USING: 'PLNBEZ'  afko-plnbez '物料' '18'.
  PERFORM frm_add_fcat USING: 'MAKTX'  makt-maktx '物料描述' '40'.
  PERFORM frm_add_fcat USING: 'WGBEZ'  t023t-wgbez '物料组' '10'.
  PERFORM frm_add_fcat USING: 'WERKS'  mard-werks '工厂' '10'.
  PERFORM frm_add_fcat USING: 'LABST'  mard-werks '当前库存' '10'.
  PERFORM frm_add_fcat USING: 'MENGE_RJ'  matdoc-menge  '日均库存' '10'.
  PERFORM frm_add_fcat USING: 'MENGE_WG'  matdoc-menge  '已完工' '10'.
  PERFORM frm_add_fcat USING: 'MENGE_SALE' matdoc-menge  '可销售' '10'.
  PERFORM frm_add_fcat USING: 'MENGE_WWG' matdoc-menge  '未完工' '10'.

1.3进行动态循环,创建对应的动态列

  "动态日期部分
  CLEAR:day_col.
  day_col =  s_gstrp-high.
  DO col TIMES." 根据条件动态生成列

    "从起始日期开始算
    CALL FUNCTION 'FIMA_DATE_CREATE'
      EXPORTING
        i_date = day_col
        i_days = '+1'
      IMPORTING
        e_date = day_col.


    CONCATENATE 'COL' day_col+4(4) INTO colname.
    CONCATENATE '未完工-' day_col+4(4) INTO  colreptext.
    PERFORM frm_add_fcat USING: colname 'I' colreptext '10'.
  ENDDO.

1.4根据创建好的内表结构生成动态表

  " 根据it_fact生成动态表
  CALL METHOD cl_alv_table_create=>create_dynamic_table
    EXPORTING
      it_fieldcatalog = it_fcat
    IMPORTING
      ep_table        = dy_table.

  ASSIGN dy_table->* TO <dyn_table> .

  CREATE DATA dy_line LIKE LINE OF <dyn_table>.

  ASSIGN dy_line->* TO <dyn_wa>.

2.相关的前导0处理

  LOOP AT gt_logrt_now ASSIGNING FIELD-SYMBOL(<fs_gt_logrt_now1>) .
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
      EXPORTING
        input  = <fs_gt_logrt_now1>-plnbez
      IMPORTING
        output = <fs_gt_logrt_now1>-plnbez.

  ENDLOOP.

3.注意一个语法的坑----AT END OF (此类的新语法)
3.1使用普通的循环可能出现,把内标赋值到工作区的时候出现*******在这里插入图片描述

  LOOP AT gt_logrt_complete_wg INTO gw_logrt_complete_wg .

    menge_total_fin  =  gw_logrt_complete_wg-menge + menge_total_fin.

    AT END OF   aufnr .

      gw_logrt_complete_wg-menge  =  menge_total_fin.
      MODIFY gt_logrt_complete_wg  FROM gw_logrt_complete_wg   TRANSPORTING    menge WHERE   aufnr   = gw_logrt_complete_wg-aufnr.
      CLEAR: menge_total_fin .
    ENDAT.

  ENDLOOP.

3.2正确的写法应该是分配到指针来处理

  LOOP AT gt_logrt_complete_mb1 ASSIGNING FIELD-SYMBOL(<fs_gt_logrt_complete_mb2>)  .

    READ TABLE gt_logrt_complete_wg INTO gw_logrt_complete_wg WITH  KEY aufnr =  <fs_gt_logrt_complete_mb2>-aufnr.

    menge_total_tar  =  <fs_gt_logrt_complete_mb2>-gamng  -  gw_logrt_complete_wg-gamng.


    AT END OF  plnbez .

      <fs_gt_logrt_complete_mb2>-gamng  =  menge_total_tar.


*      MODIFY gt_logrt_complete_mb1  FROM gw_logrt_complete_mb1   TRANSPORTING    gamng WHERE   aufnr  =  gw_logrt_complete_mb1-aufnr.
      CLEAR:menge_total_fin   .
    ENDAT.

    CLEAR: gw_logrt_complete_mb1 ,menge_total_tar   ,gw_logrt_complete_wg.
  ENDLOOP.

4.注意点排序跟去重的字段要保持一致

 SORT  gt_logrt_complete_wg BY aufnr .
  DELETE ADJACENT DUPLICATES FROM  gt_logrt_complete_wg COMPARING aufnr .

5.怎么给动态表写入值呢?(高效率)
5.1 在其他表里面把值处理好,通过关键字来关联,例如:日期之类的?

    LOOP AT gt_out INTO gw_out .

      "把静态部分的数据复制到动态表里面

      MOVE-CORRESPONDING gw_out TO <dyn_wa>.


********-未完工数量  =  目标数量  -  完工数量

      "1.生成动态表部分

      DO col TIMES.
*        index = index + 1.
        "从起始日期开始算
        CALL FUNCTION 'FIMA_DATE_CREATE'
          EXPORTING
            i_date = day_col
            i_days = '+1'
          IMPORTING
            e_date = day_col.

        CONCATENATE 'COL' day_col+4(4) INTO colname.
        ASSIGN COMPONENT colname OF STRUCTURE <dyn_wa> TO <dyn_field>.

        READ TABLE  gt_logrt_complete_mb1  INTO gw_logrt_complete_mb1 WITH  KEY auart   = gw_out-auart    plnbez  =  gw_out-plnbez  gstrp  = day_col .


*        "3.目标数据值获取

        <dyn_field> =  gw_logrt_complete_mb1-gamng  .

        gw_out-menge_wwg  = gw_out-menge_wwg  +  <dyn_field>.





        CLEAR: gt_logrt_complete  ,gw_logrt_complete, menge_total_fin  ,  menge_total_tar   ,gw_logrt_complete_mb1  ,  gw_logrt_complete_wg1.
      ENDDO.

      PERFORM frm_set_stru_value USING 'MENGE_WWG' gw_out-menge_wwg CHANGING <dyn_wa>.

      APPEND <dyn_wa> TO <dyn_table>.


      CLEAR:gw_out.
      day_col =  s_gstrp-high.
    ENDLOOP.

最后赋上全部的源码啦!

*&---------------------------------------------------------------------*
*& Report ZMMRP046
*&---------------------------------------------------------------------*
*&
*&---------------------------------------------------------------------*
REPORT zmmrp046.

TABLES:resb,afko,afpo,makt,mard,t023t,matdoc.


DATA :lt_return       LIKE bapiret2 OCCURS 0 WITH HEADER LINE.

"动态列表

DATA: wa_layo TYPE lvc_s_layo.
DATA: wa_fcat TYPE lvc_s_fcat,
      it_fcat TYPE lvc_t_fcat.



FIELD-SYMBOLS: <fs_table>     TYPE STANDARD TABLE,
               <fs_structure> TYPE any.

DATA it_scol TYPE lvc_t_scol .

DATA: g_grid TYPE REF TO cl_gui_alv_grid.

FIELD-SYMBOLS: <dyn_table> TYPE STANDARD TABLE,
               <dyn_wa>,
               <dyn_field>.

DATA: dy_table TYPE REF TO data,
      dy_line  TYPE REF TO data.

DATA: colreptext(10).

DATA: colname(10),
      index(2).
DATA :col TYPE i  .

****ALV参数定义:
TYPE-POOLS: slis.
DATA: it_fieldcat TYPE slis_t_fieldcat_alv,
      it_layout   TYPE slis_layout_alv.
DATA:   lv_repid LIKE sy-repid.
DATA:   it_ls_fieldcat TYPE slis_fieldcat_alv.
DATA:   lv_pos TYPE i VALUE 1.

TYPES:"主表
  BEGIN OF ty_out,
    auart      TYPE   afpo-dauat, "订单类型
    plnbez     TYPE  afko-plnbez , "物料
    maktx      TYPE makt-maktx , "物料描述
    labst      TYPE mard-labst , " 当前库存
    wgbez      TYPE t023t-wgbez, "物料组
    werks      TYPE mard-werks,
    menge_rj   TYPE  matdoc-menge, "日均库存
    menge_wg   TYPE matdoc-menge, "已完工
    menge_wwg  TYPE matdoc-menge, "未完工
    menge_sale TYPE  matdoc-menge, "可销售库存
    gamng      TYPE afko-gamng, "工单目标数量
    it_fcat    TYPE lvc_t_fcat,
  END OF ty_out.

TYPES:"当前库存表
  BEGIN OF ty_logrt,
    auart  TYPE  aufk-auart , "订单类型
    plnbez TYPE afko-plnbez , "物料
    labst  TYPE mard-labst , " 当前库存
    werks  TYPE afpo-dwerk, "工厂
    lgort  TYPE mard-lgort, "库位
  END OF ty_logrt.



TYPES:"日均出库
  BEGIN OF ty_logrt_aver,
    auart TYPE  aufk-auart , "订单类型
    matbf TYPE matdoc-matbf , "物料
    menge TYPE matdoc-menge , " 库存数量
    werks TYPE matdoc-werks, "工厂
    kunnr TYPE kna1-kunnr,
  END OF ty_logrt_aver.


TYPES:"日均出库
  BEGIN OF ty_logrt_complete,

    auart  TYPE  aufk-auart , "订单类型
    gstrp  TYPE afko-gstrp,
    plnbez TYPE afko-plnbez , "物料
    menge  TYPE matdoc-menge , " 库存数量
    werks  TYPE matdoc-werks, "工厂
    gamng  TYPE afko-gamng,
    kunnr  TYPE kna1-kunnr,
    aufnr  TYPE afko-aufnr,


  END OF ty_logrt_complete.




DATA:gt_out TYPE TABLE OF   ty_out WITH HEADER LINE,
     gw_out TYPE ty_out.

DATA:gt_logrt_now TYPE TABLE OF   ty_logrt WITH HEADER LINE,
     gw_logrt_now TYPE ty_logrt.

DATA:gt_logrt_avger TYPE TABLE OF   ty_logrt_aver WITH HEADER LINE,
     gw_logrt_avger TYPE ty_logrt_aver.

DATA:gt_logrt_complete TYPE TABLE OF  ty_logrt_complete WITH HEADER LINE,
     gw_logrt_complete TYPE ty_logrt_complete.


DATA:gt_logrt_complete_mb TYPE TABLE OF  ty_logrt_complete WITH HEADER LINE, "该结构体仅用于存储数据
     gw_logrt_complete_mb TYPE ty_logrt_complete.

DATA:gt_logrt_complete_mb1 TYPE TABLE OF  ty_logrt_complete WITH HEADER LINE, "该结构体仅用于存储数据
     gw_logrt_complete_mb1 TYPE ty_logrt_complete.



DATA:gt_logrt_complete_wg TYPE TABLE OF  ty_logrt_complete WITH HEADER LINE, "该结构体仅用于存储数据
     gw_logrt_complete_wg TYPE ty_logrt_complete.


DATA:gt_logrt_complete_wg1 TYPE TABLE OF  ty_logrt_complete WITH HEADER LINE, "该结构体仅用于存储数据
     gw_logrt_complete_wg1 TYPE ty_logrt_complete.




DATA:gt_logrt_tar TYPE TABLE OF  ty_logrt_complete WITH HEADER LINE,
     gw_logrt_tar TYPE ty_logrt_complete.




DATA: lv_first_day TYPE afko-gstrp, "获取传入时间段的第一天
      lv_last_day  TYPE afko-gstrp. "获取传入时间段的最后一天


"前十天
DATA: lv_first_day_10 TYPE afko-gstrp, "获取传入时间段的第一天
      lv_last_day_10  TYPE afko-gstrp. "获取传入时间段的最后一天

DATA:day_col  TYPE afko-gstrp.


DATA :gt_afko TYPE TABLE OF  afko.

DATA :i_matnr TYPE   afko-plnbez.

"数量汇总--变量
DATA :menge_total TYPE   matdoc-menge.
DATA :menge_total_1 TYPE   matdoc-menge.
DATA :menge_total_fin TYPE   matdoc-menge."当日已完工的数量
DATA :menge_total_tar TYPE   matdoc-menge."当日工单汇总数量


SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS:
                s_matnr    FOR afko-plnbez ,
                s_gstrp     FOR afko-gstrp OBLIGATORY.  "生产开始日期


SELECTION-SCREEN END OF BLOCK block1.


START-OF-SELECTION.
*** 数据上传
*  PERFORM frm_upload_data.
*  ***** 数据处理
  PERFORM get_data.
**  数据输出
  PERFORM frm_output_data.


FORM get_data .





  "获取本月的第一天
  CONCATENATE s_gstrp-low(6) '01' INTO lv_first_day.


  "获取本月的最后一天
  CALL FUNCTION 'FIMA_DATE_CREATE'
    EXPORTING
      i_date                  = s_gstrp-high
*     i_months                = '-1'    "根据月份的加减可以推算需要年月的第一天和最后一天
*     i_days                  = '+1'
      i_set_last_day_of_month = 'X'
    IMPORTING
      e_date                  = lv_last_day.



  "查询期间的前10天--开始日期
  CALL FUNCTION 'FIMA_DATE_CREATE'
    EXPORTING
      i_date = s_gstrp-low
      i_days = '-10'
    IMPORTING
      e_date = lv_first_day_10.


  "查询期间的前10天--结束日期
  CALL FUNCTION 'FIMA_DATE_CREATE'
    EXPORTING
      i_date = s_gstrp-high
      i_days = '-10'
    IMPORTING
      e_date = lv_last_day_10.

  "计算两个日期之间的差
  CALL FUNCTION 'FIMA_DAYS_AND_MONTHS_AND_YEARS'
    EXPORTING
      i_date_from = s_gstrp-high
*     I_KEY_DAY_FROM       =
      i_date_to   = lv_last_day
*     I_KEY_DAY_TO         =
*     I_FLG_SEPARATE       = ' '
    IMPORTING
      e_days      = col
*     E_MONTHS    =
*     E_YEARS     =
    .

  col  = col  - 1 .



  "静态主表部分
  PERFORM frm_add_fcat USING: 'AUART'  afpo-dauat '订单类型' '10'.
  PERFORM frm_add_fcat USING: 'PLNBEZ'  afko-plnbez '物料' '18'.
  PERFORM frm_add_fcat USING: 'MAKTX'  makt-maktx '物料描述' '40'.
  PERFORM frm_add_fcat USING: 'WGBEZ'  t023t-wgbez '物料组' '10'.
  PERFORM frm_add_fcat USING: 'WERKS'  mard-werks '工厂' '10'.
  PERFORM frm_add_fcat USING: 'LABST'  mard-werks '当前库存' '10'.
  PERFORM frm_add_fcat USING: 'MENGE_RJ'  matdoc-menge  '日均库存' '10'.
  PERFORM frm_add_fcat USING: 'MENGE_WG'  matdoc-menge  '已完工' '10'.
  PERFORM frm_add_fcat USING: 'MENGE_SALE' matdoc-menge  '可销售' '10'.
  PERFORM frm_add_fcat USING: 'MENGE_WWG' matdoc-menge  '未完工' '10'.






  "动态日期部分
  CLEAR:day_col.
  day_col =  s_gstrp-high.
  DO col TIMES." 根据条件动态生成列

    "从起始日期开始算
    CALL FUNCTION 'FIMA_DATE_CREATE'
      EXPORTING
        i_date = day_col
        i_days = '+1'
      IMPORTING
        e_date = day_col.


    CONCATENATE 'COL' day_col+4(4) INTO colname.
    CONCATENATE '未完工-' day_col+4(4) INTO  colreptext.
    PERFORM frm_add_fcat USING: colname 'I' colreptext '10'.
  ENDDO.


  " 根据it_fact生成动态表
  CALL METHOD cl_alv_table_create=>create_dynamic_table
    EXPORTING
      it_fieldcatalog = it_fcat
    IMPORTING
      ep_table        = dy_table.

  ASSIGN dy_table->* TO <dyn_table> .

  CREATE DATA dy_line LIKE LINE OF <dyn_table>.

  ASSIGN dy_line->* TO <dyn_wa>.



  "前导0处理
  CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
    EXPORTING
      input  = s_matnr-low
    IMPORTING
      output = i_matnr.




  " 获取工单类型 物料  物料描述 物料组
  SELECT   *"afpo~dauat makt~maktx
    FROM afko
*    JOIN afpo ON afpo~aufnr  = afko~aufnr   "订单类型
     JOIN aufk ON aufk~aufnr  = afko~aufnr   "订单类型
    JOIN makt ON afko~plnbez  = makt~matnr"物料描述
    JOIN mara ON afko~plnbez = mara~matnr "物料组
    JOIN t023t ON  mara~matkl = t023t~matkl
    INTO CORRESPONDING FIELDS OF TABLE gt_out
    WHERE afko~gstrp >= lv_first_day  AND afko~gstrp <=  lv_last_day
      AND ( afko~plnbez IN  s_matnr  OR afko~stlbez IN  s_matnr )
     AND aufk~auart  IN ( 'GD02' ,'GD11', 'GD12' , 'GD32'  ,'GD42' )
    .
  SORT  gt_out BY  auart  plnbez .

  DELETE ADJACENT DUPLICATES FROM  gt_out.



  LOOP AT gt_out ASSIGNING FIELD-SYMBOL(<fs_gr_out_in>).
*    *        "删除主数据的前导0
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
      EXPORTING
        input  = <fs_gr_out_in>-plnbez
      IMPORTING
        output = <fs_gr_out_in>-plnbez.


  ENDLOOP.


*  去掉多余的前导0
*  IF gt_out[] IS NOT INITIAL.
*    CLEAR:gw_out.
*    LOOP AT gt_out ASSIGNING FIELD-SYMBOL(<fs_gt_out_matnr>)  .
*      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
*        EXPORTING
*          input  = <fs_gt_out_matnr>-plnbez
*        IMPORTING
*          output = <fs_gt_out_matnr>-plnbez.
*
**    MODIFY  gt_out  FROM gw_out  TRANSPORTING   plnbez     WHERE auart = gw_out-auart   AND plnbez  = gw_out-plnbez   .
*
*      CLEAR:gw_out.
*    ENDLOOP.
*  ENDIF.





*  "获取当前库存
  SELECT aufk~auart , afko~plnbez, mard~labst ,mard~werks,mard~lgort
    FROM mard
    JOIN afko ON afko~plnbez = mard~matnr
    JOIN aufk ON aufk~werks = mard~werks  AND aufk~aufnr  = afko~aufnr AND aufk~auart  IN ( 'GD02' ,'GD11', 'GD12' , 'GD32'  ,'GD42' )
    JOIN ztsd007b ON ztsd007b~lgort = mard~lgort AND ztsd007b~werks = mard~werks
    INTO CORRESPONDING FIELDS OF TABLE @gt_logrt_now
*    FOR ALL ENTRIES IN @gt_out
    WHERE ( mard~lgort  IN ( '1128','1129','1122','1127','1212','1205','1305','1306','1503' )  OR  ( ztsd007b~lgort = mard~lgort AND ztsd007b~werks = mard~werks  )  )
     AND afko~gstrp >= @lv_first_day
     AND afko~gstrp <=  @lv_last_day
    AND  mard~matnr IN @s_matnr

    .

  "处理当前库存--删除重复数据
  SORT gt_logrt_now BY  auart   plnbez werks lgort.

  DELETE ADJACENT DUPLICATES FROM   gt_logrt_now.


  LOOP AT gt_logrt_now ASSIGNING FIELD-SYMBOL(<fs_gt_logrt_now1>) .
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
      EXPORTING
        input  = <fs_gt_logrt_now1>-plnbez
      IMPORTING
        output = <fs_gt_logrt_now1>-plnbez.

  ENDLOOP.


  "赋值到主表里面---当前库存
  SORT gt_logrt_now BY auart plnbez  .
  SORT gt_out BY auart plnbez  .
  CLEAR:menge_total.

  LOOP AT gt_logrt_now INTO gw_logrt_now.

    menge_total  =  gw_logrt_now-labst + menge_total.


    AT END OF plnbez.

      READ TABLE gt_out  INTO gw_out WITH  KEY    auart   = gw_logrt_now-auart    plnbez  =  gw_logrt_now-plnbez    .

      gw_out-labst =  menge_total.



      MODIFY  gt_out  FROM gw_out  TRANSPORTING   plnbez labst    WHERE auart = gw_logrt_now-auart   AND plnbez  =  gw_logrt_now-plnbez   .

      CLEAR:menge_total.
    ENDAT.


    CLEAR: gw_logrt_now , gw_out.
  ENDLOOP.





*  "日均库存
  SELECT  * "afpo~dwerk ,afko~aufnr,  afko~plnbez ,matdoc~menge
      FROM matdoc
      JOIN kna1 ON  matdoc~kunnr = kna1~kunnr AND kna1~ktokd <> 'SD06'
*     JOIN afko ON  matdoc~matbf = afko~plnbez
*     JOIN aufk ON aufk~aufnr = afko~aufnr
      INTO CORRESPONDING FIELDS OF TABLE @gt_logrt_avger
    WHERE  matdoc~matbf IN @s_matnr
     AND matdoc~budat > @lv_first_day_10
     AND matdoc~budat <  @s_gstrp-high
     AND matdoc~vgart = 'WL'
     AND matdoc~shkzg = 'H'
    .
*
  "赋值到主表里面---日均库存
  SORT gt_logrt_avger BY auart matbf.
  SORT gt_out BY auart plnbez  .
  CLEAR:menge_total.


  LOOP AT gt_logrt_avger ASSIGNING FIELD-SYMBOL(<fs_gt_logrt_avger1>).
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
      EXPORTING
        input  = <fs_gt_logrt_avger1>-matbf
      IMPORTING
        output = <fs_gt_logrt_avger1>-matbf.

  ENDLOOP.


  LOOP AT gt_logrt_avger INTO gw_logrt_avger.


    menge_total  =  gw_logrt_avger-menge + menge_total.


    AT END OF matbf.

      READ TABLE gt_out  INTO gw_out WITH  KEY     plnbez  =  gw_logrt_avger-matbf   .

      IF  menge_total  IS NOT INITIAL.

        gw_out-menge_rj =  menge_total  / 10.
      ELSE.
        gw_out-menge_rj =  menge_total.

      ENDIF.

      "可销售
      IF gw_out-labst IS NOT INITIAL AND   menge_total  IS NOT INITIAL..
        gw_out-menge_sale = gw_out-labst  / gw_out-menge_rj.
      ELSE.
        gw_out-menge_sale =  0.
      ENDIF.
      "**********

      MODIFY  gt_out  FROM gw_out  TRANSPORTING  menge_rj  menge_sale  WHERE    plnbez  =  gw_logrt_avger-matbf   .


      CLEAR:menge_total.
    ENDAT.


    CLEAR: gw_logrt_avger , gw_out.
  ENDLOOP.





*  "已完工
  SELECT  *
     FROM  matdoc
     JOIN afko ON  matdoc~aufnr = afko~aufnr  AND   afko~gstrp >= @lv_first_day    AND afko~gstrp <=  @lv_last_day
     JOIN aufk ON aufk~aufnr = matdoc~aufnr
     INTO CORRESPONDING FIELDS OF TABLE @gt_logrt_complete
    WHERE  matdoc~bwart = '101' OR  matdoc~bwart = '102'
     AND   afko~plnbez IN  @s_matnr
 .

  LOOP AT gt_logrt_complete ASSIGNING FIELD-SYMBOL(<fs_gt_logrt_complete1>) .

    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
      EXPORTING
        input  = <fs_gt_logrt_complete1>-plnbez
      IMPORTING
        output = <fs_gt_logrt_complete1>-plnbez.
  ENDLOOP.

  "赋值到主表里面---已完工
  SORT gt_logrt_complete BY auart plnbez.
  SORT gt_out BY auart plnbez  .
  CLEAR:menge_total,menge_total_1.

  LOOP AT gt_logrt_complete INTO gw_logrt_complete.



    menge_total  =  gw_logrt_complete-menge + menge_total.
*    menge_total_1  =    ( gw_logrt_complete-gamng -  gw_logrt_complete-menge ) + menge_total_1.

    AT END OF plnbez.

      READ TABLE gt_out  INTO gw_out WITH  KEY    auart   = gw_logrt_complete-auart    plnbez  =  gw_logrt_complete-plnbez   .

      gw_out-menge_wg =  menge_total.

*      gw_out-menge_wwg   =    menge_total_1.

      MODIFY  gt_out  FROM gw_out  TRANSPORTING  menge_wg  menge_wwg WHERE auart = gw_logrt_complete-auart   AND plnbez  =  gw_logrt_complete-plnbez   .
      CLEAR:menge_total.
    ENDAT.


    CLEAR: gw_logrt_avger , gw_out.
  ENDLOOP.


****未完工
  "1.获取剩余日期的全部天数
  CALL FUNCTION 'FIMA_DATE_CREATE'
    EXPORTING
      i_date = s_gstrp-high
      i_days = col
    IMPORTING
      e_date = lv_last_day_10.




*******目标数量

  "1.查找目标数量
  CLEAR:gt_logrt_complete.
  SELECT  *
     FROM afko
     JOIN aufk ON aufk~aufnr = afko~aufnr
     INTO CORRESPONDING FIELDS OF TABLE @gt_logrt_complete_mb
     WHERE   afko~plnbez  IN  @s_matnr
     AND afko~gstrp > @s_gstrp-high AND afko~gstrp <= @lv_last_day_10
 .

  LOOP AT gt_logrt_complete_mb ASSIGNING FIELD-SYMBOL(<fs_gt_logrt_complete_mb>).
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
      EXPORTING
        input  = <fs_gt_logrt_complete_mb>-plnbez
      IMPORTING
        output = <fs_gt_logrt_complete_mb>-plnbez.


    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
      EXPORTING
        input  = <fs_gt_logrt_complete_mb>-aufnr
      IMPORTING
        output = <fs_gt_logrt_complete_mb>-aufnr.


  ENDLOOP.

  APPEND LINES OF  gt_logrt_complete_mb TO gt_logrt_complete_mb1.  "拷贝一份数据出来-为了后续的在动态列表里面写入日期的值
*




  ".数据获取
  "已完工
  SELECT  *
     FROM  matdoc
     JOIN afko ON  matdoc~aufnr = afko~aufnr   AND afko~gstrp > @s_gstrp-high AND afko~gstrp <= @lv_last_day_10
     JOIN aufk ON aufk~aufnr = matdoc~aufnr
     INTO CORRESPONDING FIELDS OF TABLE @gt_logrt_complete_wg
    WHERE ( matdoc~bwart = '101' OR  matdoc~bwart = '102' )
  AND afko~plnbez IN  @s_matnr
 .

  LOOP AT  gt_logrt_complete_wg ASSIGNING FIELD-SYMBOL(<fs_gt_logrt_complete_wg>).
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
      EXPORTING
        input  = <fs_gt_logrt_complete_wg>-plnbez
      IMPORTING
        output = <fs_gt_logrt_complete_wg>-plnbez.

    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
      EXPORTING
        input  = <fs_gt_logrt_complete_wg>-aufnr
      IMPORTING
        output = <fs_gt_logrt_complete_wg>-aufnr.



  ENDLOOP.


  APPEND LINES OF  gt_logrt_complete_wg TO   gt_logrt_complete_wg1. "拷贝一份数据出来-为了后续的在动态列表里面写入日期的值
*
*************************已完工
*  SORT gt_logrt_complete_wg BY auart plnbez DESCENDING.
*  CLEAR:menge_total,menge_total_1 ,gw_logrt_complete_wg,menge_total_fin.
*
*
*  LOOP AT gt_logrt_complete_wg INTO gw_logrt_complete_wg  .
*    menge_total_fin  =  gw_logrt_complete_wg-menge + menge_total_fin.
*
*    AT END OF plnbez .
*      gw_logrt_complete_wg-menge  =  menge_total_fin.
*      MODIFY gt_logrt_complete_wg  FROM gw_logrt_complete_wg   TRANSPORTING    menge  WHERE   auart   = gw_logrt_complete_wg-auart  AND    plnbez  =  gw_logrt_complete_wg-plnbez  .
*      CLEAR:menge_total_fin.
*    ENDAT.
*
*    CLEAR:gw_out,gw_logrt_complete_wg.
*  ENDLOOP.
*
*
*  "去重
*  SORT  gt_logrt_complete_wg BY  auart  plnbez DESCENDING .
*  DELETE ADJACENT DUPLICATES FROM  gt_logrt_complete_wg COMPARING  auart  plnbez .


*
*  SORT gt_logrt_complete_mb BY auart plnbez.
*  CLEAR:menge_total,gw_logrt_complete_mb.
*
*  "2.汇总--目标数量
*  SORT gt_logrt_complete_mb BY auart plnbez.
*  CLEAR:menge_total,menge_total_1 ,gw_logrt_complete_mb,menge_total_fin.
*
*
*  LOOP AT gt_logrt_complete_mb INTO gw_logrt_complete_mb  .
*
*    menge_total_fin  =  gw_logrt_complete_mb-gamng + menge_total_fin.
*
*    AT END OF  plnbez .
*
*      gw_logrt_complete_mb-gamng  =  menge_total_fin.
*      MODIFY gt_logrt_complete_mb  FROM gw_logrt_complete_mb   TRANSPORTING    gamng WHERE   auart   = gw_logrt_complete_mb-auart  AND    plnbez  =  gw_logrt_complete_mb-plnbez  .
*      CLEAR:menge_total_fin .
*    ENDAT.
*
*    CLEAR: gw_logrt_complete_mb .
*  ENDLOOP.
*
*
*  "去重
*  SORT  gt_logrt_complete_mb BY  auart  plnbez .
*  DELETE ADJACENT DUPLICATES FROM  gt_logrt_complete_mb COMPARING  auart  plnbez .


***********未完工
*  CLEAR: gw_logrt_complete_mb ,gw_logrt_complete_wg ,gw_out.
*  SORT : gt_out  , gt_logrt_complete_mb ,gt_logrt_complete_wg BY  auart  plnbez.
*  LOOP AT  gt_out INTO gw_out.
*
*    READ TABLE  gt_logrt_complete_mb  INTO gw_logrt_complete_mb WITH  KEY auart   = gw_out-auart    plnbez  =  gw_out-plnbez .
*
*    READ TABLE  gt_logrt_complete_wg  INTO gw_logrt_complete_wg WITH  KEY auart   = gw_out-auart    plnbez  =  gw_out-plnbez  .
*
*    gw_out-menge_wwg =  gw_logrt_complete_mb-gamng  -   gw_logrt_complete_wg-menge .
*
*    MODIFY gt_out  FROM gw_out   TRANSPORTING   menge_wwg  WHERE   auart   = gw_out-auart  AND    plnbez  =  gw_out-plnbez  .
*
*
*    CLEAR:gw_out , gw_logrt_complete_mb ,gw_logrt_complete_wg.
*  ENDLOOP.







*******************----------------------动态数据处理

  "已完工数量汇总
  SORT gt_logrt_complete_wg  BY aufnr.
  CLEAR:gw_logrt_complete_wg  ,menge_total_fin.
  LOOP AT gt_logrt_complete_wg INTO gw_logrt_complete_wg .

    menge_total_fin  =  gw_logrt_complete_wg-menge + menge_total_fin.

    AT END OF   aufnr .

      gw_logrt_complete_wg-menge  =  menge_total_fin.
      MODIFY gt_logrt_complete_wg  FROM gw_logrt_complete_wg   TRANSPORTING    menge WHERE   aufnr   = gw_logrt_complete_wg-aufnr.
      CLEAR: menge_total_fin .
    ENDAT.

  ENDLOOP.

  SORT  gt_logrt_complete_wg BY aufnr .
  DELETE ADJACENT DUPLICATES FROM  gt_logrt_complete_wg COMPARING aufnr .


  CLEAR:gw_logrt_complete_wg  ,menge_total_fin.


**---- 未完工数量 =   当天的工单的目标数量 - 该工单的完成数量---2024年4月19日


  "计算未完工数量
  SORT  gt_logrt_complete_mb1  BY  aufnr .

  CLEAR:menge_total,menge_total_1 ,gw_logrt_complete_mb1,menge_total_fin  , menge_total_tar.


  LOOP AT gt_logrt_complete_mb1 ASSIGNING FIELD-SYMBOL(<fs_gt_logrt_complete_mb2>)  .

    READ TABLE gt_logrt_complete_wg INTO gw_logrt_complete_wg WITH  KEY aufnr =  <fs_gt_logrt_complete_mb2>-aufnr.

    menge_total_tar  =  <fs_gt_logrt_complete_mb2>-gamng  -  gw_logrt_complete_wg-gamng.


    AT END OF  plnbez .

      <fs_gt_logrt_complete_mb2>-gamng  =  menge_total_tar.


*      MODIFY gt_logrt_complete_mb1  FROM gw_logrt_complete_mb1   TRANSPORTING    gamng WHERE   aufnr  =  gw_logrt_complete_mb1-aufnr.
      CLEAR:menge_total_fin   .
    ENDAT.

    CLEAR: gw_logrt_complete_mb1 ,menge_total_tar   ,gw_logrt_complete_wg.
  ENDLOOP.





  "根据日期汇总未完工数量

  SORT  gt_logrt_complete_mb1  BY  gstrp  auart  plnbez  .

  CLEAR:menge_total,menge_total_1 ,gw_logrt_complete_mb1,menge_total_fin  , menge_total_tar.


  LOOP AT gt_logrt_complete_mb1 INTO gw_logrt_complete_mb1  .

*    READ TABLE gt_logrt_complete_wg INTO gw_logrt_complete_wg WITH  KEY aufnr =  gw_logrt_complete_mb1-aufnr.

*    menge_total_tar  =  gw_logrt_complete_mb1-gamng  -  gw_logrt_complete_wg-gamng.

    menge_total_fin  =   gw_logrt_complete_mb1-gamng + menge_total_fin.

    AT END OF  plnbez .

      gw_logrt_complete_mb1-gamng  =  menge_total_fin.


      MODIFY gt_logrt_complete_mb1  FROM gw_logrt_complete_mb1   TRANSPORTING    gamng WHERE   auart   = gw_logrt_complete_mb1-auart
            AND    plnbez  =  gw_logrt_complete_mb1-plnbez   AND   gstrp  = gw_logrt_complete_mb1-gstrp  .
      CLEAR:menge_total_fin   .
    ENDAT.

    CLEAR: gw_logrt_complete_mb1 ,menge_total_tar   ,gw_logrt_complete_wg.
  ENDLOOP.


  "去重
  SORT  gt_logrt_complete_mb1 BY gstrp auart  plnbez .
  DELETE ADJACENT DUPLICATES FROM  gt_logrt_complete_mb1 COMPARING gstrp auart  plnbez .




****--------完工数量

*  SORT gt_logrt_complete_wg1 BY   gstrp auart plnbez .
*
*
*  CLEAR:menge_total,    menge_total_1 ,gw_logrt_complete_wg1,menge_total_fin.
*
*
*  LOOP AT gt_logrt_complete_wg1 INTO gw_logrt_complete_wg1  .
*
*    menge_total_fin  =  gw_logrt_complete_wg1-menge + menge_total_fin.
*
*    AT END OF   plnbez .
*      gw_logrt_complete_wg1-menge  =  menge_total_fin.
*      MODIFY gt_logrt_complete_wg1  FROM gw_logrt_complete_wg1   TRANSPORTING    menge
*       WHERE   auart   = gw_logrt_complete_wg1-auart
*       AND    plnbez  =  gw_logrt_complete_wg1-plnbez
*       AND   gstrp  = gw_logrt_complete_wg1-gstrp  .
*      CLEAR:menge_total_fin.
*    ENDAT.
*
*    CLEAR:gw_out,gw_logrt_complete_wg1.
*  ENDLOOP.
*
*
*  "去重
*  SORT  gt_logrt_complete_wg1 BY gstrp auart  plnbez DESCENDING .
*  DELETE ADJACENT DUPLICATES FROM  gt_logrt_complete_wg1 COMPARING gstrp  auart  plnbez .




  "动态日期部分
  CLEAR:day_col.
  CLEAR: gt_logrt_complete  ,gw_logrt_complete, menge_total_fin  ,  menge_total_tar .
  day_col =  s_gstrp-high.

  "本文以  <dyn_table> 作为输出主表,GT_OUT是静态数据的合计,本循环是为了把静态舒服赋值到动态表里面
  IF gt_out[] IS NOT INITIAL.
    CLEAR:gw_out,index.






*新---2024年4月17日

    CLEAR : gw_logrt_complete_mb1 ,gw_logrt_complete_wg1 ,gw_out  .
    LOOP AT gt_out INTO gw_out .

      "把静态部分的数据复制到动态表里面

      MOVE-CORRESPONDING gw_out TO <dyn_wa>.


********-未完工数量  =  目标数量  -  完工数量

      "1.生成动态表部分

      DO col TIMES.
*        index = index + 1.
        "从起始日期开始算
        CALL FUNCTION 'FIMA_DATE_CREATE'
          EXPORTING
            i_date = day_col
            i_days = '+1'
          IMPORTING
            e_date = day_col.

        CONCATENATE 'COL' day_col+4(4) INTO colname.
        ASSIGN COMPONENT colname OF STRUCTURE <dyn_wa> TO <dyn_field>.

        READ TABLE  gt_logrt_complete_mb1  INTO gw_logrt_complete_mb1 WITH  KEY auart   = gw_out-auart    plnbez  =  gw_out-plnbez  gstrp  = day_col .


*        "3.目标数据值获取

        <dyn_field> =  gw_logrt_complete_mb1-gamng  .

        gw_out-menge_wwg  = gw_out-menge_wwg  +  <dyn_field>.





        CLEAR: gt_logrt_complete  ,gw_logrt_complete, menge_total_fin  ,  menge_total_tar   ,gw_logrt_complete_mb1  ,  gw_logrt_complete_wg1.
      ENDDO.

      PERFORM frm_set_stru_value USING 'MENGE_WWG' gw_out-menge_wwg CHANGING <dyn_wa>.

      APPEND <dyn_wa> TO <dyn_table>.


      CLEAR:gw_out.
      day_col =  s_gstrp-high.
    ENDLOOP.



  ENDIF.









ENDFORM.


FORM frm_get_stru_value USING pi_field pw_stru TYPE any CHANGING pc_value.

  FIELD-SYMBOLS:<fs_temp>.

  CLEAR: pc_value.

  ASSIGN COMPONENT pi_field OF STRUCTURE pw_stru TO <fs_temp>.
  IF sy-subrc = 0.
    pc_value = <fs_temp>.
    UNASSIGN <fs_temp>.
  ENDIF.

ENDFORM.                    "frm_get_stru_value、



*输出字段定义
FORM frm_fieldcat_init.
  DEFINE fieldcat.
    CLEAR  it_ls_fieldcat.
    it_ls_fieldcat-col_pos       =  1.
    it_ls_fieldcat-fieldname     = &1.
    it_ls_fieldcat-seltext_l     = &2.
    it_ls_fieldcat-outputlen     = &3.
    it_ls_fieldcat-key           = &4.

    it_ls_fieldcat-seltext_m = it_ls_fieldcat-seltext_l.
    it_ls_fieldcat-seltext_s = it_ls_fieldcat-seltext_l.

    APPEND it_ls_fieldcat TO it_fieldcat.
    CLEAR  it_ls_fieldcat.
  END-OF-DEFINITION.
  fieldcat          'PLNBEZ'              '物料编号'                    '18'           'X'  .
  fieldcat          'AUART'              '订单类型'                      '10'           'X'  .
  fieldcat          'MAKTX'              '物料描述'                      '40'            'X'  .
  fieldcat          'WGBEZ'                '物料组'                      '20'           ''  .
  fieldcat          'LABST'              '当前库存'                      '10'           ''  .
  fieldcat          'MENGE_RJ'              '日均库存'                      '10'           ''  .
  fieldcat          'MENGE_WG'              '已完工'                      '10'           ''  .
  fieldcat          'MENGE_SALE'              '可销售'                      '10'           ''  .
  fieldcat          'MENGE_WWG'              '未完工'                      '10'           ''  .
  DO 3 TIMES .
  ENDDO.

ENDFORM.                    "frm_fieldcat_init


***数据输出
**********
FORM frm_output_data.
*  lv_repid = sy-repid.
*  it_layout-detail_popup = 'X'.
*  it_layout-info_fieldname = 'LINECOLOR'.
*  REFRESH :it_fieldcat[].
*  PERFORM frm_fieldcat_init.
*  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
*    EXPORTING
*      i_callback_program = lv_repid
*      it_fieldcat        = it_fieldcat[]
*      is_layout          = it_layout
*      i_default          = 'X'
*      i_save             = 'A'
**     i_grid_title       = it_out
*    TABLES
*      t_outtab           =  gt_out.



  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
    EXPORTING
      i_callback_program = sy-repid
      is_layout_lvc      = wa_layo
      it_fieldcat_lvc    = it_fcat
    TABLES
      t_outtab           = <dyn_table>
    EXCEPTIONS
      program_error      = 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.

ENDFORM.                    "frm_output_data









FORM frm_add_fcat USING value1 value2 value3 value4.
  wa_fcat-fieldname = value1.
  wa_fcat-inttype = value2.
  wa_fcat-reptext = value3.
  wa_fcat-intlen = value4.
  APPEND wa_fcat TO it_fcat.
  CLEAR: wa_fcat.
ENDFORM. "frm_add_fcat



FORM frm_set_stru_value USING pi_field pi_value CHANGING pw_stru TYPE any.

  FIELD-SYMBOLS:<fs_temp>.

  ASSIGN COMPONENT pi_field OF STRUCTURE pw_stru TO <fs_temp>.
  IF sy-subrc = 0.
    <fs_temp> = pi_value.
    UNASSIGN <fs_temp>.
  ENDIF.

ENDFORM.

执行结果如下:在这里插入图片描述
在这里插入图片描述

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

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

相关文章

win/mac达芬奇19下载:DaVinci Resolve Studio 19

DaVinci Resolve Studio 19 是一款功能强大的视频编辑和调色软件&#xff0c;广泛应用于电影、电视和网络节目的后期制作。这款软件不仅提供了专业的剪辑、调色和音频处理工具&#xff0c;还引入了全新的DaVinci Neural Engine AI工具&#xff0c;对100多项功能进行了大规模升级…

Mamba 学习

Vision Mamba U-Mamba 以后的趋势&#xff1a; 1.Mamba模型机机制上和transform一样&#xff0c;但是参数量上做了改进&#xff0c;可以直接替代 2.vision上可以实时处理

游戏登录界面制作

登录界面制作 1.导入模块和初始化窗口 import subprocessimport tkinter as tkimport picklefrom tkinter import messageboxwindow tk.Tk()window.title(Welcome)window.geometry(450x300) 导入必要的模块&#xff0c;并初始化了主窗口window&#xff0c;设置了窗口的标题和…

一 Mybatis简介

一 Mybatis简介 1.1 简介 MyBatis最初是Apache的一个开源项目iBatis, 2010年6月这个项目由Apache Software Foundation迁移到了Google Code。随着开发团队转投Google Code旗下&#xff0c; iBatis3.x正式更名为MyBatis。代码于2013年11月迁移到Github。 **MyBatis 是一款优秀…

JavaSE备忘录(未完)

文章目录 基本数据类型println 小知识除法( / ) 和 Infinity(无穷) 小知识除法InfinityInfinity 在除法中正负判断 求余(%) 小知识 基本数据类型 除 int、char 的包装类分别为 Integer、Character 外&#xff0c;其余基本数据类型的第一个字母大写就是它的包装类。 println 小…

微信小程序使用 Vant Weapp 中 Collapse 折叠面板 的问题!

需求&#xff1a;结合Tab 标签页 和 Collapse 折叠面板 组合成显示课本和章节内容&#xff0c;并且用户体验要好点&#xff01; 如下图展示&#xff1a; 问题&#xff1a;如何使用Collapse 折叠面板 将内容循环展示出来&#xff1f; js中的数据是这样的 代码实现&#xff1…

第二证券今日投资参考:人形机器再迎催化 钙钛矿电池产业化提速

昨日&#xff0c;沪指盘中在金融等板块的带动下强势拉升&#xff0c;一举打破3100点&#xff1b;但午后涨幅逐渐收窄。截至收盘&#xff0c;沪指微涨0.09%报3074.22点&#xff0c;深证成指跌0.05%报9376.81点&#xff0c;创业板指跌0.55%报1787.49点&#xff0c;上证50指数涨0.…

“We Need Structured Output”: 以用户为中心的大模型输出

发表机构&#xff1a;Google Research 这篇论文的核心是设计了一种系统&#xff0c;可以让开发者和用户对大型语言模型的输出施加结构性约束。系统的主要部分包括&#xff1a; 1. 用户界面&#xff08;GUI&#xff09;&#xff1a;允许用户通过图形界面来定义他们希望LLM遵守…

Meta Llama3 炸裂登场:一夜刷屏AI界,基准测试中一骑绝尘,GPT-4 Turbo遭遇强劲对手

在 2024年4月19 日&#xff0c;AI界迎来了一项重大突破&#xff1a;Meta 公司宣布推出了迄今为止最强大的新一代开源大语言模型 Llama3。这一消息无疑为我国AI产业的发展带来了新的希望和机遇。 &#x1f3af; Llama3 系列语言模型&#xff08;LLM&#xff09;包括 Llama3 8B …

深度剖析Gateway在微服务治理中的关键角色

目录 一、多层网关 二、Gateway 路由规则 2.1 路由 2.2 谓词 2.3 过滤器 三、路由声明规则 3.1 谓词 寻址谓词 请求参数谓词 时间谓词 自定义谓词 一、多层网关 首先我们先了解下一个请求是如何到达服务端并得到相应的。过程如图所示&#xff1a; 首先网址解析的第一步是 DN…

2024年分享酷我音乐如何下载mp3的方法

这里教大家用酷我音乐小程序的下载方法,小程序下载资源的方法有3种 1.利用专业的抓包工具(Fiddler/Charles)进行获取,然后分析数据包,最后直接用下载器下载分析出来的链接。强烈不推荐,因为大部分人并非程序员出身 2.录屏,录屏效率太慢,所以也不推荐 3. 利用专门的下载资源的…

第49篇:简易处理器<三>

Q&#xff1a;本期我们来设计实现以上介绍的简易处理器&#xff0c;并进行仿真。 A&#xff1a;简易处理器顶层.v文件代码&#xff0c;顶层文件中例化实现处理器的子模块3-8译码器以及寄存器。 仿真示例&#xff1a;DIN (100)8在30 ns时加载到 IR中&#xff0c;而DIN (100)8对…

基于LSTM的负荷预测

长短 期 记 忆 网 络 ( long short term memory&#xff0c; LSTM) &#xff3b;11-12&#xff3d;作为一种特殊的循环神经网络( recurrent neural network&#xff0c;&#xff32;NN) &#xff0c;主要用于解决长序列训 练过程中的梯度消失和梯度爆炸问题。典型的 LSTM 结构如…

高中数学:三角函数之考点精华-对称性相关问题

一、对称性的几种情况 1、1个对称点/对称轴 此种情况&#xff0c;用整体换元法解题 参考&#xff1a;三角函数的整体换元法 2、2个对称点 画图 如果两个对称点之间的距离是a&#xff0c;则函数周期T2a 3、2个对称轴 画图 如果两个对称轴之间的距离是a&#xff0c;则函数…

[Python开发问题] Selenium ERROR: Unable to find a matching set of capabilities

&#x1f49d;&#x1f49d;&#x1f49d;欢迎莅临我的博客&#xff0c;很高兴能够在这里和您见面&#xff01;希望您在这里可以感受到一份轻松愉快的氛围&#xff0c;不仅可以获得有趣的内容和知识&#xff0c;也可以畅所欲言、分享您的想法和见解。 推荐:「stormsha的主页」…

【计算机毕业设计】点餐平台网站——后附源码

&#x1f389;**欢迎来到琛哥的技术世界&#xff01;**&#x1f389; &#x1f4d8; 博主小档案&#xff1a; 琛哥&#xff0c;一名来自世界500强的资深程序猿&#xff0c;毕业于国内知名985高校。 &#x1f527; 技术专长&#xff1a; 琛哥在深度学习任务中展现出卓越的能力&a…

天赐和美,大麗和和典藏珍罕翡翠手镯巡礼

翡翠玉镯矜贵难得,从整块质地完美的珍贵原玉中取出,切磨过程往往会造成玉料损耗。色佳、种水细腻且无纹裂的手镯更是难得一见。质素上乘的宝石级翡翠几乎全部产自缅甸,历来珍罕稀有,备受倾慕。大麗和和怀着对翡翠的钟情与对东方气韵的热爱,臻呈「天赐和美」和和典藏缅甸翡翠手镯…

故障诊断 | 基于迁移学习和SqueezeNet 的滚动轴承故障诊断(Matlab)

目录 效果一览基本介绍程序设计参考文献 效果一览 基本介绍 将一维轴承振动信号转换为二维尺度图&#xff08;时频谱图&#xff09;&#xff0c;并使用预训练网络应用迁移学习对轴承故障进行分类。 迁移学习显著减少了传统轴承诊断方法特征提取和特征选择所花费的时间&#xff…

通过实例学C#之FileStream类

简介 可以通过此类进行文件读取。 首先在项目所在文件夹的Bin文件中新建一个test.txt文件&#xff0c;里面输入内容“hello world!”。 构造函数 FileStream (string path, FileMode mode&#xff0c;FileAccess access) 通过路径文件path&#xff0c;打开文件模式mode以及读写…

智能内容分析:Kompas.ai如何揭示内容表现的秘密

在数字营销的世界里&#xff0c;内容分析是衡量内容表现、优化策略并实现营销目标的关键。通过深入分析内容的各项指标&#xff0c;品牌能够更准确地理解其内容的市场表现&#xff0c;从而做出更加明智的营销决策。本文将深入探讨内容分析的重要性&#xff0c;详细介绍Kompas.a…