01-27-2014 9:39 AM
In selection screen i have input company code as 4000, but GET PERNR gave me PERNRs not only belongs to the company code 4000.
What is the exact behavior of PNP Logical data base.
pls help..
01-27-2014 9:45 AM
Hi Sreekanth,
please paste your query , you have written to get PERNR values.
01-27-2014 9:56 AM
hi Sanjeev,
thanks for ur reply.
GET pernr.
CHECK p0002-natio IN so_natio. "Check For Nationality
PERFORM getdata. "Collecting data into final IT
END-OF-SELECTION.
Plz help,,
01-27-2014 10:09 AM
Hi Shreekanth,
p0002 is not a table its an structure, so how you are matching it with your selection screen fields
Please use PA0002 instead to p0002
01-27-2014 10:26 AM
hi Sanjeev,
Ya it is a structure and y can't i do so..
and my question is not that..
Plz refer the attachment.
input..
Output
01-27-2014 10:38 AM
Hi Sreekanth,
first check your entries, you are fetching data from, are they correct mentioned.
If yes, please check your code.
01-27-2014 10:31 AM
Hi Sreekanth,
Check in your program BUKRS -company code field selection & 4000 value working properly or not.
If you are using ABAP HR programming you have to go with GET PERNR with that P* structure only.
There is not field BUKRS in P0002 also.
but there is field BUKRS in P0001 .
So check all structure.
Check your code with filter part.
Thanks
Gourav.
01-27-2014 10:38 AM
Hi kumar,
Thanks for reply.
Actually my code is,
I input compny code as 4000. but why GET PERNR loops for other company codes(4500,3000).
plz refr above post.
And what is the use of PNP selection screen?
pls help.. reply pls
01-27-2014 10:55 AM
Hi Sreekanth,
GET PERNR:
This event is executed for all personnel numbers that were selected on the basis of selection screen entries .
Data is retrieved at the GET PERNR time point.
fills the internal tables of infotypes that are declared for each employee using the INFOTYPES statement.
Kindly try this,
Report XXXXXX.
Data declaration
START_OF_SELECTION.
GET PERNR.
retrieve the data from internal tables to output internal tables
END_OF_SELECTION.
Display the data retrieved above.
From GET PERNR to END_OF_SELECTION ; it will loop with the employee numbers selected from the selection screen.
And one more thing what's the period ur providing?
Regards,
Sindhuja
01-27-2014 11:04 AM
hi Sindhuja,
i m new in HR ABAP.
I havn't provide any period.
My code is ...
Selection Screen input...
My output...
How it happends?
plz explain me..
01-27-2014 11:35 AM
Hi,
In my system am getting correctly,
According to me it might be because of the Nationality selection
Check the following.
REPORT ZVC_PROGRM035.
TABLES: PERNR,PA0002.
INFOTYPES: 0000,0001,0002.
SELECT-OPTIONS: SO_NATIO FOR PA0002-NATIO NO INTERVALS.
START-OF-SELECTION.
GET PERNR.
*CHECK p0002-natio IN so_natio.
IF P0002-NATIO IN SO_NATIO.
WRITE : / PERNR-PERNR , PERNR-BUKRS.
ENDIF.
END-OF-SELECTION.
Regards,
Sindhuja.
01-27-2014 11:40 AM
Hi Sreekanth,
Logical database PNP uses default selection screen. In this selection screen if we give any PERNR's , GET PERNR event will fetch the corresponding PERNR's details otherwise it will fetch all the employee details which are existing in the system.
The other selection screen details will just act as parameter/selection-option entries only( as like selection screeen entries we define normally in standard ABAP programs ) .
Try to Debug the program at your check condition , it will help you to understand the flow of LDB & ABAP HR programming.
Hope this helps.
Thanks & Regards,
Subbu
01-27-2014 11:54 AM
01-27-2014 12:05 PM
hi all...
thanks i got it..
I think this is why GET PERNR Consider the PERNR 70125 & other 2.
01-27-2014 12:12 PM
Hi,
If you need the last entry, you need to use rp_provide_from_last after get pernr.
RP_PROVIDE_FROM_LAST P0002 SPACE PN-BEGDA PN-ENDDA.
01-27-2014 12:12 PM