Skip to Content
author's profile photo Former Member
Former Member

Issue with code

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

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Oct 11, 2005 at 09:42 AM

    Try this,

    use a variable with assignment L_S_ZOXTG20045-IWERK+0(2) and than use the variable in elsif.

    I think this is the problem.

    Regards.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 11, 2005 at 09:15 AM

    I don't know why it gives you this error, but i think you have to put another ENDIF.

    Regards.

    Paolo

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.