‎2010 Jun 09 10:58 AM
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
‎2010 Jun 10 6:08 AM
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
‎2010 Jun 09 11:11 AM
Hi,
Which select statement is causing performance issue ? Can you paste the relevant code ?
Regards
Vinod
‎2010 Jun 09 11:19 AM
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
‎2010 Jun 09 3:05 PM
>
> 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
‎2010 Jun 09 2:24 PM
Well, it might help if you specified your WHERE clause. Have you traced your data selection?
‎2010 Jun 09 5:09 PM
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)?
‎2010 Jun 10 6:08 AM
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
‎2010 Jun 10 6:59 AM
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
‎2010 Jun 10 7:04 AM
Hi,
Please check SAP Note 185530 - Performance: Customer developments in SD.
Regards,
Tausif