Application Development and Automation 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: 
Read only

for reading data from cluster tables

Former Member
0 Likes
436

i have a cluster table named RT

now i have to get data from htis table having infotypes /3f1,/3f2,/3f3

these are the condition types for getting pf amount for an employee

have never worked on cluster tables so can anyone please guide me how to go about it

thanks in advance

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
413

HI Ashish,

here is a sample code ..

**Subroutine to get BSIS data(G/L Accounts)

PERFORM GET_BSIS_DATA.

**Subroutine to get BSAS data(G/L Accounts (Cleared Item)

PERFORM GET_BSAS_DATA.

  • Proceed only if data found

CHECK GV_NODATA_FLG IS INITIAL.

**Subroutine to get BKPF data(Accounting Document Header)

PERFORM GET_BKPF_DATA.

**Subroutine to get BSEG data(Accounting Document Segment)

PERFORM GET_BSEG_DATA.

FORM GET_BSIS_DATA.

CLEAR IT_GLACCOUNTS.

REFRESH IT_GLACCOUNTS.

SELECT BUKRS

GJAHR

BELNR

FROM BSIS INTO TABLE IT_GLACCOUNTS

WHERE BUKRS IN S_BUKRS AND

( HKONT IN S_HKT_IC OR

HKONT IN S_HKT_TX ) AND

BELNR IN S_BELNR AND

BUDAT IN S_BUDAT .

ENDFORM. " GET_BSIS_DATA

FORM GET_BSEG_DATA.

CLEAR IT_BSEG.

IF NOT IT_GLACCOUNTS[] IS INITIAL.

SELECT BUKRS

BELNR

GJAHR

BUZEI

SHKZG

MWSKZ

DMBTR

KOSTL

AUFNR

XAUTO

HKONT

PROJK

XBILK

FROM BSEG INTO CORRESPONDING FIELDS OF TABLE IT_BSEG

FOR ALL ENTRIES IN IT_GLACCOUNTS

WHERE BUKRS = IT_GLACCOUNTS-BUKRS AND

BELNR = IT_GLACCOUNTS-BELNR AND

GJAHR = IT_GLACCOUNTS-GJAHR.

ENDIF. "IF NOT IT_BKPF[] IS INITIAL

ENDFORM. " GET_BSEG_DATA

This is not the query that you have asked for ... but still may help you ... in selecting the data from the cluster table....

Regards,

Jayant.

i have a cluster table named RT

now i have to get data from htis table having infotypes /3f1,/3f2,/3f3

these are the condition types for getting pf amount for an employee

have never worked on cluster tables so can anyone please guide me how to go about it

thanks in advance

2 REPLIES 2
Read only

Former Member
0 Likes
414

HI Ashish,

here is a sample code ..

**Subroutine to get BSIS data(G/L Accounts)

PERFORM GET_BSIS_DATA.

**Subroutine to get BSAS data(G/L Accounts (Cleared Item)

PERFORM GET_BSAS_DATA.

  • Proceed only if data found

CHECK GV_NODATA_FLG IS INITIAL.

**Subroutine to get BKPF data(Accounting Document Header)

PERFORM GET_BKPF_DATA.

**Subroutine to get BSEG data(Accounting Document Segment)

PERFORM GET_BSEG_DATA.

FORM GET_BSIS_DATA.

CLEAR IT_GLACCOUNTS.

REFRESH IT_GLACCOUNTS.

SELECT BUKRS

GJAHR

BELNR

FROM BSIS INTO TABLE IT_GLACCOUNTS

WHERE BUKRS IN S_BUKRS AND

( HKONT IN S_HKT_IC OR

HKONT IN S_HKT_TX ) AND

BELNR IN S_BELNR AND

BUDAT IN S_BUDAT .

ENDFORM. " GET_BSIS_DATA

FORM GET_BSEG_DATA.

CLEAR IT_BSEG.

IF NOT IT_GLACCOUNTS[] IS INITIAL.

SELECT BUKRS

BELNR

GJAHR

BUZEI

SHKZG

MWSKZ

DMBTR

KOSTL

AUFNR

XAUTO

HKONT

PROJK

XBILK

FROM BSEG INTO CORRESPONDING FIELDS OF TABLE IT_BSEG

FOR ALL ENTRIES IN IT_GLACCOUNTS

WHERE BUKRS = IT_GLACCOUNTS-BUKRS AND

BELNR = IT_GLACCOUNTS-BELNR AND

GJAHR = IT_GLACCOUNTS-GJAHR.

ENDIF. "IF NOT IT_BKPF[] IS INITIAL

ENDFORM. " GET_BSEG_DATA

This is not the query that you have asked for ... but still may help you ... in selecting the data from the cluster table....

Regards,

Jayant.

Read only

Former Member
0 Likes
413