首页 > 编程语言 >FICO清账程序

FICO清账程序

时间:2024-01-22 15:35:52浏览次数:26  
标签:wqyis 清账 程序 dmbtr lv lt ls FICO kunnr

*&---------------------------------------------------------------------*
*& Report  ZFIP001
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
report  zfip001.

tables: bsid .

selection-screen begin of block bl01 with frame title title1 . "
select-options:
  s_bukrs for bsid-bukrs no intervals no-extension obligatory , "BUKRS  公司代码  Char  4 单选  是
  s_kunnr for bsid-kunnr ,                                      "KUNNR  客户  Char  10  多选  否
  s_augdt for bsid-augdt no intervals no-extension obligatory , "AUGDT  清账日期  DATS  8 单选  是
  s_budat for bsid-budat no intervals no-extension obligatory . "BUDAT  清账凭证过账日期  DATS  8 单选  是
selection-screen end of block bl01 .

selection-screen begin of block bl02 with frame title title2 .
parameters:p_qz   radiobutton group rg1 default 'X' , "标准版本
           p_ghtk   radiobutton group rg1 ."关户退款

selection-screen end of block bl02 .

define populate_ftpost.
  ls_ftpost-stype = &1 .
  ls_ftpost-count = &2 .
  ls_ftpost-fnam  = &3 .
  ls_ftpost-fval  = &4 .
  condense ls_ftpost-fval no-gaps .
  append ls_ftpost to lt_ftpost .
end-of-definition.

data: begin of gs_out ,
  bukrs like bsid-bukrs ,
  kunnr like bsid-kunnr ,
  gjahr like bsid-gjahr ,
  belnr like bsid-belnr ,
  yisdq like bapiret2-message ,
  yusdq like bapiret2-message ,
  msg   like bapiret2-message ,
  sel   type c ,
end of gs_out ,
gt_out like table of gs_out .

data:begin of lt_wqyis occurs 0 ,
  bukrs like bsid-bukrs ,
  kunnr like bsid-kunnr ,
  gjahr like bsid-gjahr ,
  belnr like bsid-belnr ,
  buzei like bsid-buzei ,
  hkont like bsid-hkont , "科目
  budat like bsid-budat , "记账日期
  zfbdt like bsid-zfbdt , "记账日期
  shkzg like bsid-shkzg , "
  dmbtr like bsid-dmbtr , "
end of lt_wqyis .
*data lt_wqyis_h like lt_wqyis[] with header line .
data lt_wqyus   like lt_wqyis[] with header line .
*data lt_wqyus_s like lt_wqyis[] with header line .
data ls_wqyis like line of lt_wqyis .
data ls_wqyus like line of lt_wqyis .

data: begin of lt_kunnr occurs 0 ,
  bukrs like bsid-bukrs ,
  kunnr like bsid-kunnr ,
  yings like bsid-dmbtr ,
  yus   like bsid-dmbtr ,
  t_wqyis_h like lt_wqyis[] ,
  t_wqyis_s like lt_wqyis[] ,
  t_wqyus_h like lt_wqyis[] ,
  t_wqyus_s like lt_wqyis[] ,
  t_wqyis   like lt_wqyis[] ,
  t_wqyus   like lt_wqyis[] ,
end of lt_kunnr .


field-symbols: <fs_out>   like gs_out ,
<fs_wqyis> like lt_wqyis ,
<fs_wqyus> like lt_wqyis .

initialization .
  title1 = '输入条件' .
  title2 = '选择功能' .

start-of-selection .
  if p_qz = 'X' .
    perform fm_get_yis_yus_data .
  elseif p_ghtk = 'X' .
    perform fm_customer_clear .
  endif .

  perform fm_alv_display .
