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.

Similar Messages

  • Asset Reporting - Copying Logical Database ADA

    Can you please assist with the following query?  I’m trying to include the following standard R3 ffields within standard R3 reports AR01 (Asset Balances) & AR18 (Depreciation Simulation):
                                    Table            Field Name            Data Element
    Serial Number            ANLA            SERNR                AM_SERNR
    Inventory Number       ANLA            IVNR                   INVNR_ANLA
    To date I have been unsuccessful in my endeavours.
    I have been discussing with an ABAPer and have been discussing the creation of Z transactions to give me the information I’m looking for.
    I’m looking for help, assistance and expertise whether the following would be recommended or even technically feasible.
    ·     Is it possible to copy logical database ADA to say ZADA (if yes how would I or the ABAPer go about this)?
    ·     Is there a way to link existing R3 reports to the new logical database
    As the majority of the R3 reports appear to be linked to ADA the aim is to amend this once and not require creating lots of Z reports.
    Any help you could provide would be greatly appreciated
    Best regards,
    Paul

    Hi Paul,
    this is strange, what release are you on?
    I have just checked AR01 on ECC 6.0, and it offers everything you need. On the selection screen of AR01, you can add selection criteria on both Serial number and Inventory number. Plus, you can display both fields in the ALV list.
    The data may be stored on table ANLA physically, but the logical database ADA is using a structure (ANLAV) instead. Both SERNR and INVNR are available in that structure. On the selection screen, you have to use the Dynamic selections button. And in the ALV list, you simply add the 2 columns, best idea wold be to save it as a variant for future use.
    Anyway, logical databases can be copied in SE36, you simply have to press the Copy button   The more critical issue is how to link standard reports to the new LDB. The answer is, no way. Instead, you should copy some of your favorite standard reports, and change the LDB in the copies.
    But, I really do not think you need this, as ADA can provide you with the information required out of the box.
    Hope that helps, points welcome
    Csaba

  • Func Module : LDB_PROCESS and Logical Database ADA

    Hi All,
    How to get 'ANLB' data from logical database 'ADA' using the
    function module 'LDB_PROCESS'?
    Is there any other way to done this without getting into SELECTION SCREEN of this LOGICAL DATABASE?
    With Thanls & Regards,
    R.Nagarajan.
    We can -

    Hi,
    Using LDB_PROCESS will made all the fields of this LDB available to you......this is the way ..you can use n number of LDB's in your program apart from the one that u mention in Program attributes....
    for more details and Function call..use..
    Re: How to hide the selection screen of a Logical datebase?

  • Adding user fieds to logical database ADA - solution?

    Hi,
    I have problems with adding (by append structure) my user fields (which are added to standard SAP table ANLA) to logical database ADA which is used in AM reporting.
    I have found this solution:
    Thru SE30 I found, that logical database ADA using view V_ANLAZ (ANLA + ANLZ tables) for selecting data from DB. So I have created append for this view with my added fields to ANLA. Then I added the same append to structure ANLAV of logical database ADA.
    My added field are now selected in AM reporting!
    Can this solution break some SAP functionality?
    Many thanks for answer!

    So probably NOT...

  • Problem with logical database ADA

    I am trying to create query with asset values and master data fields but when trying to use logical database ADA I am getting error  No component exists with the name "VALUE0". .InfoSet Cannot be Used for InfoSet Query.
    Does anyone have an idea about such problem?

    Hi,
    The message "No component exists with the name "VALUE0"" created when  you omit to edit the field group only happens if no field is assigned to  a fieldgroup, it should not appear if you add at least one field to a  field group.                                        
    regards Bernhard

  • Multiple calling logical database ADA

    Hello,
    I need to call logical database ADA two times in my program. I use calling logical database using LDB_PROCESS function module. I need to call LDB for depreciation areas 01 and 60. If I call second time, I get exception  LDB_NOT_REENTRANT. I found, that for multiple calls of LDB, there should be LDB_PROCESS_INIT subroutine in logical database proram. In this case, program is SAPDBADA and in this program, LDB_PROCESS_INIT is missing.
    Could you pls. help me, how to call ADA logical database two times?
    Thanks&regards,
    Jirka

    The exception LDB_NOT_REENTRANT means: The logical database is not prepared to accept several successive calls within a transaction. So obviously you can't use LDB_PROCESS  for your purpose.
    Perhaps your goal is possible if you use a sequence of commands
    GET <ldb_node_1>.
    GET <ldb_node_1> LATE.
    GET <ldb_node_2>.
    GET <ldb_node_2> LATE.
    etc...
    where  ldb_node_1, ldb_node_2, etc... are some nodes included in logical database ADA. As I am not familiar with this particular LDB I can't tell which nodes are required to achieve your goal.

  • Changing logical database ADA

    Hi,
    I have a requirement to change the selection screen of a report. I need to remove one field and add another field in place of it. Now the report selection screen is getting retrieved from logical database ADA. How can I achieve the addition of field in logical database. Do I need to copy the existing logical database to a new one or is there any other way of achieving this ?

    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

  • How to read data from Logical Database ADA for more than one financia year

    Hi,
    I need to read data from ADA logical database and ANLCV node for current financial year 2007 and for the next 3 years – 2008, 2009, 2010. When I do this using program attached below, I receive only data for one year, which is entered at the selection screen in the field BERDATUM. How should I modify my program to read ANLCV node for more then one year ? Could anybody help me ?
    Kind regards,
    Zbigniew Debowski
    REPORT  ZWRZD075.
    NODES: anlav, anlcv.
    START-OF-SELECTION.
    GET anlav.
    WRITE:/ anlav-anln1, ' ', anlav-anln2.
    GET anlcv.
    WRITE:/ anlcv-kansw, ' ', anlcv-knafa, ' ', anlcv-gjahr.

    Hi!
    Have you already tried your luck in Java Programming forum?
    Regards,
    Thomas

  • Change output of abap logical database report

    Hello
    I have an abap report that is using a logical database to display some fields.My problem is that i have to change it and display more fields for output ,how can i control this?
    Thank you

    Hi,
    We need to add the required (additional) fields to the internal table structure, fill the fields with relevant data and display them on the screen. How is the output fields related to using a LDB..?
    Can you explain me a little bit more on the below stmt?
    " I have an abap report that is using a logical database to display some fields."
    I am not clear in understanding the relation b/w 'using LDB' and 'fields in output'. I dont think the fields displayed in the output screen will be restricted while using a LDB. Pls correct me if i understood wrong.
    Thanks,
    teja.

  • 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

  • Logical Database ADA

    Hi,
    I am using logical databse in a program but it is not giving all the assets compared to the standard report 'AR02'.
    Kindly advise.
    Rgds,

    Standard programs may use combination of different tables or logical database.
    So you cannot expect both of them to be same.check the program of AR02 for more details.

  • The logical database ADA

    < MODERATOR:  Message locked.  Please read the [Rules of Engagement|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/rulesofEngagement] before posting next time.  Do not offer or request points.  >
    Where do the following fields draw their underlying data from? We need to present the logic behind the data pulled from the following structures.
    KTANSW in ANLAV table (structure)
    ANLCV derives its partly from table ANLC and the remaining is derived on the basis of some computation.
    how does it calculate
    NAFA_GJE in ANLCV
    and
    ANSW_GJE in ANLCV
    (Real urgent. Immediate delivery of full points)

    look to transaction SE36:
    structure and database program SAPDBADA - (PUT ANLAV and PUT ANLCV)
    hope that helps
    God's blessing to you ALL!
    Andreas

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

  • Changes to View in logical database(SE36) is not saved in transport.!!

    Hi ,
    Logical Database: ADA
    Selection view: CUS
    We did few changes to the view for table fields ANLAV in SE36 .
    When I press save, it is not asking for transport number.
    How i can save these entries in transport?  Do I need to manually place in the transport?
    Kindly Suggest.
    Thanks

    Hi,
    Please check below sdn link..
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b0e0039a-0d79-2c10-0aaf-9f6c062c0ffb?quicklink=index&overridelayout=true
    BR,
    Vijay

  • Is there any harm in customizing logical database?

    Hi Experts,
    I want to add two field in logical database ADA and hence I created ZADA in se36.
    Can I add this ZADA in my program which is a copy of standard program S_alr_87012936?
    I just want to know is there any performance issue or any other botheration to SAP.
    Thanks
    Shireen

    here is a similar post:https://discussions.apple.com/message/22199002#22199002.  They dont need the full #.

