Skip to Content
Author's profile photo Former Member

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

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.

/wp-content/uploads/2012/10/1_149603.png

/wp-content/uploads/2012/10/2_149604.png

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.


Assigned Tags

      2 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Alex Campbell
      Alex Campbell

      Am I correct in assuming that the hint that you include in J_1I4_GET_ACTUAL_DUTY_IN_LIV will only work if you're using an Oracle DB? If so, it might be worthwhile to mention that in your post, since I'm sure it will be stumbled upon by developers/others who may not have any idea about underlying databases or ABAP hints.

      Author's profile photo Kali Charan
      Kali Charan

      Venu Chippa


      Thanks u above post is useful to me.