*----------------------------------------------------------------------*
form fm_get_yis_yus_data .
  data: lv_dmbtr_h like bsid-dmbtr ,
        lv_dmbtr_s like bsid-dmbtr .
  data: lv_get_date like sy-datum ,
        temp_yis   like lt_wqyis[]  with header line .


  field-symbols <fs_kunnr> like lt_kunnr .

  "未清应收
  select *"bukrs kunnr hkont budat shkzg dmbtr
    into corresponding fields of table lt_wqyis[]
    from  bsid
    where bukrs in s_bukrs
    and   kunnr in s_kunnr
    and   hkont in ('1122001000' , '1122002000')
    and   budat <= s_augdt-low
    order by bukrs kunnr shkzg zfbdt .
  "未清预收
  select * " bukrs kunnr hkont budat shkzg dmbtr
    into corresponding fields of table lt_wqyus[]
    from  bsid
    where bukrs in s_bukrs
    and   kunnr in s_kunnr
    and   umskz = 'A'
    and   budat <= s_augdt-low
    order by bukrs kunnr shkzg zfbdt .

  loop at lt_wqyis assigning <fs_wqyis> .
*    if <fs_wqyis>-shkzg = 'H' .
*      <fs_wqyis>-dmbtr = - <fs_wqyis>-dmbtr .
*    endif.
    append initial line to lt_kunnr assigning <fs_kunnr> .
    <fs_kunnr>-bukrs = <fs_wqyis>-bukrs .
    <fs_kunnr>-kunnr = <fs_wqyis>-kunnr .
  endloop .

  loop at lt_wqyus assigning <fs_wqyus> .
*    if <fs_wqyus>-shkzg = 'S' .
*      <fs_wqyus>-dmbtr = - <fs_wqyus>-dmbtr .
*    endif.
    append initial line to lt_kunnr assigning <fs_kunnr> .
    <fs_kunnr>-bukrs = <fs_wqyus>-bukrs .
    <fs_kunnr>-kunnr = <fs_wqyus>-kunnr .
  endloop .

  sort lt_kunnr by bukrs kunnr .
  delete adjacent duplicates from lt_kunnr comparing all fields .
*----------------------------------------------------------------------
  loop at lt_kunnr assigning <fs_kunnr> .

    append initial line to gt_out assigning <fs_out> .
    <fs_out>-bukrs = <fs_kunnr>-bukrs .
    <fs_out>-kunnr = <fs_kunnr>-kunnr .
    <fs_out>-gjahr = s_budat-low+0(4) .

    clear: lv_dmbtr_s , lv_dmbtr_h .
    loop at lt_wqyis where bukrs = <fs_kunnr>-bukrs and kunnr = <fs_kunnr>-kunnr and shkzg = 'H' .
      lv_dmbtr_h = lv_dmbtr_h + lt_wqyis-dmbtr .
      append lt_wqyis to <fs_kunnr>-t_wqyis_h[] .
    endloop .

    loop at lt_wqyis where bukrs = <fs_kunnr>-bukrs and kunnr = <fs_kunnr>-kunnr and shkzg = 'S' .
      if lv_dmbtr_h > lv_dmbtr_s .
        lv_dmbtr_s = lv_dmbtr_s + lt_wqyis-dmbtr .
        append lt_wqyis to   <fs_kunnr>-t_wqyis_s[] .
      else .
        exit .
      endif .
    endloop .

    if <fs_kunnr>-t_wqyis_h[] is not initial and <fs_kunnr>-t_wqyis_s[] is not initial .
      perform fm_posting_interface_clearing tables <fs_kunnr>-t_wqyis_h[] <fs_kunnr>-t_wqyis_s[]
                                            using lv_dmbtr_h lv_dmbtr_s s_budat-low 'YISDQ'
                                            changing <fs_kunnr> .
    endif .
