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

hr abap programming help

Former Member
0 Likes
972

can anyone help on this ?

Selection screen having p2001-BEGDA, P2001-ENDDA and PA0001-BTRTL.

<u><b>Flow of the Report:-</b></u>

1. Get Date(P2001- BEGDA and P2001- ENDDA) using selection criteria from selection screen

2. Get Personnel sub area from the table PA0001

3. Number of Occurrence is the Total number of Absences which were recorded in the specific period.

4. Get all the Absences from the table ZWSOABS which were recorded in the specific period (P2001- BEGDA and P2001- ENDDA).

5. Number of Workers is the Average number of workers who worked in the recording period excluding those persons who were absent from work on paid/unpaid leave for the entire period.

6. Get the Number of Workers from PA0000 using the following:

- Select Count(*) from PA0000 where PA0000-ENDDA = ‘31/12/9999’ and PA0000-STAT2 = ‘3’

7. Perform the report

<b>Further Information</b>:- The Incidence rate is the number of occurrences of injury/disease for each one hundred workers employed. The following formula should be applied:

Number of Occurrences in the period /Number of Workers * 100

The “number of occurrences in the period” refers to all cases of lost time injury/disease, which were recorded in the specific period. The “number of workers” is defined as the average number of workers who worked in the recording period. Persons who were absent from work on paid or unpaid leave for the entire period should be excluded from this calculation.

CAN ANYONE PLEASE SEND ME THE CODE?

YOUR HELP IS DEFINITELY REWARDED BY POINTS

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
942

Hi Hari, welcome to SDN. This really isn't a "code factory" site. It is really better for you to at least give it a try before posting a spec. We all have things that need to be done for our jobs, so writing programs for others usually is not an option. We can and will help you along the way with syntax or some small logic, but most will not code the entire thing. Please think about starting this development yourself, and feel free to come back and ask more specific questions. Thanks and again, Welcome!.

Regards,

Rich Heilman

9 REPLIES 9
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
943

Hi Hari, welcome to SDN. This really isn't a "code factory" site. It is really better for you to at least give it a try before posting a spec. We all have things that need to be done for our jobs, so writing programs for others usually is not an option. We can and will help you along the way with syntax or some small logic, but most will not code the entire thing. Please think about starting this development yourself, and feel free to come back and ask more specific questions. Thanks and again, Welcome!.

Regards,

Rich Heilman

Read only

0 Likes
942

Thank u ...can u please help me in fetching the logic. I try my best. The reason why I asked the code is i am a fresh abaper...

Sorry for asking code,

can u plz give some logic. I will try.

Read only

Former Member
0 Likes
942

HI..I AM FRESH HR ABAP'R. CAN ANYONE PLZ HELP ON THIS TOPIC. COZ IT'S VERY URGENT?

Read only

0 Likes
942

Here is how you would code your selection screen.




report zrich_0002.

tables: p2001.

* Selection Screen
selection-screen begin of block b1 with frame title text-001 .
select-options: s_begda  for p2001-begda.
select-options: s_endda  for p2001-endda.
selection-screen end of block b1.

Regards,

Rich Heilman

Read only

0 Likes
942

You can retrieve your data from PA0001 like this.



start-of-selection.


  select * into table ipa0001
                from pa0001
                    where begda in s_begda
                      and endda in s_endda.

Regards,

Rich Heilman

Read only

0 Likes
942

Hari,

Try function HR_READ_INFOTYPE to retrieve data from any IT.

V.

Read only

0 Likes
942

hello hari

U can assign logical database PNP for this case, use the event get pernr, use the macro rp-provide-from-last to populate the internal table declared under infotypes statement.

feel free to ask any questions

regards

vijay

Read only

0 Likes
942

just a small correction to Vijay's statetment..

- the internal table (P2001) declared under infotypes (2001)statement is filled for each pernr after the GET PERNR event.

- the macro RP-PROVIDE-LAST retrieves the most recnt record between pn-begda & pn-endda into the header (P2001).

Regards,

Suresh Datti

Read only

0 Likes
942

hello suresh

yes suresh u are right. Using Get pernr event it populates the internal tables declared under infotypes statement(i.e P2001 internal table under infotypes : 2001 statement correspondingly) and the macro gets the last record from this internal table.

Thank you again for correcting me. Its was my mistake in curiousity.

Regards

vj