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

Short Dump while fetching values from a Database view

Former Member
0 Likes
1,202

Hi ALL,

Here is the code that is giving short dump

SELECT * FROM ZVMATLMOVE INTO TABLE I_MATLMOVE

WHERE BUDAT >= V_LASTRUN_DATE

AND WERKS IN S_WERKS

AND LIFNR IN S_LIFNR

AND EBELN IN S_EBELN

AND MATNR IN S_MATNR

AND BWART IN S_BWART

(Please don't say that I am using * in the select query,

I knew that it is not a good way of fetching values)

Declaration of the internal table is:

DATA I_MATLMOVE LIKE ZVMATLMOVE OCCURS 0 WITH HEADER LINE.

The variable V_LASTRUN_DATE is:

DATA V_LASTRUN_DATE LIKE SY-DATUM.

We will be getting the lastrundate value from another table. And it is passing correct value (ex. 20060731)

ZVMATLMOVE is a database view created for MKPF and MSEG table. And I checked both table were consistent.

Dump Analysis:

Runtime errors DBIF_RSQL_SQL_ERROR

Exception CX_SY_OPEN_SQL_DB

Every thing is fine. But I don't know how it is going to dump. Any suggestions?

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
935

Everything looks ok to me. Not sure what the error is all about. Maybe try this to see if it makes a difference.

SELECT * FROM ZVMATLMOVE 
     <b>INTO corresponding fields</b> of TABLE I_MATLMOVE
WHERE BUDAT >= V_LASTRUN_DATE
AND WERKS IN S_WERKS
AND LIFNR IN S_LIFNR
AND EBELN IN S_EBELN
AND MATNR IN S_MATNR
AND BWART IN S_BWART.

Regards,

Rich Heilman

5 REPLIES 5
Read only

RichHeilman
Developer Advocate
Developer Advocate
936

Everything looks ok to me. Not sure what the error is all about. Maybe try this to see if it makes a difference.

SELECT * FROM ZVMATLMOVE 
     <b>INTO corresponding fields</b> of TABLE I_MATLMOVE
WHERE BUDAT >= V_LASTRUN_DATE
AND WERKS IN S_WERKS
AND LIFNR IN S_LIFNR
AND EBELN IN S_EBELN
AND MATNR IN S_MATNR
AND BWART IN S_BWART.

Regards,

Rich Heilman

Read only

Former Member
0 Likes
935

I feel you should try into correponding fields of i_matlmove.

Regards

Anurag

Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
935

I've been looking around, I don't think the problem is in your code. I think this may be a db issue, and you may need to patch your system. Search OSS Notes for

DBIF_RSQL_SQL_ERROR, you will see that a lot of times it talks about the db and fixing it with patches.

Regards,

Rich Heilman

Read only

0 Likes
935

There is no problem with the code. The issue is related to table spaces. You need to consult your basis team and ask them to resolve this issue.

Thanks and regards,

Bharath.

Read only

Former Member
0 Likes
935

Hi !

It seams that your table is not correct / fully activated.

To check it out you should try the following:

- Go to the SE11

- Give it your table name and go to "Display"

- Check if the table is "active"

- Choose "Utilities->Database Object->Check" and see

if there are any errors

- go back and choose "Utilities->Runtime Object->Check"

and see if there are any errors

If there are any errors - try to activate the table again. You may need the "Utilities->Database Utiliy" for that.

After there are no more errors by checking all these your program should work.

Regards

Rainer

Some points would be nice if thate helped a bit.