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 tuning

Former Member
0 Likes
850

Hi,

I am creating a report which has tables like bsik, bsak, bseg, bkpf, rbkp. vbrk, likp. The report is taking too long to execute.

Also, when i enter the selection parameters, the reports hangs. On the other hand the reports runs faster with no selection parameter entered.

Can anyone let me know what could be the problem be?

Thanks,

Amit.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
816

Make sure that u have used the key fields in the query for retrieving data.

So that it will be faster.

Paste ur select query here.

8 REPLIES 8
Read only

Former Member
0 Likes
816

Analyse the program and optimize the program

https://wiki.sdn.sap.com/wiki/display/HOME/ABAPPerformanceand+Tuning#ABAPPerformanceandTuning-WhatarethestepstooptimisetheABAPCode%3F

Please make your question more clear if you need a quick response.

Thanks

Wenceslaus

Read only

Former Member
0 Likes
817

Make sure that u have used the key fields in the query for retrieving data.

So that it will be faster.

Paste ur select query here.

Read only

0 Likes
816

Hi,

I emailing my code below. Please let me know which part of the code can be improved.

Thanks,

Amit.

SELECT belnr gjahr bukrs lifnr ebeln ebelp vbeln FROM bseg

INTO TABLE i_bseg

FOR ALL ENTRIES IN i_bsik

WHERE bukrs EQ i_bsik-bukrs

AND belnr EQ i_bsik-belnr

AND gjahr EQ i_bsik-gjahr.

SELECT bukrs gjahr xblnr belnr FROM bkpf INTO TABLE i_bkpf

FOR ALL ENTRIES IN i_bseg

WHERE bukrs EQ i_bseg-bukrs

AND belnr EQ i_bseg-belnr

AND gjahr EQ i_bseg-gjahr.

ENDIF.

SELECT belnr waers bukrs FROM RBKP INTO TABLE i_rbkp

FOR ALL ENTRIES IN i_bkpf

WHERE gjahr EQ i_bkpf-gjahr

AND bukrs EQ i_bkpf-bukrs

AND xblnr EQ i_bkpf-xblnr.

Read only

0 Likes
816

hi,

1. chk the itab

i_bsik

is initial or not before the select query.

2. Same in the case of

i_bseg

and

i_bkpf

Otherwise it looks ok.

eg:

if i_bsik[] is not initial.

SELECT belnr gjahr bukrs lifnr ebeln ebelp vbeln FROM bseg
INTO TABLE i_bseg
FOR ALL ENTRIES IN i_bsik
WHERE bukrs EQ i_bsik-bukrs
AND belnr EQ i_bsik-belnr
AND gjahr EQ i_bsik-gjahr.

endif.

Regards

Anver

Read only

0 Likes
816

y u r using bseg . u r already fetch data for vendor from table bsik.check the functionality again of ur requirment.

Read only

0 Likes
816

hi amit

check the order of the fields in select statement,it should match with the order in the data dictionary.the oredr should be bukrs,belnr,gjahr....

check it...

Read only

Former Member
0 Likes
816

Hello Amit,

Please check the internal table whether it is initial or not. Because using internal table against FOR ALL ENTRIES with empty records will fetche all the records from the matching tables.

Regs,

Venkat Ramanan N