需求:F-44/F-32 未清项目过账界面,增加 合同编号 参考编号和用户名字,名称
实现:
1、 表RFOPS、RFOPS_S中,增加 字段
2、 新增BTE,事件00000900,对 字段赋值;
产品:ZPRODUCT 可以自己创建
Functin: ZSAMPLE_INTERFACE_00000900 是根据 SAMPLE_INTERFACE_00000900 复制而来的
2、 SPRO中,增加字段的显示,财务会计(新)-总账会计(新)-业务交易-未清项目结算-未结清项目处理-定义行格式:行格式A1,增加“合同编号” (TCode: O7Z4S);同时需要将A1设置为默认的行格式变式。
FUNCTION zsample_interface_00000900.
*"----------------------------------------------------------------------
*"*"本地接口:
*" IMPORTING
*" REFERENCE(I_RF05A) TYPE RF05A OPTIONAL
*" TABLES
*" T_BKPF STRUCTURE BKPF
*" T_POSTAB STRUCTURE RFOPS
*" T_POSTABSUB STRUCTURE RFOPS_S
*"----------------------------------------------------------------------
BREAK yangtao.
DATA:lw_postab_sub TYPE rfops_s.
IF t_postab[] IS NOT INITIAL.
SELECT bkpf~bukrs,
bkpf~belnr,
bkpf~gjahr,
bkpf~xblnr_alt AS zxblnr_alt,
bkpf~usnam AS zusnam,
v_username~name_text AS zusnam_txt
INTO TABLE @DATA(lt_bkpf)
FROM bkpf LEFT JOIN v_username ON bkpf~usnam = v_username~bname
FOR ALL ENTRIES IN @t_postab
WHERE bukrs = @t_postab-bukrs AND
belnr = @t_postab-belnr AND
gjahr = @t_postab-gjahr.
SORT lt_bkpf BY bukrs belnr gjahr.
ENDIF.
LOOP AT t_postab ASSIGNING FIELD-SYMBOL(<fs_postab>).
lw_postab_sub-tabix = sy-tabix.
READ TABLE lt_bkpf INTO DATA(lw_bkpf) WITH KEY bukrs = <fs_postab>-bukrs
belnr = <fs_postab>-belnr
gjahr = <fs_postab>-gjahr BINARY SEARCH.
IF sy-subrc EQ 0.
lw_postab_sub-zxblnr_alt = lw_bkpf-zxblnr_alt.
lw_postab_sub-zusnam = lw_bkpf-zusnam.
lw_postab_sub-zusnam_txt = lw_bkpf-zusnam_txt.
ENDIF.
APPEND lw_postab_sub TO t_postabsub.
ENDLOOP.
ENDFUNCTION.