*-----------------------------------------------------------------------------------------------------------
    clear: lv_dmbtr_s , lv_dmbtr_h .
    loop at lt_wqyus where bukrs = <fs_kunnr>-bukrs and kunnr = <fs_kunnr>-kunnr and shkzg = 'S' .
      lv_dmbtr_s = lv_dmbtr_s + lt_wqyus-dmbtr .
      append lt_wqyus to   <fs_kunnr>-t_wqyus_s[] .
    endloop .

    loop at lt_wqyus where bukrs = <fs_kunnr>-bukrs and kunnr = <fs_kunnr>-kunnr and shkzg = 'H' .
      if lv_dmbtr_h < lv_dmbtr_s .
        lv_dmbtr_h = lv_dmbtr_h + lt_wqyus-dmbtr .
        append lt_wqyus to <fs_kunnr>-t_wqyus_h[] .
      else .
        exit .
      endif .
    endloop .

    if <fs_kunnr>-t_wqyus_h[] is not initial and <fs_kunnr>-t_wqyus_s[] is not initial .
      perform fm_posting_interface_clearing tables <fs_kunnr>-t_wqyus_s[] <fs_kunnr>-t_wqyus_h[]
                                            using  lv_dmbtr_s lv_dmbtr_h s_budat-low 'YUSDQ'
                                            changing <fs_kunnr> .
    endif .

    select *"bukrs kunnr hkont budat shkzg dmbtr
      into corresponding fields of table <fs_kunnr>-t_wqyis[]
      from  bsid
      where bukrs = <fs_kunnr>-bukrs
      and   kunnr = <fs_kunnr>-kunnr
      and   hkont in ('1122001000' , '1122002000')
      and   budat <= s_augdt-low
      order by bukrs kunnr shkzg zfbdt .
    "未清预收
    select * " bukrs kunnr hkont budat shkzg dmbtr
      into corresponding fields of table <fs_kunnr>-t_wqyus
      from  bsid
      where bukrs = <fs_kunnr>-bukrs
      and   kunnr = <fs_kunnr>-kunnr
      and   umskz = 'A'
      and   budat <= s_augdt-low
      order by bukrs kunnr shkzg zfbdt .

    clear: lv_dmbtr_s , lv_dmbtr_h .
    loop at <fs_kunnr>-t_wqyis[]  into ls_wqyis .
      lv_dmbtr_s  = lv_dmbtr_s + ls_wqyis-dmbtr .
    endloop .
    loop at <fs_kunnr>-t_wqyus[] into ls_wqyus .
      lv_dmbtr_h  = lv_dmbtr_h + ls_wqyus-dmbtr .
    endloop .

    if lv_dmbtr_s >= lv_dmbtr_h .   "应收比预收多
      loop at <fs_kunnr>-t_wqyis[]  into ls_wqyis .

        if lv_dmbtr_h > 0.
          lv_dmbtr_h = lv_dmbtr_h - ls_wqyis-dmbtr .
        else .
          clear ls_wqyis-belnr .
          modify  <fs_kunnr>-t_wqyis[] from ls_wqyis .
        endif.
      endloop .
      delete <fs_kunnr>-t_wqyis[] where belnr is initial .

    elseif lv_dmbtr_s < lv_dmbtr_h .  "预收比应收多
      loop at <fs_kunnr>-t_wqyus[] into ls_wqyus .
        if lv_dmbtr_s > 0 .
          lv_dmbtr_s = lv_dmbtr_s - ls_wqyus-dmbtr .
        else .
          clear ls_wqyus-belnr .
          modify  <fs_kunnr>-t_wqyus[] from ls_wqyus .
        endif.
      endloop.
      delete <fs_kunnr>-t_wqyus[] where belnr is initial .

    endif .

    clear: lv_dmbtr_s , lv_dmbtr_h .
    loop at <fs_kunnr>-t_wqyis[]  into ls_wqyis .
      lv_dmbtr_s  = lv_dmbtr_s + ls_wqyis-dmbtr .
    endloop .
    loop at <fs_kunnr>-t_wqyus[] into ls_wqyus .
      lv_dmbtr_h  = lv_dmbtr_h + ls_wqyus-dmbtr .
    endloop .

    perform fm_posting_interface_clearing tables <fs_kunnr>-t_wqyis[] <fs_kunnr>-t_wqyus[]
    using  lv_dmbtr_s lv_dmbtr_h s_budat-low 'MSG'
    changing <fs_kunnr> .
  endloop .
endform .                    "FM_GET_YIS_YUS_DATA






*----------------------------------------------------------------------*
form fm_posting_interface_clearing  tables lt_yi like lt_wqyis[] lt_yu like lt_wqyis[]
                                    using  lv_yi lv_yu lv_budat lv_type
                                    changing ls_kunnr like lt_kunnr .
  data: lt_blntab  type table of blntab ,
        ls_blntab  type blntab ,
        lt_ftclear type table of ftclear ,
        ls_ftclear type ftclear ,
        lt_ftpost  type table of ftpost ,
        ls_ftpost  type ftpost ,
        lt_fttax   type table of fttax with header line .

  field-symbols <fs> type any .

  assign component lv_type of structure <fs_out> to <fs>  .
