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: 

Reading Cluster Tables

Former Member
0 Kudos

How to read Cluster Tables.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

I think u can using FM "HR_TIME_RESULTS_GET" to read data from Table Cluster B2. Here the sample code:

data: saldo like pc2b5 occurs 0 with header line.

call function 'HR_TIME_RESULTS_GET'

exporting

get_pernr = pernr

get_pabrj = pabrj

get_pabrp = pabrp

tables

get_saldo = saldo

exceptions

no_period_specified = 1

wrong_cluster_version = 2

no_read_authority = 3

cluster_archived = 4

technical_error = 5

others = 6.

3 REPLIES 3

amit_khare
Active Contributor
0 Kudos

Check out if any FM is there otherwise use Select and try to pass all the Keys in where Clause.

Regards,

Amit

Reward all helpful replies.

Former Member
0 Kudos

I think u can using FM "HR_TIME_RESULTS_GET" to read data from Table Cluster B2. Here the sample code:

data: saldo like pc2b5 occurs 0 with header line.

call function 'HR_TIME_RESULTS_GET'

exporting

get_pernr = pernr

get_pabrj = pabrj

get_pabrp = pabrp

tables

get_saldo = saldo

exceptions

no_period_specified = 1

wrong_cluster_version = 2

no_read_authority = 3

cluster_archived = 4

technical_error = 5

others = 6.

Former Member
0 Kudos

Sample program

Import and export to database is used in two programs and not in the same program.

ZPROGRAM1.

tables : indx.

Data : SALDO type i,

indxkey LIKE indx-srtfd VALUE 'ZAB1'.

indx-aedat = sy-datum.

indx-usera = sy-uname.

indx-pgmid = sy-repid.

EXPORT SALDO TO DATABASE indx(zc) ID indxkey.

In another program,

ZPROGRAM2.

tables : indx.

Data : SALDO type i,

indxkey LIKE indx-srtfd VALUE 'ZAB1'.

indx-aedat = sy-datum.

indx-usera = sy-uname.

indx-pgmid = sy-repid.

IMPORT SALDO FROM DATABASE indx(zc) ID indxkey.