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: 

VBFA Table performance

Former Member
0 Kudos

Hello All,

This is regarding VBFA table performance,

Iam using VBFA to Get Delivery numbers from Shipment and Invoice numbers from Delivery.

1st Select Statement on VBFA

By using Shipment iam getting Deliveries ,it is taking time to get the data.

here iam using all key fields in select Query.

Average Records is around 10K

2nd Select Statement on VBFA.

By using Deliveries which we get above statement am getting Billing documents.

this is taking too much time almost 30 to 40min .

here also average records around 10+K.

how to resolve this?,Please suggest is there any FM to get data from VBFA or to increase performance of select query.

Regards

Surendra.

5 REPLIES 5

Former Member
0 Kudos

Hi,

1. create secondary index on VBFA.

OR

best way to get deliveries and billing numbers as follows.

1. Join LIKP,LIPS get LIKP-VBELN,    LIPS-POSNR  add your where condition

2.  Join VBRK,VBRP and pass LIKP-VBELN to VBRP-VGBEL and LIPS-POSNR to VBRP-VGPOS

and get VBRK-VBELN and VBRP-POSNR .

Regards,

Chandu

0 Kudos

Hello Chandra Mohan,

Thanks for Reply.

We cannot create Index as we like ,and to get Deliveries from Shipments we have to use sale flow(VBFA) not LIKP or LIPS .

0 Kudos

Hi

yes, your correct it is deliveries from shipments.

check the below link : there is a common table for shipment and delivery check this once:

regards

Chandu

raymond_giuseppi
Active Contributor
0 Kudos

Did you read and apply suggestion of 185530 - Performance: Customer developments in SD?


c) Search for invoices with delivery number (preceding document, field VBRP-VGBEL):

Incorrect:    SELECT FROM vbrp WHERE vgbel = ...

Correct:      SELECT FROM vbfa WHERE vbtyp_n = 'M'

                     AND vbelv  = ...

               SELECT FROM vbrp WHERE vbeln = vbfa-vbeln

                     AND posnr = vbfa-posnn

Else can you post SQL actual statement and trace Access plan explanation from ST05?

Regards,
Raymond

Former Member
0 Kudos

Dear Surendra,

Do not use select statements with VBFA table since it is a time consuming query.

Please use function module 'RV_ORDER_FLOW_INFORMATION' to get the document flow (ie: Get Delivery numbers from Shipment and Invoice numbers from Delivery) .

// Result table is 'VBFA_TAB'
// You can identify the relevant document using VBTYP_N and VBTYP_V fields

Regards

Praveen