‎2021 Jan 22 9:01 AM
Hello team,
As per project requirement.. I have to fetch VBAK data using VGBEL.
Since VGBEL is not a key field of VBAK I am facing performance issues.
Can any one suggest me a function module to get VBAK-VBELN using LIPS-VGBEL.
We also need to fetch TKNUM from vttp using vbeln (non key field of VTTP)
‎2021 Jan 22 9:26 AM
First, stop thinking Function Module will solved everything because it is ... a FM
it is old school, forget it
VGBEL is a reference document, it could be the key of VBAK
The performance optimization depends of the context, how did you access the data, what do you need in VBAK ?
‎2021 Jan 22 11:25 AM
Hi Frederic,
I am fetching TKNUM from VTTP table passing VBELN in where condition
since VBELN is not a key field of VTTP it would be bad in performance, so I am looking for FM.
Select
tknum,
tpnum,
vbeln
from VTTP
into table @dat(it_vttp)
for all entries in @it_likp_lips
where vbeln = @it_likp_lips-vbeln.
Thank you.
‎2021 Jan 22 12:46 PM
Check VEPVG Index, it is a link between Sales order & Transport.
‎2021 Jan 22 9:40 AM
Hello dubbaka
If you're facing performance issue reading VBAK by VGBEL then consider creating an additional index on the VBAK table with the VGBEL field as one of the fields.
Kind regards,‎2021 Jan 22 12:53 PM
Your question is not very clear. I'm afraid I can't answer precisely.
Why do you want to read via a function module?
What is your LIPS-VGTYP value? (example, if VGTYP='C' then VGBEL refers to a sales order in VBAK i.e. LIPS-VGBEL -> VBAK-VBELN directly)
Concerning VTTP, it has THE index VBL over field VBELN in my S/4HANA system.