cancel
Showing results for 
Search instead for 
Did you mean: 

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

former_member374954
Participant
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Alexandre
Participant
0 Kudos

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.

Answers (1)

Answers (1)

srikanth_rapur2
Explorer
0 Kudos

Hi,

Pls check whether you have defined field name or infoobject name for Copanetsl while defining in the structure.

Thanks