03-20-2008 5:21 AM
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
03-20-2008 6:43 AM
Hi Krishna,
Can you please specify whether the internal table TA_MATNR is a standard or indexed table.
03-20-2008 7:00 AM
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