Maybe you are looking for

  • Adobe reader 10.1.2 crashes when opening pdf

    I have a user with windows XP pro ,  Just recently she tries to open pdf's in outlook 2003 and it crashes. Did an uninstall of reader and re-installed and it worked fine for a couple days the it crashed again. I again un-installed and re-installed an

  • Concurrent manager did not failover

    Dear all, i've setup the load balancer and PCP on 2 appsTier and 2 DBTier. the failover of forms and HTTP are working fine.When i shutdown node 2, i can connect to common URL and open forms and run request because node one is the primary node for all

  • Multiple Hierarchy in Dimension and ENT-06972: while viewing them

    Hi I am running owb 10gr2 patched 10.2.0.5.0. Tried to create multiple hierarchies in time dimension . Ex Calendar Hierarchy and fiscal hierarchy . Created them using time wizard and them adding fiscal levels and recreate mapping to generate etl code

  • Javax.naming.InvalidNameException when deploying JCA project

    Greetings, I have found the "JCA on EP6: Building Portal Applications with Remote Function Modules" (Mar'04) to be one of the clearest documents on how JCA from EP works. I also found the sample jca package package that comes with it to be one of the

  • Getting a DisplayObjectContainer name

    Hi to Eone, I'd like to know if is possible to trace the name of a container object using the contained object. Something like: mc1 = new Movieclip(); cont1.addChild(mc1); trace ("container object is: " + mc1.function_I_need()); OUTPUT container obje