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

performance wise

Former Member
0 Likes
463

Hi experts,

SELECT AAUFNR ABUKRS AWERKS AKOKRS A~OBJNR

APRCTR BGSTRP BGSTRS CMATNR INTO TABLE

GT_ORDER FROM AUFK AS A INNER JOIN AFKO AS B ON AAUFNR = BAUFNR

INNER JOIN AFPO AS C ON AAUFNR = CAUFNR WHERE A~AUFNR IN SO_AUFNR

AND ABUKRS IN SO_BUKRS AND APRCTR IN SO_PRCTR AND A~WERKS IN SO_WERKS.

IF GT_ORDER IS NOT INITIAL.

SELECT

A~KOKRS

A~BELNR

B~BUZEI

B~WOGBTR

B~OBJNR

B~KSTAR

B~OWAER

A~BUDAT

B~BELTP

FROM COBK AS A INNER JOIN COEP AS B

ON AKOKRS = BKOKRS AND

ABELNR = BBELNR INTO TABLE GT_COVP FOR ALL ENTRIES IN GT_ORDER

WHERE OBJNR = GT_ORDER-OBJNR AND

OWAER = 'INR' AND

KSTAR IN R_COSTGL AND

BUDAT IN SO_BUDAT.

this is the code i have written . in development it is taking less than one minute but in quality it is taking to

too much time . can any help me to reduce the time in quality.

thanks & regards

suri

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
441

goto st05 activate the trace.

then run your report.

deactivate the trace. then check when select query is made is the system using any indexes if no then adjust your query as to use indexes or create new if not available.

But be carefull in making indexes since to many indexes may slow down updation and insertion.

Regards

Khusro Habib

3 REPLIES 3
Read only

Former Member
0 Likes
442

goto st05 activate the trace.

then run your report.

deactivate the trace. then check when select query is made is the system using any indexes if no then adjust your query as to use indexes or create new if not available.

But be carefull in making indexes since to many indexes may slow down updation and insertion.

Regards

Khusro Habib

Read only

Former Member
0 Likes
441

HI Suresh,

I would suggest one correction:

IF GT_ORDER[] IS NOT INITIAL.

Because your statement checks for the header line & this one check for the table.

Hope this helps.

Reward if helpful.

Regards,

Sipra

Read only

Former Member
0 Likes
441

IF GT_ORDER[] IS NOT INITIAL.

SELECT

A~KOKRS

A~BELNR

A~BUDAT

B~BUZEI

B~WOGBTR

B~OBJNR

B~KSTAR

B~OWAER

B~BELTP

FROM COBK AS A INNER JOIN COEP AS B

ON AKOKRS = BKOKRS AND

ABELNR = BBELNR INTO TABLE GT_COVP FOR ALL ENTRIES IN GT_ORDER

WHERE OBJNR = GT_ORDER-OBJNR AND

OWAER = 'INR' AND

KSTAR IN R_COSTGL AND

BUDAT IN SO_BUDAT.

Better if OBJNR is the first field in internal table GT_ORDER ..

also sort GT_ORDER by OBJNR ...