• F110的几个功能



    1.F-59, 没有找到函数, 使用BDC

    BAPI_ACC_DOCUMENT_POST 必须创建有借贷2 line 的凭证,
    需求要参考原始的SA类型凭证, 创建一个单条的 科目 = 供应商 的凭证,

    参考程序 ZFIT_001_YJ

    CALL TRANSACTION 'F-47' USING gt_bdcd
    MODE p_mode
    UPDATE 'S'
    MESSAGES INTO gt_messtab.

    READ TABLE gt_messtab WITH KEY msgtyp = 'S'
    msgid = 'F5'
    msgnr = '312'.

    IF sy-subrc = 0 AND gt_messtab-msgv1 IS NOT INITIAL.
    MESSAGE s312(f5) WITH gt_messtab-msgv1 gw_regup-bukrs.
    * 凭证 & 记帐到公司代码&中
    lw_ztregup-belnr = gt_messtab-msgv1.
    lw_ztregup-buzei = '001'.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    EXPORTING
    input = lw_ztregup-belnr
    IMPORTING
    output = lw_ztregup-belnr.
    CONCATENATE 'S1成功:'(156) gt_messtab-msgv1 INTO gw_f110-zmsg SEPARATED BY space.
    lv_flag = lv_i.
    gw_f110-zstep = lv_i.
    gw_f110-zicon = '@01@'.
    gw_f110-msgty = 'S'.
    lw_ztregup-budat = sy-datum.
    lw_ztregup-bldat = sy-datum.
    lw_ztregup-dmbtr = lv_zcyje.
    lw_ztregup-wrbtr = lv_zcyje.
    lw_ztregup-sgtxt = lv_text.
    APPEND lw_ztregup TO lt_ztregup.
    *** F-59成功,则更新项目表
    * MODIFY ztregup FROM TABLE lt_ztregup.
    EXIT.

    ELSE.
    gw_f110-msgty = 'E'.
    * gw_f110-zicon = '@02@'.
    * gw_f110-zstep = 0.
    * lv_flag = 'X'.
    * LOOP AT gt_messtab WHERE msgtyp = 'E' OR msgtyp = 'A'.
    * CALL FUNCTION 'MESSAGE_TEXT_BUILD'
    * EXPORTING
    * msgid = gt_messtab-msgid
    * msgnr = gt_messtab-msgnr
    * msgv1 = gt_messtab-msgv1
    * msgv2 = gt_messtab-msgv2
    * msgv3 = gt_messtab-msgv3
    * msgv4 = gt_messtab-msgv4
    * IMPORTING
    * message_text_output = lv_msg.
    * ENDLOOP.
    * CONCATENATE 'S1失败:'(155) lv_msg INTO gw_f110-zmsg SEPARATED BY space.

    ENDIF.

    ENDIF.

    2.凭证行冻结F-02 FI_MASS*CHANGE

    FI_ITEMS_MASS_CHANGE

    *... apply changes:
    CALL FUNCTION 'FI_ITEMS_MASS_CHANGE'
    EXPORTING
    s_bseg = tbseg
    IMPORTING
    errtab = it_errtab[]
    TABLES
    it_buztab = rt_buztab
    it_fldtab = fldtab
    EXCEPTIONS
    bdc_errors = 1
    OTHERS = 2.
    IF sy-subrc <> 0.
    info_flag = 'X'.
    ENDIF.

    3.删除F110 付款清单;

    Function module DELETE_PAYMENT_PROPOSAL
    DELETE_PAYMENT_RUN

    CALL FUNCTION 'DELETE_PAYMENT_PROPOSAL'
    EXPORTING
    date = gw_f110-laufd
    identification = gw_f110-laufi
    i_datum = sy-datum
    EXCEPTIONS
    no_delete_authority = 1
    OTHERS = 2.

    4.重新运行F110 付款建议:没有找到函数,BDC

    CALL TRANSACTION 'F110' USING gt_bdcd
    MODE p_mode
    UPDATE 'S'
    MESSAGES INTO gt_messtab.
    READ TABLE gt_messtab WITH KEY msgid = 'F0' msgnr = '084'.
    IF sy-subrc EQ 0.

    *&->其他函数;
    CALL FUNCTION 'FI_PAYMENT_FORMAT_INDICATOR'
    EXPORTING
    I_COUNTRY = BUKTAB-LAND1
    I_ZWELS = FKTTAB-ZWELS
    IMPORTING
    E_XFORMI = XFORMI.

    *&5.删除付款建议 参数

    CALL FUNCTION 'DELETE_PAYMENT_PARAMETERS_DB'
    EXPORTING
    i_laufd = f110v-laufd
    i_laufi = f110v-laufi
    i_check = ' '
    EXCEPTIONS
    deletion_not_allowed = 1
    OTHERS = 2.

  • 相关阅读:
    https://blog.csdn.net/yongchaocsdn/article/details/53355296
    P1526 [NOI2003]智破连环阵 [搜索+剪枝(二分图)]
    AT2165 Median Pyramid Hard [二分答案]
    翻煎饼 [迭代加深搜索+剪枝]
    P2962 [USACO09NOV]灯Lights [高斯消元+异或方程组 / 折半搜索]
    P5025 [SNOI2017]炸弹 [线段树优化建图 + Tarjan]
    Tarjan [割点, 缩点, 桥(待填坑)]
    线段树优化建图学习笔记
    P5468 [NOI2019]回家路线 [斜率优化dp]
    CF573E Bear and Bowling [平衡树+动态规划]
  • 原文地址:https://www.cnblogs.com/rainysblog/p/8168368.html
Copyright © 2020-2023  润新知