‎2010 Aug 09 12:37 PM
Hi,
I'm looking to filter data in a report which uses LDB PNP.
When i enter the 'start dates' and 'end dates' the values goes into PN-BEGDA and PN-ENDDA respectively.
I want to know whether the GET PERNR statement will filter out the data based on 'start dates' and 'end dates'
or do i have to loop at each infotype and manually filter out.
varun
‎2010 Aug 09 12:56 PM
>
> I want to know whether the GET PERNR statement will filter out the data based on 'start dates' and 'end dates'
> or do i have to loop at each infotype and manually filter out.
>
> varun
[Here is the answer from SAP|http://help.sap.com/saphelp_47x200/helpdata/en/4f/d527ba575e11d189270000e8322f96/content.htm]
GET PERNR fills the internal tables of infotypes that are declared for
each employee using the INFOTYPES statement. The internal infotype table
is filled with all records existing between the lowest and highest
system date. The internal table has the name Pnnnn, where nnnn is the
infotype number- Rajesh.
‎2010 Aug 09 1:16 PM
>
> [Here is the answer from SAP|http://help.sap.com/saphelp_47x200/helpdata/en/4f/d527ba575e11d189270000e8322f96/content.htm]
>
>
GET PERNR fills the internal tables of infotypes that are declared for > each employee using the INFOTYPES statement. The internal infotype table > is filled with all records existing between the lowest and highest > system date. The internal table has the name Pnnnn, where nnnn is the > infotype number>
> - Rajesh.
That means its useless to give a selection criteria on the selection screen.
GET PERNR will get all records, means it will just filter the employee numbers nothing else, everything you will have to do manually by using loops.
Varun
‎2010 Aug 09 1:29 PM
Yes, that is the default behaviour of the PNP ldb, however you can use the macro[ RP_SET_DATA_INTERVAL|http://help.sap.com/saphelp_47x200/helpdata/en/60/d8bb88576311d189270000e8322f96/content.htm]
in the events INITIALIZATION or START-OF-SELECTION to restrict the data selection period, also be informed that this restriction(through macro) happens at an internal table level in the LDB driver progam and not at the database level. The definition of the macro can be found in the include program DBPNPCOM.
-Rajesh.
‎2010 Aug 09 2:07 PM
>
> Yes, that is the default behaviour of the PNP ldb, however you can use the macro[ RP_SET_DATA_INTERVAL|http://help.sap.com/saphelp_47x200/helpdata/en/60/d8bb88576311d189270000e8322f96/content.htm]
> in the events INITIALIZATION or START-OF-SELECTION to restrict the data selection period, also be informed that this restriction(through macro) happens at an internal table level in the LDB driver progam and not at the database level. The definition of the macro can be found in the include program DBPNPCOM.
>
> -Rajesh.
Very strange behavior this..