Logical databases (sorry for not introducing myself)

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

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

Similar Messages

  • How do u find if a logical database exsits  for ur program requirements.

    hi
    how do u find if a logical database exsits  for ur program requirements.

    Hai friend
    you just open your program and than from your MENU BAR select GOTO menu from that select ATTRIBUTE and enter then check LOGICAL DATABASE name hase give or not.
    1. open your program.
    2. from menu bar select GOTO
    3. from GOTO menu select ATTRIBUTES.
    4. check for LOGICAL DATABASE name has given or not, If give that is  your logical database name.
    reward if useful.
    uk

  • How do you find if a LOGICAL DATABASE exists for your program requirements?

    how do you find if a LOGICAL DATABASE exists for your program requirements?
    please explain.

    Hi Ramana
      One may not accurately pin point the LDB for ones requirement. But there some ways.
    1. You can find with respect to the application you are working on. You can refer to the Table field TRDIR-APPL. The following are the values it has. So suppose if you have requirement for HR you can search for application 'P' :
    A Assets accounting
    D DASS control station
    E RIVA
    F Financial accounting
    G General Ledger
    H Human resources planning
    I Maintenance
    J RK projects
    K Cost accounting
    L Warehouse management
    M Materials management
    N Hospital
    P Human resources
    Q QSS
    S System
    V Sales
    Y Customer head office
    Z Customer branch
    2. You can see the package in which your current is stored in SE80. Under the same package you can see if there are any LDBs.

  • How to find if a logical database exists for your program requrements?

    hi
    How do you find if a logical database exists for your program requrements?
    Regards

    You probably know the DB table that you'd like to query
    try where used list : 'Logical database'
    then you can see what interests you...

  • ABAP query using logical database KDF is not populating custom fields

    Hi Experts ,
    I created two following queries
    1.       VENDORCATKDF – uses KDF logical database
    2.       VENDORCATLFA1 – uses table = LFA1
    I’m pulling the same information in both queries:
    ·         Vendor Number
    ·         Country
    ·         Vendor Name
    ·         Vendor Category  (custom fields added to LFA1)
    The results for the query that uses the logical database KDF is incorrect.  It doesn’t pull in the flag on the custom field LFA1-ZMRO.   Even though the logical database KDF is made up of the table LFA1 and has these fields. 
    Is there something that can be done – so that all of these “custom” category fields under LFA1 (such as LFA1-ZZMRO) – get pulled into queries – when we use the logical database KDF ?

    Hi,
    I have got the error removed by ensuring that fields from one table are a part of one line ( taking help of ruler) only. But the underlying problem remains, the output is not ALV but List output.
    I do not think having additional fields in the query is reason for this.
    Is it bcoz iI am adjusting the output length of columns to ensure no hierarchical error ?
    Can we not have a query using LDB which is shown as SAP List?
    Regards,
    Garima.

  • Logical database PSJ for tcode CJI3 - add additional

    Hi,
    I need to create the customized program which refer to standard program RKPEP003 (CJI3) with additional fields require to be added in selection screen and ALV report.
    I checked in program attribute for program RKPEP003, there is no selection screen version exist for this logical database. Could anyone advise how do I add the additional fields in either selection screen/ ALV report (eg: Vendor).  Thanks.

    Hi,
    I managed to add the additional fields  (eg: Vendor) in ALV report in CJI3 using the user exit.EXIT_SAPLKAEP_001.
    Now, I require to add this field in the CJI3 selection screen. I tried to maintain this field via SE36 - Maintain selection Views, but the Vendor field (eg: EKKO-LIFNR) which I required is not able to display out.  Anyone have any ideas on it or how should I add this additional selection screen option?

  • 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

  • One of the functional groups of the Logical Database "SDF" does not appear.

    Hello,
    I have a problem with the logical database "SDF". It has already defined 3 functional groups. When I select the buttom "display the contents" I can see all these groups with their owns fields.
    The problem is that when I use a transaction which contains this logical database, in the dynamic selections I can only see two of the functional groups. The last one doesn't appear there and I don't know why.
    How can I resolve my problem?
    Thank you very much in advance.
    Best Regards.

    1 hour is the default timeout for "ExternalCommandTimeout". So, it could be that this one measure group's fact query is taking longer than 1 hour for the first record.  You can see the query in the error messages and might like to try it out
    manually.  Note, a common issue is with referenced dimensions or Distinct Count when an inner join or Order By are added to the fact queries.
    A simple solution might be to simply increase the ExternalCommandTimeout in the SSAS properties page.  Try 7200, and if it completes in less than 2 hours, or fails after exactly 2 hours, you know this is the issue.
    Richard

  • 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

  • LOGICAL DATABASE BRF   FOR ...  BKPF AND BSEG

    Hi friends  ,
    i want the change the input criteria  ( select option) in my program , i am using the LDB  "BRF"  ..it gives me standard selection screen  .. but i want to add the GSBER   field in the input  condition  ..
    How can i cahge the selection  criteria in standard LDB ..How can i do that ..
    Ialso want to convert select option in  output to  parameter ...
    Plz suggest..

    Dude LDB gives me one extra selection  parameter   but i need not that parameter ...
    Is ther any way by which i remove that  selection parameter and add up my new paramere ...
    The same thing  i done in pnp LDB  but i am unable to do  same in brf LDB. 
    Beaus in PNP there is "HR report  category "  BY which i cam made  >>>>

  • How to use logical database "psj" for query?

    Hi, expert :
       use "PSJ" to make a query. but in queries, the title have two lines. and can't  correspond to the content.
       how to make the title correspond to the content?
    regards

    Hi
    Comments option nothing but where you can enter your description.While creating the SAP Query using SQVI enter your query name and click create one popup window will come in that you have comments field where you can enter your description.
    Thanks
    S.Murali

  • Selection screen for HR report with logical database PNP

    Hi All,
       I am writing a HR report. And I use the logical database PNP. Also I create a HR report category for this report. In the report category, I can define the selection screen field. But all these fields are selection option format. My question is How can I add parameters, radiobutton group and checkbox in the selection screen. Thanks.
    Alex

    Hi Alex,
    Sorry for replying so late. Please try this tutorial:
    w w w. s a p t e c h n i c a l. c o m -> tutorials -> ABAP-HR -> Creating HR Report category in PNP logical database
    Sorry, I put it like this, because direct link doens't let me post the answer. Don't know why.
    It can also be something with your custom code in selection screen. Though it works fine for, try to remove COMMENTs and observe the result. Maybe parameters are overlapping somehow. First try this:
    SELECTION-SCREEN begin of BLOCK blk2 WITH FRAME TITLE text-002.
    PARAMETERS RefDate type DATS.
    parameter BFlag type c RADIOBUTTON GROUP grp1.
    PARAMETER FFlag type c RADIOBUTTON GROUP grp1.
    parameters days type i.
    PARAMETERS spvsr like PA0001-MSTBR.
    selection-SCREEN end of BLOCK blk2.
    If that works together with the report category, try to extend it with adding a selection-screen comment, but do this in reversed order (comment goes first and FOR FIELD addition is supplied) like this:
    SELECTION-SCREEN begin of BLOCK blk2 WITH FRAME TITLE text-002.
    PARAMETERS RefDate type DATS.
    SELECTION-SCREEN begin of line.
    SELECTION-SCREEN COMMENT 3(10) text-003 for field bflag.  "FOR FIELD, and goes first
    parameter BFlag type c RADIOBUTTON GROUP grp1.
    SELECTION-SCREEN COMMENT 16(10) text-004 for FIELD fflag.  "here two
    PARAMETER FFlag type c RADIOBUTTON GROUP grp1.
    SELECTION-SCREEN end of line.
    parameters days type i.
    PARAMETERS spvsr like PA0001-MSTBR.
    selection-SCREEN end of BLOCK blk2.
    If still not working, see if text-003 and text-004 are not too long (you expect them to be 10 chars), This may somehow affect selection screen.
    You may also try with setting cursor position explicity by:
    SELECTION-SCREEN begin of line.
    SELECTION-SCREEN POSITION 3.
    SELECTION-SCREEN COMMENT (10) text-003 for field bflag. 
    parameter BFlag type c RADIOBUTTON GROUP grp1.
    SELECTION-SCREEN POSITION 16.
    SELECTION-SCREEN COMMENT (10) text-004 for FIELD fflag.  "here two
    PARAMETER FFlag type c RADIOBUTTON GROUP grp1.
    SELECTION-SCREEN end of line.
    It is really hard to identify where can be a bug as it is working fine for me. Keep trying with different variations, it should finally run with some.
    Regards
    Marcin

  • Dynamic Selection for non-logical database

    How to read the dynamic selections information to a table that is not in logical database for ex. : BSAD.
    Currently, i'm reading from the function module 'RS_REFRESH_FROM_DYNAMICAL_SEL'. The value for the fields are read one by one...........totalling to thousands of codes.
    Does anyone noe a shorter way of reading it ?
    Please give sme guidance. Thank you.

    Hi Mr Anthony,
    I have a report using logical database. However, the logical database used does not contain a table, BSEG, which i need to access.
    I understand that for tables which are not in the logical database, I cannot use the "GET <tablename>" in the "START_OF_SELECTION" event.
    Please advise on how to use the "SELECT" statement for the BSEG table with constraints from the dynamic selections. Thank you

  • Prereq query for Logical Standby runs for days

    Have had an SR open for a month that isn't getting anywhere, thought I'd check here and see if anybody has run into this.
    We're looking at setting up a logical standby database, Oracle 11.2.0.3 on AIX running PeopleSoft.
    There is a prereq query in the Oracle manual which is also run via the GC wizard to find tables without unique logical identifiers.
    SELECT OWNER, TABLE_NAME FROM DBA_LOGSTDBY_NOT_UNIQUE
    WHERE (OWNER, TABLE_NAME) NOT IN
    (SELECT DISTINCT OWNER, TABLE_NAME FROM DBA_LOGSTDBY_UNSUPPORTED)
    AND BAD_COLUMN = 'Y';
    My problem is that the darned thing runs for 5.5 days.
    The view in that query runs the function  logstdby$tabf, which runs the following SQL over and over and over and over:
    SELECT * FROM LOGSTDBY_UNSUPPORT_TAB_11_2B
    Each time it runs the LOGSTDBY_UNSUPPORT_TAB_11_2B query is about 8 seconds. Run it 100,000 times and that adds up. Looks like the big problem in that query is full table scans of TAB$ and COL$.
    Anybody seen it? Anybody fixed it?

    Good suggestion - in 15 minutes you got farther than support did in 2 weeks.
    Rather than remove the sub-query, I can change it into a minus, which is functionally equivalent to the original but changes the executions on DBA_LOGSTDBY_UNSUPPORTED from many times to just once.
    select owner, table_name from dba_logstdby_not_unique
    where bad_column = 'Y'
    minus
    select distinct owner, table_name from dba_logstdby_unsupported;
    The top part of the query still takes 9.5 hours to run though, with the time now being spent the following SQL which is called from the function logstdby$tabf which is called from the view DBA_LOGSTDBY_NOT_UNIQUE :
    SELECT * FROM LOGSTDBY_SUPPORT_TAB_11_2B
    Sorry for not putting that in the original post, but I want the original query to run if possible so the GC wizard will work - and I didn't want to clutter up the question.

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

Maybe you are looking for

  • How to check the whole values of a set of map exist in the vector of map?

    Hi Friends! I have a set of map; map<int, set<int>>myset; and a vector of map; map<int,vector<int>>myvec; myset contains; 1=>11  16  30 3=>2  11 6=>2 7=>9  12  16 8=>9  13  16 myvec contains; 1=>11  15  21 2=>16 3=>11  16 4=>2  13 5=>11  16  30 6=>9

  • Vendor and Material (MARA and LFA1) linking

    Hi , I have created a view on top of mara marc and mard for one of my report requirements. Here I have mara-mfrnr field is mapping to manufacurer field in BW. Now I need to restrict the data in to this field by acct group which is available in 0vendo

  • IPhone and Europe

    Does anybody know if I can when I am in Europe, Get a sim card there and put it in my iPhone and use it? I know in Europe you can buy sim cards that have minutes on them. Thanks

  • Which version of Safari I need to download?

    I have a MacBook that's five years old and I'm trying to figure out which version of Safari is best for my computer

  • Update distinguishedName field in Active Directory?

    HI all, We are trying to create the Active Directory users from SAP .  But we are not able to manipulate the Distingushed Name attribute to create the users inside the right OU. We tried to pass the value of OU name to the attribute 'o' which is not