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: 

what is get pernr

Former Member
0 Kudos
1,609

what is get pernr

12 REPLIES 12

bpawanchand
Active Contributor
0 Kudos
381

HI

This is the most important event for executable programs that use a logical database. It occurs when the logical database has read a line from the node <table> and made it available to the program in the work area declared using the statement NODES <table>.

When you define the corresponding event block in the program, you can specify a field list if the logical database supports field selection for this node:

GET <table> [FIELDS <f1> <f 2>...].

You can process the data in the work area in this event block. For example, you can write it directly to a list, or store it in a sequential dataset (internal table or extract) so that you can process it later.

The logical database reads all columns from all nodes that are not designated for field selection in the logical database and which are superior to <table> on the access path of the logical database. This works independently of whether you have defined GET event blocks for these nodes or not. However, you can only access the data of the nodes for which you have declared a work area in the NODES statement.

reward points if you got a idea

Regards

Pavan

Former Member
0 Kudos
381

Hi,

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

Thanks

Former Member
0 Kudos
381

Sudheer,

check this and also try to find some resources online.

GET PERNR :

This event fills the data structures of declared infotypes with all records that exists for a personnel number.

Data selection does not delimit the records that retrieved from the database.

Whenever GET PERNR statement is included in your program check the following two .

1.Have you included PNP for the logical database screen field in the program attributes.

2.Have you included PERNR structure in the tables declaration.

Former Member
0 Kudos
381

Hi Sudheer,

GET is Event. This is used to get the details of a logical database node...

So for GET PERNER if you look into PNP LDB you will find a node pernr..

'PNP' LDB is for HR ABAP you will find pernr node which is parent node of all in it.

PERNR Table Standard Selections for HR Master Data Reporting

so using the statement in report program it gets pernr relating records from the LDB with values you mentioned in selection screen....

Hope this would help you.

Regards

Narin Nandivada

Former Member
0 Kudos
381

hi sudheer,

this is the event used to load personnel data for each

employee into the main memory and makes it

available for processing . The entire history

of declared infotypes are loaded into the main

memory . The data of previous employee is deleted

when next personnel number is processed.

regards

padma

Former Member
0 Kudos
381

In simple way(to understand) from Get PERNR to END-OF-SELECTION it is called as Loop.Thats it.

Former Member
0 Kudos
381

Hi

This is the most important event for executable programs that use a logical database. It occurs when the logical database has read a line from the node <table> and made it available to the program in the work area declared using the statement NODES <table>.

When you define the corresponding event block in the program, you can specify a field list if the logical database supports field selection for this node:

GET <table> [FIELDS <f1> <f 2>...].

You can process the data in the work area in this event block. For example, you can write it directly to a list, or store it in a sequential dataset (internal table or extract) so that you can process it later.

The logical database reads all columns from all nodes that are not designated for field selection in the logical database and which are superior to <table> on the access path of the logical database. This works independently of whether you have defined GET event blocks for these nodes or not. However, you can only access the data of the nodes for which you have declared a work area in the NODES statement.

pernr is personnel number (hr abap).

regards

pritam.

Former Member
0 Kudos
381

Hello Rao,

GET PERNR fetches the infotypes for a given logical database selection into the main memory. When the selection is done once again, the new infotypes replace the old ones in the memory.

Indu.

Former Member
0 Kudos
381

hi,

GET PERNR

GET is an Event which is related to the processing of Logical DataBase. This event While Triggered Collects the Data of Employee NUmber from the Logical Datbase.

GET will work with PUT Keyword in the LDB. There is a Subroutine written in the LDB for Selecting Data.

Hope this is helpful.

Reward if Useful

Sumit Agarwal

Former Member
0 Kudos
381

Hii!

Check out this link

http://sapabap.iespana.es/sap/info/hr_overview.htm

Regards

Abhijeet Kulshreshtha

Former Member
0 Kudos
381

hi check this..

get pernr is a loop in the logical data base .

suppose u coded like this..

report ztest.

tables: pernr.(this is must in ldb)

infotypes:0002.

get pernr .( the looping of data starts from here on the infotype).

the processing is comleted first for one employee then for second ......last employee ...in a serial order due to the get pernr event.

Former Member
0 Kudos
381

Hi,

This event fills the data structures of declared infotypes with all records that exists for a personnel number.

Data selection does not delimit the records that retrieved from the database.

Whenever GET PERNR statement is included in your program check the following two .

1.Have you included PNP for the logical database screen field in the program attributes.

2.Have you included PERNR structure in the tables declaration.

Regards,

Rajitha.