What are structures of logical database.

hi
what are structures of logical database.

Dear Chaitanya,
The structure of LDB can be divided into three sections:
>Structure
>Selection
>Database Program
STRUCTURE:
The structure defines the data view of the logical database. It adopts the hierarchy of the database tables defined by their foreign key relationships. This also controls the sequence in which the tables are accessed. It determines the structure of the other components and the behavior of the logical database at runtime.
The structure of a logical database is usually based on the foreign key relationships between hierarchical tables in the SAP System. Logical databases have a tree-like structure, which can be defined as follows:
· There is a single node at the highest level. This is known as the root node.
· Each node can have one or several branches.
· Each node is derived from one other node.
The nodes must be structures defined in the ABAP Dictionary or data types from a type group. Normally, these are the structures of database tables which the logical database reads and passes to the user for further evaluation. However, it is also possible, and sometimes useful, to use ABAP Dictionary structures without an underlying database. For technical reasons, the maximum number of nodes allowed in the structure of a logical database is 300.
Any executable ABAP program that has a logical database linked to it can contain a GET statement for each node of the structure. When you run the program, the corresponding event blocks are processed in the sequence prescribed by the hierarchical structure of the logical database. If a program does not contain a GET statement for every node of a logical database, the processing passes through all the nodes that lie in the path from the root to the nodes specified by GET statements.
If you call a logical database using the function module LDB_PROCESS, the depth to which the system reads is controlled by an interface parameter.
SELECTIONS:
The selections define a selection screen, which forms the user interface of the executable programs that use the logical database. Its layout is usually determined by the structure. You can adapt the selections to your own requirements and also add new ones. When you link a logical database to an executable program, the selections of the logical database become part of the standard selection screen of the program (screen number 1000). If you call a logical database using the function module LDB_PROCESS, the selections are filled using interface parameters.
The selections in a logical database are defined using the normal statements for defining selection screens, that is, PARAMETERS, SELECT-OPTIONS and SELECTION-SCREEN. In a logical database, you can also use the additions VALUE-REQUEST and HELP-REQUEST to define specific input and value help. You define the selection screen in a special include program known as the selection include.
When you write programs using a logical database, you can also add your own program specific selections. The standard selection screen then contains the database-specific selections, followed by the program-specific selections that you have defined.
When the system generates the selection screen for an executable program, database-specific selection criteria and parameters are only displayed if you have declared an interface work area for them in your program using the NODES or TABLES statement.
Suppose you have a selection include containing the following lines:
SELECT-OPTIONS slifnr FOR lfa1-lifnr.
PARAMETERS pbukrs LIKE lfb1-bukrs FOR TABLE lfb1.
The selection criterion SLIFNR is linked to table LFA1, the parameter PBUKRS to table LFB1. If the TABLES statement in an executable program (report) declares LFA1 but not LFB1, SLIFNR is displayed on the selection screen, but PBUKRS does not appear.
The selection screen of a logical database can contain dynamic selections as well as static ones. Dynamic selections are extra, user-defined selections that the user can make as well as using the static selections defined in the selection include. To improve performance, you should always use this option instead of reading more data than you need and then sorting it out in the application program.
To make dynamic selections available for the node nodeof a logical database, the selection include must contain the following statement:
SELECTION-SCREEN DYNAMIC SELECTIONS FOR NODE|TABLE node.
If the node node is requested by the user of the logical databases, the dynamic selections are included in the selection screen. A user can then choose Dynamic selections to enter extra selections for the corresponding fields. If you call the logical database using the function module LDB_PROCESS, you can pass a corresponding parameter. You can use these selections in dynamic statements in the logical database program to read data. The values of the program-specific selection criteria that you defined for a node for which dynamic selections were available are also passed to the logical database. The user can also define the fields for dynamic selections as a selection view for the logical database.
The selection screen of a logical database is part of the standard selection screen (number 1000) of the executable program to which the logical database is attached. It has a standardized layout - the selection criteria and parameters appear on separate lines in the order in which they were declared. You can change the layout using the SELECTION-SCREENstatement.
The runtime environment generates the selection screen with number 1000 for every program in which the attributes do not contain a different selection screen version. You can prevent certain input fields from the selection screen of a logical database from appearing on the selection screen by defining selection screen versions with a screen number lower than 1000 in the selection include, and entering this version number in the program attributes. By pressing F4 there, you can get an overview of the selection screen versions defined in the logical database concerned. To define a selection screen version, use the statements SELECTION-SCREEN BEGIN|END OF VERSION. Within these statements you can use SELECTION-SCREEN EXCLUDEto specify fields that you do not want to appear on the selection screen.
If the attributes of an executable program contain the number of a selection screen version, the version is used in the standard selection screen. Although the input fields that you excluded from the selection screen are not displayed, the corresponding selections still exist, and you can still edit them in the program or by calling the function module LDB_PROCESS.
DATABASE PROGRAM:
The database program contains the ABAP statements used to read the data and pass it to the user of the logical database. There is a container for special subroutines into which, amongst other things, the data from the database tables is read. These subroutines are called by the reporting processor in the runtime environment in a sequence that has been predefined by the structure. The database program is determined by the structure and selections and can be adapted or expanded to meet your requirements.
The name of the database program of a logical database ldbconforms to the naming convention SAPDBldb. It serves as a container for subroutines, which the ABAP runtime environment calls when a logical database is processed. The sequence of the calls and their interaction with the events in executable programs or the function module LDB_PROCESS depends on the structure of the logical database.
A logical database program usually contains the following subroutines:
· FORM LDB_PROCESS_INIT
Called once only before the logical database is processed. It prepares it to be called more than once by the function module LDB_PROCESS.
· FORM INIT
Called once only before the selection screen is processed.
· FORM PBO
Called before the selection screen is displayed, each time it is displayed. Consequently, it is only called when you use the logical database with an executable program, not with the function module LDB_PROCESS.
· FORM PAI
Called when the user interacts with the selection screen. Consequently, it is only called when you use the logical database with an executable program, not with the function module LDB_PROCESS. The interface parameters FNAME and MARK are passed to the subroutine.
FNAME contains the name of a selection criterion or parameter on the selection screen.
MARK describes the selection made by the user: MARK = space means that the user has entered a simple single value or range selection. MARK = '*' means that the user has also made entries on the Multiple Selection screen.
· FORM LDB_PROCESS_CHECK_SELECTIONS
Called instead of the subroutine PAI if the logical database is called using the function module LDB_PROCESS without a selection screen. This subroutine can check the selections passed in the function module interface.
· FORM PUT_node
Called in the sequence defined in the structure. Reads the data from the node nodeand uses the
PUT node.
statement to trigger a corresponding GETevent in the ABAP runtime environment. The PUT statement is the central statement in this subroutine: It can only be used within a subroutine of a logical database. The logical database must contain the node node, and the subroutine name must begin with PUT_node. The PUT statement directs the program flow according to the structure of the logical database. The depth to which the logical database is read is determined by the GET statements in the application program or the interface parameter CALLBACK of the function module LDB_PROCESS.
First, the subroutine PUT_root is executed for the root node. The PUT statement then directs the program flow as follows:
i. If the database program contains the subroutine AUTHORITY_CHECK_node, the first thing the PUT_node statement does is to call it.
ii. Next, the PUT statement triggers a GET event in the runtime environment. If there is a corresponding GET nodestatement in the executable program to which the logical database is linked, the associated event block is processed. If the CALLBACK parameter of the function module LDB_PROCESS is filled accordingly, the corresponding callback routine is called.
iii. The PUT statement directs the program flow
(a) To the next subroutine of a node that follows directly, if a lower-level node (not necessarily the very next) in the same subtree is requested by GET in the executable program or in the function module.
(b) To the subroutine of a node at the same level, if the preceding node branches to such a node and if a GET statement exists for such a node in the executable program or the function module.
The PUT statement in that subroutine starts again at step (i). In the subroutine of the lowest node in a subtree to be processed using GET, the program control does not branch further. Instead, the current subroutine is processed further. When a subroutine PUT_node has been executed in its entirety, the program flow returns to the PUTstatement from which it branched to the subroutine PUT_node.
iv. When control has returned from a lower-level subroutine PUT_node, the PUTstatement triggers the event GET node LATEin the runtime environment.
· FORM AUTHORITY_CHECK_node
Called automatically by the PUT node statement. In this subroutine, you can specify authorization checks for the appropriate node node from the structure of the logical database.
· FORM PUT_ldb_SP
Called when the user makes a selection using a search help to process the key chosen in the search help. ldb is the name of the logical database. From this subroutine, you can use the entries in the search help tables to read the relevant entries from the root node root. The processing in the program can then be triggered using PUT root. The subroutine PUT_root is then not called automatically.
· FORM BEFORE_EVENT
Called before an event, the name of which is passed in the parameter EVENT. Currently, the EVENT field can only contain the value START-OF-SELECTION, to call a subroutine before this event.
· FORM AFTER_EVENT
Called after an event, the name of which is passed in the parameter EVENT. Currently, the EVENT field can only contain the value END-OF-SELECTION, to call a subroutine after this event.
· FORM par_VAL, selop_VAL, selop-LOW_VAL, selop-HIGH_VAL
Called when the user calls possible values help for the parameter par or the selection criterion selop. These must belong to the selections in the logical database.
· FORM par_HLP, selop_HLP, selop-LOW_HLP, selop-HIGH_HLP
Called when the user calls possible values help for the parameter par or the selection criterion selop. These must belong to the selections in the logical database.
Example
Suppose that in the logical database structure, LFB1 is a branch of LFA1.
and that the following selection criteria are defined in the selection include:
SELECT-OPTIONS: slifnr FOR lfa1-lifnr,
sbukrs FOR lfb1-bukrs.
A section of the database program would then read:
FORM put_lfa1.
SELECT * FROM lfa1
WHERE lifnr IN slifnr.
PUT lfa1.
ENDSELECT.
ENDFORM.
FORM put_lfb1.
SELECT * FROM lfb1
WHERE lifnr = lfa1-lifnr.
AND bukrs IN sbukrs.
PUT lfb1.
ENDSELECT.
ENDFORM.
An executable program (report) linked to the logical database could contain the lines:
GET lfa1.
WRITE lfa1-lifnr.
GET lfb1.
WRITE lfb1-bukrs.
In this example, the runtime environment calls the routine put_lfa1 after the event START-OF-SELECTION. The event GET lfa1 is triggered by the statement PUT lfa1.
Once the corresponding event block in the program is complete, PUT lfa1 branches to the subroutine put_lfb1.
From this subroutine, the event GET lfb1 is triggered in the application program. If LFB1 is the last node to be read, processing resumes with the SELECTloop in put_lfb1. Otherwise, the program flow moves to the subroutine put_node of the next node. At the end of the SELECT loop of the last node, processing resumes in the SELECTloop of the node at the next level up. The example of programming using nested SELECT loops is only used to make the program flow clearer. In a real logical database, you would avoid doing this in order to minimize the number of database accesses.
Regards,
Rajesh K Soman
Please reward points if helpful.

