Enhanced F110

1.F110 deletion enhancement:
Method: SE19 ZE_F110_DELETE_CHECK

 

 

 

Code:
. ENHANCEMENT 1 ZE_F110_DELETE_CHECK     "the Active Version ** ZE_F110_DELETE_CHECK the Add by xiangc ON 20,170,506 for F110 payment proposal check before deleting, recommendations ID can not be deleted in approval status. ** The require by fi_luotang the DATA: LS_ZTYJ_FK_STATUS the TYPE ZTYJ_FK_STATUS. The DATA: lv_answer the TYPE C.   the CASE the OK-CODE. * ------- Zahlungsauftr Ä GE L ö Schen ----------------------------- --------- * the WHEN 'PYOD'. * SUBMIT RFPYORDD the AND the RETURN the WITH PARLAUFD INCL 
         
  




   
     
              F110V-LAUFD
*                                 WITH  PARLAUFI INCL F110V-LAUFI
*                                 VIA   SELECTION-SCREEN.
*------- Vorschlagslauf Loeschen ---------------------------------------
    WHEN 'VODE'.
* break c_xiangc.
      CLEAR:LS_ZTYJ_FK_STATUS.
      SELECT SINGLE *
        INTO LS_ZTYJ_FK_STATUS
        FROM ZTYJ_FK_STATUS
       WHERE LAUFD = F110V-LAUFD
         AND LAUFI = F110V-LAUFI
         AND ZCHEC = 'X'.
      IF SY-SUBRC EQ 0.
*        MESSAGE S020(ZYUEJIN_FICO) WITH F110V-LAUFD F110V-LAUFI The DISPLAY the LIKE 'E'. * EXIT.       The CALL FUNCTION 'POPUP_TO_CONFIRM'         EXPORTING           TitleBar = 'Confirm'           text_question = 'This payment ID in the audit, whether to delete? '           Text_button_1 =' Confirm Delete '           text_button_2 =' not delete '           default_button =' 1 '       " is selected by default button: 1 is; 2 No           display_cancel_button =' '        " Tags: empty, does not display the Cancel button         IMPORTING           answer = lv_answer                  "1 is ;  
        






    
  

 

          text_not_found        = 1
          OTHERS                = 2.
      IF lv_answer EQ '1'.
 UPDATE ztyj_fk_status SET zchec = ' '
                           datum = sy-datum
                           uzeit = sy-uzeit
                           usnam = sy-uname
                     WHERE laufd = F110V-laufd
                       AND laufi = F110V-laufi.
       MESSAGE S023(ZYUEJIN_FICO) WITH F110V-LAUFD F110V-LAUFI.
      else.
        exit.
      ENDIF.

      ENDIF.

    WHEN OTHERS.
    ...
   ENDCASE.


ENDENHANCEMENT.


 

Transaction Code - F110 Parameters for Automatic Payment

 BADI Name            Description

 

 FI_BSTM_MC_EXIT FI Account Statement: transforming a number of cash withdrawal

 FI_F110_SCHEDULE_JOB F110: the recommended / run scheduled update check before scheduled

No of BADIs:          2

 

 

 

 

 

 

2.F110 before the payment run to lift the freeze document line items marked enhancement
SE19
: FI_F110_SCHEDULE_JOB  
F110: examination before the recommendations / update operation schedule of

 

Implementation: SE24 ZCL_IM_FI_F110_SCHEDULE_JB

 

 

 

 

Code:
. CHECK_PARAMETER the METHOD IF_EX_FI_F110_SCHEDULE_JOB ~
** vendor payment proposal has all the credentials to freeze all solutions to freeze
  the TYPE-POOLS:. TPIT
  the FIELD-the SYMBOLS <FS_LIFNR> the TYPE STANDARD TABLE.
  TYPES: BEGIN OF T_BSEG,
           BUKRS the TYPE BSEG-BUKRS,
           BELNR the TYPE BSEG,-BELNR,
           GJAHR the TYPE BSEG,-GJAHR,
           BUZEI the TYPE BSEG,-BUZEI,
           KOART the TYPE BSEG,-KOART,
         the END. OF T_BSEG.
  the DATA: LS_REGUV the TYPE REGUV,
        LV_FIELD (20 is),
        LT_BSIK the TYPE TABLE. OF BSIK,
        LS_BSIK the TYPE BSIK,
        LT_BSEG the TYPE T_BSEG OF TABLE,
        LS_BSEG the TYPE T_BSEG,
        S_BSEG the TYPE BSEG,
        The TYPE TPIT_T_BUZTAB LT_BUZTAB,
        LS_BUZTAB the TYPE. OF TPIT_T_BUZTAB the LINE,
        LT_FLDTAB the TYPE TPIT_T_FNAME,
        LS_FLDTAB the TYPE. OF TPIT_T_FNAME the LINE,
        LT_ERRTAB the TYPE TPIT_T_ERRDOC,
        LS_ERRTAB the TYPE. OF TPIT_T_ERRDOC the LINE,
        LR_LIFNR the TYPE FAGL_RANGE_T_LIFNR,
        LS_LIFNR the TYPE FAGL_RANGE_S_LIFNR.
