Skip to Content
0
Former Member
Oct 10, 2005 at 09:26 PM

Issue with code

25 Views

I have appended a field to the extract structure of a DataSource.

The main body of the code is as follows

TABLES: QMIH, /TPISP/YI_NONSAP.

DATA: L_S_ZOXTG20045 LIKE ZOXTG20045.

LOOP AT I_T_DATA INTO L_S_ZOXTG20045.

L_TABIX = SY-TABIX.

IF L_S_ZOXTG20045-IWERK IS INITIAL.

SELECT SINGLE AUSBS FROM QMIH

INTO L_S_ZOXTG20045-ZZBW_IMP_DATE

WHERE EQUNR = L_S_ZOXTG20045-EQUNR

AND BAUTL = L_S_ZOXTG20045-RK_MATNR.

ELSEIF L_S_ZOXTG20045-IWERK+0(2) = ‘ZZ’.

SELECT SINGLE RK_IMPLEMENT_DT FROM /TPISP/YI_NONSAP

INTO L_S_ZOXTG20045-ZZBW_IMP_DATE

WHERE EQUNR = L_S_ZOXTG20045-EQUNR

AND RK_MATNR = L_S_ZOXTG20045-RK_MATNR.

ELSE.

SELECT SINGLE AUSBS FROM QMIH

INTO L_S_ZOXTG20045-ZZBW_IMP_DATE

WHERE EQUNR = L_S_ZOXTG20045-EQUNR

AND BAUTL = L_S_ZOXTG20045-RK_MATNR.

ENDIF.

MODIFY I_T_DATA FROM L_S_ZOXTG20045 INDEX L_TABIX.

ENDLOOP.

I am getting an error when I try and activate. The details are:

Field 'ZZ' is unknown. It is neither in one of the specified tables nor defined by a DATA statement. However ZZ is meant to represent the first two characteristics of a field IWERK. I cannot see any problems could anyone assist. Thanks