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

Filter Data using LDB PNP

Former Member
0 Likes
1,029

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

4 REPLIES 4
Read only

rajesh_paruchuru
Active Participant
0 Likes
753

>

> 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.

Read only

0 Likes
753

>

> [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

Read only

0 Likes
753

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.

Read only

0 Likes
753

>

> 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..