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: 

Doubt about select performance and keys in Select.

ronaldo_aparecido
Contributor
0 Kudos

Hi Gurus.

I need select data from VBAK with key Vbeln (VBFA has value then i can use your vbelv i think)  then with VBAK-BSTNK and VBAK-KUNNR i goin to select data from KNA1 , only field ADRNR , then i going to ADRC table with field ADRNR  like key, then i could select CITY1, STREET, HOUSE_NUM1, HOUSE_NUM2, CITY2, POST_CODE1 e CITY1.

1- I know that tables has many data then i need advices for a good performance. suggests is welcome.

2- If i write any thing wrong please tell me .

3-If anybody know any key that i don´t write please tell me.

4-If anybody know other way .suggests is welcome.

Thanks comunitty for help.

1 ACCEPTED SOLUTION

custodio_deoliveira
Active Contributor
0 Kudos

Hi Ronaldo,

It seems you have everything you need. You have primary keys for VBAK, KNA1 and ADRC, so the best option in my opinion is one select from vbak inner join KNA1. As fopr ADRC it may be tricy because of the date from / to, so this might be worth going FAE. But test both posibilities before settling for one.  I don't know why you need BSTNK though

By the way, this I assume you are writing a report? cause if you only need one record at a time I suggest you use BAPIs for customer/address.

Cheers,

Custodio

4 REPLIES 4

custodio_deoliveira
Active Contributor
0 Kudos

Hi Ronaldo,

It seems you have everything you need. You have primary keys for VBAK, KNA1 and ADRC, so the best option in my opinion is one select from vbak inner join KNA1. As fopr ADRC it may be tricy because of the date from / to, so this might be worth going FAE. But test both posibilities before settling for one.  I don't know why you need BSTNK though

By the way, this I assume you are writing a report? cause if you only need one record at a time I suggest you use BAPIs for customer/address.

Cheers,

Custodio

0 Kudos

thanks for reply Custodio .

Do you know the name of that bapi adress customer?

0 Kudos

Hi Ronaldo - You can use BAPI BAPI_CUSTOMER_GETDETAIL2 for customer address..

Cheers,

Raju

0 Kudos

Yes, the one Raju says will do it. Or, if  you want to get multiple customer at a time you can try BAPI_CUSTOMER_GETLIST.