Skip to Content

Low performance of FBL3N report

Hi Team,

I have activate BTE 1650 also after that FBL3N report is running very slow.

please suggest me how can I improve performance of this report

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Mar 08 at 09:47 AM

    Hi,

    a) Was performance reasonable without BTE?

    b) Are you accessing archived records in your selection when you run FBL3N?

    c) What is your SAP release?

    If the answer to a) is positive, then post screenshot of what you have put in BTE. Verify that the algorithm is not running on non-indexed fields.

    Regards,

    Eli

    Add comment
    10|10000 characters needed characters exceeded

    • FUNCTION Z_INTERFACE_00001650.
      *"----------------------------------------------------------------------
      *"*"Local Interface:
      *"  IMPORTING
      *"     VALUE(I_POSTAB) LIKE  RFPOS STRUCTURE  RFPOS
      *"  EXPORTING
      *"     VALUE(E_POSTAB) LIKE  RFPOS STRUCTURE  RFPOS
      *"----------------------------------------------------------------------
      
      *-------------- Initialize Output by using the following line ----------
        E_POSTAB = I_POSTAB.
      
        TABLES : BSEG, LFA1,KNA1.
        DATA: W_NAME1 TYPE LFA1-NAME1,
              W_NAMEC TYPE KNA1-NAME1,
        W_LIFNR TYPE LFA1-LIFNR,
        W_KUNNR TYPE BSEG-KUNNR,
        W_HKONT TYPE BSEG-HKONT,
        W_TXT TYPE SKAT-TXT20,
        W_EBELN TYPE EKKO-EBELN.
        IF E_POSTAB-BLART EQ 'WE'.
      *  “For MIGO documents
          SELECT SINGLE EBELN INTO W_EBELN FROM BSEG WHERE BELNR = E_POSTAB-BELNR
          AND BUKRS = E_POSTAB-BUKRS
          AND GJAHR = E_POSTAB-GJAHR
          AND HKONT = E_POSTAB-HKONT.
      
      *** for GL accunt and description for expenses
          SELECT SINGLE HKONT FROM BSEG INTO E_POSTAB-ZHKONT WHERE BELNR = E_POSTAB-BELNR AND BSCHL in ('81','91')
           AND    KOART ='S'.
          SELECT SINGLE TXT20 FROM SKAT INTO E_POSTAB-ZTXT20 WHERE SAKNR = E_POSTAB-ZHKONT.
      
          IF SY-SUBRC = 0.
      
            SELECT SINGLE LFA1~NAME1
            LFA1~LIFNR
            INTO (W_NAME1, W_LIFNR)
            FROM EKKO INNER JOIN LFA1 ON EKKO~LIFNR =
            LFA1~LIFNR WHERE EKKO~EBELN = W_EBELN.
      
            IF SY-SUBRC = 0.
      
              E_POSTAB-ZNAME = W_NAME1.
              E_POSTAB-ZLIFNR = W_LIFNR.
      
              CLEAR:W_NAME1,W_LIFNR.
            ENDIF.
          ENDIF.
        ELSE.
      *  “For other than MIGO doc
      *i.e. Vendor Invoice
          SELECT SINGLE LIFNR
          FROM BSEG
          INTO (E_POSTAB-ZLIFNR)
          WHERE BUKRS = I_POSTAB-BUKRS
          AND GJAHR = I_POSTAB-GJAHR
          AND BELNR = I_POSTAB-BELNR
          AND BSCHL IN ('31','21')
          AND KOART = 'K'.
      ***  Customer code
      
          SELECT SINGLE KUNNR
        FROM BSEG
        INTO (E_POSTAB-ZKUNNR)
        WHERE BUKRS = I_POSTAB-BUKRS
        AND GJAHR = I_POSTAB-GJAHR
        AND BELNR = I_POSTAB-BELNR
        AND BSCHL IN ('01','02','11','12','15')
        AND KOART = 'D'.
      **    Fetching Customer name
          SELECT SINGLE NAME1
      FROM KNA1
      INTO E_POSTAB-ZNAMEC
      WHERE KUNNR = E_POSTAB-ZKUNNR.
      * Fetching Vendor Name
          SELECT SINGLE NAME1
          FROM LFA1
          INTO E_POSTAB-ZNAME
          WHERE LIFNR = E_POSTAB-ZLIFNR.
        ENDIF.
      
      ENDFUNCTION.
  • Mar 08 at 10:00 AM

    Have a look at the following OSS notes

    1. 977792 - FBL3N: Performance improvement while reading archive records
    2. 904163 - FBL3N - performance problem after Support Package 10
    3. 2568807 - Performance improvement for FBL3N
    Add comment
    10|10000 characters needed characters exceeded

  • Mar 13 at 03:42 PM

    You can experiment with enabling and disabling the BTE in FIBF to determine the perfomance impact.

    Furthermore the new approach to do this is with a BADI (i'm not sure if the performance is affected) 1323512 - Line items: BADI FI_ITEMS_CH_DATA / 1504612 - Line item: Offsetting account information (BAdI FI_ITEMS_CH_DATA)

    Last but not least: you'll need an ABAP or BASIS consultant to solve this

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 13 at 11:27 AM

    Of course, you would have performance problems: you run a selection on BSEG!

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Mr Eli Klovaski,

      Thanks for reply

      All the data is not available in BSIK and BSAK table i.e Purchase order No. This information is must required so that we used BSEG Table please suggest any other table can we use instead of BSIK,BSAK