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

Infotype Problem

Former Member
0 Likes
516

Hi All,

In My report i am passing one date. Based on this date it should read all info types changed date. If the changed date is >= my parameter date and endda = '99991231' this parameter it should take all the reocrds in infyotype (0000,1,8,167,168,169,170).

in all these info types wht changes they did i have to show in my report.

Kindly give me ur inputs.

Sathvik

4 REPLIES 4
Read only

sourabhshah
Product and Topic Expert
Product and Topic Expert
0 Likes
484

hi,

If you do not get a answer in this forum post your question in the HR related forum section on SDN.You will certainly find and ans there

Regards,

Sourabh

Read only

Former Member
0 Likes
484

Hi,

To read all these infotypes, you must declare it at the beginning of your program, like you do with tables:

Ex:

Tables: Pernr, T...., PA...

Infotypes: 0000,1,8,167,168,169,170.

Then, when you will be in the GET event, you can read all of these infotypes. If you have a date parameter, use it to read the infotypes like this, for exemple:

loop at p0000 where "changed date" >= "your parameter date"

and endda = '99991231' .

....

endloop.

Of course, you must declare the use of a Logical Database (f.e.PNP) in your program attributes.

Hope this help you,

Carles

Read only

Former Member
0 Likes
484

Hi Surendra,

To capture all changes after this date(entered parameter date), the condition should check start date is greater than parameter date and end date is less than '99991231'.

Try as this follows.

SELECT * FROM PA0000

INTO TABLE IT_0000

WHERE <b>( BEGDA >= P_DATE AND ENDDA <= '99991231' ).</b>

Do the same for all other infotypes too.

Thanks,

Vinay

Read only

Former Member
0 Likes
484

Sathvik,

There are a number of ways to do this, but you need to be aware how the dates work.

- Using the start and end dates can be flawed as users could create a record [today] with a start date of 3 months in the past for example, therefore you could miss it

- Using the change date is probably the safest way as this is the actaul day the change was made, regardless of what start adn end date the suer users.

You then can perform straight selects as already suggested, but if your using some of the HR logical DBs, i.e. PNP and the GET pernr macro then you can use LOOPs or PROVIDE ie.

- LOOP AT P0000 WHERE aedtm BETWEEN PN-BEGDA AND PN-ENDDA

- PROVIDE * FROM P2001 BETWEEN PN-BEGDA AND PN-ENDDA - the provide is useful for time dependent infor types as it brings in overlapped records