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 issue when selection LIPS table into program.

Former Member
0 Likes
1,796

Hi expert,

I have created Pending sales order report , in that i am facing performance problem for selection of LIPS table.

i have tried to use VLPMA table but performance has not been improved so, is their any need to create secondary index and

if yes then which fields of lips table i have to includes in index.

Please reply.

Regards,

Jyotsna

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,256

Hi,

First extract the Delivery No (VBFA-VBELN) & Line item number(VBFA-POSNN) from VBFA by passing Sales order number and line item to VBFA-VBELV & VBFA-POSNV.

Select vbelv posnv vbeln posnn
from vbfa
into table <itab>
where vbelv = <order number>
and      posnv = <line item>
and      vbtyp_n = 'J'.

Now extract the delivery information from LIPS based on internal table populated using above select. This will ensure the data extraction with the primary key fields of LIPS.

select <required fields>
from LIPS
into <itab_lips>
for all entries in itab
where vbeln = itab-vbeln
and      posnr = itab-posnn.

Regards

Vinod

8 REPLIES 8
Read only

Former Member
0 Likes
1,256

Hi,

Which select statement is causing performance issue ? Can you paste the relevant code ?

Regards

Vinod

Read only

Former Member
0 Likes
1,256

Hi ,

1.Please make use of PACKAGE in your select query , it will definetly improve the performance.

2.Please use the primary index by passing the fields in where clause in the order in which they appera in LIPS table.

3.You can also create a secondary index with the fields which you are using in where clause of select query and maintain the fields in the same sequence (where clause and secondary index)

4.If there is any inner joins (more than 3) then reduce them and have few mare select queries for them and make use of for all entries.

This will definitely improve the performance to great extend.

Hope this is helpful.

Regards,

Uma

Read only

0 Likes
1,256

>

> Hi ,

> 1.Please make use of PACKAGE in your select query , it will definetly improve the performance.

> 2.Please use the primary index by passing the fields in where clause in the order in which they appera in LIPS table.

> 3.You can also create a secondary index with the fields which you are using in where clause of select query and maintain the fields in the same sequence (where clause and secondary index)

> 4.If there is any inner joins (more than 3) then reduce them and have few mare select queries for them and make use of for all entries.

>

> This will definitely improve the performance to great extend.

>

> Hope this is helpful.

> Regards,

> Uma

Please do some more research before offering advice:

PACKAGE SIZE is for memory management, not performance.

Creating a secondary index is using a hammer to swat a fly and the order in the SELECT is not relevant.

FAE does not improve performance over a JOIN.

Rob

Read only

brad_bohn
Active Contributor
0 Likes
1,256

Well, it might help if you specified your WHERE clause. Have you traced your data selection?

Read only

Former Member
0 Likes
1,256

Don't know why you're reading LIPS for a "pending sales order" report?? What do you need from LIPS that you couldn't get from VBFA or VBUK or VBUP (assuming you're starting from the proper Sales Index table)?

Read only

Former Member
0 Likes
1,257

Hi,

First extract the Delivery No (VBFA-VBELN) & Line item number(VBFA-POSNN) from VBFA by passing Sales order number and line item to VBFA-VBELV & VBFA-POSNV.

Select vbelv posnv vbeln posnn
from vbfa
into table <itab>
where vbelv = <order number>
and      posnv = <line item>
and      vbtyp_n = 'J'.

Now extract the delivery information from LIPS based on internal table populated using above select. This will ensure the data extraction with the primary key fields of LIPS.

select <required fields>
from LIPS
into <itab_lips>
for all entries in itab
where vbeln = itab-vbeln
and      posnr = itab-posnn.

Regards

Vinod

Read only

birendra_chatterjee
Active Participant
0 Likes
1,256

Hi,

Please check all possible options before rushing to create a secondary index wherever possible.

There is already a standard SAP Index 'VGB' which has only VGBEL.

If You want to fetch the delivery item details, for all items that you have in the Sales Order table (IT_VBAP), then remove the selection criteria of VGPOS from your selection query. The standard SAP index will be used then while data fetch and this will enhance the performance.

Regards,

Birendra

Read only

Former Member
0 Likes
1,256

Hi,

Please check SAP Note 185530 - Performance: Customer developments in SD.

Regards,

Tausif