Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Error

Former Member
0 Likes
1,018

Hi, I am new in this industry and trying to practice ITABs. I'm encountering syntax error as follows:- UNKNOWN COLOUMN NAME "EBAN-MATNR" NOT DETERMINE UNTIL RUNTIME ERROR, YOU CANNOT SPECIFY THE FIELD LIST. Please assist. Thanks

REPORT zitabtest1 NO STANDARD PAGE HEADING.

TABLES : eban.

DATA : BEGIN OF itab OCCURS 0,

matnr LIKE eban-matnr, "Material Number"

menge LIKE eban-menge, "Quantity"

END OF itab.

SELECT-OPTIONS : matnr FOR eban-matnr.

SELECT Eban-Matnr Eban-Menge INTO CORRESPONDING FIELDS OF itab

from EBAN UP TO 30 ROWS WHERE Matnr NE space.

endselect.

ULINE /(40).

WRITE : / sy-vline,

(4) 'sno',

sy-vline,

(18) 'material',

sy-vline,

(10) 'Quantity',

sy-vline.

ULINE /(40).

LOOP AT itab.

WRITE 😕 sy-vline,

(4) sy-tabix LEFT-JUSTIFIED,

sy-vline,

(18) itab-matnr,

sy-vline,

(10) itab-menge DECIMALS 0,

40 sy-vline.

ENDLOOP.

ULINE /(40).

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
977

Hi,

Change your select query,

SELECT <b>Matnr Menge</b> INTO CORRESPONDING FIELDS OF itab

from EBAN UP TO 30 ROWS WHERE Matnr NE space.

endselect.

<b>Reward if helpful.</b>

10 REPLIES 10
Read only

Former Member
0 Likes
978

Hi,

Change your select query,

SELECT <b>Matnr Menge</b> INTO CORRESPONDING FIELDS OF itab

from EBAN UP TO 30 ROWS WHERE Matnr NE space.

endselect.

<b>Reward if helpful.</b>

Read only

0 Likes
977

Thanks a million.

Read only

Former Member
0 Likes
977

in the select query do the changes like this

SELECT Matnr Menge INTO CORRESPONDING FIELDS OF itab

from EBAN UP TO 30 ROWS WHERE Matnr NE space.

endselect.

Read only

0 Likes
977

Thank you for the immediate reply.

Read only

Former Member
0 Likes
977

hi,

SELECT Eban-Matnr Eban-Menge INTO CORRESPONDING FIELDS OF itab

from EBAN UP TO 30 ROWS WHERE Matnr NE space.

endselect. ** this select is wrong

donnot use Eban-Matnr Eban-Menge ,, use

SELECT Matnr Menge INTO CORRESPONDING FIELDS OF itab

from EBAN UP TO 30 ROWS WHERE Matnr NE space.

endselect.

I<b> will let you know the difference..

When you are fetching the data from DBTABLE.. you need to just give the fields (matnr or menge) and not DBTABLE-FIELD (eban-matnr etc..)..</b>

rewards if useful,

regards,

nazeer

Read only

0 Likes
977

thanks alot.

Read only

former_member404244
Active Contributor
0 Likes
977

Hi,

do like this

SELECT Matnr Menge INTO table itab

from EBAN UP TO 30 ROWS

WHERE Matnr NE space.

endselect.

Regards,

Nagaraj

Read only

0 Likes
977

thanks

Read only

Former Member
0 Likes
977

SELECT <b>Matnr Me</b>nge INTO CORRESPONDING FIELDS OF itab

from EBAN UP TO 30 ROWS WHERE Matnr NE space.

endselect.

Read only

0 Likes
977

Thanks.