Similar Messages

  • STRUCTURES of LOGICAL DATABASE?

    STRUCTURES of LOGICAL DATABASE?
    please explain

    hi,
    Logical Databases
    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 by linking them to executable ABAP programs.
    However, from Release 4.5A, it has also been possible to call logical databases 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 programs with type 1.
    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.
    Logical Databases - Views of Data
    A logical database provides a particular view of database tables in the R/3 System. It is always worth using logical databases if the structure of the data that you want to read corresponds to a view available through a logical database.
    The data structure in a logical database is hierarchical. Many tables in the R/3 System are linked to each other using foreign key relationships. Some of these dependencies form tree-like hierarchical structures. Logical databases read data from database tables that are part of these structures.

  • What are the major logic steps of WL Portal Server process a portal request

    Hi,
    I comes from IBM and we provided a product to monitor most types of J2EE App Server about transactions and performance.
    we will monitor WebLogic Portal Server in next release.
    So would you please tell me:
    How Weblogic Portal handles a page request from browser, what are the major logic steps that a page requests are fulfilled, which areas in Weblogic Portal are most likely to cause response time problem. For example, We monitor WebSphere Portal Server as the following major steps:
    Portal Page loading, Model building, Page rendering, portlet action, etc....
    we look forward to get your developer helps since we cann't find related documents over your website.
    Thank you very much
    Edited by wutingbin at 12/28/2006 12:35 AM

    WebLogic Portal, if Desktop enabled, it will render from Desktop->Portal->Books->Pages-->Portlets. You can get these information from WebLogic E-Docs.

  • What are your future component database plans?

    I have been a longtime user of Multisim, Ultiboard, (and Ultiroute) power pro edition.  This includes the PartMiner days before NI bought EWB.  While component manufacturers commonly have component databases for use in the suites of your competitors, there never seem to be any available for your products.  Now, access to these databases would save a lot of time.  I don't use simulation a lot because you don't provide behavioral simulators, and my designs mostly include processors or controllers.  Even Analog Devices' database, which advertises a Multisim and Ultiroute subset, won't load on my platform.  Can you explain why you don't either digest the ORCAD datasets or pursuade Analog Devices, Microchip, TI, et al to provide multisim versions of their data?
    I have long been a supporter, and am just seeking to make my life simpler.

    Hi Thomas.
    When you say "MDM as Catalogue", which means utilizing the features available in SAP-MDM(Like Portal iViews) and use it as functionality provided for catalog solutions instead of going for SRM-MDM Catalog - correct me if my understanding is wrong.
    If this is the case, then you can simply fetch the records available in the repository and showcase it using portal iviews and
    use it for procurement solutions(for SRM-Shopping cart etc) using check out functionality.
    But SRM-MDM Catalog is designed specifically for certain functionalities like showing different prices like Contract, Purchase Info records, List price etc which is not possible in portal iviews, Service Catalog for showing hierarchies, showing various types of item types(BOM, SK1, SK2, Components etc). Similarly there are some more features which is available in SRM-MDM Catalog which lacks when we use "MDM as Catalogue"
    But still SAP can come up with more features if they have plans to bring up a common catalog solution for various solutions.
    Hope this helps.
    Regards
    Bala

  • Logical Database PGQ structure usage

    Hello Everyone,
    I have a question regarding Logical Database(LDB) usage...How to use the structure defined in LDB. We are using PGQ Logical database in one of custom programs. The structure of the LDB as hierarchy or tree is:
      QALS
          QAVE
          QMFEL
          QAPO
               AFFHD
               QAMV
                    QAMR
                         QASE  ---> From this table
                    QASV
                         QASR  ---> From this table
    and etc
    The code was something like this in the program:
    GET QALS.
    GET QAPO.
    GET QAMV.
    GET QAMR.
    Now, my requirement is to get data additionally from QASE and QASR tables..So, I tried modifying the code according to the hierarchy structure defined in the PGQ LDB(check bold statements):
    GET QALS.
    GET QAPO.
    GET QAMV.
    GET QAMR.
    <b>GET QASE.
    GET QASV.
    GET QASR.</b>
    But in runtime I see that QAMR and QASE is filled up with # data ...I am not sure if is right way to do....Is this the way to use the structure defined in the Logical database? QAMV and QASV lie in the same level of hierarchy and I have to use them to get QASE and QASR data...Let me know, if I am not clear...
    Thanks for taking your time and I appreciate if some one can help me.
    --- Ashley

    Hi Ankur
    You can use program SAPDBPGQ that is program created to test logical database PGQ. Then you can get only part responsible for nodes QALS, QAPO and QAMV
    Best regards

  • Logical Database - PNPCE - Hide 'Org Structure' 'Search Help' etc buttons

    Hi,
    We have created a report by making a z copy of RCATS_APPROVE_ACTIVITIES. In the Z version we need to hide the buttons on the titlebar of the selection screen.
    Buttons are
    - Org Structure
    - Search Help
    - Dynamic Selection
    - Selection Fields.
    Can you please suggest if I can do something from the code ?
    Regards,
    Chiranjeevi.

    Hi,
    Thanks for your suggestion. However, there is no title bar method that we can modify to remove the buttons. I have created a Z report Category by copying the existing one and made the modifications.
    In that we can hide/display UI elements which are displayed by Logical Database.
    Regards,
    Chiranjeevi.

  • What are the tables name in database belongs to AGIS?

    Dear all:
    I want to know what are the tables in database belongs to AGIS , such as transactions,AGIS "Intercompany Organization Assignments"?
    My environment is : Oracle R12.1.3
    Regards
    Terry

    Terry,
    Please see these docs/links.
    Advanced Global Intercompany Systems FAQ [ID 975235.1]
    Troubleshooting AGIS Accounting [ID 813397.1]
    How to Determine Data Populated in the Reference Columns in GL,AR,AP Interface tables for AGIS Invoices [ID 853296.1]
    Oracle E-Business Suite Release 12.1 Release Content Documents [ID 561580.1]
    eTRM Version 12.1.1
    http://etrm.oracle.com/pls/et1211d9/etrm_search.search
    Thanks,
    Hussein

  • ABAP Logical Database ADA

    Hi All, I am quite familiar with Logical Databases but I need to understand the following.
    1) I am using LDB ADA, but I want to use my own Selection Screen and not the default one that the LDB provides. I know I must put something in AT SELECTION-SCREEN but am unsure what.
    2) Once I get the data, I want to store the data in an internal table - how do I go about doing this? If you can provide a code example that would be great.
    Points for any relevant help.

    Hi,
    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.
    Logical database structures
    There are three defining entities in an SAP logical database. You must be clear on all three in order to create and use one.
    Table structure: Your logical database includes data from specified tables in SAP. There is a hierarchy among these tables defined by their foreign keys (all known to SAP), and you are going to define a customized relationship between select tables. This structure is unique and must be defined and saved.
    Data selection: You may not want or need every item in the referenced tables that contributes to your customized database. There is a selection screen that permits you to pick and choose.
    Database access programming: Once you’ve defined your logical database, SAP will generate the access subroutines needed to pull the data in the way you want it pulled.
    Creating your own logical database
    Here’s a step-by-step guide:
    1) Call up transaction SLDB (or transaction SE36). The path you want is Tools | ABAP Workbench | Development | Programming Environment | Logical Databases. This screen is called Logical Database Builder.
    2) Enter an appropriate name in the logical database name field. You have three options on this screen: Create, Display, and Change. Choose Create.
    3) You’ll be prompted for a short text description of your new logical database. Enter one. You’ll then be prompted to specify a development class.
    4) Specify a root node, or a parent table, as the basis of your logical database structure. You can now place subsequent tables under the root table as needed to assemble the data object you want. You can access this tree from this point forward, to add additional tables, by selecting that root node and following the path Edit | Node | Create. Once you’ve saved the structure you define in this step, the system will generate the programming necessary to access your logical database. The best part is you don’t have to write a single line of code.
    Noted point is we cant add any selection criteria thru our se38 program if you are attaching any LDB to program.Ist of no use.
    If you want to change selection criteria to the existing LDB, you have to goto SE36 tcode and provide LDB name and choose "Change" mode by selecting "Selections" Radio button.
    declaration of params is different compared to normal se38 program in some aspects.
    PARAMETERS :p_curr LIKE bkpf-waers FOR TABLE bkpf OBLIGATORY.
    this BKPF table should be one of the node in the "Structure" Radio button.
    Thanks
    Sivaparvathi
    Please reward points if helpful.

  • Steps to create LOGICAL DATABASE in sap

    hi guys,
    i have gone through many documents about LDB. But, i didnt get the steps to create a LDB.
    plz provide me with the steps to be followed to create a LDB.
    thnx,
    shivaa.

    Hi Shiva,
    This might help you!
    Logical database structures
    There are three defining entities in an SAP logical database. You must be clear on all three in order to create and use one.
    Table structure: Your logical database includes data from specified tables in SAP. There is a hierarchy among these tables defined by their foreign keys (all known to SAP), and you are going to define a customized relationship between select tables. This structure is unique and must be defined and saved.
    Data selection: You may not want or need every item in the referenced tables that contributes to your customized database. There is a selection screen that permits you to pick and choose.
    Database access programming: Once youu2019ve defined your logical database, SAP will generate the access subroutines needed to pull the data in the way you want it pulled.
    Creating your own logical database
    ABAP/4 (Advanced Business Application Programming language, version 4) is the language created by SAP for implementation and customization of its R/3 system. ABAP/4 comes loaded with many predefined logical databases that can construct and table just about any conventional business objects you might need in any canned SAP application. However, you can also create your own logical databases to construct any custom objects you care to define, as your application requires in ABAP/4. Hereu2019s a step-by-step guide:
    1. Call up transaction SLDB (or transaction SE36). The path you want is Tools | ABAP Workbench | Development | Programming Environment | Logical Databases. This screen is called Logical Database Builder.
    2. Enter an appropriate name in the logical database name field. You have three options on this screen: Create, Display, and Change. Choose Create.
    3. Youu2019ll be prompted for a short text description of your new logical database. Enter one. Youu2019ll then be prompted to specify a development class.
    4. Now comes the fun part! You must specify a root node, or a parent table, as the basis of your logical database structure. You can now place subsequent tables under the root table as needed to assemble the data object you want. You can access this tree from this point forward, to add additional tables, by selecting that root node and following the path Edit | Node | Create. Once youu2019ve saved the structure you define in this step, the system will generate the programming necessary to access your logical database. The best part is you donu2019t have to write a single line of code.
    Watch out!
    The use of very large tables will degrade the performance of a logical database, so be aware of that trade-off. Remember that some tables in SAP are very complex, so they will be problematic in any user-defined logical database.
    Declaring a logical database
    Hereu2019s another surprising feature of logical databases: You do not assign them in your ABAP/4 Code. Instead, the system requires that you specify logical databases as attributes. So when you are creating a report, have your logical database identifier (the name you gave it) on hand when you are defining its attributes on the Program Attributes screen. The Attributes section of the screen (the lower half) will include a Logical database field, where you can declare your logical database.
    Logical databases for increasing efficiency
    Why else would you want to create a logical database? Consider that the logical databases already available to you begin with a root node and proceed downward from there. If the data object you wish to construct consists of items that are all below the root node, you can use an existing logical database program to extract the data, then trim away what you donu2019t want using SELECT statementsu2014or you can increase the speed of the logical database program considerably by redefining the logical database for your object and starting with a table down in the chain. Either way, youu2019ll eliminate a great deal of overhead.
    Reward if useful.
    Thankyou,
    Regards.

  • Regarding Logical database and  select statement..

    Hi
    Experts.
    i would  like to  know the  diff b/w logical data base & select statement  while using report.
    wt is the use of logical databases in R/3. is there   any   advantage  used in the  reports.
    Thanks & Regards..
    Spandana.

    Dear Spandana,
      Go through the below description of LDB. I hope you wil get a fair amount of idea.
    SAP comes loaded with all the extras. Among the extras that are most helpful to IT managers are all the access routines needed to pull any business object that managers can think of out of SAP databases. However, SAP has not thought of everything where your particular applications are concerned. SAP organizes its standard database tables to service business units based on conventional business applications. Itu2019s likely your business requires something new, perhaps even something exotic. In that case, you will need to create a new database, using information from different places. Basically, you need a logical database. You need to create a virtual business data object repository consisting of a new kind of record or table that suits your purposes. In addition, the repository should be composed of information that is actually stored in a number of different locations, none of them necessarily logically associated with one another. Letu2019s take a closer look at creating logical databases.
    A case for a logical database
    Suppose my company manufactures widgets of the most obscure variety, and they are components of other widgets. I sell my widgets as raw material for the more sophisticated widgets built by others, but in some cases I actually partner with other manufacturers in creating yet another class of widget. Now, in my world, I consequently have customers who are also partners. I sell to them and I partner with them in manufacturing and distribution. Also, I need an application that uses both of these dual-use relationships.
    Essentially, I have a customer database and a partner database. Neither contains records that are structured to contain the identifying particulars of the other. Thus, I need a hybrid database that gives me tables detailing these hybrid relationships. What can I do? I can go the long way around and write a new database, pulling information from both and creating new objects with a customized program that I write by hand. However, this process is cumbersome and contains maintenance issues. On the other hand, I can use SAPu2019s logical database facility, create my logical database in a couple of minutes, and have no maintenance issues at all.
    Logical database structures
    There are three defining entities in an SAP logical database. You must be clear on all three in order to create and use one.
    u2022     Table structure: Your logical database includes data from specified tables in SAP. There is a hierarchy among these tables defined by their foreign keys (all known to SAP), and you are going to define a customized relationship between select tables. This structure is unique and must be defined and saved.
    u2022     Data selection: You may not want or need every item in the referenced tables that contributes to your customized database. There is a selection screen that permits you to pick and choose.
    u2022     Database access programming: Once youu2019ve defined your logical database, SAP will generate the access subroutines needed to pull the data in the way you want it pulled.
    Creating your own logical database
    ABAP/4 (Advanced Business Application Programming language, version 4) is the language created by SAP for implementation and customization of its R/3 system. ABAP/4 comes loaded with many predefined logical databases that can construct and table just about any conventional business objects you might need in any canned SAP application. However, you can also create your own logical databases to construct any custom objects you care to define, as your application requires in ABAP/4. Hereu2019s a step-by-step guide:
    1.     Call up transaction SLDB (or transaction SE36). The path you want is Tools | ABAP Workbench | Development | Programming Environment | Logical Databases. This screen is called Logical Database Builder.
    2.     Enter an appropriate name in the logical database name field. You have three options on this screen: Create, Display, and Change. Choose Create.
    3.     Youu2019ll be prompted for a short text description of your new logical database. Enter one. Youu2019ll then be prompted to specify a development class.
    4.     Now comes the fun part! You must specify a root node, or a parent table, as the basis of your logical database structure. You can now place subsequent tables under the root table as needed to assemble the data object you want. You can access this tree from this point forward, to add additional tables, by selecting that root node and following the path Edit | Node | Create. Once youu2019ve saved the structure you define in this step, the system will generate the programming necessary to access your logical database. The best part is you donu2019t have to write a single line of code.
    Watch out!
    The use of very large tables will degrade the performance of a logical database, so be aware of that trade-off. Remember that some tables in SAP are very complex, so they will be problematic in any user-defined logical database.
    Declaring a logical database
    Hereu2019s another surprising feature of logical databases: You do not assign them in your ABAP/4 Code. Instead, the system requires that you specify logical databases as attributes. So when you are creating a report, have your logical database identifier (the name you gave it) on hand when you are defining its attributes on the Program Attributes screen. The Attributes section of the screen (the lower half) will include a Logical database field, where you can declare your logical database.
    Logical databases for increasing efficiency
    Why else would you want to create a logical database? Consider that the logical databases already available to you begin with a root node and proceed downward from there. If the data object you wish to construct consists of items that are all below the root node, you can use an existing logical database program to extract the data, then trim away what you donu2019t want using SELECT statementsu2014or you can increase the speed of the logical database program considerably by redefining the logical database for your object and starting with a table down in the chain. Either way, youu2019ll eliminate a great deal of overhead.
    Regards
    Arindam

  • Related to logical database

    q1]]   What is the difference between LOGICAL DATABASE and VIEWS?
    q2]]  Why are <b>alphaneumeric characters</b> called so ?

    Hi
    <i>q1]] What is the difference between LOGICAL DATABASE and VIEWS?</i>
    <b>Logical Databases</b>
    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 by linking them to executable ABAP programs.
    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.
    <i>Logical Databases - Views of Data</i>
    A logical database provides a particular view of database tables in the R/3 System. <u><i>It is always worth using logical databases if the structure of the data that you want to read corresponds to a view available through a logical database.</i></u>
    Please got through the link where you can find how create or modify logical database.
    http://www.datamanagementgroup.com/Resources/Articles/Article_1005_2.asp
    <i>q2]] Why are alphaneumeric characters called so ?</i>
    Alphanumeric characters are combination of alphabets including Uppercase letters (A..Z) and lowercase letters (a..z) , and Numerals(0123456789) .
    This Can be defined with character strings.
    A character string is a data type that consists of a series of alphanumeric characters.
    Each character string has a code attribute (ASCII, EBCDIC, or BYTE). It defines the sort sequence to be used for comparing values.
    Regards,
    Raghav
    Message was edited by:
            Raghavendra  L

  • Logical databases (sorry for not introducing myself)

    New on this forum. Logical databases have any use?
    What is a subprogram?
    Moderator message: please search for available information/documentation.
    [Rules of engagement|http://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement]
    [Asking Good Questions in the Forums to get Good Answers|/people/rob.burbank/blog/2010/05/12/asking-good-questions-in-the-forums-to-get-good-answers]
    Edited by: Thomas Zloch on Aug 2, 2011 11:13 PM

    hi logiacl databases are mostly used in the hrabap.
    Logical databases are programs that read data from database tables and pass it to other programs for processing. The order of reading the database tables is determined by a hierarchy.
    Many tables in the R/3 System are linked using foreign key relationships. Parts of these relationships form tree-like hierarchical structures. Logical databases allow you to read data easily from database tables that form parts of these structures
    Retrieving Data Using a Logical Database:
    GET EVENT
    This is the most important event for executable programs that use a logical database. It occurs when the logical database has read a line from the node <table> and made it available to the program in the work area declared using the statement NODES <table>.
    When you define the corresponding event block in the program, you can specify a field list if the logical database supports field selection for this node:
    GET <table> http://FIELDS <f1> <f 2>....
    Transation is se36
    check this simple example..
    REPORT  Z_LDB_DEMO.
    NODES: SPFLI, SFLIGHT, SBOOK.
    START-OF-SELECTION.
      WRITE 'Test Program for GET'.
    GET SPFLI.
      SKIP.
      WRITE: / 'From:', SPFLI-CITYFROM,
               'TO  :', SPFLI-CITYTO.
    GET SFLIGHT.
      SKIP.
      WRITE: / 'Carrid:', SFLIGHT-CARRID,
               'Connid:', SFLIGHT-CONNID.
      ULINE.
    GET SBOOK.
      WRITE: / 'Fldate:',    SFLIGHT-FLDATE,
               'Bookid:',    SBOOK-BOOKID,
               'Luggweight', SBOOK-LUGGWEIGHT.
      ULINE.
      END-OF-SELECTION.

  • Why and how we use Logical Database?

    Can anybody explain with example why and how we use logical database?
    Regards,
    Rajan

    Hello,
    SAP comes loaded with all the extras. Among the extras that are most helpful to IT managers are all the access routines needed to pull any business object that managers can think of out of SAP databases. However, SAP has not thought of everything where your particular applications are concerned. SAP organizes its standard database tables to service business units based on conventional business applications. Itu2019s likely your business requires something new, perhaps even something exotic. In that case, you will need to create a new database, using information from different places. Basically, you need a logical database. You need to create a virtual business data object repository consisting of a new kind of record or table that suits your purposes. In addition, the repository should be composed of information that is actually stored in a number of different locations, none of them necessarily logically associated with one another. Letu2019s take a closer look at creating logical databases.
    A case for a logical database
    Suppose my company manufactures widgets of the most obscure variety, and they are components of other widgets. I sell my widgets as raw material for the more sophisticated widgets built by others, but in some cases I actually partner with other manufacturers in creating yet another class of widget. Now, in my world, I consequently have customers who are also partners. I sell to them and I partner with them in manufacturing and distribution. Also, I need an application that uses both of these dual-use relationships.
    Essentially, I have a customer database and a partner database. Neither contains records that are structured to contain the identifying particulars of the other. Thus, I need a hybrid database that gives me tables detailing these hybrid relationships. What can I do? I can go the long way around and write a new database, pulling information from both and creating new objects with a customized program that I write by hand. However, this process is cumbersome and contains maintenance issues. On the other hand, I can use SAPu2019s logical database facility, create my logical database in a couple of minutes, and have no maintenance issues at all.
    Logical database structures
    There are three defining entities in an SAP logical database. You must be clear on all three in order to create and use one.
    u2022     Table structure: Your logical database includes data from specified tables in SAP. There is a hierarchy among these tables defined by their foreign keys (all known to SAP), and you are going to define a customized relationship between select tables. This structure is unique and must be defined and saved.
    u2022     Data selection: You may not want or need every item in the referenced tables that contributes to your customized database. There is a selection screen that permits you to pick and choose.
    u2022     Database access programming: Once youu2019ve defined your logical database, SAP will generate the access subroutines needed to pull the data in the way you want it pulled.
    Creating your own logical database
    ABAP/4 (Advanced Business Application Programming language, version 4) is the language created by SAP for implementation and customization of its R/3 system. ABAP/4 comes loaded with many predefined logical databases that can construct and table just about any conventional business objects you might need in any canned SAP application. However, you can also create your own logical databases to construct any custom objects you care to define, as your application requires in ABAP/4. Hereu2019s a step-by-step guide:
    1.     Call up transaction SLDB (or transaction SE36). The path you want is Tools | ABAP Workbench | Development | Programming Environment | Logical Databases. This screen is called Logical Database Builder.
    2.     Enter an appropriate name in the logical database name field. You have three options on this screen: Create, Display, and Change. Choose Create.
    3.     Youu2019ll be prompted for a short text description of your new logical database. Enter one. Youu2019ll then be prompted to specify a development class.
    4.     Now comes the fun part! You must specify a root node, or a parent table, as the basis of your logical database structure. You can now place subsequent tables under the root table as needed to assemble the data object you want. You can access this tree from this point forward, to add additional tables, by selecting that root node and following the path Edit | Node | Create. Once youu2019ve saved the structure you define in this step, the system will generate the programming necessary to access your logical database. The best part is you donu2019t have to write a single line of code.
    Regards
    Arindam

  • LOGICAL DATABASE IN HR ABAP PRPGRAMMING

    Hi Friends,
    what is use of LOGICAL DATABASE IN HR ABAP PROGRAMMING
    AND END-OF-SELECTION EVENT IN HR PROGRAMMING PROGRAMMING???
    regards,
    vijay.

    hi
    HR Logical Databases
    In Human Resources (HR), the following logical databases can be used as a data source for HR InfoSets:
    PNP (PNPCE)
    PAP
    PCH
    By selecting a logical database, you determine the HR data that can be reported on using an InfoSet.
    Logical Database PCH
    This logical database generally enables you to report on all HR infotypes. However, you are advised not to use this logical database unless you want to report on Personnel Planning data.
    Logical Database PNP (or PNPCE)
    Use logical database PNP to report on HR master data. It is possible to use logical database PCH to access this data, but PNP meets such reporting requirements more quickly because it is best suited to the task of selecting persons.
    Logical database PNP enables you to access HR master data and infotypes from Personnel Planning. For example, you have the following options:
    Reporting on the costs, number of attendees booked, and instructor for a business event on which an employee is booked
    Reporting on working time and planned compensation for a position that an employee occupies
    Reporting on the validity and proficiency of a qualification that an employee fulfils
    From a technical perspective, this means you can use PNP to report on all of the infotypes that exist for objects (infotype 1000) that have a direct relationship (infotype 1001) with the Person object.
    The ability to access infotypes from Personnel Planning using logical database PNP is a special feature that you can only use in the context of SAP Query and Ad Hoc Query. You cannot use this functionality for ABAP reports you programmed yourself.
    You can also use logical database PNP to report on data from Personnel Time Management (infotypes 2000 to 2999) and Payroll (special payroll infotypes for the USA and customer infotypes; for more information, access Customizing for the Human Resources Information System and see Payroll Results).
    Logical Database PAP
    Logical database PAP enables you to access data from Recruitment.
    regards
    navjot
    reward if helpfull

  • ABAP logical database

    Hi,
    What is Logical Database? advantages and disadvantages?
    thanks in advance?

    Hi,
    Advantages of Using Logical Databases
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/db99b435c111d1829f0000e829fbfe/content.htm
    Logical databases save you having to define a selection screen and read data from the database in every program. The program does not have to specify how to retrieve the data, but instead only has to process it and display it on the screen.
    An executable program can only work with one logical database, but each logical database can be used by several programs. This offers considerable advantages over integrating the database accesses with SELECT statements into each executable program. It means that you only have to code identical access paths once. The same applies to coding authorization checks.
    When you use logical databases, most executable programs benefit from having
    · an easy-to-use and standard user interface
    · check functions, which check that user input is complete, correct, and plausible
    · meaningful data selection
    · central authorization checks for database accesses
    · good read access performance (for example, with views) while retaining the hierarchical data view determined by the application logic.
    Even though you are using central logical databases, the program itself remains flexible because:
    · You can still create your own selection screens for each program
    · You can code your own functions in any event block in the program. For example, you may want to write user dialogs for further authorization or plausibility checks on the selection screen.
    +++++
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9b5e35c111d1829f0000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9bed35c111d1829f0000e829fbfe/frameset.htm
    Thanks,
    Aby

Maybe you are looking for

  • How do I query a SharePoint List using a url and filtering on date?

    I am reading a SharePoint list using jquery.  Everything is working fine except for the filter.  Each list item has an expiration date.  I want to retrieve JUST the items that have not expired (Expires > Today) but I can't figure out the url syntax a

  • Keychain waiting for approval

    So I am currently not signed into keychain on any device and am trying to sign in on Yosemite. Because I can not verify keychain with another device I have to enter my code. I enter my code and it has a little setting up circle loading icon, before s

  • App not displayed in permissions

    Installed Magellan Compass on my PlayBook. I did not give it access to documents during the installation. Upon running the app, I received the message to go to security-application permission and change permissions. When I go to permissions the app i

  • Material Master List by SQVI

    Hi, I am trying to create a List of Materials Master by using SQVI. I have used MARA table, MARC table & MVKE table. Some of the data is getting populated in the ALV Grid Display, but would like to know, what would be the sequence and the relevant ta

  • Disk image could not be mounted - error

    Ok, I've been using TC (Time Capsule) for a week now, and it was working great. Then in the middle of the week I decided to change the password for TC. Now when I reboot my iMac, TM (Time Machine) will not back up and it gives me a failed - "the back