10-21-2008 7:17 AM
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
10-21-2008 7:24 AM
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-21-2008 7:24 AM
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-21-2008 7:45 AM
Choose logical database and their tools/macros. Thus, you dont need to fiddle around with authority checks.This is handled in the LDB.
10-21-2008 7:48 AM
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
10-21-2008 8:06 AM
Hi,
Thanks for your replies.....
Performance wise which is the best option among these....
10-21-2008 8:37 AM
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.
10-21-2008 8:57 AM
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.
10-21-2008 8:21 AM
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
10-21-2008 10:27 AM
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....
10-21-2008 8:26 AM
> 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
10-21-2008 10:32 AM