*
  clear:  ls_blntab, lt_blntab, ls_ftclear, lt_ftclear, ls_ftpost, lt_ftpost,
          lt_fttax, lt_fttax[]  .", lv_yis, lv_yus, lv_zfbdt .

  call function 'POSTING_INTERFACE_START'
    exporting
      i_client           = sy-mandt
      i_function         = 'C'
      i_keep             = 'X'
      i_mode             = 'N'    "A OR N
      i_user             = sy-uname
    exceptions
      client_incorrect   = 1
      function_invalid   = 2
      group_name_missing = 3
      mode_invalid       = 4
      update_invalid     = 5
      others             = 6.
  if sy-subrc <> 0.
    message id sy-msgid type sy-msgty number sy-msgno
    with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  endif .

  populate_ftpost:  'K'  1  'BKPF-BLDAT'  lv_budat , "凭证日期
                    'K'  1  'BKPF-BLART'  'AB'        , "凭证类型
                    'K'  1  'BKPF-BUKRS'  s_bukrs-low , "公司代码
                    'K'  1  'BKPF-BUDAT'  lv_budat , "过账日期
                    'K'  1  'BKPF-WAERS'  'RMB'       , "货币
                    'K'  1  'BKPF-BKTXT'  '清账'      . "抬头文本

  loop at lt_yi .
    ls_ftclear-agkoa = 'D' .
    ls_ftclear-xnops = 'X' .
    ls_ftclear-agbuk = lt_yi-bukrs .
    ls_ftclear-agkon = lt_yi-kunnr .
    ls_ftclear-agums = 'A' .
    ls_ftclear-selvon     = lt_yi-belnr .   "Belegnummer
    ls_ftclear-selvon+10  = lt_yi-gjahr."Gesch#ftsjahr
    ls_ftclear-selvon+14  = lt_yi-buzei."Buchungszeichen
    ls_ftclear-selfd      = 'BELNR'.         "Selectionstext für Funktion
    ls_ftclear-selbis     = lt_yi-belnr .
    append ls_ftclear to lt_ftclear .
  endloop.


*
*
  loop at lt_yu .
    ls_ftclear-agkoa = 'D' .
    ls_ftclear-xnops = 'X' .
    ls_ftclear-agbuk = lt_yu-bukrs .
    ls_ftclear-agkon = lt_yu-kunnr .
    ls_ftclear-agums = 'A' .
    ls_ftclear-selvon     = lt_yu-belnr .   "Belegnummer
    ls_ftclear-selvon+10  = lt_yu-gjahr."Gesch#ftsjahr
    ls_ftclear-selvon+14  = lt_yu-buzei."Buchungszeichen
    ls_ftclear-selfd      = 'BELNR'.         "Selectionstext für Funktion
    ls_ftclear-selbis     = lt_yu-belnr .
    append ls_ftclear to lt_ftclear .
  endloop .


  data: lv_abs_yiyu type dmbtr .
  lv_abs_yiyu = abs( lv_yi - lv_yu ) .


  if lv_type = 'YISDQ'.
    populate_ftpost:  'P'  1  'BSEG-WRBTR'    lv_abs_yiyu ,  " .
                      'P'  1  'BSEG-HKONT'    ls_kunnr-kunnr ,
                      'P'  1  'RF05A-NEWBS'   '07' ,
                      'P'  1  'RF05A-NEWUM'   '' ,
                      'P'  1  'BSEG-ZFBDT'    lt_yu-zfbdt ,
                      'P'  1  'BSEG-SGTXT'    '清账余额' ,"
                      'P'  1  'BSEG-XNEGP'    'X' .
  elseif lv_type = 'YUSDQ' .
    populate_ftpost:  'P'  1  'BSEG-WRBTR'    lv_abs_yiyu ,  " .
                      'P'  1  'BSEG-HKONT'    ls_kunnr-kunnr ,
                      'P'  1  'RF05A-NEWBS'   '19' ,
                      'P'  1  'RF05A-NEWUM'   'A' ,
                      'P'  1  'BSEG-ZFBDT'    lt_yu-zfbdt ,"
                      'P'  1  'BSEG-SGTXT'    '清账余额'  ."
  elseif lv_type = 'MSG' .
    if lv_yi > lv_yu .
      populate_ftpost:  'P'  1  'BSEG-WRBTR'    lv_abs_yiyu ,  " .
                        'P'  1  'BSEG-HKONT'    ls_kunnr-kunnr ,
                        'P'  1  'RF05A-NEWBS'   '07' ,
                        'P'  1  'RF05A-NEWUM'   '' ,
                        'P'  1  'BSEG-ZFBDT'    lt_yi-zfbdt ,
                        'P'  1  'BSEG-SGTXT'    '清账余额' ,"
                        'P'  1  'BSEG-XNEGP'    'X' .
    elseif lv_yi < lv_yu .
