Selection part of Logical Database

I read about logical database somewhere on the net but it was not so clear. Can anyone explain to me about the selection part of the logical database???

Logical databases are special ABAP programs that retrieve data and make it available to application programs. The most common use of logical databases is still to read data from database tables and linking them to executable ABAP programs while setting the program contents. You edit logical databases using the Logical Database Builder in the ABAP Workbench.
However, since Release 4.5A, it has also been possible to call logical databases independently of this tool using the function module LDB_PROCESS. This allows you to call several logical databases from any ABAP program, nested in any way. It is also possible to call a logical database more than once in a program, if it has been programmed to allow this. This is particularly useful for executable programs, allowing them to use more than one logical database and process a database more than once.
Logical databases contain Open SQL statements that read data from the database. You do not therefore need to use SQL in your own programs. The logical database reads the program, stores them in the program if necessary, and then passes them line by line to the application program or the function module LDB_PROCESS using an interface work area.
http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/db9b5e35c111d1829f0000e829fbfe/content.htm
A logical database is a special ABAP/4 program which combines the contents of certain database tables. You can link a logical database to an ABAP/4 report program as an attribute. The logical database then supplies the report program with a set of hierarchically structured table lines which can be taken from different database tables.
GO THROUGH LINKS -
http://www.sap-basis-abap.com/saptab.htm
http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9bfa35c111d1829f0000e829fbfe/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9b5e35c111d1829f0000e829fbfe/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/c6/8a15381b80436ce10000009b38f8cf/frameset.htm
/people/srivijaya.gutala/blog/2007/03/05/why-not-logical-databases
Re: **LDB**
www.sapbrain.com/FAQs/TECHNICAL/SAP_ABAP_Logical_Database_FAQ.html
www.sap-img.com/abap/abap-interview-question.htm
www.sap-img.com/abap/quick-note-on-design-of-secondary-database-indexes-and-logical-databases.htm
http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9b5e35c111d1829f0000e829fbfe/content.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/db9bb935c111d1829f0000e829fbfe/content.htm
Logical databases are SAP standard programs that are desinged with selections screens that helps easy retrival and access of data from various tables in and efficient manner.
You can get to know more about the logical databases from the SAP documentation or the following links.
A logical database is a special ABAP/4 program which combines the contents of certain database tables. You can link a logical database to an ABAP/4 report program as an attribute. The logical database then supplies the report program with a set of hierarchically structured table lines which can be taken from different database tables.
Advantages of Logical database -
1) No need of programming for retrieval , meaning for data selection
2) Easy to use standard user interface, have check completeness of user input.
Disadvantages
1) Fast in case of lesser no. of tables But if the table is in the lowest level of hierarchy, all upper level tables should be read so performance is slower.
GO THROUGH LINKS -
http://www.sap-basis-abap.com/saptab.htm
http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9bfa35c111d1829f0000e829fbfe/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9b5e35c111d1829f0000e829fbfe/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/c6/8a15381b80436ce10000009b38f8cf/frameset.htm
1. A logical database is in fact
a program only.
2. This LDB provides two main things :
a) a pre-defined selection screen
which handles all user inputs and validations
b) pre defined set of data
based upon the user selection.
3. So we dont have to worry about from
which tables to fetch data.
4. Moreover, this LDB Program,
handles all user-authorisations
and is efficient in all respects.
5. tcode is SLDB
good info about Logical Database. you can check the link.
http://www.geekinterview.com/question_details/1506
http://help.sap.com/saphelp_46c/helpdata/EN/35/2cd77bd7705394e10000009b387c12/frameset.htm
Re: How to Create and Use ldb in reports?
Re: Logical databases
http://help.sap.com/saphelp_46c/helpdata/en/9f/db9bed35c111d1829f0000e829fbfe/frameset.htm
Functions for displaying and changing logical databases:
Call Transaction SE36 or
Choose ABAP Workbench -> Development -> Programming environ. -> Logical databases
Interaction between database program and report:
During program processing, subroutines are performed in the database program and events are executed in the report.
To read data from a database tables we use logical database.
A logical database provides read-only access to a group of related tables to an ABAP/4 program.
advantages:-
The programmer need not worry about the primary key for each table.Because Logical database knows how the different tables relate to each other,and can issue the SELECT command with proper where clause to retrieve the data.
i)An easy-to-use standard user interface.
ii)check functions which check that user input is complete,correct,and plausible.
iii)meaningful data selection.
iv)central authorization checks for database accesses.
v)good read access performance while retaining the hierarchical data view determined by the application logic.
disadvantages:-
i)If you donot specify a logical database in the program attributes,the GET events never occur.
ii)There is no ENDGET command,so the code block associated with an event ends with the next event
statement (such as another GET or an END-OF-SELECTION).
1. transaction code SLDB.
2.enter name z<ldb-name>
3.create
4.short text
5.create
6. name of root node (here Ekko)
7. enter short text (f6)
8.node type -> data base table.
9.create
10 change logical DB
riht click on ekko and insert node
here node name ekpo
11.create
12. click on selections
13. press no Should the changed structure of Z<ldb name> be saved first.
14.select tables which you want to join.
15.transfer
16 now you have to o to coding part.
17. save
activate.
19.click to src code
double click on first include and activate
Regards
Vasu

