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: 

Function module for BSEG table

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Try these FMs

GET_ALL_BSEG

FAGL_GET_BSEG

FAGL_GET_ITEMS_BSEG

8 REPLIES 8

Former Member
0 Kudos

Try these FMs

GET_ALL_BSEG

FAGL_GET_BSEG

FAGL_GET_ITEMS_BSEG

0 Kudos


Hi Gayathri,

more illustrative examples of this function module yet?

Regards Rasim

0 Kudos

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.

0 Kudos

Please start your own question rather than taking over someone else's.

Thomas

0 Kudos

I asked this question by turning the subject. But that did not help.


Rasim.

Former Member
0 Kudos

Hi,

Use READ_BSEG function module by passing the required exporting parameters

with in a loop of BKPF.

Former Member
0 Kudos

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.

Former Member
0 Kudos

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