*    lt_kunnr-yus = abs( lt_kunnr-yus ) .
      populate_ftpost:  'P'  1  'BSEG-WRBTR'    lv_abs_yiyu ,  "凭证日期 .
                        'P'  1  'BSEG-HKONT'    ls_kunnr-kunnr ,
                        'P'  1  'RF05A-NEWBS'   '19' ,
                        'P'  1  'RF05A-NEWUM'   'A' ,
                        'P'  1  'BSEG-ZFBDT'    lt_yu-zfbdt ,"
                        'P'  1  'BSEG-SGTXT'    '清账余额'  ."
    endif.
  endif.


  call function 'POSTING_INTERFACE_CLEARING'
  exporting
    i_auglv                    = 'UMBUCHNG' "转账并清账
    i_tcode                    = 'FB05'
    i_sgfunct                  = 'C'
  importing
    e_msgid                    = sy-msgid
    e_msgno                    = sy-msgno
    e_msgty                    = sy-msgty
    e_msgv1                    = sy-msgv1
    e_msgv2                    = sy-msgv2
    e_msgv3                    = sy-msgv3
    e_msgv4                    = sy-msgv4
*        e_subrc                    = sy-subrc
  tables
    t_blntab                   = lt_blntab
    t_ftclear                  = lt_ftclear
    t_ftpost                   = lt_ftpost
    t_fttax                    = lt_fttax
  exceptions
    clearing_procedure_invalid = 1
    clearing_procedure_missing = 2
    table_t041a_empty          = 3
    transaction_code_invalid   = 4
    amount_format_error        = 5
    too_many_line_items        = 6
    company_code_invalid       = 7
    screen_not_found           = 8
    no_authorization           = 9
    others                     = 10.

  if sy-subrc = 0 and sy-msgty <> 'E' and lv_type = 'X'.
    read table lt_blntab into ls_blntab index 1.

    <fs_out>-bukrs = lt_kunnr-bukrs .
    <fs_out>-kunnr = lt_kunnr-kunnr .
    <fs_out>-gjahr = ls_blntab-gjahr .
    <fs_out>-belnr = ls_blntab-belnr .
    <fs>           = 'S' .
  else .
*    rollback work.
    data lv_errmsg type char50 .
    call function 'MESSAGE_TEXT_BUILD'
      exporting
        msgid               = sy-msgid
        msgnr               = sy-msgno
        msgv1               = sy-msgv1
        msgv2               = sy-msgv2
        msgv3               = sy-msgv3
        msgv4               = sy-msgv4
      importing
        message_text_output = lv_errmsg.

    <fs_out>-bukrs = ls_kunnr-bukrs .
    <fs_out>-kunnr = ls_kunnr-kunnr .
    <fs>           = lv_errmsg .
*    <fs_out>-msg   = lv_errmsg .
  endif .

  call function 'POSTING_INTERFACE_END'
    exceptions
      session_not_processable = 1
      others                  = 2.
  commit work and wait.

endform .                    "fm_POSTING_INTERFACE_CLEARING

