Skip to main content
Kofax

Extract / Invoice Reader Normalize Masterdata - TPF

3014847

Question / Problem: 

In the Extract and IR TPF for Transferring the Masterdata from SAP Cache to RefDB, the step Normalize Masterdata, can take up a lot of time. Especially with a lot of rows in EKKO and EKPO. SWE had this problem recently, the step took over 1 hour and 40 minutes to complete

Answer / Solution: 

The culprit was the Delete statement for EKPO rows with no matching EKKO entry. I changed the three Delete Statements at the end of the step as follows:

DELETE FROM LFA1 WHERE SPERR <>'' OR LOEVM <> ''

DELETE FROM LFB1 WHERE SPERR <>'' OR LOEVM <> ''

DELETE FROM LFB1 WHERE FRGRP <>'MFL1'

UPDATE LFA1 SET LIFNR = RIGHT(N'0000000000'+LIFNR,10)

UPDATE LFB1 SET LIFNR = RIGHT(N'0000000000'+LIFNR,10)

UPDATE LFBK SET LIFNR = RIGHT(N'0000000000'+LIFNR,10)

UPDATE EKKO SET LIFNR = RIGHT(N'0000000000'+LIFNR,10)

DELETE

FROM         LFA1

WHERE NOT Exists (

      SELECT 1

        FROM LFB1

       WHERE LFB1.LIFNR = LFA1.LIFNR

      )

DELETE

FROM         LFBK

WHERE NOT Exists (

      SELECT 1

        FROM LFA1

       WHERE LFA1.LIFNR = LFBK.LIFNR

      )

DELETE

FROM EKPO

WHERE NOT Exists (

      SELECT 1

        FROM EKKO

       WHERE EKKO.EBELN = EKPO.EBELN

      )

Now this step runs through in seconds.

Thanks to Ulrike Wingerath for this useful information.

Enter How to here:

  1. How to Step 1
  2. How to Step 2
  3. How to Step 3

 

Applies to:  

Product Version
eFlow 5.x

 

 

  • Was this article helpful?