#1
|
|||
|
|||
mejorar performance
Hola:
Miren tengo el siguiente codigo: SELECT ebeln INTO CORRESPONDING FIELDS OF TABLE t_ekko FROM ekko WHERE ebeln IN ebeln AND kdatb IN s_kdatb AND kdate IN s_kdate . SELECT banfn bnfpo INTO CORRESPONDING FIELDS OF TABLE t_ekpo FROM ekpo FOR ALL ENTRIES IN t_ekko WHERE ebeln EQ t_ekko-ebeln . select konnr frgkz banfn ebeln ebelp frgdt bnfpo bsart frggr fixkz badat bedat lfdat werks ekorg matkl ernam menge meins matnr txz01 lgort knttp ebakz loekz ekgrp preis peinh waers bsmng into corresponding fields of table i_eban from eban for all entries in t_ekpo where banfn eq t_ekpo-banfn and bnfpo eq t_ekpo-bnfpo and banfn in banfn and werks in werks and bsart in bsart and badat in badat and ekgrp in ekgrp and ebeln in ebeln and bedat in bedat and konnr in konnr. y me pidieron optimizarlo utilizando inner join, y me quedó algo así: SELECT * INTO CORRESPONDING FIELDS OF TABLE i_eban FROM ekko as A JOIN ekpo as B ON A~ebeln = B~ebeln JOIN eban as C ON B~banfn = C~banfn and B~bnfpo = C~bnfpo WHERE A~ebeln IN ebeln AND A~kdatb IN s_kdatb AND A~kdate IN s_kdate AND C~banfn IN banfn AND C~werks IN werks AND C~bsart IN bsart AND C~badat IN badat AND C~ekgrp IN ekgrp AND C~ebeln IN ebeln AND C~bedat IN bedat AND C~konnr IN konnr . la cosa es que al ejecutarlo no me devuelve los mismos datos, algo estoy haciendo mal en el join, por eso solicito su ayuda. pd: ya habia escrito antes de este tema pero en la empresa quedo parado, ahora lo volvieron a retomar. ayudenme porfa llevo super poco en abap. gracias y saludos |
Herramientas | Buscar en Tema |
Desplegado | |
|
|