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

Exception while executing a select statement.

Former Member
0 Likes
2,226

Hello All,

I get an exception:

"CX_SY_NO_HANDLER triggered

An exception with the type CX_SY_OPEN_SQL_DB occured but was neither handled"

Here is the select statement:

select single empneededby from hrp9007 into start_date

where OBJID = REQUISITION_NUM .

Can anybody tell me whats goin on here.

Thanks

Srinivas

9 REPLIES 9
Read only

Former Member
0 Likes
1,338

Hello Srinivas,

Just whether u r passing all the key fields in the select query:

select single empneededby from hrp9007 into start_date
where OBJID = REQUISITION_NUM .

Regards,

Vasanth

Read only

Former Member
0 Likes
1,338

Hi Srinivas,

Check with the table name, bcoz when i am trying to open the table it is giving as table does not exist.

Regards

Haritha.

Read only

Former Member
0 Likes
1,338

Is the declaration of start_date same as empneededby.

Read only

0 Likes
1,338

Thanks all for your replies, I was trying all options. But still same exception. One thing "passing all the key fields in the select query:" from Vasanth's reply. Could you guys be more specific about using all the key fields in a select query.

Thanks

Srinivas

Read only

0 Likes
1,338

Hello Srinivas,

If u r using select single u need to pass all the primary key fields of the table in the where condition then only it will correctly fetch the desired record

Thanks !!!

Vasanth

Read only

0 Likes
1,338

Hi Vasanth,

I have changed my query to include all the key fields.

select single empneededby from hrp9007 into start_date

where plvar eq '01'

and istat eq '1'

and begda le sy-datum

and endda ge sy-datum

and reqnr eq REQUISITION_NUM

and status eq '99'.

When I execute, nothing happens. what am I expected to see.

Thanks

Srinivas

Read only

Former Member
0 Likes
1,338

Hello Srinivas,

In ur first post u have assigned OBJID to REQUISITION_NUM

But now u have changed to reqnr

select single empneededby from hrp9007 into start_date
where plvar eq '01'
and istat eq '1'
and begda le sy-datum
and endda ge sy-datum
and reqnr eq REQUISITION_NUM " Check here
and status eq '99'.
IF SY-SUBRC = 0.
" U r having data for the selection condn in the table.
ENDIF.

Regards,

Vasanth

Read only

0 Likes
1,338

Hi Vasanth,

I want to look for the contents of the table and randomly pick one row and put all the key field values in my select statement and see if I can pull one other filed value. How can I look into the contents of the table. I tired se11 (displays only fields). se16, its asking some values before I can execute the table to display ( the values am not sure of).

Thanks and Regards.

Srinivas

Read only

0 Likes
1,338

When I test the class (say am printing something). Where can I see the output after I test the method.

Regards

Srinivas