04-03-2006 2:04 PM
Hi All,
How far are LDB's relevant to HR-ABAP Programming, are <u><i><b>select</b></i></u> statements absoultely obselete in HR-ABAP Programming. Here in our project we are only using select statements to retrieve date from infotypes. Is it a wrong programming practice? Is it absoultely necessay that we should only use LDB'S in HR-ABAP programming.
Basically got this doubt because whatever the SAP Documentation related to HR-ABAP Programming i found uses only LDB'S to retrive data. Please clarify my doubt.
04-03-2006 2:08 PM
04-03-2006 2:08 PM
04-03-2006 2:12 PM
Hi Vijay,
There is no problem in using Selects but if you use LDB's then you can use GET PERNR ,and with PROVIDE you can get the data, it will reduce the coding .
Regards
vijay
04-03-2006 2:19 PM
Hi ,
It all depends on the client , what he wants (LDBs or
select statements)
Using LDBs will make the coding simpler and shorter ,
also need not code for the selection screen(exception)
need not do explicit Authorization checks .
Else U can also use select statements.
Regards,
GSR.
04-03-2006 2:38 PM
Hi Vijay,
It is always a compromise on performance when you opt for an LDB. But you do have the luxury of in-built authorization checks whe you use LDBs. So, you must remember to put in explicit authority checks when you retrieve data with direct SELECTs on the db tables.
Regards,
Suresh Datti
04-03-2006 2:19 PM
Hi vijay,
1. are select statements absoultely obselete in HR-ABAP Programming
Absolutely No.
(I have never read such thing)
(Further, all sap programs,
whether ldb or normal programs,
internally do use Select statements,
to fetch data)
2. Is it a wrong programming practice?
Absolutely No.
(If we know the hr tables
and if we know the correct select statement,
then there is no harm in using them)
3.
Is it absoultely necessay that we should only use LDB'S in HR-ABAP programming.
Its optional to use (not necessary)
I personally never use ldbs,
bcos
a) their selection screen is insufficient
b) their selection screen has extra fields
which are not required, and some times
not relevant for the requirement)
c) before using GET, i need to know
many things for showing to the user,
so for this, i explicitly have to write
my own code (ie.select statment)
regards,
amit m.