Create a Logical Database Based on Mseg and Bseg

Hi,
  how can i create a Logical database using bkpf,bseg,mkpf,mseg. i need to know , which table is a root node ?
could any one help me?
   Thanks

Hi Amit,
       While I am Creating the Logical Database by selection MKPF as root node, i have one problem.
   my selection-screen is,
    Plant  Bseg-werks,
    G/Laccount Bseg-Hkont,
    Fin year bseg-gjahr,
    Grn Date Bkpf-Budat,
    Vendor No Bseg-lifnr,
    Po        Bseg-ebeln,
    MatNr     Bseg-matnr.
  My LDB structure is
         MKPF
Mseg
BKPF
Bseg.
  My Doubt is, how can I access the glaccount details from bseg and How can i fetch the data from Mseg and Mkpf
(Grn details) .
  If you give the Source code it is very useful to me.
  Thanks,
  Neptune.M

Similar Messages

  • How to create a logical database?

    Hi,
    Can anyone tell me how to create a logical database? I am curious about it.
    Thanks.
    Awards will be provided.
    Best regards,
    Chris Gu

    Transaction code for creating Logical db is se36.
    Give the name as <ldbname>..
    Specify the table names and the sub nodes according to your heirarchy.The root node used is zxxx_product and child node is zxxx_orders
    The heirarchy used is ZXXX_PRODUCT---->ZXXX_ORDERS
    write the below code under selections ...
    Enable DYNAMIC SELECTIONS for selected nodes :
    SELECTION-SCREEN DYNAMIC SELECTIONS FOR TABLE zxxx_product.
    SELECTION-SCREEN DYNAMIC SELECTIONS FOR TABLE zxxx_orders.
    Enable FIELD SELECTION for selected nodes :
    SELECTION-SCREEN FIELD SELECTION FOR TABLE zxxx_product.
    SELECTION-SCREEN FIELD SELECTION FOR TABLE zxxx_orders.
    ***User defined blocks :
    ****Root node
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001 .
    SELECT-OPTIONS :
    so_pname FOR zxxx_product-prname ,
    so_pdelv FOR zxxx_product-prdeldate .
    SELECTION-SCREEN END OF BLOCK b1 .
    ****Child node
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002 .
    SELECT-OPTIONS :
    so_odate FOR zxxx_orders-orddate ,
    so_oqty FOR zxxx_orders-ordqty .
    SELECTION-SCREEN END OF BLOCK b2 .
    write the below code under include include DBZXX_PRODUCTTOP
    TABLES : ZXXX_product, ZXXX_orders.
    DATA : gt_root TYPE table of ZXXX_product ,
    gt_chld TYPE table of ZXXX_orders .
    write the below code under source code...
    Call event GET Zxxx_PRODUCT
    FORM put_zxxx_product.
    TYPES : BEGIN OF ls_pid ,
    prodid TYPE zxxx_product-prodid,
    END OF ls_pid .
    DATA : lt_pid TYPE ls_pid OCCURS 0 ,
    lt_pid_tmp TYPE ls_pid OCCURS 0 .
    STATICS lv_first_time VALUE 'X'.
    STATICS ls_isroot_fields TYPE rsfs_tab_fields.
    STATICS ls_isroot_where TYPE rsds_where.
    STATICS ls_ischld_fields TYPE rsfs_tab_fields.
    STATICS ls_ischld_where TYPE rsds_where.
    IF lv_first_time EQ 'X'.
    CLEAR lv_first_time.
              o
                    + Declarations for field selection for node Zxxx_PRODUCT ***
    " move table name to the corresponding field
    MOVE 'Zxxx_PRODUCT' TO ls_isroot_fields-tablename.
    " Read values from selection screen
    READ TABLE select_fields WITH KEY ls_isroot_fields-tablename
    INTO ls_isroot_fields.
    " move table name to the corresponding field
    MOVE 'Zxxx_PRODUCT' TO ls_isroot_where-tablename.
    " Read values from dynamic selection screen
    READ TABLE dyn_sel-clauses WITH KEY ls_isroot_where-tablename
    INTO ls_isroot_where.
              o
                    + Declarations for field selection for child node Zxxx_ORDERS ***
    MOVE 'Zxxx_ORDERS' TO ls_ischld_fields-tablename.
    READ TABLE select_fields WITH KEY ls_ischld_fields-tablename
    INTO ls_ischld_fields.
    MOVE 'Zxxx_ORDERS' TO ls_ischld_where-tablename.
    READ TABLE dyn_sel-clauses WITH KEY ls_ischld_where-tablename
    INTO ls_ischld_where.
    "...Check whether entry is made in atleast one selection field:
    IF NOT so_pname IS INITIAL OR
    NOT so_pdelv IS INITIAL OR
    NOT so_odate IS INITIAL OR
    NOT so_oqty IS INITIAL OR
    NOT ls_isroot_where-where_tab IS INITIAL OR
    NOT ls_ischld_where-where_tab IS INITIAL .
    "...Check whether entry is made in atleast one field in root node :
    IF NOT so_pname IS INITIAL OR
    NOT so_pdelv IS INITIAL OR
    NOT ls_isroot_where-where_tab IS INITIAL .
    SELECT prodid FROM Zxxx__product
    INTO CORRESPONDING FIELDS OF TABLE lt_pid
    WHERE prname IN so_pname AND
    prdeldate IN so_pdelv AND
    (ls_isroot_where-where_tab).
    "...Check whether entry is made in atleast one field in child node:
    IF NOT so_odate IS INITIAL OR
    NOT so_oqty IS INITIAL OR
    NOT ls_ischld_where-where_tab IS INITIAL AND
    NOT lt_pid IS INITIAL.
    SELECT prodid FROM Zxxx_orders
    INTO CORRESPONDING FIELDS OF TABLE lt_pid_tmp
    FOR ALL ENTRIES IN lt_pid
    WHERE prodid = lt_pid-prodid AND
    orddate IN so_odate AND
    ordqty IN so_oqty AND
    (ls_ischld_where-where_tab).
    lt_pid = lt_pid_tmp.
    ENDIF.
    ELSEIF NOT so_odate IS INITIAL OR
    NOT so_oqty IS INITIAL OR
    NOT ls_ischld_where-where_tab IS INITIAL.
    SELECT prodid FROM Zxxx_orders
    INTO CORRESPONDING FIELDS OF TABLE lt_pid
    WHERE orddate IN so_odate AND
    ordqty IN so_oqty AND
    (ls_ischld_where-where_tab).
    ENDIF.
    ******lt_pid contains all the selections based product ids
    ******Now retrieve all the records with the corresponding product ids
    CHECK NOT lt_pid IS INITIAL.
    IF NOT ls_isroot_fields IS INITIAL.
    SELECT (ls_isroot_fields-fields) FROM Zxxx_product
    INTO CORRESPONDING FIELDS OF TABLE gt_root
    FOR ALL ENTRIES IN lt_pid WHERE prodid = lt_pid-prodid.
    ENDIF.
    IF NOT ls_ischld_fields IS INITIAL AND
    NOT gt_root IS INITIAL.
    SELECT (ls_ischld_fields-fields) FROM Zxxx_orders
    INTO CORRESPONDING FIELDS OF TABLE gt_chld
    FOR ALL ENTRIES IN gt_root WHERE prodid = gt_root-prodid.
    ENDIF.
    LOOP AT gt_root INTO Zxxx_product.
    PUT Zxxx_product.
    ENDLOOP.
    ENDIF.
    ENDIF.
    ENDFORM.
    write the below code under
    include DBZXXX_PRODUCTNXXX -->
    include DBZXXX_PRODUCTN002 .
    form put_zxxx_orders
    LOOP AT gt_chld INTO zxxx_orders WHERE prodid = zxxx_product-prodid.
    PUT ZXXX_ORDERS.
    ENDLOOP.
    endform.
    now write a report program and call the ldb by its name using get
    get <ldbname>.
    Reward if this is useful.
    Regards,
    devi.
    Edited by: Devi Raju on Jul 15, 2008 9:13 AM

  • Hoe to creat own logical database inhr

    hi all,
    can anyone send the codefor creating the own logical databse like pnp in HR.

    <b>Creating a Logical Database</b>
    Open the Logical Database Builder (<b>SE36</b>)
    1. Enter a name on the initial screen of the Logical Database Builder and choose Create.
    2. A dialog box appears. Enter a short text. You can change this later by choosing Extras -> Short text or Administration info.
    3. Once you have entered the short text, you must define the root node of the logical database. Enter the node name and its attributes. There are three different types of nodes:
    The logical DB gets created.
    Then to edit the logical DB, use the following steps.
    The structure editor of the Logical Database Builder appears. On the left is the name of the root node, followed by a code for the node type: T for a database table, S for a ABAP Dictionary type, and C for a type from a type group. The new logical database now has a structure with a single node.
    You can now extend the structure as described in Editing the Structure.
    If you choose Next screen (right arrow in the application toolbar), a screen appears on which you can enter a search help for the logical database as described under Editing Search Helps.
    If you choose Next screen (right arrow in the application toolbar), a dialog box appears, asking you whether the system should generate the selections for the logical database. When you have confirmed the dialog box, a list appears, on which you can select all of the nodes that you want to use for field selections or dynamic selections. The fields that you select are included in the source code generated by the system for the selection include.
    The generated selection include is displayed in the ABAP Editor. You can change it as described in Editing Selections.
    If you choose Next screen (right arrow in the application toolbar), a dialog box appears, asking you whether the system should generate the database program for the logical database. The database program is generated from the structure and the selection include. It has a modular structure, consisting of several include programs and all of the necessary subroutines, with proposals for the statements that will read the data.
    The generated database program is displayed in the ABAP Editor. You can change it as described in Editing the Database Program.
    If you repeatedly choose Previous screen (left arrow in the application toolbar), you can display and change the general attributes of the logical database.
    Finally, you can maintain optional selection texts and documentation.
    <b>Reward if helpful</b>

  • Transporting Views created for Logical Database in QAS

    Hello all,
    Can anybody let me know teh steps...
    How to transport views created for logical database from dev to QAS...
    kindly give the steps...
    thanks
    saurabh

    I don't think PNPCE does anything with HRP infotypes.  PNPCE is all about PA data since PERNR is the main key.  Logical DB PCH is the one that deals with HRP Infotypes.

  • Fetching data slow from MSEG and BSEG table

    Dear Experts,
    Out  MSEG and BSEG are major tables which are very slow and taking 5-10 minutes in fetching just 20/30 records.
    Why this table taking more time and how I can fatch fast  data from these table.
    regards

    > Out  MSEG and BSEG are major tables which are very slow and taking 5-10 minutes in fetching just 20/30 records.
    > Why this table taking more time and how I can fatch fast  data from these table.
    Do you select on key fields or on indexed fields? How do you select?
    If not, then the database must read the full table and check which of the entries are valid for your selection.
    Do an SQL trace using ST05, run the command, stop the trace and check the explain.
    Markus

  • Sort+logical database using field group and extract

    Hi Folks,
    I have a program which is using Logical database concept and creating a file on application server as below.
    SORT BY
        reguh-zbukr                        "Zahlender Buchungskreis
        reguh-rzawe                        "Payment method
        reguh-ubnks                        "Bankland unserer Bank
        reguh-ubnky                        "Bankkey zur Übersortierung
        reguh-ubnkl                        "Bankleitzahl unserer Bank
        reguh-ubknt                        "Kontonummer bei unserer Bank
        payment_form                       "Brazil: CC, DOC or OP
        regud-xeinz                        "X - Lastschrift
        reguh-zbnks                        "Bankland Zahlungsempfänger
        reguh-zbnky                        "Bankkey zur Übersortierung
        reguh-zbnkl                        "Bankleitzahl Zahlungsempfänger
        reguh-zbnkn                        "Bank-Ktonummer Zahlungsempfänger
        reguh-lifnr                        "Kreditorennummer
        reguh-kunnr                        "Debitorennummer
        reguh-empfg                        "Zahlungsempfänger CPD
        reguh-vblnr                        "Zahlungsbelegnummer
        regup-belnr.  
    LOOP.
    AT NEW reguh-rzawe
    PERFORM store_on_file USING j_1bh1.
    ENDAT
    AT NEW reguh-ubnkl
    PERFORM store_on_file USING j_1bh2.
    ENDAT
    AT NEW reguh-ubnkt
    PERFORM store_on_file USING j_1bh2.
    ENDAT
    AT NEW VBLNR
    PERFORM store_on_file USING j_1bh3.
    AT DATEN
    PERFORM store_on_file USING j_1bh4.
    ENDAT.
    ENDLOOP.
    FORM store_on_file USING daten.
      IF hlp_temse CA par_dtyp.            "Temse
        PERFORM temse_schreiben USING daten.
      ELSE.
        TRANSFER daten TO g_name.
      ENDIF.
    ENDFORM.
    Is Sorting concept different when it comes to logical databases and field groups ?
    I had added a new field in the sort reguh-rzawe.I think due to that it is getting into AT NEW UBNKL and AT NEW UBKNT even though those details are same for the payment methods in the payment run.Even though the house bank number and account number is same for all the payment methods it is getting into AT NEW UBNKL and AT NEW UBKNT for every new payment method in the iteration.
    vblnr-1
    rzawe- A
    ubnkl-12345
    ubnkt-45678
    vblnr-2
    rzawe- A
    ubnkl-12345
    ubnkt-45678
    vblnr-3
    rzawe- B
    ubnkl-12345
    ubnkt-45678
    vblnr-4
    rzawe- B
    ubnkl-12345
    ubnkt-45678
    Can anyone here throw some light on this.
    Thanks,
    K.Kiran.

    Read the documentation for the at-new process.  As I recall the at-new considers the field named, and all the fields to the left of that in the table.  With that in mind, look at how your logic will work.  This could result in more, or fewer, breaks than intended(fewer if, for instance, a field to the left was deleted).

  • Logical Database PNP. HR and Unicode

    Hi,
    currently we are checking all programs to make them unicode compliant. Using the logical database PNP a lot of macros is loaded automatically. One of them is
    rp_provide_from_last (or rp_provide_from_frst) to get the last record in a specifed time-interval. The existance is stated in varaible named pnp-sw-found, it is 0 if no record was found and 1 if there is one in existance.
    Checking the program (normal syntach check and extended syntax check) leads to the warning that varaibale names with a hyphen are no longer allowed in unicode programs if its not a structure (and pnp-sw-found is not). The program is doing well, and transaction UCCHECK does not mention this error/warning at all. Has someone experience with that issue and perhaps a solution?
    cu
      Rainer

    Thanks for the answers so far. Using PNPCE does not resolve my problem, cause we have a lot of own written reports and i just want to avoid to change them all.
    And using PNPCE idoes not solve the problem, that i have to use pnp-sw-found, this one is still in existance and gives still the warning that thois is not unicode compliant.
    Switching off the unicode flag is no good idea if we wanna go for unicode.
    Anyone else with experience in unicode in the HR Area?

  • Changing logical database DDF select order, and restricting the selection

    HI all,
    I am using logical database DDF for a report.  I would like to do two things:
    1) Change the sort order of records so that when my GET statements are processing, they are bringing the data back in sorted by a field of my choice (such as KNA1-REGIO, or KNB1-BUSAB).
    2) I would like to add KNA1-REGIO and KNB1-BUSAB as fields for selection during the LDB's initial selection, instead of filtering out records during the GET statements. 
    FYI, I did find the field DD_BUSAB in the LDB selection structure which I can use to restrict KNB1-BUSAB.  I am still not sure how to restrict by KNA1-REGIO though.
    Any thoughts?
    Thanks so much,
    L

    Thanks for the reply Shiba.  For that particular problem, the business wants to not have to use the dynamic selection, and just have KNA1-REGIO and KNB1-BUSAB as regular select options.  Like I said as well, I did find DD_BUSAB which I can use for KNB1-BUSAB, but KNA1-REGIO is still a problem. 
    Right now I just use a CHECK statement and filter kna1-regio after the GET kna1 statement.
    Thanks again,
    L

  • Create repository from database model- snowflake facts and dimension joins

    I am working on a project that has a database model similar to the image in the link below.
    There are other few tables around it, but this generally represent the spine or major database model. This is not exactly a snowflake schema as there are no intrinsic hierarchy in the dimension tables. As you can see dim2 and dim4 has one to many relationship with dim3. there are joins between the fact tables as well.
    From some blogs and forum threads, I found out that I can create one fact/dimension table by joining many fact/dimension tables. Is this a right approach? Any thoughts on this model please?
    Thanks,
    Rakesh
    ps: I am using Windows XP Pro and OBIEE 10.1.4.3.1 and right now analyzing the data to create a repository.

    Hi Rakesh,
    As above post says you combine all fact tables into single fact table with other dimension tables so it would become a simple start schema .Go throught these blogs for further information .
    http://forums.oracle.com/forums/thread.jspa?threadID=2124061&tstart=0
    http://www.obinotes.com/2010/08/joins-within-logical-table-sources-in.html#comment-form
    Hope it helps you.Seems your new to forum you sud follow these rules http://forums.oracle.com/forums/ann.jspa?annID=939
    By,
    KK

  • Oracle 11 RPD: Create 2 Logical Tables Based on 1 Physical Table

    Hello,
    I have a date dimension table in the physical layer. From that I need to create 2 date dimension tables in the BMM layer. One is for order date and the other is for shipped date. There is a ship_date_key and an order_date_key in my fact table that I'm trying to use as my foreign key.  Seems I can create a joined ship date logical table or a joined order date logical table but not both.
    Very new to OBI Admin tool.  Any help would be greatly appreciated.

    If you create only one alias from Date dimension in Physical Layer then you can get only one data either Ship Date or Order date details.
    The data from Date dimension gets retrieved on the basis of the Join i.e on which key it was joined to the Fact.
    To solve the above ambiguity you should create two separate alias tables in physical layer, hence you will have two logical tables in BMM Layer
    Create Dim_Ship_Date and Dim_Order_Date from Date dimension.
    And now, you can join the fact with these two aliases on different keys. This practice is usually followed.
    If found useful mark the answer
    Srikanth

  • 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

  • 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

  • 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.

  • Syntax error in Logical database created by copying standard PGQ

    Hi guys.
    I created a logical database ZMPQ_PGQ using the copy option from SE36 with the input PGQ (logical database used by QA33).
    But it showing some syntax error Field "PGQ_SP" is unknown. It is neither in one of the specified tables nor defined by a "DATA" statement.
    How to resolve this?
    Thanks in advance.

    When checking the syntax of the LDB source code, go to the location of the syntax error (in include DBZMPQ_PGQSXXX), and change all internal table references of PGQ_SP to ZMPQ_PGQ_SP.

  • Creating Logical Database

    hi,
       i need to display Outstanding Liability GRNs in my report. for that report, i have created a Logical Database.
    The structure of ldb is,
    BSIS>Bkpf->Bseg--->Rseg
        My Input fields
                        GL Account
                        Plant
                        Fiscal Year
                        Grn Date
        Now my problem is,
                     Time taken to give the output is very high(Nearly 450 seconds for 1 month duration)
          Is there any alter way to create the Logical database using some other tables?
          In logical Database can i create Internal tables?      
          Thanks,
          Neptune.M

    Hi,
    you can create the view or index to make it faster
    regards
    vijay
    Message was edited by: Vijay Babu Dudla

Maybe you are looking for