cancel
Showing results for 
Search instead for 
Did you mean: 

regarding hr-abap

Former Member
0 Kudos

hi all,

how to retrieve the data using logical database PCH.we cant use rp-provide here.

so can any one of you give suggestions on this it will be good to have an example prgm using pch,so can any one send me.

i have used select stmts to retrieve the data but while taking data its not taking.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Nishika,

Please refer to the following sample program for accessing PCH LDB.

For concept to start with refer url:

http://www.sap-press.de/download/dateien/860/sappress_mysap_hr_technical_principles2.pdf

It contains info regarding PCH Reporting.

<b>REPORT zhsol010.

TABLES: objec, gdstr.

INFOTYPES: 0002, 0006, 1003.

DATA: stabs LIKE p1003-stabs,

name LIKE p0001-ename.

INITIALIZATION.

pchotype = 'O'.

pchwegid = 'O-S-P'.

GET objec.

IF objec-otype = 'S'.

CLEAR stabs.

LOOP AT p1003 WHERE begda LE pc-endda

AND endda GE pc-begda.

IF p1003-stabs = 'X'.

stabs = 'X'.

WRITE : / objec-objid, objec-short, objec-stext.

ENDIF.

ENDLOOP.

ENDIF.

IF objec-otype = 'P' AND stabs = 'X'.

PROVIDE vorna nachn FROM p0002

subty telnr FROM p0006

BETWEEN pc-begda and pc-endda

WHERE p0006-subty = '1'.

IF p0006_valid = 'X'.

CONCATENATE p0002-vorna p0002-nachn INTO name

SEPARATED BY space.

WRITE: / name, p0006-telnr.

SKIP.

ENDIF.

ENDPROVIDE.

ENDIF.

Former Member
0 Kudos

Hi

HR:

HR deals with the INFOTYPES which are similar to Tables in General ABAP.

There are different ways of fetching data from these infotypes.

There are different areas in HR LIKE Personal Admn, Orgn Management, Benefits, Time amangement, Event Management, Payroll etc

Infotypes for these areas are different from one another area.

storing of records data in each type of area is different

LDBS like PNP are used in HR programing.

Instead of Select.. we use some ROUTINES and PROVIDE..ENDPROVIDE.. etc

and in the case of Pay roll we use Clusters and we Import and Export them for data fetching.

On the whole Normal ABAP is different from HR abap.

For Personal Admn the Infotypes start with PA0000 to PA1999

Time Related Infotypes start with PA2000 to PA2999.

Orgn related Infotypes start with HRP1000 to HRP1999.

All custom developed infotypes stsrat with PA9000 onwards.

In payroll processing we use Clusters like PCL1,2,3 and 4.

Instead of Select query we use PROVIDE and ENDPROVIDE..

You have to assign a Logical Database in the attributes PNP.

Go through the SAp doc for HR programming and start doing.

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

See:

http://help.sap.com/saphelp_46c/helpdata/en/4f/d5268a575e11d189270000e8322f96/content.htm

sites regarding hr-abap:

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

http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PAPA/PAPA.pdf

http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PAPD/PAPD.pdf

http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PYINT/PYINT_BASICS.pdf

http://www.atomhr.com/training/Technical_Topics_in_HR.htm

http://www.planetsap.com/hr_abap_main_page.htm

You can see some Standard Program examples in this one ...

http://www.sapdevelopment.co.uk/programs/programshr.htm

http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci1030179,00.html?Offer=SAlgwn12604#...

http://www.erpgenie.com/faq/hr.htm.

http://www.planetsap.com/hr_abap_main_page.htm

http://www.sapbrain.com/TUTORIALS/FUNCTIONAL/HR_tutorial.html

These are the FAQ's that might helps you as well.

http://www.sap-img.com/human/hr-faq.htm

http://www.sapgenie.com/faq/hr.htm

http://www.planetsap.com/hr_abap_main_page.htm

http://www.atomhr.com/library_full.htm

HR Long texts Upload

Look at the below link

sample code

START-OF-SELECTION.

GET pernr.

rp_provide_from_frst p0000 space pn-begda pn-endda.

if pnp-sw-found EQ '1'.

READ TABLE p0001 WITH KEY pernr = p0000-pernr.

if sy-subrc = 0.

write : p0001-plans. " earliest.

endif.

endif.

rp_provide_from_last p0014 space pn-begda pn-endda.

if pnp-sw-found EQ '1'.

READ TABLE p0014 WITH KEY pernr = p0000-pernr.

if sy-subrc = 0.

write : p0014-LGART. .

endif.

endif.

<b>Reward points for useful Answers</b>

Regards

Anji

Former Member
0 Kudos

hi

i have sked abt PCH any example u can give for pch to retrieve the data

when am using rp-provide in this its not taking.

thanking you,

Former Member
0 Kudos

Hi,

You cant use Rp-provide there.U have to loop at records there.

Reward if helpful.

~Kamal