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

Retrieving data from Payroll clusters u0085

Former Member
0 Likes
1,125

Hi ,

Can any one help me , How to retrieve data from payroll clusters , For example take payus_result (structure ) and I want to retrieve data from PC208 and PC209 . Can any one give step by step process how to do this?

I am working with HR – ABAP. Mostly working with Payrolls. So I want to know this. Plz help me in this ASAP.

Thanks & Regards,

K Venkata Suresh

7 REPLIES 7
Read only

Former Member
0 Likes
986

Hello,

you have to read the cluster like this.

Tables : pcl1, pcl2.

  • temp.variable to hold the payroll period

DATA : g_f_pper LIKE pc261-fpper .

DATA : g_f_seqnr LIKE pc261-seqnr.

    • Cluster Definition.

INCLUDE rpc2cd00. "Cluster CD Data-Definition

INCLUDE rpppxd00. "Data-Definition Puffer PCL1/PCL2

INCLUDE rpppxd10. "Common Part Puffer PCL1/PCL2

INCLUDE rpppxm00 .

INCLUDE rpc2rx02 .

INCLUDE rpc2rx39 .

INCLUDE rpc2ca00 .

INCLUDE rpc2rdd1 .

INCLUDE rpc2rx29 .

INCLUDE hdepaymacro .

  • Get the payroll period

CLEAR : g_f_pper.

CONCATENATE pn-begda0(4) pn-begda4(2) INTO g_f_pper .

  • fill the keys for the CU cluster

cd-key-pernr = pernr-pernr.

  • import from the cluster CU

CLEAR: rgdir, g_f_seqnr.

REFRESH rgdir.

rp-imp-c2-cd.

IF rp-imp-cd-subrc = 0 .

IF NOT rgdir[] IS INITIAL.

SORT rgdir BY fpbeg DESCENDING.

LOOP AT rgdir WHERE fpper EQ g_f_pper

AND srtza EQ 'A'. " Active g_f_seqnr = rgdir-seqnr.

ENDLOOP.

ENDIF.

ENDIF.

  • fill the RX key and then import the cluster

rx-key-pernr = pernr-pernr .

CLEAR : rx-key-seqno.

UNPACK g_f_seqnr TO rx-key-seqno .

CLEAR rt.

REFRESH rt.

rp-imp-c2-rd.

IF rp-imp-rd-subrc = 0.

LOOP AT rt WHERE lgart = '9230'. RT " Result table

  • move the values here

Endloop.

ENDIF.

Reward if helps.

Thanks,

Krishnakumar

Read only

0 Likes
986

Hi,

If i use GET Payroll, What ill happen , How to Retreive data , If i use Get Payroll.

With regards,

Venkata Suresh K

Read only

Former Member
0 Likes
986

check this link.

http://www.sapdevelopment.co.uk/hr/hrhome.htm

Regards

Prabhu

Read only

Former Member
0 Likes
986

In SE38 or SA38, execute the sample program <b>EXAMPLE_PNP_GET_PAYROLL</b>

Read only

Former Member
0 Likes
986

Hi,

The GET Event dynamically calls the PUT event of the LDB Program. Further if you want to use the standard payroll try exploring the Standard Schema X000.

Reward if helpful.

Regards

Read only

Former Member
0 Likes
986

Hi kutam,

1. U want the remuneration (monthly salary )

2. U won't get it DIRECTLY from any table.

(Its stored in cluster format)

3. Use this logic and FM.

DATA: myseqnr LIKE hrpy_rgdir-seqnr.

DATA : mypy TYPE payin_result.

DATA : myrt LIKE TABLE OF pc207 WITH HEADER LINE.

SELECT SINGLE seqnr FROM hrpy_rgdir

INTO myseqnr

WHERE pernr = mypernr

AND fpper = '200409'

AND srtza = 'A'.

IF sy-subrc = 0.

CALL FUNCTION 'PYXX_READ_PAYROLL_RESULT'

EXPORTING

clusterid = 'IN'

employeenumber = mypernr

sequencenumber = myseqnr

CHANGING

payroll_result = mypy

EXCEPTIONS

illegal_isocode_or_clusterid = 1

error_generating_import = 2

import_mismatch_error = 3

subpool_dir_full = 4

no_read_authority = 5

no_record_found = 6

versions_do_not_match = 7

error_reading_archive = 8

error_reading_relid = 9

OTHERS = 10.

myrt[] = mypy-inter-rt.

READ TABLE myrt WITH KEY lgart = '1899'.

4. the internal table myrt

will contain what u require.

regards,

amit m.

Read only

0 Likes
986

Hi ,

Can any one help in HR where we will get the follwing data.

payroll-payment date

BT-run date.

Thanks,

Suresh.