Application Development 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: 

Re : Reports in ABAP-HR

Former Member
0 Kudos

Hi All,

What is the best way of creating reports in ABAP-HR while retreiving data from infotypes.

I mean to ask u among the four ways that i know

1. Using Macros

2. Using Provide.. Endprovide statement

3. Using Select statements

4. Using Function Modules like HR_read_infotype, etc....

which is the better option...

Pls... explain me with an example scenario...

Thanks

Phani

1 ACCEPTED SOLUTION

KK07
Contributor
0 Kudos

hi Phani,

it is always better to use macro's or provide statements than select statements to retrieve the data from infotypes when u r using LDB's.

u can use macro's or provide depending on your requirement,for ex. if u want a specific record(first or last) then u can use macro otherwise if u want to retrieve all the records in a specific time period then u can use provide statements.(it is like loop and endloop).u can also use the function module to retrieve the data as they provide implicit authorization check.

thanks.

10 REPLIES 10

KK07
Contributor
0 Kudos

hi Phani,

it is always better to use macro's or provide statements than select statements to retrieve the data from infotypes when u r using LDB's.

u can use macro's or provide depending on your requirement,for ex. if u want a specific record(first or last) then u can use macro otherwise if u want to retrieve all the records in a specific time period then u can use provide statements.(it is like loop and endloop).u can also use the function module to retrieve the data as they provide implicit authorization check.

thanks.

rainer_hbenthal
Active Contributor
0 Kudos

Choose logical database and their tools/macros. Thus, you dont need to fiddle around with authority checks.This is handled in the LDB.

Former Member
0 Kudos

Hi Phani,

Using of Function Modules and LDB's are the best way of doing HR-ABAP reports.

There are lot of function modules avaliable.

Regards

Kmar M

Former Member
0 Kudos

Hi,

Thanks for your replies.....

Performance wise which is the best option among these....

0 Kudos

Performance is not that big issue in HR. Most of the time the reports are doing authority checks, which you cant avoid. Either you let the logicaldatabse do that for you or you have to check the authorities yourself (good luck doing that).

If ever possible use LDB PNP or PNPCE.

0 Kudos

Hi,

performance way it is better to use the function modules(read the data),but in that case u have to define ur own selection-screen.

Former Member
0 Kudos

Hi,

Try to follow these steps..

First U should create the base structure PSXXXX. You just include the additional fields you want in this structure. The common header data will be created for the tables.

e.g. PS9919 should just contain the field 'NUMBR' of some data element (e.g. CHAR15 or a new one you create) or just use the built-in definition.

Use transaction PM01, enter infotype number XXXX, maintain infotype settings (time constraint, subtype strategy,etc...). I think you have some documentation for these settings.

To have the infotype listed on PA30 screen you should deal with some customization.

Thanks,

Rajesh Kumar

0 Kudos

Hi Rajesh Kumar,

Pls, read the post properly before you answer...

My post is on data retrieval from Infotypes, and you have provided here the steps to create a customized infotype....

Anyway,Thanks for your reply....

Former Member
0 Kudos

> If you are using LDB PNP, then use macros or infotypes statement to retrive data.

>If you are not using LDB PNP, then you can use FM HR_READ_INFOTYPE

>It is not recommended to use FM in prog where you have used LDB

>Select statements usage is not recommended in ABAP HR

>Provide/Endprovide are not used to fetch data from DB, but to process fetched data

Edited by: Amit Gupta on Oct 21, 2008 9:26 AM

Former Member
0 Kudos

Hi Friends,

thanks all of you for your replies....