05-18-2009 10:50 AM
Hi Guru's,
SELECT bukrs
belnr
gjahr
budat
monat
waers
awkey
FROM bkpf
INTO TABLE i_bkpf_data
WHERE bukrs EQ pa_bukrs AND
budat IN so_budat.
SORT i_bkpf_data BY bukrs belnr gjahr.
IF i_bkpf_data[] IS NOT INITIAL.
SELECT bukrs belnr gjahr koart dmbtr wrbtr pswsl
kokrs kostl hkont aufnr lifnr ebeln buzei shkzg
FROM bseg
INTO TABLE i_bseg_data
FOR ALL ENTRIES IN i_bkpf_data
WHERE
bukrs EQ pa_bukrs AND
belnr EQ i_bkpf_data-belnr AND
gjahr EQ i_bkpf_data-gjahr AND
kostl IN so_kostl AND
lifnr IN so_lifnr AND
hkont IN so_hkont.
ENDIF.
I got performance issue on this Query..while accessing the data from BSEG table,its makes performance issue in my program so i want to improve performance of the program.i was analysed that BSEG table makes performance issue..
Hi..Anybody give the solution imporving this Query or give some function module for accessing BSEG table..
Note..I want to pass my selection inputs also into function module..i was seen some function module for BSEG,those are not satisfying the my inputs so those also making performance issue..
Regards
P.Senthil Kumar
05-18-2009 11:39 AM
05-18-2009 11:39 AM
02-04-2014 8:08 AM
02-04-2014 8:26 AM
Hi Everybody,
About how to use this function Does anyone have an idea?
I've found it.
call function 'FI_DOCUMENT_READ'
exporting
i_awtyp = 'VBRK'
i_awref = vbfa_tab-vbeln
i_awsys = vbrk-logsys
i_bukrs = vbrk-bukrs
i_gjahr = vbrk-gjahr
tables
t_bkpf = xbkpf
t_bseg = xbseg
exceptions
wrong_input = 1
not_found = 2.
But this is not enough.
Best Regards Rasim.
02-04-2014 8:28 AM
Please start your own question rather than taking over someone else's.
Thomas
02-04-2014 8:31 AM
I asked this question by turning the subject. But that did not help.
Rasim.
05-18-2009 11:43 AM
Hi,
Use READ_BSEG function module by passing the required exporting parameters
with in a loop of BKPF.
05-18-2009 11:43 AM
Hi,
Even though there is some function module is available, even that could have the similar SELECT statement. I mean without SELECT command, you are not going to fetch any data.
Now in your select, after sorting, delete the adjacent duplicates from the internal table.
Also if you are allowed, then create the SECONDARY INDEX for the required fields, if your program going to be used very frequently.
Regards,
Santhosh.
05-18-2009 11:58 AM
Hi senthil kumar,
the coding looks good for table BSEG..
the time taking is in BKPF table..
check the any index available bukrs and budat field ..if ther try to force the index using index hints.
Regards,
Prabhudas