*&---------------------------------------------------------------------*
*&      Form  fm_alv_display
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
form fm_alv_display .
  data: begin of ls_field_config ,
    fieldname type lvc_s_fcat-fieldname,
    scrtext_l type lvc_s_fcat-scrtext_l,
  end of ls_field_config ,
  lt_field_config like table of ls_field_config .

  define add_field_config .
    ls_field_config-fieldname = &1 .
    ls_field_config-scrtext_l = &2 .
    append ls_field_config to lt_field_config .
    clear  ls_field_config .
  end-of-definition .
  "  alv 函数用
  data:lt_fieldcat type lvc_t_fcat,
        ls_layout   type lvc_s_layo,
        ls_variant  type disvariant.
  field-symbols <ls_fieldcat> like line of lt_fieldcat.
  "自动获取fieldcat用
  data:lo_structdescr  type ref to cl_abap_structdescr.
  data:lt_ddfields  type ddfields.
  data:ls_ddfields  type dfies.

  add_field_config 'BUKRS'        '公司代码'.
  add_field_config 'KUNNR'        '客户号码'.
  add_field_config 'GJAHR'        '会计年度'.
*  add_field_config 'BELNR'        '凭证编号'.

  if p_qz = 'X' .
    add_field_config 'YISDQ'        '应收对清'.
    add_field_config 'YUSDQ'        '预收对清'.
  endif.

  add_field_config 'MSG'          '应收清预收'.
*  add_field_config ''        ''.
  lo_structdescr ?= cl_abap_structdescr=>describe_by_data( gs_out ).
  lt_ddfields     = zcl_salv_data_descr=>read_structdescr( lo_structdescr ).

  loop at lt_ddfields into ls_ddfields .
    append initial line to lt_fieldcat assigning <ls_fieldcat> .
    move-corresponding ls_ddfields to <ls_fieldcat>.
    <ls_fieldcat>-no_zero = 'X' .
    read table lt_field_config into ls_field_config with key fieldname = <ls_fieldcat>-fieldname .
    if sy-subrc = 0 .
      <ls_fieldcat>-coltext = ls_field_config-scrtext_l.
    else .
      clear <ls_fieldcat>-fieldname .
    endif.

  endloop.

  delete lt_fieldcat where fieldname is initial .

*设置布局
  ls_layout-zebra = 'X' .
  ls_layout-cwidth_opt = 'X'.
  ls_layout-box_fname = 'SEL'.
*  ls_layout-info_fname = 'COLOR' .
  ls_variant-report = sy-repid.
  ls_variant-handle = '0001'.

*ALV显示
  call function 'REUSE_ALV_GRID_DISPLAY_LVC'
  exporting
    i_callback_program       = sy-repid
*      i_callback_pf_status_set = 'FM_PF_STATUS_SET'
    i_callback_user_command  = 'FM_USER_COMMAND'
    i_default                = 'X'
    i_save                   = 'A'
    is_layout_lvc            = ls_layout
    is_variant               = ls_variant
    it_fieldcat_lvc          = lt_fieldcat
*      i_grid_title            = lv_title
  tables
    t_outtab                 = gt_out[]
  exceptions
    program_error            = 1
    others                   = 2.
endform .                    "fm_alv_display



*&---------------------------------------------------------------------*
*       text   关户退款
*----------------------------------------------------------------------*
form fm_customer_clear .

  select distinct bukrs kunnr
    into corresponding fields of table gt_out
    from bsid
    where bukrs in s_bukrs
    and   kunnr in s_kunnr .

  data: ls_input  type zifs_fis006_input ,
        ls_output type zifs_fis006_output ,
        ls_return type bapiret2 .

  loop at gt_out assigning <fs_out> .
    clear: ls_input , ls_output , ls_return .

    <fs_out>-gjahr = s_budat-low+0(4) .
    ls_input-bukrs = <fs_out>-bukrs .
    ls_input-kunnr = <fs_out>-kunnr .
    ls_input-augdt = s_budat-low .

    call function 'ZCL_IFS_FI006_CUST_CLEAR'
      exporting
        input  = ls_input
      importing
        output = ls_output.

    if sy-subrc = 0 .
      <fs_out>-belnr = ls_output-belnr .
      read table ls_output-t_return into ls_return index 1 .
      <fs_out>-msg = ls_return-message .
    endif.
  endloop.

