cancel
Showing results for 
Search instead for 
Did you mean: 

Select Statement

Former Member
0 Kudos

Hello All,

I have problem in my select statement. Nested select statement has been used to get data from database. Now Im getting dump saying that


Short text
    No more storage space available for extending an internal table.

What happened?
    You attempted to extend an internal table, but the required space was
    not available.

Please find my code below.



  SELECT *
  INTO TABLE g_t_y16v_t9ispfsoi
  FROM y16v_t9ispfsoi
  WHERE vbeln NOT IN (
      select VBELN
      from VBAK ).

Can any one tell me any other replacement code for the above select statement without nested select statement.

Best Regards,

Sreenivasa Chary B.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

you can try this below code,

Select vbeln into table i_vbak from vbak.

if not i_vbak[ ] is initial.

Select *

into table g_t_y16v_t9ispfsoi

from y16v_t9ispfsoi

for all entries in i_vbak

where vbeln ne i_vbak-vbeln.

endif.

Regards,

Joan

Answers (2)

Answers (2)

MarcinPciak
Active Contributor
0 Kudos

Hi,

Do not use NOT, NE and similar logic operators in select statements. It affects both performance and might produce errors.

Regards

Marcin

Former Member
0 Kudos

>

> Hello All,

>

> I have problem in my select statement. Nested select statement has been used to get data from database. Now Im getting dump saying that

>

>


> Short text
>     No more storage space available for extending an internal table.
> 
> What happened?
>     You attempted to extend an internal table, but the required space was
>     not available.
> 

>

> Please find my code below.

>

>


> 
>   SELECT *
>   INTO TABLE g_t_y16v_t9ispfsoi
>   FROM y16v_t9ispfsoi
>   WHERE vbeln NOT IN (
>       select VBELN
>       from VBAK ).
> 
> 

>

> Can any one tell me any other replacement code for the above select statement without nested select statement.

>

> Best Regards,

> Sreenivasa Chary B.

try this

Select vbeln into corresponding fields of table it_vbak from vbak.

SELECT *

INTO TABLE g_t_y16v_t9ispfsoi

FROM y16v_t9ispfsoifor all entries in it_vbak

WHERE vbeln ne it_vbak-vbeln.