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: 

Internal Table - Work Area issue

Former Member
0 Kudos

Guru's:

I am selecting the mentioned fields from TVAKT into t_itt1 (internal table) - I however an encountering "you canot use an internal table as a work area" as an error.

DATA: s_bezei LIKE tvakt-bezei,

s_auart LIKE tvakt-auart.

DATA t_itt1 LIKE tvakt OCCURS 0.

DATA z_itt LIKE tvakt.

its at this stage of the code that I am facing this problem

SELECT spras auart bezei FROM tvakt

INTO t_itt1

WHERE bezei IN s_bezei

AND auart IN s_auart.

would appreciate your help.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hello,

You need to change your code, since you're selecting only one line not several lines when you're using internal tables in the select command you need to use the INTO TABLE clause.


SELECT spras auart bezei FROM tvakt
INTO TABLE t_itt1
WHERE bezei IN s_bezei
AND auart IN s_auart.

Regards.

5 REPLIES 5

Former Member
0 Kudos

Hello,

You need to change your code, since you're selecting only one line not several lines when you're using internal tables in the select command you need to use the INTO TABLE clause.


SELECT spras auart bezei FROM tvakt
INTO TABLE t_itt1
WHERE bezei IN s_bezei
AND auart IN s_auart.

Regards.

0 Kudos

Thank you for your valuable inputs: i did make the necessary chagnes as mentioned, I however an encountering another bug:

near the where clause this is what i am encountering "The IN operator with S_SPRAS is followed neither by an internal table nor by a vlue list"

SELECT spras auart bezei FROM tvakt

INTO TABLE t_itt1

WHERE spras IN s_spras

AND auart IN s_auart.

would appreciate any help..

0 Kudos

Well, how is s_spras defined?

Rob

0 Kudos

Hello,

You need to change the declaration of the s_spras to use the IN clause:

See these for more informations: http://help.sap.com/saphelp_nw04/helpdata/en/18/a1f251e28b11d295f500a0c929b3c3/frameset.htm and .

Regards.

JozsefSzikszai
Active Contributor
0 Kudos

instead of INTO use INTO TABLE