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
Similar Messages
-
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®ards,
JirkaThe 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. -
Why and how we use Logical Database?
Can anybody explain with example why and how we use logical database?
Regards,
RajanHello,
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 -
How to use Logical database in function module?
I will create a function module in HR.
but how to use Logical database in function module ? Logical database PNP always show screen.in function (RFC) code , it is a matter.You cannot attach the LDB to the main program of the function group.
- So you may [SUBMIT|https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=submit&adv=false&sortby=cm_rnd_rankvalue] a report which use the LDB and get back the data (export/import), by default in the syntax of SUBMIT the selection-screen will not be displayed
- Use [LDB_PROCESS|https://www.sdn.sap.com/irj/sdn/advancedsearch?query=ldb_process&cat=sdn_all], fill a structured table for selection, and get data back in another table
- Use [HR function modules to read Infotypes|https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=hrfunctionmodulestoread+Infotypes&adv=false&sortby=cm_rnd_rankvalue].
Regards -
How to determine logical database in a program?
Hello guys!
How to determine logical database in a program on Eclipse?
I have not found any options:
Thanks!Welcome to SDN
Check the table RSOSFIELDMAP
Assign points if useful
Regards
N Ganesh -
How to know logical database supports Dynamic Selections
hi all,
1. Logical database KDF supports Dynamic Selections
2. How to know logical database 'KDF' supports Dynamic SelectionsYou might find an answer regarding dynamic 'WHERE' statements in standard SAP report SAPDBKDF
-
How to modify Logical database Selection screen
I am using PNP logical database , it is giving one selection screen ,
after executioni can able to change the selection screen but i want to change default selection screen so that when i execute i want specific fields in selection.
How to modify it?Hi,
You need to use report category.In the attributes,click HR report category and select or create the selection screen you need.
Check this link.
http://www.sapdevelopment.co.uk/hr/hr_repcat.htm
Kindly reward points by clicking the star on the left of reply,if it helps. -
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 -
HI all,
I am trying to execute the report RFDOPR00 , where structure BSEGA is getting populated from Logical database DDF. Can I put break poing in DDF and see how BSEG is being populated.
I tried doing so but , not able to reach the break point. Please suggest how to debug DDF?
Regards
SaurabhHi,
If you want to see how it is getting populated.
Goto Tcode SE36, give DDF and press display.
On the user menu bar click on source code to view the logic.
Regards,
Amit -
Hi expert.
now that, I'm using Logical database KDF for report module AP, but i meet issue following.
first way i used SE38 and choose radio Attribute and Input LDB is KDF.
In program I get only NODE BSIK but structure BSEGA Not is initial( I don't get BSEG anywhere)
second way. I used FM LDB_PROCESS to call LDB KDF.
I also get NODE BSIK then BSEGA Is initial.
Please anybody to me first way structure BSEGA have data, second way it haven't data.
Thank & best regards,
Dungnvdon't use fm but include KDF as in standard report RFKOPO00
hope that helps
Andreas -
How to call the Database views in Reports?
Hai experts,
i created one Database view in data dictionary for that how to call the that in my program?
are we write the select quries on views.
plz help me.
thanks in adv.thanks for ur reply.
how to maintain data in maintance view . is it possible write the select query on that . I know it most be relate with forgien key.
plz help.
thanks in adv. -
Don't have access to my old apps and I can't remember how to call fields from a database link now...
when i try
select "TABLE"."DATE" as "Date"
from "TABLE" "TABLE" @LINKNAME
I get ORA-00933: SQL command not properly ended
Tried CHRISD which is the name of the link, then tried CHRISD.REGRESS.RDBMS.DEV.US.ORACLE.COM which is the entire name.
Neither one looks right to me but I can't remember the correct syntax for the link name... I remember putting something about userlink in there somewhere but nothing I can think of works.
anyone?select ename from emp@dblink
...lose the double quotes.
Scott -
Hi,
I have created one logical database using BSAK & BSEG named as "ZVENLDB".
While iam calling this LDB into abap program...it is showing error that "BSAK is not a node of the logical database".
Could any one tell me where might be the problem?
...this is abap program...
report Z_SAMPLE.
NODES: BSAK,BSEG.
GET BSAK.
SKIP.
WRITE:/BSAK.
GET BSEG.
SKIP.
WRITE:/BSEG.
Reward guaranteed...
KakiHere is the link for help for more details:
http://help.sap.com/saphelp_47x200/helpdata/en/9f/db9b5e35c111d1829f0000e829fbfe/frameset.htm
Hope this will be helpful. -
How to find Logical database name using selection view
Hi Experts,
How can we find logical database name using selection view in se36.
Regards,
ManiHi,
If you want to see the logincal database used in the report ( tcode se38) in the intial screen select the attribute tab
and click display you will bw able to see the logical datbase ysed for the report.
Thanks. -
How to Find Logical Database with table name
Shankar
Version 4.6x
If you need to find the logical database for a table name, you can used <b>SE36</b> - Logical Database Bulider.
Steps :-
Go to transaction <b>SE36</b>
Click <b>Extras -> Table usage</b>
Supply the Table name and hit enter.
A Display Logical Database will be shown on a pop-up windows.
Reward points if it is usefull ....
Girish
Maybe you are looking for
-
Hi everyone, I am trying to get the properties of a button in a webdynpro by doing : IWDButton button = (IWDButton)wdContext.getCurrentElement().getAttributeValue("Go_ctx"); button.setEnabled(false); I get a CastClassException. Can someone help ? Tha
-
J2ee in 620 Web AS Dialog server is not coming up
Hi all, We have installed new 620 WEB AS dialog server in same host as CI , Installtion completed successfully i am not able to see the ports and j2ee in SMICM.. it showing as True for J2ee configured but ports are not there and J2ee operational
-
How to send huge no. of excel sheet attachment to a mail ID
HI , I have mail functionality program which send mail to a mail id with multiple excel sheet attchment. I have done all these things. When it sends small number of excel attchment then it's ok. But when it sends huge number of excel attch
-
I'm getting this error 'Unexpected installation error -203 when installing add-ons'
this occurs when I try to update existing extensions or install new ones. I have followed the information in this article [https://support.mozilla.com/en-US/kb/Unexpected%20installation%20error%20-203%20when%20installing%20add-ons] but neither soluti
-
Trying to configure a local login on routers and switches running IOS. We currently have tacacs+ configured, but want to configure the local login with SSH v2 incase we loss connection with the ACS server. I followed the direction listed in the link