Logical Database ekko
I am new to Logical Database. I want to create a Logical DB which
should show me table values of EKKO based on the selection that I make. So I
want to create a Logical DB, which, if I run, should show me selection
options(for PO Number) first and once the selection is given then I should
be able to see the list of records.
Can any one let me know the sample program(code) for this. I have
tried to learn from existing Logical DBs but they are bit complecated for
me. Please be very clear with the code, as I can easily understand. The help
will be highly appreciated!!!!
Thanks in advance,
Hey,
SLDB is the transaction Code to list all the LDBs. There are a few forMM Module.
you may want to use any of these LDBs for MM.
BAM, BBM, BKM, DBM, EBM, ECM, EKM, ELM, EMM, ENM, ERM, EWM, ESM.
For further details of these LDBs, please use transaction SLDB.
Regards,
Chaitanya.
Similar Messages
-
How to retrieve data using logical database and custom select options
Hi all,
I have a selection screen which is displayed by logical database PSJ and I have two select options of my own. I need to retrieve data based on both selection screen of logical database and my own select options. How can I do it?
Thanks in advance.Hai Gupta
Check the following Document & Links
1. A logical database is in fact
a program only.
2. This LDB provides two main things :
a) a pre-defined selection screen
which handles all user inputs and validations
b) pre defined set of data
based upon the user selection.
3. So we dont have to worry about from
which tables to fetch data.
4. Moreover, this LDB Program,
handles all user-authorisations
and is efficient in all respects.
5. tcode is SLDB
good info about Logical Database. you can check the link.
http://www.geekinterview.com/question_details/1506
http://help.sap.com/saphelp_46c/helpdata/EN/35/2cd77bd7705394e10000009b387c12/frameset.htm
Re: How to Create and Use ldb in reports?
Re: Logical databases
http://help.sap.com/saphelp_46c/helpdata/en/9f/db9bed35c111d1829f0000e829fbfe/frameset.htm
Functions for displaying and changing logical databases:
Call Transaction SE36 or
Choose ABAP Workbench -> Development -> Programming environ. -> Logical databases
Interaction between database program and report:
During program processing, subroutines are performed in the database program and events are executed in the report.
To read data from a database tables we use logical database.
A logical database provides read-only access to a group of related tables to an ABAP/4 program.
advantages:-
The programmer need not worry about the primary key for each table.Because Logical database knows how the different tables relate to each other,and can issue the SELECT command with proper where clause to retrieve the data.
i)An easy-to-use standard user interface.
ii)check functions which check that user input is complete,correct,and plausible.
iii)meaningful data selection.
iv)central authorization checks for database accesses.
v)good read access performance while retaining the hierarchical data view determined by the application logic.
disadvantages:-
i)If you donot specify a logical database in the program attributes,the GET events never occur.
ii)There is no ENDGET command,so the code block associated with an event ends with the next event
statement (such as another GET or an END-OF-SELECTION).
1. transaction code SLDB.
2.enter name z<ldb-name>
3.create
4.short text
5.create
6. name of root node (here Ekko)
7. enter short text (f6)
8.node type -> data base table.
9.create
10 change logical DB
riht click on ekko and insert node
here node name ekpo
11.create
12. click on selections
13. press no Should the changed structure of Z<ldb name> be saved first.
14.select tables which you want to join.
15.transfer
16 now you have to o to coding part.
17. save
activate.
19.click to src code
double click on first include and activate
Regards
Sreeni -
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? -
Need to specify LEFT OUTER JOIN while using data from logical database BRM?
I'm trying to extract data for external processing using SQVI. The fields required are in tables BKPF (Document Header) and BSEG (document detail) so I'm using logical database BRM. Note: required fields include the SPGR* (blocking reasons) which don't appear to be in BSIS/BSAS/BSID/BSAD/BSIK/BSAK, hence I can't just use a Table Join on any of these but have to use BSEG, hence BRM.
If the document type is an invoice, I also need to include the PO number from table EKKO (PO header), if present, hence I'd like to add this to the list. However, if I do this, it seems that some records are no longer display, e.g. AB documents.
The interesting thing is that not all records are suppressed, so it's not a simple case of the logical database using an effective INNER JOIN, but the effect is similar.
In any event, is there a way to specify that the link to table EKKO should be treated as an effective LEFT OUTER JOIN, i.e. records from BKPF/BSEG should be included irrespective of whether any records from EKKO/EKPO exist or not?
Alternatively, is there some other way to get the SPGR* fields (for example) from BSEG and still join the BKPF? Of course, one solution is to use multiple queries, but I was hoping to avoid this.Thanks for everyone's responses, I know how to work around the problem with sql, I am wanting to see if there is a way to make the outer joins filter go in the join clause instead of the where clause with Crystal Reports standard functionality.
We have some Crystal Reports users that are not sql users, i.e. benefit specialists, payroll specialists and compensation analysts who have Crystal Reports. I was hoping this functionality was available for them. I just made my example a simple one, but often reports have multiple outer joins with maybe 2 or three of the outer joins needing a filter on them that won't make them into an inner join.
Such as
Select person information
outer join address record
outer join email record
outer join tax record (filter for active state record & filter for code = STATE )
outer join pay rates record
outer join phone#s (filter for home phone#)
I thought maybe the functionality may be available, that I just don't know how or where to use it. Maybe it is just not available.
If it is not available, I will probably need to setup some standard views for them to query, rather than expecting them to pull the tables together themselves. -
Selection part of Logical Database
I read about logical database somewhere on the net but it was not so clear. Can anyone explain to me about the selection part of the logical database???
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 and linking them to executable ABAP programs while setting the program contents. You edit logical databases using the Logical Database Builder in the ABAP Workbench.
However, since Release 4.5A, it has also been possible to call logical databases independently of this tool 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 executable programs, allowing them to use more than one logical database and process a database more than once.
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.
http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/db9b5e35c111d1829f0000e829fbfe/content.htm
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.
GO THROUGH 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
Logical databases are SAP standard programs that are desinged with selections screens that helps easy retrival and access of data from various tables in and efficient manner.
You can get to know more about the logical databases from the SAP documentation or the following links.
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.
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 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
1. A logical database is in fact
a program only.
2. This LDB provides two main things :
a) a pre-defined selection screen
which handles all user inputs and validations
b) pre defined set of data
based upon the user selection.
3. So we dont have to worry about from
which tables to fetch data.
4. Moreover, this LDB Program,
handles all user-authorisations
and is efficient in all respects.
5. tcode is SLDB
good info about Logical Database. you can check the link.
http://www.geekinterview.com/question_details/1506
http://help.sap.com/saphelp_46c/helpdata/EN/35/2cd77bd7705394e10000009b387c12/frameset.htm
Re: How to Create and Use ldb in reports?
Re: Logical databases
http://help.sap.com/saphelp_46c/helpdata/en/9f/db9bed35c111d1829f0000e829fbfe/frameset.htm
Functions for displaying and changing logical databases:
Call Transaction SE36 or
Choose ABAP Workbench -> Development -> Programming environ. -> Logical databases
Interaction between database program and report:
During program processing, subroutines are performed in the database program and events are executed in the report.
To read data from a database tables we use logical database.
A logical database provides read-only access to a group of related tables to an ABAP/4 program.
advantages:-
The programmer need not worry about the primary key for each table.Because Logical database knows how the different tables relate to each other,and can issue the SELECT command with proper where clause to retrieve the data.
i)An easy-to-use standard user interface.
ii)check functions which check that user input is complete,correct,and plausible.
iii)meaningful data selection.
iv)central authorization checks for database accesses.
v)good read access performance while retaining the hierarchical data view determined by the application logic.
disadvantages:-
i)If you donot specify a logical database in the program attributes,the GET events never occur.
ii)There is no ENDGET command,so the code block associated with an event ends with the next event
statement (such as another GET or an END-OF-SELECTION).
1. transaction code SLDB.
2.enter name z<ldb-name>
3.create
4.short text
5.create
6. name of root node (here Ekko)
7. enter short text (f6)
8.node type -> data base table.
9.create
10 change logical DB
riht click on ekko and insert node
here node name ekpo
11.create
12. click on selections
13. press no Should the changed structure of Z<ldb name> be saved first.
14.select tables which you want to join.
15.transfer
16 now you have to o to coding part.
17. save
activate.
19.click to src code
double click on first include and activate
Regards
Vasu -
Logical Database in Abap Objects
Hi to All
I want do it a program report using a Logical Database.
Is this possible ??? But when I make a GET <node>, occurs the following error:
"" Statement "ENDMETHOD" missing. ""
I'm doing the following:
CLASS MONFIN IMPLEMENTATION.
METHOD TRAER_DATOS.
GET VBRK.
ENDMETHOD.
ENDCLASS.
Please, somebody tell me how I use the logical database in Abap Objects.
Thank you very much
Regards
Dario R.Hi there
Logical databases whilst of "some use" are not really part of OO.
If you want to use a logical database in an abap OO program I would create a special class which just does the get data from your DB and pass this either at record or table level.
Techniques such as GET XXXX LATE aren't really part of any OO type of application since at Object Instantiation time you should be able to access ALL the attributes of that object.
As far as OO is concerned Logical databases are a throwback to "Dinosaur Technology".
Since however modules such as SD and FI are still heavily reliant on relational structures (i.e linked tables etc) then there is still some limited life in this stuff but for OO try and solve it by another method.
If you really must use this stuff in OO then do it via a FMOD call and save the data in a table which your method will pass back to your application program.
You can't issue a GET command directly in a method.
Cheers
Jimbo -
Hello,
I have a program in R/3 that is based on a logical database. I don't want to have to write the program all over again in Webdynpro.
Is there a way to use the logical database in Webdynpro for ABAP.Basically WDA calls a FM and then the following help is a good starting point:
"Calling a Logical Database Using a Function Module"
http://help.sap.com/saphelp_nw04/helpdata/en/64/237f8cd43711d1950b0000e8353423/content.htm
Kindly close the thread and award appropriate a points to the answer given.
Sergio -
Logical database in adhoc query
Hello All,
Can anyone tell me what is the logical database in adhoc query?Hi
When you create a query , you have to select an infoset. Infoset can be considered as a source from which data is populated in the Query Fields.
Infosets are created from Transaction SQ02.
There can be four methods through which an Infoset can become a source of data:
1. Table join ( By joining two or more tables from Data dictionary)
example: Joining tables PA0001 and PA0006 on Pernr to get a one resultant dataset
2. Direct read of Basis Table ( Like PA0001 as a source for data in Infoset )
3. Logical Database ( A Pre-written Program by SAP that extract data from clusters, tables taking care of authorizations and validity periods)
Example : Logical database PNP, PNPCE (Concurrent Employement),PCH ( LDB for Personnel Development Data)
Custom Logical DBs can be created in T_Code SE-36.
4. Data Retrieval by a Program ( Custom code written by ABAP developers which will collect and process data) . This program has a corresponding Structure in data dictionary and the fields of this structure will be used in query)
Reward Points, if helpful.
Regards
Waseem Imran -
LOGICAL DATABASE IN HR ABAP PRPGRAMMING
Hi Friends,
what is use of LOGICAL DATABASE IN HR ABAP PROGRAMMING
AND END-OF-SELECTION EVENT IN HR PROGRAMMING PROGRAMMING???
regards,
vijay.hi
HR Logical Databases
In Human Resources (HR), the following logical databases can be used as a data source for HR InfoSets:
PNP (PNPCE)
PAP
PCH
By selecting a logical database, you determine the HR data that can be reported on using an InfoSet.
Logical Database PCH
This logical database generally enables you to report on all HR infotypes. However, you are advised not to use this logical database unless you want to report on Personnel Planning data.
Logical Database PNP (or PNPCE)
Use logical database PNP to report on HR master data. It is possible to use logical database PCH to access this data, but PNP meets such reporting requirements more quickly because it is best suited to the task of selecting persons.
Logical database PNP enables you to access HR master data and infotypes from Personnel Planning. For example, you have the following options:
Reporting on the costs, number of attendees booked, and instructor for a business event on which an employee is booked
Reporting on working time and planned compensation for a position that an employee occupies
Reporting on the validity and proficiency of a qualification that an employee fulfils
From a technical perspective, this means you can use PNP to report on all of the infotypes that exist for objects (infotype 1000) that have a direct relationship (infotype 1001) with the Person object.
The ability to access infotypes from Personnel Planning using logical database PNP is a special feature that you can only use in the context of SAP Query and Ad Hoc Query. You cannot use this functionality for ABAP reports you programmed yourself.
You can also use logical database PNP to report on data from Personnel Time Management (infotypes 2000 to 2999) and Payroll (special payroll infotypes for the USA and customer infotypes; for more information, access Customizing for the Human Resources Information System and see Payroll Results).
Logical Database PAP
Logical database PAP enables you to access data from Recruitment.
regards
navjot
reward if helpfull -
Logical database and program selection filter
Hi experts ,
In my program i have to select pernr through logical database selection and payroll area through manual coding .
Could you tell me how to give the filter condition in program.I am using PNPCE Logical database .
Thank you.
Devika.I guess you mean to modify the screen layout during AT SELECTION-SCREEN OUTPUT via
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
screen-active = 0.
MODIFY SCREEN.
ENDLOOP.
This does hides all screen elements but the screen is still displayed. -
Logical Database and Logical Thing
Hi,
i want to access KONV which is cluster table and the field is KWERT.
The thing is that i want to access it by taking customers from KNVV and giving it to VBRK (SALES Table). Now in VBRK i want to have a selection on FKDAT to get a list of Customers stored in the field called KUNAG.
on VBRK-KUNAG basis i want to access the table KONV-KWERT.
If i am doing queries then the System stops responding cuz it has got alot of overhead. So i tried to use Logical Database called VFV.
If this is the best solution means using LDB then how to use it, can anyone help me with this. I tried it by Function module but it is showing all data without considering selection criteria.
If anyone can help me then plz do answer or refer me to any web site so that i can figure this thing out. If anyione has got a good book on that then plz feel free to mail me.
Thanks,
Muhammad Usman Malik
ABAP Consultant
Siemens
[email protected]
+92-333-2700972Thanks Shibba that was very helpful, i applied that but the system overhead was so much.
can u help me with Dynamic selection code.
I used FREE_SELECTION_INIT, FREE_SELECTION_DIALOG and then FREE_SELECTIONS_RANGE_2_WHERE to get ther Selections in one table.
if u want me to send u the code then i can do that cuz i am getting so much mad that this work is not done yet.
The Scenario here is that we want to take BILLED Customers and VKORG as Industrial Billing Customer and then taking VBRK and giving all these Customers and then taking selection on FKDAT range.
Now after that the data should be collected from KONV-KWERT and i want to perform some calculation over it. I am using VFV (Logical Database) to perform this thing because i know that it would be very fast then applying my own queries.
If you can mail me any book on Logical Database and Dynamic selection then it will be very Helpful.
Thanks once again for being such helpful.
Muhammad Usman Malik
SAP Consultant
[email protected]
+92-333-2700972 -
Logical database access in abap HR
Dear all,
i am working on HR Master Report. is there any way to access logical database PNP without standard input screen.
means due to requirement my input screen is totally different so i don't want to use standard input screen. but i want to access
pernr table by get pernr or other functioality of PNP logical database.
any valuable suggesstion will be much apprecaited.
Thanks and Regards
vijay dwivediYes, there is, by means of FM [LDB_PROCESS|http://help.sap.com/saphelp_47x200/helpdata/en/64/237f8cd43711d1950b0000e8353423/frameset.htm]
Regards
Marcin -
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 -
Use of Logical Database in function module
Hello Experts,
Is there a way of using logical database and Get enent inside a function module.
I am trying to create a RFC for HR module and need this badly. Any help would be highly appriciated.
Thanks,
Gregory fernandoThis fm will work fine with all LDBs including PNP
Have you checked the fm documentation ?
a® -
Change selection screen in LDB (KDF logical database - NOT HR)
Hi All,
Iu2019d like to use KDF logical database to keep the dynamic selections since user wants to use it but I need to change the selection screen itself. The existing variants for KDF donu2019t meet the user requirements. Some fields I need to hide some add. Like I want to u201Cremoveu201D the field u2018Posting periodu2019 (MONAT) (which is available in dynamic selection screen) and put it on the u201Cmainu201D selection screen.
Do I need to create my own logical database or there is a way around?
Could someone give me a practical advice or sample of solution?
Thanks a lot.Thanks Himanshu,
I did as you suggested but problem is that it does not allow me to hide the whole block.
I have 3 filelds actually on block KD_0 I need to hide (its from selection screen of KDF logical database.)
SELECT-OPTIONS: KD_LIFNR FOR LFA1-LIFNR MATCHCODE OBJECT KRED.
SELECT-OPTIONS: KD_BUKRS FOR LFB1-BUKRS.
SELECTION-SCREEN END OF BLOCK KD_0.
PARAMETERS KD_INDEX AS SEARCH PATTERN FOR TABLE LFA1.
What I did is below. I used sp instead of u201C=u201D since it has many screen for field KD_LIFNR(for frame, text etc).
And when I did just for KD_LIFNR it was hidden but when I did the same for KD_BUKRS it was not hidden . The field has stars u201C*********u201D in it.
Same happen with KD_INDEX. The name of the field is hidden but field not and it filled with ********. Do you have any ideas what it can be?
I debugged it to catch all screen names but no luck
loop at screen.
if screen-name cp 'KD_LIFNR' or
screen-name cp 'KD_BUKRS' or
screen-name cp 'KD_INDEX' or
screen-name = '%B000003_BLOCK_1000' or
screen-name = 'SSCRTEXTS-FRAME_TEXT' or
screen-name = 'SSCRTEXTS-MCID_TEXT' or
screen-name = 'SSCRTEXTS-STRNG_TEXT' or
screen-name = 'SSCRFIELDS-SEARCH_BTN' or
screen-name = '%B025008_BLOCK_1000' or
screen-name = '%F021010_1000' or
screen-name = 'ALCUR' or
screen-name = '%F022012_1000' or
screen-name = 'EXCDT' or
screen-name = 'SSCRFIELDS-UCOMM'.
screen-invisible = '1'.
modify screen.
endif.
endloop.
Maybe you are looking for
-
Id has "live:" name on my account. How can I get...
Hello, My id has "live:"<name> on my account. How can I get rid of "live:"? Btw, I am using Microsoft account. Also, since my name as live: I get unnecessary public invites. HOw can I block all these unnecessary invites? Also, how do I make my id
-
HT1551 Do you have to have a certain Hdmi cable for sky go to stream picture not just sound?
Do you have to have a certain Hdmi cable for sky go to stream picture not just sound?
-
Why is my video perfect in iMovies but when I try to share it in ANY mode it is jittery? Any info would be great. Thank you
-
I am trying to import a set of data from Sql server to my ODB and I'm getting this error could anyone help or maybe direct me to the right path. Because i know I have data in the the fold I'm importing to my ODB Validation Error Examine and correct t
-
How do I change my Bluetooth name
Can anyone tell me how I change my Bluetooth name