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: 

how to optimize the ABAP select syntax

Former Member
0 Kudos

Dear all:

Anyone can help me to optimize the ABAP syntax like this:

select objid stext from hrp1000

into (itab-plans,itab-plstx)

where plvar = '01'

and istat = '1'

and begda <= pn-begda

and endda >= pn-begda

and langu = sy-langu

and otype = 'S'.

if sy-subrc = 0.

select single * from hrp1001

where objid = itab-plans

and rsign = 'A'

and relat = '008'

and plvar = '01'

and begda <= pn-begda

and endda >= pn-begda

and sclas = 'P'

and otype = 'S'.

if sy-subrc <> 0.

append itab.

clear itab.

endif.

endif.

endselect.

In the table hrp1000 has almost 50000 records ,the table hrp1001 200000 records. I found that if i run the ABAP above ,my performance is so bad .

Andone can help me ?

3 REPLIES 3

Madhurivs23
Participant
0 Kudos

please go through se30->tips and tricks transaction

rgds,

Madhuri

Madhurivs23
Participant
0 Kudos

please go through se30->tips and tricks transaction

rgds,

Madhuri

Former Member
0 Kudos

Try using this FM and check how is the performance.

RH_READ_OBJECT_SET

A