After Get pernr
Hi Sap Gurus,
I am new to hr abapcolud clarify my doubts plzzzzzzz.
After excuting our program in hr abap
start-of-selection. will trigger am i correct
in our program which infotype we have diclered those infotypes data comes in pnnnn
this pnnnn is internal table or structue,
and after get pernr we will get that data into final internal table
this get is event or what, while i was debugging have seen that one as form
Thanks,
Prasad.
PNNN is a structure
The Pnnnn structure of the infotype is used as the field structure for the infotype entry screen
When you declare an infotype using the INFOTYPES statement, an internal table Pnnnn with the structure Pnnnn is created and all records of the infotype are transferred to this table:
At the GET PERNR event, the PERNR structure contains the data for a personnel number chosen on the basis of selection screen entries
Data is retrieved at the GET PERNR event. The GET PERNR action is executed for all personnel numbers that were selected on the basis of selection screen entries
GET PERNR fills the internal tables of infotypes that are declared for each employee using the INFOTYPES statement
Similar Messages
-
ABAP HR : Restriction of data after GET PERNR
Hi Folks,
I am using LDP PNP and using get statement. I am using multiple Infotypes. So all the Pxxxx are getting field with each GET PERNR. I have to extract last record which I am getting using RP_PROVIDE_FROM_LAST.
Can I avoid getting all the data of a PERNR after GET PERNR or is there any other way to get only the latest record.
Thanks
RahulHi ,
In my opinion i can infer your questions as ..
suppose p0000 has 3 records for pernr 5125.
Get PERNR.
rpprovidefrom last -> triggers last date ..
Here usage of rp provide allows u to pick the latest entry . Now you are asking the loading of p0000 should happen only with 1 record( instead of 3 ) .
Get PERNR.
--> here u need to see p0000 with 1 entry only ..
**rpprovide*from last -> triggers last date ..
May be a check from initialization to restrict based on date entry within the interval .. and if in that interval there are two records i suppose it cannot pick one.. thats my opinion .. lets see if someone has a better solution .
BR,
Vijay. -
[HR] Precise GET PERNR
Hi. When I use GET PERNR, all pernr are taken so it takes a long minute to complete. How can I limit number of PERNR who are taken by GET statement? For example I'd like to process only pernr from particular shop or particular organization. I'll be thankful for tips. Greetings. P.
I believe that the only thing that your you can do is to check manually with a CHECK after GET PERNR, of way that if it does not fulfill the conditions necessary, the PROVIDE continues with the following PERNR. Something like this:
GET PERNR.
check pernr-pernr in so_pernr. -
How to use the class CL_PT_EMPLOYEE with GET PERNR?
Hi,
I saw this sample code on the forum.
Is it more performant than using the "RP-PROVIDE-..." macros?
Does the employee instance needs to be killed after each pass? How does it affects memory?
start-of-selection.
GET pernr.
<b>* Create employee instance</b>
gif_employee = cl_pt_employee=>get_employee( pernr ).
go_employee ?= gif_employee.
<b>* Append all other required infotypes to itab</b>
APPEND '0003' TO gt_infotypes.
CALL METHOD go_employee->get_infotypes
EXPORTING
i_itlist = gt_infotypes
i_fromdate = id_fromdate " start date
i_todate = id_todate " end date
* I_FILTER =
i_noauthcheck = 'X'
IMPORTING
e_result = gt_infty_request
e_retcd = gd_retcd.I think it that way. You are trying to compare and analyse old (don't say bad) programming school with a new (OO one) approach. Although, I am OO enthusiast and in any case I will try to convice you that OO aproach is better than classical one, you should know what SE30 was designed for. If you want to stress on OO design, use the one you mentioned, otherwise stick what SAP recommmends (please note, that I am "middle" school pupil, so I tried to learn all courses with my own experience and feelings from OO).
IMHO, OO aproach is a way of thinking, not something we can messure in sec. and compare to old school teaching. Some of your report should be desinged in classical way, some should be pure OO. Which one you choose, is up to you, your conclusions, your percives of ABAP language. For me OO was not injected in ABAP enough, to affect developers or to convince them using it in any case w/o doubts you have.
Regards
Marcin -
hi frriends,
i am doing the hr programming for the first time & have a doubt.
when we extract the data using
get pernr & provide * from pxxxx
& then we move the data into corresponding itab
after that when we write the result with loop at itab,
it gives strange output.
actually, after the endloop again it goes to 'get pernr' & again it executes the same whole sequence.
can anybody help me understanding this concept
thanks
abhayhi bharat,
thanks for the reply.
the code is something like this
DATA: BEGIN OF i_tab1 OCCURS 0,
pernr like p0000-pernr,
stat2 like p0000-stat2,
abkrs like p0001-abkrs,
plans like p0001-plans,
END OF i_tab1.
GET pernr.
PROVIDE pernr stat2 FROM P0000
abkrs plans FROM P0001
BETWEEN sy-datum AND sy-datum.
ENDPROVIDE.
MOVE p0000-pernr TO i_tab1-pernr.
MOVE p0000-stat2 TO i_tab1-stat2.
MOVE p0001-abkrs TO i_tab1-abkrs.
MOVE p0001-plans TO i_tab1-plans.
APPEND i_tab1.
LOOP AT i_tab1.
write:/ i_tab1-pernr, 15 i_tab1-stat2, 35 i_tab1-abkrs,
50 i_tab1-plans.
ENDLOOP.
It gives me output like:
12340001 1 v1 99999999
12340001 1 v1 99999999
12340002 1 v1 99999999
12340001 1 v1 99999999
12340002 1 v1 99999999
12340003 1 v1 99999999
12340001 1 v1 99999999
and so on
if i dont use loop....endloop, it gives me proper results.
Also i am trying few things like deleting duplicates, sorting etc. on itab but not working.
can you please tell me why is it so?
thanx in advance
abhay -
Hi All,
I have a requriement to fetch last pernr.Once after using GET PERNR statement in my program i will get all the pernrs available.So after this i want to fetch only the last pernr exists.For example if i have 1000 pernrs after my get pernr statment i want to fetch only the 1000 pernr .so please suggest me on this.HI..
this one is simple to try..
REPORT YH642_HR_TEST.
TABLES: PERNR.
INFOTYPES: 0001.
<b>start-of-selection.</b>
GET PERNR.
<b>end-of-selection.</b>
read table p0001 index 1.
WRITE: / P0001-PERNR,
P0001-plans,
P0001-BEGDA,
P0001-ENDDA.
it always stores the last pernr details in the last loop. So go to end-of-selection and print the details. -
Hi all,
can u explain the get event functionality ?
Can u tell me the difference between
get pernr and get late pernr.
when should i use these type of statements ?
Regards
charanHi Ravi,
GET PERNR event initiates the data extraction for a pernr.
GTE PERNR LATE event is triggered after all the other events are triggered and right before the end-of-selection.
PL take a look at the following <a href="http://help.sap.com/saphelp_47x200/helpdata/en/ac/764da4496f11d3967200a0c9306433/frameset.htm">SAP Help</a> where it is explained very clearly.
Regards,
Suresh Datti -
Hello all,
I understand the basic concept of the GET PERNR command but I wanted to clarify something.
In the logical database PNP, after the GET PERNR event, does the 'header' information in the structure PERNR contain the combination of the person's 'latest' infotype records?
For example:
- someone has a current surname of SMITH but had a previous surname of JONES in IT0002
- will the field PERNR-SNAME contain SMITH?
- will their PERNR-WERKS and PERNR-BTRTL contain their current values
Also, are the selection dates PN-BEGDA and PN-ENDDA considered when determining these 'latest' PERNR values or is the end date '99991231' assumed.
Many thanks in advance,
Keiron.See the following example:-
REPORT zemployee.
TABLES: pa0000.
DATA:
go_employee TYPE REF TO cl_pt_employee,
gd_infty TYPE infty,
gt_infty TYPE tim_tmw_itlist_tab,
gt_result TYPE tim_blp_request_tab,
gd_result LIKE LINE OF gt_result,
go_data TYPE REF TO cl_pt_td_itnnnn,
gs_prelp TYPE prelp, " HR Master Data Buffer
gs_p0009 TYPE pa0009. " HR Master Record: Infotype 0009 (Bank
" Details)
FIELD-SYMBOLS:
TYPE ANY.
PARAMETERS:
p_pernr TYPE pa0000-pernr DEFAULT '00900222',
p_begda TYPE begda DEFAULT syst-datum,
p_endda TYPE endda DEFAULT syst-datum.
START-OF-SELECTION.
go_employee ?= cl_pt_employee=>get_employee( p_pernr ).
CALL METHOD go_employee->get_master_data
EXPORTING
im_begda = p_begda
im_endda = p_endda
IMPORTING
EX_I0000 = " infotype 0000 = Actions
EX_I0001 = " infotype 0001 = Organizational Assignment
EX_I0002 = " infotype 0002 = Personal Data
EX_I0007 = " infotype 0007 = Planned Working Time
EX_I0008 = " infotype 0008 = Basic Pay
Using this method you can access any infotype(s)
APPEND '0009' TO gt_infty. " Bank Details
APPEND '0010' TO gt_infty. " Capital Formation
CALL METHOD go_employee->if_pt_employee~get_infotypes
EXPORTING
i_itlist = gt_infty
i_fromdate = '20000101'
i_todate = syst-datum
I_FILTER =
i_noauthcheck = ' ' " do authority check (if required)
IMPORTING
e_result = gt_result.
E_RETCD =.
LOOP AT gt_result INTO gd_result.
go_data ?= gd_result->data.
Get infotype in semi-transparent form
gs_prelp = go_data->if_pt_td_infotype~get_prelp( ).
Convert: semi-transparent -> transparent infotype
CALL METHOD cl_hr_pnnnn_type_cast=>prelp_to_pnnnn
EXPORTING
prelp = gs_prelp
IMPORTING
pnnnn = gs_p0009.
ENDLOOP.
Print-Out infotype data
DO.
ASSIGN COMPONENT syst-index OF STRUCTURE gs_p0009 TO .
IF ( syst-subrc NE 0 ).
EXIT.
ELSE.
WRITE: / .
ENDIF.
ENDDO.
END-OF-SELECTION. -
Hi,
I just want to know how to debug the get pernr statement or to know what is happening by this statement in the program.
Thing is that, I have a scenario where, for a particular employee ID the get pernr statement gets executed with sy-subrc value 0 which idealy should not be. And except this ID rest all IDs have sy-subrc as 4 after the get pernr statement execution.
Please reply.
Regards,
Binay.Hi,
First of all thanx for your reply.
The variant used in the program execution should consider all the company codes except 0121. But its strange that this company code is too chosen and that too for only one employee. I tried to test with other employees belonging to this company code but they are not chosen.
Actually this program is meant for the job to run Payroll for Semimonthly employees and this employee should not be chosen as the variant is only meant for company codes other than 0121 and this employee belongs to 0121.
Just before the Get pernr statement, in the code while debugging, there are some Badis being called. I did not find anything by checking them too.
Please suggest.
Regards,
Binay. -
hello friends.
please anybody tell me in what conditions can we use get pernr late event. can we give get pernr late after end-of-selection. pls explain with an example.
thankshi
good
The GET PERNER is exclusively used in HR ABAP. The GET event gets the node.
The text below will explain the GET event better.
This statement defines an event block whose result is triggered by the ABAP runtime environment after submitting an executable program, if the logical database to which the program is linked, provides data in the work area node. The node work area must be declared with the NODES statement (or TABLES). The data can be processed in the event block.
GET node also controls the behavior of the logical database.
And GET node Late
GET node LATE [FIELDS f1 f2 ...].
Effect
This statement defines an event block whose result is triggered by the ABAP runtime environment after submitting an executable program, when the logical database has read in all records of node node. For node and FIELDS, the same applies as for the previous variant. Use this event block for final processing actions concerning the hierarchy level of the node.
We generally use the same when we write the PAYROLL as to get the entire payroll structure from the database.
reward point if helpful.
thanks
mrutyun^ -
hi all,
i want to stop the get pernr after some lines and want to run the remaining lines of the programm which is not in logical database.
ITS URGENT.....
Thx in advance
SunilHi,
Try the REJECT statement followed by the name of the logical database.
Example:
REJECT 'PERNR'.
Don't forget to assign points and close the thread when you are finished.
Best regards,
Guillaume -
After getting a new router, my ipod touch is asking for a password. I was able to put in the router's passcode on all my other wireless stuff, but the ipod won't accept it. I thought I had made too many attempts, but I've reset it and it still won't let me on. I have no idea what the password is or why it is now asking for one. Help!!
Look at the manual for the router. The password is on the router. Then change the password in the router to something other than the default one and use that password when the iPod asks for it (it will only ask once, once it has the password/router combo in its memory, it will remember it)
-
Trying to restore after getting a new hard drive. I can see the backup on the Time Capsule and on the correct date but it is Greyed out. That is it wont let me open it and restore the machine. Have tried also Migration Assistant, no luck.
https://discussions.apple.com/thread/5210788?tstart=0
At startup hold down the Command+Option/Alt+r keys until you see a globe on the screen. Then use disk utility to partition and format the drive HSF+ and then select Reinstall Mac OS X. whatever version of OS X that originally came on your system will be installed and then you can upgrade back to Mavericks. -
After getting a new desktop I downloaded iTunes and authorized my new computer and then de-authorized my old one, When I try to update my 5S it says my phone is not authorized and list my wifes email address as the account holder and not mine. How do I correct this. I am using Windows 8.1 . My wife has never had an iTuunes account
Hello Lakesidetom,
It sounds as though you are experiencing an issue with an Apple ID and authorizations. Based on your post, it sounds like you are familiar with the authorizing and deauthorizing process. The Apple ID in question (your wife's email) may be originating from the iPhone you are attempting to update. Is it possible that your wife created an Apple ID or iCloud account which is signed in on that iPhone? Below, I have included links to some resources that may help you determine if your wife has created an Apple ID:
How to find your Apple ID - Apple Support
Use these steps if you forgot your Apple ID or aren't sure that you have one.
Apple - My Apple ID
If you can't remember your Apple ID, just provide us with some information and we'll find it for you. Then we'll help you reset your password.
Thank you for contributing to Apple Support Communities.
Cheers,
Bobby_D -
How many times can i use the limited warranty on my Apple iPhone 5, I just broke mine after getting a brand new one. Also, can I extend my warranty?
If you purchased AppleCare + within 30 days of getting your iPhone 5 you are allowed 2 instances of breakage replacement with a $49 deductible. If you do not have AppleCare + accidental breakage is not covered under you warranty, you can do an out-of-warranty replacement for $229.
Maybe you are looking for
-
Help needed in EXPLAIN PLAN for a partitioned table
Oracle Version 9i (Paste execution plan in a spreadsheet to make sense out of it) I am trying to tune this query - select * from comm c ,dates d where d.active_period = 'Y' and c.period = d.period; Operation Object Name Rows Bytes Cos
-
Every time I download the drive for the HP LaserJet CM1415fnw printer it says the file is corrupt. Without having the driver I am unable to print. Any help would be greatly appreciated. Thanks, Paul This question was solved. View Solution.
-
New DVD drive issues on DV6000 series.
I just got my replacement drive from hp. I pulled the old drive and got the new one in yesterday. The driver installed on restart and seemed to be fine, i just ripped a couple of cds to itunes. The DVD side is giving me trouble though. I can't change
-
Cannot open Firefox since I connected to wireless network. IE works ok
-
Safari-will not keep position in dock and vanishes after closing-any ideas?
I know this topic has been addressed previously but has there been a solution to this problem Some have written and suggested solutions but I have yet to see 'cause' of this annoying problem, and any definitive answer. have read and tried most of the