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

select query

Former Member
0 Likes
843

Hi all,

select smenr swenr intreno from vimi01 into table itab1 on p_vbeln.

select sobjekt usr04 usr05 from vzsort into table itab2 for all entries in itab1 where

sobjket = itab1-intreno.

i am getting dump in the second select statement.

data is like this.

in itab1 when i give p_vbeln as 1.

interno are

im01000000001

im01000000024

imo1000000027

like this.

can any body help me in this regard.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
815

Hi,

Internal table ITAB2 should have the smae fields which you are selecting from the table VZSORT and in the where condition the field SOBJKET shoulb have the same format

Regards

Sudheer

8 REPLIES 8
Read only

Former Member
0 Likes
815

hi

in 1st select, what's on p_vbeln? change it to eq if p_vbeln is parameters or in if it's select-options...use itab1[] is not initial before for all entries

select smenr swenr intreno from vimi01 into table itab1 -- eq or in p_vbeln.

if itab1[] is not initial.

select sobjekt usr04 usr05 from vzsort into table itab2 for all entries in itab1 where

sobjket = itab1-intreno.

endif.

if helpful, reward

Sathish. R

Read only

Former Member
0 Likes
815

Hi

What exactly it is indicating for the dump analysis?

check the dump in St22

Reward points if useful

Regards

Anji

Read only

Sougata
Active Contributor
0 Likes
815

before the second select, try:

IF NOT itab1[] IS INITIAL.

Read only

Former Member
0 Likes
815

Hi,

Check the structure of itab2 .

it shud contain only the follwing fields :

sobjekt usr04 usr05

revert back if any issues,

reward wif helpful.

Regards,

Naveen

Read only

Former Member
0 Likes
815

Hi Siva ,

What is the dump message you are getting.

Regards

Arun

Read only

Former Member
0 Likes
816

Hi,

Internal table ITAB2 should have the smae fields which you are selecting from the table VZSORT and in the where condition the field SOBJKET shoulb have the same format

Regards

Sudheer

Read only

Former Member
0 Likes
815

Hi,

The dump states "Invalid Interruption of database"

then this is not becoz of your query. The query is fine

and correct.

This dump is as you must debugged the select statement

Read only

S0025444845
Active Participant
0 Likes
815

Hi,

please check the order of fields you are retrieving in the tables is same as in the sructure declared by u I mean to say in itab1 order of field is

smenr swenr intreno and

itab2 is

sobjekt usr04 usr05 .

regards,

sudha