Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Problematic Statement EPC Error

Former Member
0 Kudos

Hello All,

In the following FORM in a program when i do the EPC Check. I get a problematic statement Error which says:

Indirect Index Access to Internal Table TA_MATNR

Outside a LOOP, this causes a short dump.

Please tell me how can this be resolved. What is the problem with the DELETE Statement ?

FORM READ_MATERIAL_CLASS.

  • reading classificationsystem.

DATA: XCLASS LIKE SCLASS OCCURS 0 WITH HEADER LINE,

XOBJECTS LIKE CLOBJDAT OCCURS 0 WITH HEADER LINE.

KLAH-CLASS = 'SUPPLY'.

MOVE TA_MATNR-MATNR TO AUSP-OBJEK.

CALL FUNCTION 'CLAF_CLASSIFICATION_OF_OBJECTS'

EXPORTING

CLASS = KLAH-CLASS

CLASSTYPE = '001'

CLINT = KLAH-CLINT

OBJECT = AUSP-OBJEK

TABLES

T_CLASS = XCLASS

T_OBJECTDATA = XOBJECTS

EXCEPTIONS

NO_CLASSIFICATION = 1

NO_CLASSTYPES = 2

INVALID_CLASS_TYPE = 3

OTHERS = 4.

IF SY-SUBRC <> 0.

REFRESH XOBJECTS.

ENDIF.

READ TABLE XOBJECTS WITH KEY ATNAM =

'QRES'.

IF SY-SUBRC NE 0.

TA_MATNR-NEW = 'X'.

MODIFY TA_MATNR.

ELSEIF XOBJECTS-AUSP1(1) EQ TA_MATNR-RESP.

>>> DELETE TA_MATNR. <<<

ENDIF.

ENDFORM.

Regards,

Sai

2 REPLIES 2

Former Member
0 Kudos

Hi Krishna,

Can you please specify whether the internal table TA_MATNR is a standard or indexed table.

0 Kudos

Hi Avinash,

It is not a standard table.

DATA: BEGIN OF STR_MATNR,

MATNR LIKE MARA-MATNR,

SOBSL LIKE MARC-SOBSL,

RESP(1) TYPE C,

NEW(1) TYPE C.

DATA: END OF STR_MATNR.

DATA: TA_MATNR LIKE STR_MATNR OCCURS 0 WITH HEADER LINE.

Regards,

Sai