*&---------------------------------------------------------------------*
*& Report ZCO005
*&---------------------------------------------------------------------*
*&
*&---------------------------------------------------------------------*
REPORT zco005.
TABLES : csks,setleaf ,acdoca .
PARAMETERS p_bukrs TYPE csks-bukrs OBLIGATORY . "公司代码
PARAMETERS p_gjahr TYPE acdoca-gjahr OBLIGATORY . "财年
SELECT-OPTIONS: s_poper FOR acdoca-poper OBLIGATORY . "期间
SELECT-OPTIONS :s_kostl FOR csks-kostl ."成本中心
SELECT-OPTIONS : s_name FOR setleaf-setname .
PARAMETERS:setclass TYPE setleaf-setclass DEFAULT'0101' NO-DISPLAY .
PARAMETERS:subclass TYPE setleaf-subclass DEFAULT '8000' NO-DISPLAY.
DATA : BEGIN OF gs_csks,
kostl LIKE csks-kostl,
END OF gs_csks .
DATA: gt_csks LIKE TABLE OF gs_csks.
DATA: BEGIN OF gs_setleaf,
valfrom LIKE setleaf-valfrom,
valto LIKE setleaf-valto,
END OF gs_setleaf .
DATA: gt_setleaf LIKE TABLE OF gs_setleaf .
DATA : BEGIN OF gw_t001,
bukrs TYPE t001-bukrs, " 公司代码
butxt TYPE t001-butxt, " 公司描述
END OF gw_t001 .
DATA: BEGIN OF gs_out1 ,
bukrs TYPE csks-bukrs , "公司代码
* BUTXT TYPE T001-BUTXT , "公司名称
gjahr TYPE acdoca-gjahr , "财年
poper TYPE acdoca-poper , "期间
kostl TYPE csks-kostl , "成本中心
* KTEXT TYPE CSKT-KTEXT, "成本中心名称
racct TYPE acdoca-racct, "会计科目
* TXT20 TYPE SKAT-TXT20, "科目名称
" tsl TYPE acdoca-tsl, "合计
sumtsl TYPE acdoca-tsl, "期间累计值
END OF gs_out1.
DATA: gt_out1 LIKE TABLE OF gs_out1 .
DATA: BEGIN OF gs_out ,
kostl TYPE csks-kostl , "成本中心
ktext TYPE cskt-ktext, "成本中心名称
racct TYPE acdoca-racct, "会计科目
txt20 TYPE skat-txt20, "科目名称
rs001 TYPE i,
fy001 TYPE acdoca-tsl,
pj001 TYPE acdoca-tsl,
rs002 TYPE i,
fy002 TYPE acdoca-tsl,
pj002 TYPE acdoca-tsl,
rs003 TYPE i,
fy003 TYPE acdoca-tsl,
pj003 TYPE acdoca-tsl,
rs004 TYPE i,
fy004 TYPE acdoca-tsl,
pj004 TYPE acdoca-tsl,
rs005 TYPE i,
fy005 TYPE acdoca-tsl,
pj005 TYPE acdoca-tsl,
rs006 TYPE i,
fy006 TYPE acdoca-tsl,
pj006 TYPE acdoca-tsl,
rs007 TYPE i,
fy007 TYPE acdoca-tsl,
pj007 TYPE acdoca-tsl,
rs008 TYPE i,
fy008 TYPE acdoca-tsl,
pj008 TYPE acdoca-tsl,
rs009 TYPE i,
fy009 TYPE acdoca-tsl,
pj009 TYPE acdoca-tsl,
rs010 TYPE i,
fy010 TYPE acdoca-tsl,
pj010 TYPE acdoca-tsl,
rs011 TYPE i,
fy011 TYPE acdoca-tsl,
pj011 TYPE acdoca-tsl,
rs012 TYPE i,
fy012 TYPE acdoca-tsl,
pj012 TYPE acdoca-tsl,
fysum TYPE acdoca-tsl,
rspj TYPE acdoca-tsl,
rssum TYPE acdoca-tsl,
fypj TYPE acdoca-tsl,
END OF gs_out.
DATA gt_out LIKE TABLE OF gs_out .
DATA: gt_fieldcat TYPE TABLE OF slis_fieldcat_alv.
DATA: gs_fieldcat TYPE slis_fieldcat_alv.
DATA: gs_layout TYPE slis_layout_alv .
DATA: functxt TYPE smp_dyntxt. " 菜单制作器:动态文本的程序接
TABLES: sscrfields,faglflext. " 选择屏幕上的字段
DATA: wa_vimsellist LIKE vimsellist, " 选择视图维护范围的工作区
gt_vimsellist LIKE TABLE OF wa_vimsellist.
DATA : gv_bukrs TYPE bukrs.
SELECTION-SCREEN: FUNCTION KEY 1. " 资产负债表维护的功能键
INITIALIZATION.
functxt-icon_id = icon_create_text.
functxt-quickinfo = '部门人数维护'.
functxt-icon_text = '部门人数表维护'.
sscrfields-functxt_01 = functxt.
AT SELECTION-SCREEN.
*Authority check(权限检查)
PERFORM frm_authority_check.
IF sscrfields-ucomm = 'FC01'.
*&---对资产负债表进行维护
PERFORM frm_configuration USING 'ZMV_ZTFI010'.
ELSE.
PERFORM frm_check_screen.
ENDIF.
START-OF-SELECTION.
SELECT valfrom valto
INTO TABLE gt_setleaf
FROM setleaf
WHERE setclass = '0101'
AND subclass = '8000'
AND setname IN s_name .
DATA: lt_csks LIKE TABLE OF gs_csks .
IF s_kostl IS NOT INITIAL .
SELECT kostl
INTO TABLE gt_csks
FROM csks
WHERE kostl IN s_kostl .
ELSE .
LOOP AT gt_setleaf INTO gs_setleaf .
SELECT kostl
INTO TABLE lt_csks
FROM csks
WHERE kostl BETWEEN gs_setleaf-valfrom AND
ALV双击出来明细
最新推荐文章于 2023-06-08 09:09:57 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)