Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Error in End routine- Field not there in Table or Data statement

Hi Guys,

I am writing an END Routine. Here are the exact code. Its giving me error  "E:Field "COPANETSL" is unknown. It is neither in one of the specified tables nor defined by a "DATA" statement. "DATA" statement.

DATA : begin of t_comp,
   /BIC/ZCOMPANY  type  /BIC/PZSOLD_TO-/BIC/ZCOMPANY,
/BIC/ZSOLD_TO type /BIC/PZSOLD_TO-/BIC/ZSOLD_TO,
  COPANETSL           TYPE /BI0/OICOPANETSL,
END OF t_comp.

data: lt_comp like table of t_comp.

DATA: E_S_RESULT TYPE _ty_s_TG_1 .
DATA: E_T_RESULT TYPE _ty_t_TG_1 .

select /BIC/ZCOMPANY
from /BIC/PZSOLD_TO
INTO table lt_comp
for all entries in RESULT_PACKAGE
where /BIC/ZSOLD_TO = RESULT_PACKAGE-/BIC/ZSOLD_TO.
LOOP AT RESULT_PACKAGE INTO E_S_RESULT.
      READ TABLE lt_comp INTO t_comp WITH KEY
     /BIC/ZSOLD_TO = E_S_RESULT-/BIC/ZSOLD_TO.
IF sy-subrc = 0.
MOVE t_comp-/BIC/ZCOMPANY to E_S_RESULT-/BIC/ZCOMPANY.


if t_comp-/BIC/ZCOMPANY IS INITIAL.
MOVE COPANETSL to E_S_RESULT-/BIC/ZAFFAMT.
ELSEIF E_S_RESULT-/BIC/ZAFFAMT =0.
ENDIF.
MODIFY RESULT_PACKAGE from E_S_RESULT transporting /BIC/ZCOMPANY.
ENDLOOP.

Here are some more details.

DS is Flat File. COPANETSL is available in RESULT_PACKAGE and in DS also mapped.

Can someone please suggest what am I doing wrong?

Regards

Prashant

Former Member
replied

Hi,

This line

MOVE COPANETSL to E_S_RESULT-/BIC/ZAFFAMT


I believe it should be


MOVE t_comp-COPANETSL to E_S_RESULT-/BIC/ZAFFAMT.

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question