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: 

Custom LDB Selecet endselect ... can we use open curser

Former Member
0 Kudos

Hi Gurus,

Can we use Open curser in Custom LDB

the code goes like below:

_____________________________________________________

select * from ztable into table tb_ztable

where key_field in s_key_field

and field1 in s_field1

order by datum.

endselect.

loop at tb_ztable into wa_ztable.

ztable = wa_ztable.

put ztable.

endloop.

______________________________________________________

Thing is that the select endselect take lot of time to fetch data can we use open curser in the custom LDB

Appriciate the help.

Regards

Mohsin

1 REPLY 1

Former Member
0 Kudos

In your code "Endselect" will result in systax error as you are moving the contents into "table tb_ztable". Even without the Endselect if your select is taking long time consider fine tuning it than opting for Open Cursor ( unless your ZTable is a huge one ) even though it is allowed in LDB.