endform .                    "fm_customer_CLEAR

 

标签:wqyis,清账,程序,dmbtr,lv,lt,ls,FICO,kunnr
From: https://www.cnblogs.com/Anyohh233/p/17980142

相关文章

  • FICO 资产负债表
    *&---------------------------------------------------------------------**&ReportZFIR_004*&---------------------------------------------------------------------**&*&-----------------------------------------------------------------......
  • FICO 三大报表运算维护表计算规则(表里维护行次的)
    1+2+3"内表整理科目报表项目汇总后计算公式1+2+3DATA:lv_strTYPEstring,lv_str1TYPEstring,lt_numTYPETABLEOFstring,lt_signTYPETABLEOFstring,lv_indexTYPECHAR4,lv_iTYPEi,lv_sumTYPEpDECIMALS3.......
  • go tool trace 跟踪执行过程,程序优化过程
    Go并发优化的9大技巧,效果立竿见影原创 Go先锋 Go先锋 2023-11-1008:02 发表于广东 听全文Go先锋读完需要8分钟速读仅需3分钟  概述Go语言以其在并发编程方面的优势而闻名,但合理利用各种优化技巧可以进一步提升Go程序的并发性能。本文将介绍在CP......
  • exe安装程序的的执行过程
     执行一个.exe安装程序的过程涉及多个步骤,旨在将新软件或更新安装到Windows操作系统上。以下是这个过程的例子,说明了当用户运行一个名为Setup.exe的安装程序时发生的步骤:例子:安装名为“ExampleApp”的软件用户操作:用户双击Setup.exe文件或在命令行中执行该文件......
  • 基于taro搭建小程序多项目框架
    前言为什么需要这样一个框架,以及这个框架带来的好处是什么?从字面意思上理解:该框架可以用来同时管理多个小程序,并且可以抽离公用组件或业务逻辑供各个小程序使用。当你工作中面临这种同时维护多个小程序的业务场景时,可以考虑使用这种模式。灵感来自最近webpack的多项目打包构建......
  • #yyds干货盘点# LeetCode程序员面试金典:反转字符串中的单词 III
    题目给定一个字符串s,你需要反转字符串中每个单词的字符顺序,同时仍保留空格和单词的初始顺序。 示例1:输入:s="Let'stakeLeetCodecontest"输出:"s'teLekatedoCteeLtsetnoc"示例2:输入:s="MrDing"输出:"rMgniD"代码实现classSolution{publicString......
  • #yyds干货盘点# LeetCode程序员面试金典:二进制手表
    题目二进制手表顶部有4个LED代表小时(0-11),底部的6个LED代表分钟(0-59)。每个LED代表一个0或1,最低位在右侧。例如,下面的二进制手表读取"4:51"。给你一个整数turnedOn,表示当前亮着的LED的数量,返回二进制手表可以表示的所有可能时间。你可以按任意顺序返回答案......
  • 《程序是怎样跑起来的》第一章读后感
    我是现代信息技术学院计应232班赵精艺,在阅读了书籍《程序是怎样跑起来的》第一章后,我了解到了运行程序的CPU。其中CPU的内部是由寄存器、控制器、运算器和时钟四个部分构成的,各个部分之间由电流信号相互连通,每个部分都有各自的功能。要着重了解寄存器,因为程序是把寄存器作为对象来......
  • 读书有感 程序是怎样跑起来的
    CPU与内存的关系,虽然本质上都是名为集成电路的电子部件,由大量晶体管构成。CPU内部是由寄存器、控制器、运算器、和时钟四部分组成。内存则是指主存储器,简称主存。CPU中,需特别关注寄存器,因为寄存器是程序的描述对象。CPU是寄存器的集合体。用英语单词或其缩写表示每一种信号的功能,......
  • Go语言核心36讲 49 | 程序性能分析基础(下)
    你好,我是郝林,今天我们继续分享程序性能分析基础的内容。在上一篇文章中,我们围绕着“怎样让程序对CPU概要信息进行采样”这一问题进行了探讨,今天,我们再来一起看看它的拓展问题。知识扩展问题1:怎样设定内存概要信息的采样频率?针对内存概要信息的采样会按照一定比例收集Go程序......