Skip to Content
0
Former Member
Apr 18, 2008 at 11:36 AM

Regarding Function Module

10 Views

Hi Experts,

It's Very Urgent. Can any one tell me ,Is there any function module to retrive data(records) from Bseg Table.

Actullay I hav a report, In that report ,it is mandatory to take records from bseg table 2 times.But IN production It is taking lot of time ,it has more than 7 lakh records in bseg table(in Production Server ).

So plz tell me is there any function module to retrive data from Bseg.

thanks&regards,

Venkat.

below is My Select Statement

SELECT BUKRS

BELNR

GJAHR

BLDAT

BUDAT

XBLNR

STBLG

INTO TABLE IBKPF1

FROM BKPF

WHERE BUKRS IN S_BUKRS

AND GJAHR EQ P_GJAHR

AND BELNR IN S_BELNR

AND BUDAT IN S_BUDAT

  • AND BLART EQ 'SA'

AND XBLNR NE ''.

IF IBKPF[] IS NOT INITIAL.

SELECT BUKRS

BELNR

GJAHR

AUGCP

AUGBL

SHKZG

MWSKZ

DMBTR

KTOSL

HKONT

KUNNR

LIFNR

REBZG

PRCTR

BUPLA

INTO TABLE IBSEG1

FROM BSEG

FOR ALL ENTRIES IN IBKPF

WHERE BUKRS EQ IBKPF-BUKRS

AND BELNR EQ IBKPF-BELNR

AND GJAHR EQ IBKPF-GJAHR

AND HKONT IN S_HKONT.

ENDIF.

IF IBKPF1[] IS NOT INITIAL.

SELECT BUKRS

BELNR

GJAHR

AUGCP

AUGBL

SHKZG

MWSKZ

DMBTR

KTOSL

HKONT

KUNNR

LIFNR

REBZG

PRCTR

BUPLA

INTO TABLE IBSEG

FROM BSEG

FOR ALL ENTRIES IN IBKPF1

WHERE BUKRS EQ IBKPF1-BUKRS

AND BELNR EQ IBKPF1-BELNR

AND GJAHR EQ IBKPF1-GJAHR

AND HKONT IN S_HKONT.

ENDIF. " IF IBKPF1[] IS NOT INITIAL.

IF IBSEG1[] IS NOT INITIAL.

IBSEG2[] = IBSEG1[].

ENDIF.