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

PNPCE LDB

Former Member
0 Likes
521

Hi all,

How to retrive the payroll data while using PNPCE logical databse.

plz help me out in this case.

thanks and regards,

Ravikiran

Hi all,

How to retrive the payroll data while using PNPCE logical databse.

plz help me out in this case.

thanks and regards,

Ravikiran

2 REPLIES 2
Read only

Former Member
0 Likes
466

Hi,

i faced the same problem and was asking the teacher while i was on the SAP course HR 350. He answered that this could only be achieved with logical Database PNP.

But i've found an interesting Link for reading payroll data with PNPCE and ABAP OO.

You should take a look at it: <a href="http://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/hr-abap+payroll+result+using+classes&">https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/hr-abap+payroll+result+using+classes&</a>

Regards

Mark-André

Read only

abhijitzope
Active Participant
0 Likes
466

Hi Ravikiran,

you have to fetch the data using Function Modules.

(1) function module CU_READ_RGDIR reads table RGDIR from cluster CU

(2) function module CD_READ_LAST determines the current payroll result for a for- period to be evaluated

(3) function module PYXX_READ_PAYROLL_RESULT to read a complete

payroll result from the database table PCL2 or from the buffer.

check the following code for reference.

tables: pernr.

nodes: peras.

infotypes: 0001.

start-of-selection.

get peras.

rp_provide_from_last p0001 space pn-begda pn-endda.

CALL FUNCTION 'CU_READ_RGDIR'

EXPORTING

persnr = p0001-pernr

IMPORTING

molga = country

TABLES

in_rgdir = rgdir

EXCEPTIONS

no_record_found = 1

OTHERS = 2.

IF sy-subrc = 1.

WRITE: / 'No records found for '(001), pernr-pernr.

REJECT.

ENDIF.

CALL FUNCTION 'CD_READ_LAST'

EXPORTING

begin_date = pn-begda

end_date = pn-endda

IMPORTING

out_seqnr = number

TABLES

rgdir = rgdir

EXCEPTIONS

no_record_found = 1

OTHERS = 2.

IF sy-subrc = 1.

WRITE: / 'No payroll result found for'(002), pn-paper.

ELSE.

CALL FUNCTION 'PYXX_READ_PAYROLL_RESULT'

EXPORTING

clusterid = 'RX'

employeenumber = p0001-pernr

sequencenumber = number

  • READ_ONLY_BUFFER = ' '

  • READ_ONLY_INTERNATIONAL = ' '

  • CHECK_READ_AUTHORITY = 'X'

  • IMPORTING

  • VERSION_NUMBER_PAYVN =

  • VERSION_NUMBER_PCL2 =

CHANGING

payroll_result = payroll

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

OTHERS = 8.

IF sy-subrc = 0.

PERFORM print_rx.

ELSE.

WRITE: / 'Result could not be read (003).

ENDIF.

ENDIF.

Hope it will help you.

regards,

Abhijit Zope