• SAP 取得因为折旧价值变动的固定资产的方法


    由于需要将固定资产价值变动后的数据实时传送给OA系统,找了很多都只到期间,最后想了个间接的方法,通过科目变动去判断固定资产价值有没有变动。

    目前使用折旧科目进行判断,后期可以加入固定资产价值变动的其他科目。

     DATA:LT_ASSET_INFO TYPE STANDARD TABLE OF    ZSFI008,
           LS_ASSET_INFO TYPE ZSFI008.
      FIELD-SYMBOLS  : <LT_PAY_DATA>   TYPE ANY TABLE .
      FIELD-SYMBOLS : <LT_TEST> TYPE ANY . "LIKE LINE OF  it_tab .
      DATA LR_PAY_DATA  TYPE REF TO DATA.
    RANGES:LR_SAKNR FOR SKA1-SAKNR."定义折旧科目
    "根据折旧科目日期去取价值变动的资产,用于下传OA
      LR_SAKNR-SIGN = 'I'.
      LR_SAKNR-OPTION = 'EQ'.
      LR_SAKNR-LOW = '1602010001'.
      APPEND LR_SAKNR.
      CLEAR LR_SAKNR.
      LR_SAKNR-SIGN = 'I'.
      LR_SAKNR-OPTION = 'EQ'.
      LR_SAKNR-LOW = '1602020001'.
      APPEND LR_SAKNR.
      CLEAR LR_SAKNR.
      LR_SAKNR-SIGN = 'I'.
      LR_SAKNR-OPTION = 'EQ'.
      LR_SAKNR-LOW = '1602030001'.
      APPEND LR_SAKNR.
      CLEAR LR_SAKNR.
      LR_SAKNR-SIGN = 'I'.
      LR_SAKNR-OPTION = 'EQ'.
      LR_SAKNR-LOW = '1602040001'.
      APPEND LR_SAKNR.
      CLEAR LR_SAKNR.
      LR_SAKNR-SIGN = 'I'.
      LR_SAKNR-OPTION = 'EQ'.
      LR_SAKNR-LOW = '1602050001'.
      APPEND LR_SAKNR.
      CLEAR LR_SAKNR.
      LR_SAKNR-SIGN = 'I'.
      LR_SAKNR-OPTION = 'EQ'.
      LR_SAKNR-LOW = '1602990001'.
      APPEND LR_SAKNR.
      CLEAR LR_SAKNR.
    
    CL_SALV_BS_RUNTIME_INFO=>SET( EXPORTING DISPLAY = ABAP_FALSE   METADATA = ABAP_FALSE DATA = ABAP_TRUE ).
          SUBMIT FAGL_ACCOUNT_ITEMS_GL "根据FAGLL03总账科目取数
          USING SELECTION-SCREEN '1000'
                WITH SD_SAKNR IN LR_SAKNR
                WITH SD_BUKRS IN S_BUKRS6
                WITH X_AISEL = 'X'
                WITH X_CLSEL = SPACE
                WITH X_OPSEL = SPACE
                WITH SO_BUDAT IN S_ERDAT6
    *VIA  SELECTION-SCREEN
          EXPORTING LIST TO MEMORY AND RETURN.
          IF SY-SUBRC = 0.
            TRY.
                CL_SALV_BS_RUNTIME_INFO=>GET_DATA_REF( IMPORTING R_DATA = LR_PAY_DATA ).
                ASSIGN LR_PAY_DATA->* TO <LT_PAY_DATA>.
              CATCH CX_SALV_BS_SC_RUNTIME_INFO.
                MESSAGE `Unable to retrieve ALV data` TYPE 'E'.
            ENDTRY.
          ENDIF.
          CL_SALV_BS_RUNTIME_INFO=>CLEAR_ALL( ).
          IF <LT_PAY_DATA> IS  ASSIGNED.
            LT_DATA_6 = CORRESPONDING #( <LT_PAY_DATA> ).
          ENDIF.
    SORT LT_DATA_6 BY BUKRS ANLN1 ANLN2.
      DELETE ADJACENT DUPLICATES FROM LT_DATA_6 COMPARING BUKRS ANLN1 ANLN2.

    取出所有资产后,就可以根据ANLC去读取价值传送给OA

  • 相关阅读:
    快速查询 jsp页面 和 js方法
    order by 特定字段放在特定的位置
    eclipse中将java项目变成web项目
    Eclipse导入项目:No projects are found to import
    解决【Tomcat version 6.0 only supports J2EE 1.2, 1.3, 1.4, and Java EE 5 Web modul】报错问题
    ORA-24247:网络访问被访问控制列表(ACL)拒绝器
    Oracle 使用UTL_HTTP发送http请求--转载
    Oracle ACL (Access Control List) 详细介绍
    PLSQL中&符号处理
    windows oracle11gR2安装使用
  • 原文地址:https://www.cnblogs.com/BruceKing/p/15333445.html
Copyright © 2020-2023  润新知