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

Get pernr statement

Former Member
0 Likes
10,987

Hi,

Could anyone please tell me how why is the Get pernr . statement used and how it functions ?

One more thing, is there any means to check the amount a particular employee received as salary after the payroll ran for him ?

Please reply.

Regards,

Binay.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
4,075

Hi Binay, GET will fetch you the header data in the structure pernr. GET usually acts as a select placed inside the loop statement.

Regards,

Vijayalakshmi

6 REPLIES 6
Read only

Former Member
0 Likes
4,075

GET is Logical Database statement. Please check report use any logical database in technical attributes. You can check logical database in SE36

Read only

Former Member
0 Likes
4,076

Hi Binay, GET will fetch you the header data in the structure pernr. GET usually acts as a select placed inside the loop statement.

Regards,

Vijayalakshmi

Read only

Former Member
0 Likes
4,075

GET PERNR

THIS STATEMENT WILL RETRIEVE ONE EMPLOYEE RECORDS FROM INFOTYPES DATABASE TABLES (PA0000 TO PA0999) BY USING LDB PROGRAMME AND PASS THE DATA INTO THE INFOTYPE INTERNAL TABLE

IN ABAP HR REPORTS FROM GET PERNR TO END-OF-SELECTION FORMS THE LOOP.

EXAMPLE REPORT:

tables: pernr.

infotypes: 0000," actions

0001," org assignment

0002."personal data

TYPES: BEGIN OF ty_final,

massn type massn,"action

massg type massg,"action type

bukrs type bukrs,"company code

abkrs type abkrs,"payroll area

werks type werks,"plant

kostl type kostl,"stell

nachn type nachn,"last name

vorna type vorna,"first name

med_ins type numc7,

END OF ty_final.

DATA : it_final TYPE STANDARD TABLE of ty_final INITIAL SIZE 0,

wa_final LIKE LINE OF it_final.

START-OF-SELECTION.

get pernr.

  • to get the employee master data

PERFORM f_get_emp.

end-of-selection.

perform f_get_display.

&----


*& Form f_get_emp

&----


FORM f_get_emp .

RP_PROVIDE_FROM_LAST P0000 SPACE PN-BEGDA PN-ENDDA.

IF PNP-SW-FOUND EQ 1.

WA_FINAL-MASSN = p0000-massn.

WA_FINAL-MASSG = P0000-MASSG.

ENDIF.

RP_PROVIDE_FROM_LAST P0001 SPACE PN-BEGDA PN-ENDDA.

IF PNP-SW-FOUND EQ 1.

WA_FINAL-BUKRS = P0001-BUKRS.

WA_FINAL-WERKS = P0001-WERKS.

WA_FINAL-ABKRS = P0001-ABKRS.

ENDIF.

RP_PROVIDE_FROM_LAST P0002 SPACE PN-BEGDA PN-ENDDA.

IF PNP-SW-FOUND EQ 1.

WA_FINAL-NACHN = P0002-NACHN.

WA_FINAL-VORNA = P0002-VORNA.

ENDIF.

ENDFORM. " f_get_emp

Read only

Former Member
0 Likes
4,075

tables: pernr.

infotypes: 0000, 0001, 0002, 0006.

start-of-selection.

GET PERNR.

  • This event fetches all data of pernrs which are selected on the selection screen. it fecthes data from infotypes 0000, 0001, 0002 and 0006.

end-of-selection.

Read only

Former Member
0 Likes
4,075

Hi Binay,

GET <node_name> reads the logical database and retrives all data.

Consider the following code.

NODES pernr.

GET pernr.

WRITE:/ PERNR-PERNR.

This will write all the PERNR present in your server.

It acts like a loop at all the PERNR values present in ur system.

Please award points if helpful.

Read only

Former Member
0 Likes
4,075

>

> Hi,

>

> Could anyone please tell me how why is the Get pernr . statement used and how it functions ?

> Binay.

Check the link below, it clearly explains the GET pernr event processing

http://help.sap.com/saphelp_47x200/helpdata/en/4f/d527ba575e11d189270000e8322f96/content.htm

>

> One more thing, is there any means to check the amount a particular employee received as salary after the payroll ran for him ?

>

> Please reply.

>

> Regards,

> Binay.

Fetch the payroll results of the EE for the payroll period from the cluster tables and display the corresponding wagetype.

Check the blog below, which explains the diff methods to fetch payroll results

/people/alvaro.tejadagalindo/blog/2006/02/19/how-to-deal-with-hr-payroll-reports

Also, check the standard example program EXAMPLE_PNP_GET_PAYROLL

search the forum for the FM PYXX_READ_PAYROLL_RESULT