Application Development 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: 

Field "ts" is unkwown. It is neither one of the specified tables...

calvinkarlo
Explorer
0 Kudos

Hi need help in how to use select statement from multiple tables.

I'm having this error "Field "TS_BWART-BWART" is unkwown. It is neither one of the specified tables nor defined by a "DATA" statement. "DATA" statement."

SELECT SUB2
FROM ZVXXPARAM_GLOBAL
INTO TABLE TS_BWART
WHERE MAIN EQ 'QR'.

SELECT MATNR
CHARG
FROM MSEG
INTO TABLE TS_RETRIEVE
WHERE BWART EQ TS_BWART-BWART
AND MATNR EQ TS_QMAT-MATNR
AND WERKS EQ P_SPLANT


How to fix this error?


7 REPLIES 7

raymond_giuseppi
Active Contributor
0 Kudos

I can only suppose that TS_BWART is an itab without header.

(Did you forget some FOR ALL ENTRIES option in second select statement?)

0 Kudos

If you want to select for all previously read value in a single select statement, use SELECT, FOR ALL ENTRIES

Else, assign each record (or copy it to a work aread) of the table to a field symbol in a LOOP AT or READ TABLE statement

calvinkarlo
Explorer
0 Kudos

Hi raymond.giuseppi what should i change? to fix

xiaosanyu
Participant
0 Kudos

The definition of the structure TS_BWART does not include the BWART field, please check.

BTW, the sql not provide the BWART field in the column list, so the table TS_BWART BWART all are empty values

SELECT SUB2 
FROM ZVXXPARAM_GLOBAL
INTO TABLE TS_BWART
WHERE MAIN EQ 'QR'.

0 Kudos

IF TS_BWART is defined as a TABLE with a single field, then this select will copy SUB2 (of a customer table) into the single field

ZHAMAMA
Explorer
0 Kudos

use for all entries better

Sandra_Rossi
Active Contributor
0 Kudos

Please edit your question (Actions>Edit), select your code and press the button [CODE], which makes the code appear colored/indented, it'll be easier for people to look at it. Thanks!