Application Development Blog Posts
Learn and share on deeper, cross technology development topics such as integration and connectivity, automation, cloud extensibility, developing at scale, and security.
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member

Indexing MSEG : ABAP dump due to Time out during invoice verification - MIRO

Hi All,

This Blog Talks about how to solve an ABAP Dump: Time out during invoice verification – MIRO even after applying various SAP Notes due to performance issue in fetching data from MSEG table in Function Module J_1I4_GET_ACTUAL_DUTY_IN_LIV.

Solution:   Create New ‘Z’ Index in MSEG Table and write a oracle index statement in select query of MSEG table in               

FM J_1I4_GET_ACTUAL_DUTY_IN_LIV.

Step 1:  Create Index For LFBJA ,LFBNR ,LFPOS Fields in MSEG.

Step 2: Write the below code in FM J_1I4_GET_ACTUAL_DUTY_IN_LIV for the MSEG Select Query:

               %_HINTS ORACLE 'INDEX(MSEG~ZMR)'

AS:

SELECT * FROM MSEG INTO TABLE lt_mseg
WHERE lfbja = yydrseg-lfgja
AND   lfbnr = yydrseg- lfbnr AND   lfpos = yydrseg-lfpos
%_HINTS ORACLE
'INDEX(MSEG~ZMR)'.

OR:

SELECT * FROM mseg WHERE lfbja = yydrseg-lfgja

AND lfbnr = yydrseg-lfbnr

AND lfpos = yydrseg-lfpos

%_HINTS ORACLE 'INDEX(MSEG~ZMR)'.

IF sy-subrc EQ 0 AND mseg-bwart = '105'.
        rdoc2       = mseg-mblnr.
        ryear2      = mseg-mjahr.
        ritem2      = mseg-zeile.
      ENDIF.
ENDSELECT.

Note: For doing above changes need to take Access Key as this is SAP Standard Code.

After the completion of the above steps, your system will retrieve the data fast from MSEG table and does not get time-out Dump

Even you can use this indexing method for other purpose also.


2 Comments