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: 

Performance Issue

Former Member
0 Kudos

Dear Friends,

I'm trying to fetch the invoice number form BSEG table.

The query is

loop at IT_BSEG2 INTO WA_BSEG2.

SELECT SINGLE BELNR FROM bseg INTO invoice

where BUKRS = WA_BSEG2-BUKRS and

GJAHR = WA_BSEG2-GJAHR and

BUZEI = '001' and

AUGBL = WA_BSEG2-BELNR and

  • KOART = 'K' and

SHKZG = 'H' and

lifnr = wa_bseg2-lifnr .

-


-


endloop.

but its making performance issue. How i can increase the performance of this code.

Kindly give your valuable guidance.

regards,

BAB

4 REPLIES 4

former_member536879
Active Contributor
0 Kudos

Hi,

The BSEG is a cluster table. Although the data retrival from this table will be slow. Beyond that you are using the BSEG in the LOOP statement. It will give the Performance Issue.

While fetching the data from the BSEG try to use all the key fields of the BSEG and dont use the BSEG inside the LOOP.

Next time onwards try to post this thread in the Appropriate Forum

With Regards,

Sumodh.P

0 Kudos

hi,

Even if inside or out side loop BSEG giving Performance issue..

Well, actually what i need means, to get Payment document wise Invoice number. From which table i'll get this invoice number.

Eg. Payment document number is 15 Series and Invoice number started with 50 series.

So i passed this 15 series in BSEG-AUGBL field and getting BELNR number (Invoice number). Rather than this any other way to get the Invoice number.

Regards,

Bab

0 Kudos

The answer again lies in searching the forums. This question has been asked and answered many times already.

pk

former_member184657
Active Contributor
0 Kudos

Search the forums for Tips to improve performance and the first tip you find will help improve the performance of your "code" to a great extent.

pk