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

sql performnace problem..

Former Member
0 Likes
589

Hi all,

in my code..

SELECT SINGLE FIELDNAME

TABNAME

CHECKTABLE

ROLLNAME

ENTITYTAB

DOMNAME

DDTEXT

INTO (WDD03M-FIELDNAME

,WDD03M-TABNAME

,WDD03M-CHECKTABLE

,WDD03M-ROLLNAME

,WDD03M-ENTITYTAB

,WDD03M-DOMNAME

,WDD03M-DDTEXT

)

FROM DD03M

WHERE TABNAME LIKE 'AUTH%'

AND DDLANGUAGE = SY-LANGU

AND FIELDNAME = FLD

AND FLDSTAT = 'A'

AND ROLLSTAT = 'A'

AND DOMSTAT = 'A'

AND TEXTSTAT = 'A'.

here im getting time out dump..

please help me how to make this perfomance gud..

here im taking data from view..

wht exactly wrong with this code i mean as performance wise..whts wrong with this code..

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
568

<b>tables dd03m.</b>

SELECT SINGLE FIELDNAME

TABNAME

CHECKTABLE

ROLLNAME

ENTITYTAB

DOMNAME

DDTEXT

INTO <b>(DD03M-FIELDNAME,DD03M-TABNAME,DD03M-CHECKTABLE,DD03M-ROLLNAME,

DD03M-ENTITYTAB,DD03M-DOMNAME,DD03M-DDTEXT)</b>

FROM DD03M

WHERE TABNAME LIKE 'AUTH%'

AND DDLANGUAGE = SY-LANGU

AND FIELDNAME = 'FLD'

AND FLDSTAT = 'A'

AND ROLLSTAT = 'A'

AND DOMSTAT = 'A'

AND TEXTSTAT = 'A'.

Copy paste the code, the errors are rectified.

Regards,

Pavan.

4 REPLIES 4
Read only

Former Member
0 Likes
568

Hi

You are using SELECT SINGLE and in where condition you are using TABNAME LIKE AUTH%, there will be some thousands of records starting with AUTH letters

so give some fixed name like AUTHA or something which you want

it will work.

So it is taking time for this.

<b>Reward points for useful Answers</b>

Regards

Anji

Read only

0 Likes
568

HI Anji Reddy.

thn first i can concatnate this string into one name n thne i can use like this?

here in this case .

CONCATNATE 'AUTH%' INTO AUTH.

N THEN IN WHERE CLUASE GIVE THIS AUTH NAME LIKE THIS ?

Read only

Former Member
0 Likes
569

<b>tables dd03m.</b>

SELECT SINGLE FIELDNAME

TABNAME

CHECKTABLE

ROLLNAME

ENTITYTAB

DOMNAME

DDTEXT

INTO <b>(DD03M-FIELDNAME,DD03M-TABNAME,DD03M-CHECKTABLE,DD03M-ROLLNAME,

DD03M-ENTITYTAB,DD03M-DOMNAME,DD03M-DDTEXT)</b>

FROM DD03M

WHERE TABNAME LIKE 'AUTH%'

AND DDLANGUAGE = SY-LANGU

AND FIELDNAME = 'FLD'

AND FLDSTAT = 'A'

AND ROLLSTAT = 'A'

AND DOMSTAT = 'A'

AND TEXTSTAT = 'A'.

Copy paste the code, the errors are rectified.

Regards,

Pavan.

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
568

try to split ...i guess it may work ...

ranges:wk_fld for <table-field>

wk_fld-option = 'EQ'

wk_fld-sign = 'I'.

loop at it.

move fld to wk_fld-low.append wk_fld.clear wk_fld.

endloop.

then select the records from dd03m

select FIELDNAME TABNAME CHECKTABLE ROLLNAME ENTITYTAB DOMNAME

DDTEXT appending table itab from dd03m

where AND FLDSTAT = 'A'

AND ROLLSTAT = 'A'

AND DOMSTAT = 'A'

AND TEXTSTAT = 'A'

TABNAME LIKE 'AUTH%'

and fieldname in wk_fld.

hope this may work