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

ABAP HR

Former Member
0 Likes
821

Hi Experts,

I am using the LDB screen for my Z program. This screen has in selection

pernr

employee status

personal area

personnel subarea

emp group

emp sub group

But its not evaluting employee status, per area, subarea.. . For example if i give emp status 3 its still showing me inactive employees too.

I think this will automatically evaluate the data given in the screen or

Is there any other code i need to inculde for evaluation.

Thank you.

Regards,

Admir.

Points will be rewarded.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
785

Hi

Its not true that LDBs do not filter records. If you go through the documentation, you will see that the LDB just checks if all the selection criterian is met for the PERNR in the date range. If a single record satisfy that condition, then it will be processed. You will have to then check if you need that record or REJECT the record.

You can use macros, loop endloop, Provide...Endprovide to evaluate.

Regards

Navneet

Hi Experts,

I am using the LDB screen for my Z program. This screen has in selection

pernr

employee status

personal area

personnel subarea

emp group

emp sub group

But its not evaluting employee status, per area, subarea.. . For example if i give emp status 3 its still showing me inactive employees too.

I think this will automatically evaluate the data given in the screen or

Is there any other code i need to inculde for evaluation.

Thank you.

Regards,

Admir.

Points will be rewarded.

5 REPLIES 5
Read only

Former Member
0 Likes
785

LDB does not filter the data properly. I have faced this issue so many times.

After GET event put explicit check.

CHECK p0000-stat2 IN PNPSTAT2.

CHECK p0001-werks IN PNPWERKS.

CHECK p0001-btrtl IN PNPBTRTL.

CHECK p0001-persg IN PNPPERSG.

CHECK p0001-persk IN PNPPERSK.

Put this below check after corresponding RP-PROVIDE-FROM-LAST of infotype.

Reward if its useful.

Regards,

Sail

Read only

suresh_datti
Active Contributor
0 Likes
785

>>For example if i give emp status 3 its still showing me inactive employees too.

It is the DATES that really drive the data selection from PNP/PNPCE.. In your scenario, the inactive emps would get picked up in the report, if they were active at some point during the selection preiod but are currently inactive. In such cases, it is necessary to put in explicit checks in the GET PERNR event as mentioned in the previous response.

~Suresh

Read only

Former Member
0 Likes
786

Hi

Its not true that LDBs do not filter records. If you go through the documentation, you will see that the LDB just checks if all the selection criterian is met for the PERNR in the date range. If a single record satisfy that condition, then it will be processed. You will have to then check if you need that record or REJECT the record.

You can use macros, loop endloop, Provide...Endprovide to evaluate.

Regards

Navneet

Read only

0 Likes
785

Can you send me any documentation or more details about the screen validation done by pnp screen or atleast one example code which does this validations.

My question is , will , get pernr get only the record which satisfy all the conditions on the screen with out any code writen or i need to add code for validation before get pernr.

Read only

0 Likes
785

Hi

If you run any program using PNP LDB, goto Person selection date or Other period and press F1.

It will be clearly mentioned how data is selected using LDBs.

1. In the date range, there needs to be valid record is PA0001. This is the first and the formost important condition.

2. In the date range, if any record for a PERNR satisfies the selection criteria, the pernr will be processed.

Examples are in the help.

Regards

Navneet