Similar Messages

  • How to define our own selection screen for logical database  in abap-hr?

    Hi Friends,
    Can u please help me
    How to define your own selection screens for  logical database.
    we use to do like(goto->attributes-HRReportcatagerious ).but How to desin using  customer table like t599c, t599f and how to add to my logical database?
    Thanks in advance
    charan

    check out this online help
    http://help.sap.com/saphelp_erp2004/helpdata/en/9f/dba65c35c111d1829f0000e829fbfe/frameset.htm
    Regards
    Raja

  • How to hide some select-option of Logical Database in report?

    How to hide select-option of  Logical Database in report?eg . In Logical Database 'PNP' , my code is 'GET  PERNR' , excute the report , select-screen is displayed . I want to hide some select-options , such as PNPPERNR-LOW .
    Edited by: rongrong wang  on Mar 26, 2008 9:31 AM

    U need to write code in initialization as
    initialization.
    loop at screen.
    if screen-name = 'PNPPERNR-LOW'.
    screen-active = '0'.
    modify screen.
    endif.
    if screen-name = 'PNPPERNR-HIGH'.
    screen-active = '0'.
    modify screen.
    endif.
    endloop.

  • How to pass a default value in selection screen of logical database pnpce

    Dear All,
    Can any one tell me how to pass a default value in selection screen of logical database pnpce .
    Regards
    Rakesh Singh

    Hi Rakesh,
    Go to SE36 (logical database Builder).First enter PNPCE in Logical Database and press documentation,here you will get the details of exactly what is PNPCE and how it works.After that select selections in subojects in se36 only and enter display ,there you have the include from where you acn get the idea.
    Regards,
    Rahul

  • How to get the selection parameters from logical database into one of the t

    Hi Sap ABAP Champians,
    How to get the selection parameters from logical database into one of the tab in the tabstrip selection-screen.
    Please help me for this
    Thanks
    Basu

    Hi
    Thanks, that will work, but then I'll have to insert code into all my reports.
    I can see that "Application Server Control Console" is able to rerun a report.
    This must mean that the Report Server has access to the runtime parameters.
    But how?
    Cheers
    Nils Peter

  • How to suppress the Selection Screen of Logical Database

    Hi,
    I am using one Logical Database for my report.
    I want to show my customized selection Screen.
    How can I hide the Selection Screen of Logical Database?

    Hi,
    Check the attributes of the report program where you assign the LDB. You can see the parameter Selection Screen press the F4 and check the LBD is provided any Blank screen or not.
    For some LDB's you can find the Report Category in the attribute section of the report. either you can create the new screen or standard screen might be provided with Blank.
    Check there ..
    If you don't find you can use LOOP AT SCREEN..ENDLOOP to hide the fields of LDB.
    Which LDB you are using.

  • How to display selection screen of logical database on a screen

    Hi Experts,
    I create a screen 100, how do I display a selection screen of logical database on this screen.
    Thanks!
    Anthony

    hi
    if u are making HR report then goto attribute -> Logical database -> write PNPCE to create in build selection scree.
    regards,
    Abhilash

  • Modify selection screen for Logical Database 'SDF'

    Hi
    I need to make a section of the standard selection screen for logical database 'SDF' invisible. I have tried the differet selection screen options of the report attributes, but none of the provided ones give me what I want.
    How can I find the name of the screen group for the "Line Item Selection" block of the selection screen so that I can make it invisible when the selection screen is displayed?
    Thanks,
    Thomas

    I tried to do this:
    Loop at screen.
             if   screen-group4 = '026'
               or screen-group4 = '027'
               or screen-group4 = '028'.
                 screen-invisible = 1.
                 modify screen.
             endif.
    endloop.
    This removed the selection text for these fields, but the Line Item Selection block is still visible, and the actual input fields are also visible. They now look like password input fields with all ***** in them.
    What am I doing wrong?
    Thanks for your help!
    Thomas

  • Selection screen of logical database

    hello all,
    i need to find a way to gray out and put a default value in the selection screen generated by the logical database PNP using the HR Report Category X10002.  how would i be able to do this?
    thanks in advance!

    Hi,
    try that
    NODES pernr.
    INITIALIZATION.
    *<b>gray out</b>
      LOOP AT SCREEN.
        IF screen-name = 'PNPBUKRS-LOW'
        OR screen-name = 'PNPBUKRS-HIGH'.
          screen-input = 0.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
    *default
      pnppernr-low = 4711.
      PNPPERNR-sign = 'I'.
      PNPPERNR-option = 'EQ'.
      append PNPPERNR.
    Andreas

  • Selection screen for logical database PNP..

    hi all,
    I am having a requirement to produce a HR Report where i need to use logical database PNP. Now the issue is i need to supress some of the elements of standard selection screen of PNP and add a couple of fields of mine.
    i have been looking all around and i got few of the below methods.
    its good to use a report category.
    somewhere it says include it in ur program using selection screen block..
    can you please guide me which is the best way and what would be a perfect solution?
    thanks in advance,
    Reena

    Hi reeena,
    1. simple
    2. u want to
      a) add ur own fields
      b) suppress some fields
    3. a) is simple, just add your parameters,
       in your program, and they will appear
       b) use SCREEN logic
    4. just copy paste to get a taste of it
      (it will HIDE the PAYROLL AREA field)
      and add MATNR field
    5.
    report abc.
    TABLES : PERNR.
    PARAMETERS : MATNR LIKE MARA-MATNR.
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        IF SCREEN-NAME CS 'ABKRS'.
          SCREEN-INVISIBLE = '1'.
          SCREEN-INPUT = '0'.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
    regards,
    amit m.

  • Selection screen of logical database PCH

    Hi all,
    I am writing a report using the logical database PCH. For this report I need the full selection screen of the logical database, especially the structure parameters. However, wenn I test my program, I only get a reduced selection screen without the structure parameters and the "further conditions". According to the documentation I found, this behaviour appears when you set the selection screen version to '900' in the program attributes. In my program, the selection screen version is empty, and I still get the reduced screen. The missing selection fields are even totally unknown to the ABAP compiler. E.g. when I try to assign the field PCHWEGID in my report, I get a "field unknown" error message from the compiler.
    I have compared my report in various aspects to the standard report RHSTRU00 which shows the behaviour I want, I did not find any difference, and yet I get a different behaviour.
    Any ideas how to fix this?
    Thank you
    Alexandre

    Hi,
    Did you declare the below statement?
    TABLES: OBJEC, GDSTR.
    Regards,
    -Sandeep

  • Selection screen and logical database PNP

    hi all,
    I am having a requirement to produce a HR Report where i need to use logical database PNP. Now the issue is i need to supress some of the elements of standard selection screen of PNP and add a couple of fields of mine.
    i have been looking all around and i got few of the below methods.
    its good to use a report category.
    somewhere it says include it in ur program using selection screen block..
    can you please guide me which is the best way and what would be a perfect solution?
    thanks in advance,
    Reena

    In the Program Attributes, click on the pushbutton 'HR Report Category'.Click on the 'Create' icon in the pop-up  window that comes up. You will get a list of all the available Report Categories. Go through the list & if you don't find one that suits you, select one that is closest & click on the 'Copy As' icon in the menu bar..
    Now, you can remove the unwanted fields & add yours for selection. save it & and attach it to report in the attributes.
    ~Suresh

  • Select statement in Logical Database

    hi,
       i need to select particular fields(not select * )
      from bsis table in my Logical database. how can i write code for this?
    for eg,
       In Ordinary report , we can write (select belnnr into
      itab_bsis-belnr)  like this.
       but in Logical Database how can i write the code ?
       Neptune.M

    Hi,
    I am new to ABAP.Currently I'm practicing logical database. I am facing a similar problem like what Neptune is having.
    I have created a logical database 'Z03_SAMPLEDB5' using tables KNA1, KNB1,KNB4,KNB5 and KNKK.
    I have defined the Database program and selections.Now I would like to use this logical database in one of my programs.
    Please find the code of the program in which I'm using this logical datbase  :
    REPORT  Z03_SAMPLELDB5.
    tables : kna1.
    data: begin of t occurs 0,
    kunnr like kna1-kunnr,
    land1 like kna1-land1,
    bukrs like knb1-bukrs,
    end of t.
    start-of-selection.
    get kna1.
    clear t.
    move-corresponding kna1 to t.
    append t.
    end-of-selection.
    write: /20 'Customer No.', 40 'Country code', 55 'Company Code'.
    ULINE.
    loop at t.
    write: /20 t-kunnr, 40 t-land1, 55 t-bukrs.
    endloop.
    In the output screen I could get data for only 'Customer No' and  'Country code' .'Company Code' is blank.
    Please let me know what I need to do to get data for 'Company Code'  as well.
    Thanks,
    Prasuna

  • Customize selection screen of logical database AFI of report RIAUFK20 ?

    Hi Experts,
    I have to customize the report RIAUFK20 which use logical database AFI.
    I have to do the following:
    - Change the field labels of some fields in the selection screen.
    - Add more field into selection screen which does not appear in the nodes of logical database structure, for example TIDNR in table EQUZ.
    So what is the best way to achieve that result?
    I intended to copy the AFI into ZAFI and change, but still struggle with add fields which does not appear in the structure of logical database.
    Any help is appreciated, thanks!

    Specify your logical database on Program "attributes".
    It will display the standard selection screen of LDB. Now in your report, create selection screen as in other programs for the additional fields.
    It will first display the field of LDB, followed by fields provided by your selection screen.

  • Customizing user selection fields of Logical database PNP

    Dear Gurus,
    I had made a z-copy of payslip program for incorporation of Logo. Now we need to put this report in Enterprise Portal (EP). Now since we would not want any user to view any other person's payslip, I need to disable the selection field (PERNR) for user selection.
    Problem is this field for user selection is coming from standard Logical Database (LDB - PNP) used in the program. So how can I make this field hardcoded as sy-uname and non-modifiable without making z-copy of LDB-PNP.
    Also I wish to harcode Payroll Area writing some code (from table PA000) but again I cannot write this in std. PNP LDB and writing it in driver program will not help.
    Thanks in advance.
    Regards,
    Amit

    Write the highlighted coding in initialization ...
    initialization .
    select single pernr from pa0105
           into pernr-pernr
           where usrid = sy-uname.
    if sy-subrc = 0.
      PNPPERNR-sign = 'I'.
      PNPPERNR-option = 'EQ'.
      PNPPERNR-LOW = pernr-pernr.
      Append PNPPERNR.
    endif.
    loop at screen.
    if screen-name = 'PNPPERNR-LOW' or
    screen-name = 'PNPPERNR-HIGH'.
    screen-input = '0'.
    endif.
    modify screen.
    endloop.
    at selection-screen output.
    loop at screen.
    if screen-name = 'PNPPERNR-LOW' or
    screen-name = 'PNPPERNR-HIGH'.
    screen-input = '0'.
    endif.
    modify screen.
    endloop.

Maybe you are looking for