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

Similar Messages

  • Can any one tell me how to create logical database

    i want to create logical database which contain tables BSEG,BSIS,BSAS,BKPF.
      tell me how this table will come under hierarchary and
    what should i do.please guide me step by step for this problem,i am new to logical datbase.

    Hi,
    Use transaction SE37 or SLDB for creation of LDB.
    Three main things in creation of LDB are
    1)Structure(Hierarchy in nodes)
    2)Selections
    3)Source code
    In structure part we have to define hierarchy as IN NODES
    BKPF          - Accounting Document Header
    BSEG         - Accounting Document Segment
      BSIS
      BSAS
    In selections part we have to define selection screens for the LDB
    In source code part we have to write the data decelerations and data retrieval.
    Regards
    Rajesh Yadla

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

  • Runtime error while creating logical database report pgm

    Hi,
        I have started doing pgm on Logical Database report using VBAK,VBAP and MARA. I took VBAK as the root node and VBAP& MARA  as subnodes. The actual requirement is:-  I am trying to place these tables in Application server for perfromance issue using Logical database. Based on sales, the items need to be be displayed. And based on Items, the material data should be displayed.So root node here is VBAK.
    I have created these 3 nodes in SE36 tx.code. when I go back to se36 main screen and under "subobjects"  ,I've selected "selections". I got a dialog box saying that "Nodes for which free selections are to be made". I have clicked on the radio buttons.And then clicked on "transfer" . I am getting a runtime error . Please let me know the solution.
        Please do send me the actual process to goon with logical database reporting.

    Hello
    Logically speaking, a company code can have more than one FSV as long as they share the same chart of accounts.
    When COA is common, the FSV pattern can be designed seperatly to serve the purpose of varied reporting.
    The dump you are getting is a temporary snag. Take a screen shot from SM54 after you execute the report and pass it to BASIS for analysis. They would fix that.
    Reg
    assign points if useful

  • 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

  • Not getting fields in logical database of infotypes

    Hi All,
    I have created Infotype(9xxx) through PM01, and also maintained the screen for this with 6 feilds..
    BEGDA, ENDDA, SUBTY, OBJPS, Zxxx1, Zxxx2
    every thing is going fine but when im creating logical database for that infotype,
    im getting only 3 feilds there
    PERNR
    Zxxx1
    Zxxx2
    I need to take all the fields there.. please suggest how to do this?
    Regards
    Neha Gupta

    Solved on own.

  • Logical database LDB

    hi,
    what is LDB....its benefit
    and how to to it for multiple tables ......
    .... i want to use LDB instead of table joins...... there are  abt 20 tables..... using joins , the performance is slow ...
    ..... please advise..
    thanks

    LOGICAL DATABASES:
    Logical Databases are used to generate report.
    It is a repository object, not a data dictionary object.
    Under one logical database, a node is created first for the corresponding table in the database.
    A logical database can have any number of related nodes in the hierarchical manner.
    First node of the logical database is called as ROOT NODE.
    SLDB or SE36 to create logical databases.
    Navigations to Create Logical Database:
    SLDB -> Specify LDB name starting with Z or Y -> Click on Create -> Opens an interface -> Enter short description
    -> Create -> Save under a package and assign request number -> Opens an interface
    -> Specify Root Node name (MARA) -> Enter short description for the Root node
    -> Specify Database Table name (MARA) -> Create -> Opens an interface
    -> Select the Root Node (KNA1) -> Click on SELECTIONS pushbutton from Appn.
    Toolbar -> Click on Yes to generate Selection Screens from the Structure
    -> Click on No to Search Help -> Opens an Interface
    -> Select the checkboxes to create Field Selections and Free Selections
    -> TRansfer -> Opens an Include Program -> Decomment Select-Options statement and specify range variable as follows:
    SELECT-OPTIONS : MATNUM FOR MARA-MATNR.
    -> Save -> Activate -> Come back.
    Select the Node -> Click on SOURCE CODE pushbutton
    -> Click on Yes to generate source code from Structure and Selections -> Opens a report with two Include Files :
    include DBZLOGICAL_DATABASE1TOP . " header
    include DBZLOGICAL_DATABASE1NXXX . " all system routines
    -> Double click on Header File to declare global variables -> Specify Following code:
    TABLES : MARA * Autogenerated
    DATA IT_MARA LIKE MARA OCCURS 0 WITH HEADER LINE.
    -> Save -> Activate -> Come back -> Double click on System Routine file, where the fetching operations are done
    -> Opens an Include File with three subfiles as follows:
    include DBZLOGICAL_DATABASE1N001 . " Node MARA
    include DBZLOGICAL_DATABASE1FXXX . " init, PBO, PAI
    include DBZLOGICAL_DATABASE1SXXX . " search help
    -> Double click on the first file -> Specify SELECT operation statement as follows:
    select * from mara into table it_mara where matnr in MATNUM.
    PUT MARA. * AUTOGENERATED CODE
    loop at it_mara.
    write :/ it_mara-matnr, it_mara-mtart, it_mara-mbrsh, it_mara-meins.
    endloop.
    -> Save -> Activate.
    To Access LDB node, create SE38 PROGRAM, Specify LDB name in ATTRIBUTES section -> Specify following code in SE38:
    NODES MARA.
    GET MARA.
    -> Save -> Activate -> Execute.

  • How to call logical database

    hi friends,
        plz explain me how to call logical database in a report program?

    hi,
    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.
    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 THE 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
    Use Tcode SE36 For creating Logical Database.
    Here is a simple Program on Logical database.
    NODES: spfli,sflight.
    START-OF-SELECTION.
    WRITE 'Test Program for GET'.
    *Fetching SPFLI table
    GET spfli.
    WRITE: / 'Carrid:', spfli-carrid,
    'Connid:', spfli-connid.
    *Fetching SFLIGHT table
    GET sflight.
    SKIP 5.
    WRITE: / 'Carrid:', sflight-carrid,
    'Connid:', sflight-connid.
    logical database
    logical database
    http://help.sap.com/saphelp_nw04/helpdata/en/60/183d78163011d2953c0000e8353423/frameset.htm
    general
    example program
    http://help.sap.com/saphelp_nw04s/helpdata/en/9f/db9be035c111d1829f0000e829fbfe/frameset.htm
    regards,
    pavan
    REWARD POINTS IF USEFUL

  • Hi,  logical database

    hi
    when i am creating logical database i am getting error with top page, although i am not doing any thing with top of page.
    could any one tell me steps to create logical database using mara and marc table.
    thanx in advance.
    rocky

    hi,
    Procedure for Creating a Logical Database
    Enter a name on the initial screen of the Logical Database Builder and choose Create.
    A dialog box appears. Enter a short text. You can change this later by choosing Extras ® Short text or Administration info.
    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:
    § Database tables. The table must be active in the ABAP Dictionary. Tables always have a flat structure. The name of the node must correspond with the name of the table.
    § Data types from the ABAP Dictionary: The node may refer to any data type in the ABAP Dictionary. The node name and the name of the data type do not have to be the same. You can use deep data types as nodes.
    § Data types from type groups: The node can also refer to a data type from a type group in the ABAP Dictionary. Enter the name of the type group in the corresponding field. You must choose Other types before specifying this type. Data types in type groups were the forerunners of real data types in the ABAP Dictionary. Wherever possible, you should use ABAP Dictionary data types. They have all of the semantic properties of their underlying data elements. This is useful, for example, when you use a logical database to create ABAP Queries.
    You can use the Text from Dictionary function to adopt the text stored in the ABAP Dictionary for the relevant table or data type.
    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.
    for more info on LDB chk this link
    http://help.sap.com/saphelp_46c/helpdata/en/9f/db9bed35c111d1829f0000e829fbfe/frameset.htm
    hope this helps.
    PLZ reward if helpful.

  • 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 QNQ not working when creating a query in SQVI

    Hi All,
    When i try creating a Quick Viewer Query using SQVI on Logical Database QNQ, I do not get any output.
    What am i doing wrong? 
    Regards,
    Jr.

    Hi,
    The blank row that you get from your second select statement would appear at the end of the report. Put that statement first and it should be at the top of the first page
    Andy

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

  • How to select a new table in logical database after creating the Infoset

    I have created a abap query report ,i have used logical data base ADA in the infoset in SQ02.In the logical database i had selected only two tables then ANALV and ANLB.Now my client wants one more field to be added and thats is from table ANEK.Now i need to select this table in logical database ADA.
    Please assist on how to select another table available in the Logicaldata base now which i didnt select when i created the query

    Markus,
    I have now selected the additional field Posting date in Document ANEK -BUDAT .Earlier the report had the fields from ANLCV - Current acquisition value ,ordinary dep posted selected for  the output.
    When i run the query after adding this new field ANEK-BUDAT the below warning  is generated  by system :
    The query specifications cannot be used to generate a list,
    i.e. the query will probably not return the list you desire.
    If you still want to execute the query, please use the
    "Generate" function
    -> 'Generate'
    Fields from parallel tables within a line*
    Line: 01
    Field: Posting Date in the Document
    (ANEK-BUDAT, table ANEK)
    Field: Ordinary depreciation posted
    (ANLCV-NAFA GEB, table ANLCV)
    Fields from parallel tables within a line*
    Line: 01
    Field: Posting Date in the Document
    (ANEK-BUDAT, table ANEK)
    Field: Current asset acquisition value
    (ANLCV-LFD KANSW, table ANLCV)
    2 warnings for query QUERY ***
    Please advice .How get this new field added.

  • Creating Selection Screen version in Logical Database

    Hi,
    I want to design my own Selection screen while creating a report with Logical Database. My requirement is not to show the Standard Selection screen of LDB.
    Can it be achieved by creating Selection Screen Version in SE36 and using that version in Attribute of the Report?
    If yes, then how can it be created?

    You can change the Selection Include to include your selection screen version.
    Go to SE36
    Select "Selections"
    Change
    Create a new version like:
    SELECTION-SCREEN BEGIN OF VERSION 904 TEXT-904.
      SELECTION-SCREEN EXCLUDE PARAMETERS: KD_STIDA.
      SELECTION-SCREEN EXCLUDE SELECT-OPTIONS: KD_GJAHR, KD_BUDAT, KD_AUGDT,
                                               KD_ZUONR, KD_UMSKZ.
    SELECTION-SCREEN END   OF VERSION 904.
    Regards,
    Naimesh Patel

  • 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

Maybe you are looking for