** BREAK-the POINT. ** the CHECK . 1 = 2 . ** F110 automatic payments: the parameters have been entered and payment proposal has been established to run the solution was freeze ** status: the button to perform the following solution freeze logic "pay run" * CHECK I_F110V-BUKLS + 0 (4) = 'CV50 ' OR I_F110V-BUKLS + 0 (. 4) =  
     
  
 
         'CV51'.
  CLEAR: LS_REGUV.
  SELECT SINGLE * INTO LS_REGUV
      FROM REGUV
    WHERE LAUFD = I_F110V-LAUFD
      AND LAUFI = I_F110V-LAUFI.
  CHECK LS_REGUV-XVORE = 'X' AND LS_REGUV-XECHT IS INITIAL.
**取供应商
  REFRESH:LR_LIFNR,LT_BSIK,LT_BSEG.
  LV_FIELD = '(SAPF110V)R_LIFNR[]'.
  ASSIGN (LV_FIELD) TO <FS_LIFNR>.
  IF <FS_LIFNR>[] IS ASSIGNED.
    LR_LIFNR[] = <FS_LIFNR>[].
    UNASSIGN <FS_LIFNR>.
  ENDIF.

**取供应商已被冻结的数据
  SELECT * INTO TABLE LT_BSIK
      FROM BSIK
    WHERE BUKRS = I_F110V-BUKLS+0(4)
      AND GJAHR = I_F110V-LAUFD+0(4)
      AND LIFNR IN LR_LIFNR
**      AND BSTAT = SPACE
**      AND BSCHL = '31'
      AND ZLSPR = 'X'. "X:(跃进)自动付款冻结

  CHECK LT_BSIK[] IS NOT INITIAL.
**取科目类型
  SELECT BUKRS BELNR GJAHR BUZEI KOART
      INTO CORRESPONDING FIELDS OF TABLE LT_BSEG
      FROM BSEG
      FOR ALL ENTRIES IN LT_BSIK
    WHERE BUKRS = LT_BSIK-BUKRS
      AND BELNR = LT_BSIK-BELNR
      AND GJAHR = LT_BSIK-GJAHR
      AND BUZEI = LT_BSIK-BUZEI.
  SORT LT_BSEG BY BUKRS BELNR GJAHR BUZEI.
  LOOP AT LT_BSIK INTO LS_BSIK.
    CLEAR: S_BSEG, LS_BSEG, LS_FLDTAB, LT_FLDTAB []
           LS_FLDTAB, LT_FLDTAB [] LS_ERRTAB, LT_ERRTAB [].
    TABLE READ INTO LT_BSEG LS_BSEG WITH KEY BUKRS = LS_BSIK-BUKRS
                                             BELNR = LS_BSIK-BELNR
                                             GJAHR = LS_BSIK-GJAHR
                                             Buzau = LS_BSIK-Buzau
                                             BINARY SEARCH.
    LS_BUZTAB-BUKRS = LS_BSIK-BUKRS.
    LS_BUZTAB-BELNR = LS_BSIK-BELNR.
    LS_BUZTAB-GJAHR = LS_BSIK-GJAHR.
    LS_BUZTAB-Buzau = LS_BSIK-Buzau.
    LS_BUZTAB-KOART = LS_BSEG-KOART.
    LS_BUZTAB-BSCHL = LS_BSIK-BSCHL.
    APPEND LS_BUZTAB TO LT_BUZTAB.

    LS_FLDTAB-FNAME = 'ZLSPR'.
    APPEND LS_FLDTAB TO LT_FLDTAB.
**
    CALL FUNCTION 'FI_ITEMS_MASS_CHANGE'
      EXPORTING
        S_BSEG     = S_BSEG
      IMPORTING
        ERRTAB     = LT_ERRTAB
      TABLES
        IT_BUZTAB  = LT_BUZTAB
        IT_FLDTAB  = LT_FLDTAB
      EXCEPTIONS
        BDC_ERRORS = 1
        OTHERS     = 2.
    IF SY-SUBRC <> 0.
      MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      EXIT.
    ENDIF.
  ENDLOOP.
ENDMETHOD.

 

3. Financial document item terms of payment substitution

 

* ------------------------------------------------- * --------------------
* FORM Z002 * * ------------------------ --------------------------------------------- * * alternative payment methods : BSEG,-ZTerm . *. 1 system according BSEG-BUKRS (company code) = (CV50, CV51, CV52), * BSEG,-KOART (account type) = K, * according BSEG-LIFNR (vendor account) to LFB1-LIFNR BSEG-LIFNR =, * LFB1-BUKRS = BESG-BUKRS (company code), find BSEG-ZTERM LFB1-ZTERM assigned to * * --------------------- * ------------------------------------------------ FORM Z002. * BREAK-the POINT. * & ---> the Add ON 16.05.2017 10:30:38 by CX.                                                             



  
 
 




      
  DATA:l_zterm TYPE lfb1-zterm.

  CLEAR:l_zterm.
  SELECT SINGLE zterm
    INTO l_zterm
    FROM lfb1
   WHERE lifnr = bseg-lifnr
     AND bukrs = bseg-bukrs.
  IF l_zterm NE space.
    CONDENSE l_zterm NO-GAPS.
    bseg-zterm = l_zterm.
  ENDIF.
*&--->end add.

ENDFORM.       

Guess you like

Origin www.cnblogs.com/rainysblog/p/11974258.html