Logical Database PGQ structure usage
Hello Everyone,
I have a question regarding Logical Database(LDB) usage...How to use the structure defined in LDB. We are using PGQ Logical database in one of custom programs. The structure of the LDB as hierarchy or tree is:
QALS
QAVE
QMFEL
QAPO
AFFHD
QAMV
QAMR
QASE ---> From this table
QASV
QASR ---> From this table
and etc
The code was something like this in the program:
GET QALS.
GET QAPO.
GET QAMV.
GET QAMR.
Now, my requirement is to get data additionally from QASE and QASR tables..So, I tried modifying the code according to the hierarchy structure defined in the PGQ LDB(check bold statements):
GET QALS.
GET QAPO.
GET QAMV.
GET QAMR.
<b>GET QASE.
GET QASV.
GET QASR.</b>
But in runtime I see that QAMR and QASE is filled up with # data ...I am not sure if is right way to do....Is this the way to use the structure defined in the Logical database? QAMV and QASV lie in the same level of hierarchy and I have to use them to get QASE and QASR data...Let me know, if I am not clear...
Thanks for taking your time and I appreciate if some one can help me.
--- Ashley
Hi Ankur
You can use program SAPDBPGQ that is program created to test logical database PGQ. Then you can get only part responsible for nodes QALS, QAPO and QAMV
Best regards
Similar Messages
-
Hello Experts,
I want to fetch data from Logical database PGQ. I am using the following code :
Nodes : QALS, QAPO, QAMV.
GET QALS.
GET QAPO.
GET QAMV.
I am getting the data in QALS. But QAPO and QAMV are filled with #.
Can anyone please suggest how to fetch data using logical database.
Thanks!!!Hi Ankur
You can use program SAPDBPGQ that is program created to test logical database PGQ. Then you can get only part responsible for nodes QALS, QAPO and QAMV
Best regards -
Logical Database - PNPCE - Hide 'Org Structure' 'Search Help' etc buttons
Hi,
We have created a report by making a z copy of RCATS_APPROVE_ACTIVITIES. In the Z version we need to hide the buttons on the titlebar of the selection screen.
Buttons are
- Org Structure
- Search Help
- Dynamic Selection
- Selection Fields.
Can you please suggest if I can do something from the code ?
Regards,
Chiranjeevi.Hi,
Thanks for your suggestion. However, there is no title bar method that we can modify to remove the buttons. I have created a Z report Category by copying the existing one and made the modifications.
In that we can hide/display UI elements which are displayed by Logical Database.
Regards,
Chiranjeevi. -
Addtional Structure on InfoSet query of Logical database
Hi Experts,
We have a logical database on which we are supposed to create an InfoSet query. We could create the InfoSet query and also the query on top of it.
We have a requirement to add addtional fiels which are not part of the logical database. The addtional fields are in a strucuture. I added the strucuture using the Extras option, but I need help on how to extract data from this strucuture.
Can you please help me with a sample code:
Logical Database in question is - FTI_TR_PERIODS
Structure to be included is - VTG_IRATE_STRUCTURE
Field in structure to be included is - PKOND, SKOART
As this is a structure we cannot right a select statement, and I am very new to abap and require help on how to extract data from the structure.
Thanks for your help.
Best Regards,
RaviHi,
This is SAP Business one reporting and printing forum. Please find correct forum and repost above discussion to get quick response.
Please close this thread here with helpful answer.
Thanks & Regards,
Nagarajan -
Is it possible to change selection screen of logical database structure?
I have to create a z report for a standard transaction FBL01N which is extracting data according to the vendor account number(LIFNR) at the selection screen. Now as per the requirement the system should extract details according to 'vendor name' keeping the same functionality.
But the standard program is using some logical database structure KDB and the include for the selection screen is DBKDFSEL.So can I modify the selection screen of this transaction replacing Vendor No with Vendor Name.Hi..
Refer this links
http://help.sap.com/saphelp_46c/helpdata/en/9f/db9b8535c111d1829f0000e829fbfe/content.htm
http://help.sap.com/saphelp_nw70/helpdata/en/9f/db9b8535c111d1829f0000e829fbfe/content.htm
Hope this may b very helpful to u
Sravani
Plz reward points -
What are structures of logical database.
hi
what are structures of logical database.Dear Chaitanya,
The structure of LDB can be divided into three sections:
>Structure
>Selection
>Database Program
STRUCTURE:
The structure defines the data view of the logical database. It adopts the hierarchy of the database tables defined by their foreign key relationships. This also controls the sequence in which the tables are accessed. It determines the structure of the other components and the behavior of the logical database at runtime.
The structure of a logical database is usually based on the foreign key relationships between hierarchical tables in the SAP System. Logical databases have a tree-like structure, which can be defined as follows:
· There is a single node at the highest level. This is known as the root node.
· Each node can have one or several branches.
· Each node is derived from one other node.
The nodes must be structures defined in the ABAP Dictionary or data types from a type group. Normally, these are the structures of database tables which the logical database reads and passes to the user for further evaluation. However, it is also possible, and sometimes useful, to use ABAP Dictionary structures without an underlying database. For technical reasons, the maximum number of nodes allowed in the structure of a logical database is 300.
Any executable ABAP program that has a logical database linked to it can contain a GET statement for each node of the structure. When you run the program, the corresponding event blocks are processed in the sequence prescribed by the hierarchical structure of the logical database. If a program does not contain a GET statement for every node of a logical database, the processing passes through all the nodes that lie in the path from the root to the nodes specified by GET statements.
If you call a logical database using the function module LDB_PROCESS, the depth to which the system reads is controlled by an interface parameter.
SELECTIONS:
The selections define a selection screen, which forms the user interface of the executable programs that use the logical database. Its layout is usually determined by the structure. You can adapt the selections to your own requirements and also add new ones. When you link a logical database to an executable program, the selections of the logical database become part of the standard selection screen of the program (screen number 1000). If you call a logical database using the function module LDB_PROCESS, the selections are filled using interface parameters.
The selections in a logical database are defined using the normal statements for defining selection screens, that is, PARAMETERS, SELECT-OPTIONS and SELECTION-SCREEN. In a logical database, you can also use the additions VALUE-REQUEST and HELP-REQUEST to define specific input and value help. You define the selection screen in a special include program known as the selection include.
When you write programs using a logical database, you can also add your own program specific selections. The standard selection screen then contains the database-specific selections, followed by the program-specific selections that you have defined.
When the system generates the selection screen for an executable program, database-specific selection criteria and parameters are only displayed if you have declared an interface work area for them in your program using the NODES or TABLES statement.
Suppose you have a selection include containing the following lines:
SELECT-OPTIONS slifnr FOR lfa1-lifnr.
PARAMETERS pbukrs LIKE lfb1-bukrs FOR TABLE lfb1.
The selection criterion SLIFNR is linked to table LFA1, the parameter PBUKRS to table LFB1. If the TABLES statement in an executable program (report) declares LFA1 but not LFB1, SLIFNR is displayed on the selection screen, but PBUKRS does not appear.
The selection screen of a logical database can contain dynamic selections as well as static ones. Dynamic selections are extra, user-defined selections that the user can make as well as using the static selections defined in the selection include. To improve performance, you should always use this option instead of reading more data than you need and then sorting it out in the application program.
To make dynamic selections available for the node nodeof a logical database, the selection include must contain the following statement:
SELECTION-SCREEN DYNAMIC SELECTIONS FOR NODE|TABLE node.
If the node node is requested by the user of the logical databases, the dynamic selections are included in the selection screen. A user can then choose Dynamic selections to enter extra selections for the corresponding fields. If you call the logical database using the function module LDB_PROCESS, you can pass a corresponding parameter. You can use these selections in dynamic statements in the logical database program to read data. The values of the program-specific selection criteria that you defined for a node for which dynamic selections were available are also passed to the logical database. The user can also define the fields for dynamic selections as a selection view for the logical database.
The selection screen of a logical database is part of the standard selection screen (number 1000) of the executable program to which the logical database is attached. It has a standardized layout - the selection criteria and parameters appear on separate lines in the order in which they were declared. You can change the layout using the SELECTION-SCREENstatement.
The runtime environment generates the selection screen with number 1000 for every program in which the attributes do not contain a different selection screen version. You can prevent certain input fields from the selection screen of a logical database from appearing on the selection screen by defining selection screen versions with a screen number lower than 1000 in the selection include, and entering this version number in the program attributes. By pressing F4 there, you can get an overview of the selection screen versions defined in the logical database concerned. To define a selection screen version, use the statements SELECTION-SCREEN BEGIN|END OF VERSION. Within these statements you can use SELECTION-SCREEN EXCLUDEto specify fields that you do not want to appear on the selection screen.
If the attributes of an executable program contain the number of a selection screen version, the version is used in the standard selection screen. Although the input fields that you excluded from the selection screen are not displayed, the corresponding selections still exist, and you can still edit them in the program or by calling the function module LDB_PROCESS.
DATABASE PROGRAM:
The database program contains the ABAP statements used to read the data and pass it to the user of the logical database. There is a container for special subroutines into which, amongst other things, the data from the database tables is read. These subroutines are called by the reporting processor in the runtime environment in a sequence that has been predefined by the structure. The database program is determined by the structure and selections and can be adapted or expanded to meet your requirements.
The name of the database program of a logical database ldbconforms to the naming convention SAPDBldb. It serves as a container for subroutines, which the ABAP runtime environment calls when a logical database is processed. The sequence of the calls and their interaction with the events in executable programs or the function module LDB_PROCESS depends on the structure of the logical database.
A logical database program usually contains the following subroutines:
· FORM LDB_PROCESS_INIT
Called once only before the logical database is processed. It prepares it to be called more than once by the function module LDB_PROCESS.
· FORM INIT
Called once only before the selection screen is processed.
· FORM PBO
Called before the selection screen is displayed, each time it is displayed. Consequently, it is only called when you use the logical database with an executable program, not with the function module LDB_PROCESS.
· FORM PAI
Called when the user interacts with the selection screen. Consequently, it is only called when you use the logical database with an executable program, not with the function module LDB_PROCESS. The interface parameters FNAME and MARK are passed to the subroutine.
FNAME contains the name of a selection criterion or parameter on the selection screen.
MARK describes the selection made by the user: MARK = space means that the user has entered a simple single value or range selection. MARK = '*' means that the user has also made entries on the Multiple Selection screen.
· FORM LDB_PROCESS_CHECK_SELECTIONS
Called instead of the subroutine PAI if the logical database is called using the function module LDB_PROCESS without a selection screen. This subroutine can check the selections passed in the function module interface.
· FORM PUT_node
Called in the sequence defined in the structure. Reads the data from the node nodeand uses the
PUT node.
statement to trigger a corresponding GETevent in the ABAP runtime environment. The PUT statement is the central statement in this subroutine: It can only be used within a subroutine of a logical database. The logical database must contain the node node, and the subroutine name must begin with PUT_node. The PUT statement directs the program flow according to the structure of the logical database. The depth to which the logical database is read is determined by the GET statements in the application program or the interface parameter CALLBACK of the function module LDB_PROCESS.
First, the subroutine PUT_root is executed for the root node. The PUT statement then directs the program flow as follows:
i. If the database program contains the subroutine AUTHORITY_CHECK_node, the first thing the PUT_node statement does is to call it.
ii. Next, the PUT statement triggers a GET event in the runtime environment. If there is a corresponding GET nodestatement in the executable program to which the logical database is linked, the associated event block is processed. If the CALLBACK parameter of the function module LDB_PROCESS is filled accordingly, the corresponding callback routine is called.
iii. The PUT statement directs the program flow
(a) To the next subroutine of a node that follows directly, if a lower-level node (not necessarily the very next) in the same subtree is requested by GET in the executable program or in the function module.
(b) To the subroutine of a node at the same level, if the preceding node branches to such a node and if a GET statement exists for such a node in the executable program or the function module.
The PUT statement in that subroutine starts again at step (i). In the subroutine of the lowest node in a subtree to be processed using GET, the program control does not branch further. Instead, the current subroutine is processed further. When a subroutine PUT_node has been executed in its entirety, the program flow returns to the PUTstatement from which it branched to the subroutine PUT_node.
iv. When control has returned from a lower-level subroutine PUT_node, the PUTstatement triggers the event GET node LATEin the runtime environment.
· FORM AUTHORITY_CHECK_node
Called automatically by the PUT node statement. In this subroutine, you can specify authorization checks for the appropriate node node from the structure of the logical database.
· FORM PUT_ldb_SP
Called when the user makes a selection using a search help to process the key chosen in the search help. ldb is the name of the logical database. From this subroutine, you can use the entries in the search help tables to read the relevant entries from the root node root. The processing in the program can then be triggered using PUT root. The subroutine PUT_root is then not called automatically.
· FORM BEFORE_EVENT
Called before an event, the name of which is passed in the parameter EVENT. Currently, the EVENT field can only contain the value START-OF-SELECTION, to call a subroutine before this event.
· FORM AFTER_EVENT
Called after an event, the name of which is passed in the parameter EVENT. Currently, the EVENT field can only contain the value END-OF-SELECTION, to call a subroutine after this event.
· FORM par_VAL, selop_VAL, selop-LOW_VAL, selop-HIGH_VAL
Called when the user calls possible values help for the parameter par or the selection criterion selop. These must belong to the selections in the logical database.
· FORM par_HLP, selop_HLP, selop-LOW_HLP, selop-HIGH_HLP
Called when the user calls possible values help for the parameter par or the selection criterion selop. These must belong to the selections in the logical database.
Example
Suppose that in the logical database structure, LFB1 is a branch of LFA1.
and that the following selection criteria are defined in the selection include:
SELECT-OPTIONS: slifnr FOR lfa1-lifnr,
sbukrs FOR lfb1-bukrs.
A section of the database program would then read:
FORM put_lfa1.
SELECT * FROM lfa1
WHERE lifnr IN slifnr.
PUT lfa1.
ENDSELECT.
ENDFORM.
FORM put_lfb1.
SELECT * FROM lfb1
WHERE lifnr = lfa1-lifnr.
AND bukrs IN sbukrs.
PUT lfb1.
ENDSELECT.
ENDFORM.
An executable program (report) linked to the logical database could contain the lines:
GET lfa1.
WRITE lfa1-lifnr.
GET lfb1.
WRITE lfb1-bukrs.
In this example, the runtime environment calls the routine put_lfa1 after the event START-OF-SELECTION. The event GET lfa1 is triggered by the statement PUT lfa1.
Once the corresponding event block in the program is complete, PUT lfa1 branches to the subroutine put_lfb1.
From this subroutine, the event GET lfb1 is triggered in the application program. If LFB1 is the last node to be read, processing resumes with the SELECTloop in put_lfb1. Otherwise, the program flow moves to the subroutine put_node of the next node. At the end of the SELECT loop of the last node, processing resumes in the SELECTloop of the node at the next level up. The example of programming using nested SELECT loops is only used to make the program flow clearer. In a real logical database, you would avoid doing this in order to minimize the number of database accesses.
Regards,
Rajesh K Soman
Please reward points if helpful. -
Usage of GET - Basic LOGICAL database question
Hi,
I have a few doubts in Logical Databases.
1.) Why should i include a logical database in a abap program.
2.) Can i add more than 1 LDB to a abap program
3.) can Nodes statement used on all nodes on LDB
4.) Please provide a example program based on F1S LDB with small explanation.
Thanks in advance,
Bala.>
Bala Shanmuga Priyan wrote:
> Thank you all.
>
> What is the difference between tables and nodes statement,
>
> Thanks in advance,
> Bala.
AFAIK, it is expected that we should we the TABLES statement if the node type is a TABLE and if the node type is DDIC type then it is expected that we should use NODES statement, however I found that they can be used interchangeably.
We can find the node type info in the structure defintion of the LDB(in SE36)
Also check this extract from the SAP help
The nodes of the structure are declared with the TABLES statement which generates
the appropriate table work areas. You can also use the NODES statement to define
database tables as nodes. If a node of a logical database is not a database table,
you must use the NODES statement.
[Example of a Logical Database |http://help.sap.com/saphelp_47x200/helpdata/en/9f/db9be035c111d1829f0000e829fbfe/content.htm] -
Syntax error in Logical database created by copying standard PGQ
Hi guys.
I created a logical database ZMPQ_PGQ using the copy option from SE36 with the input PGQ (logical database used by QA33).
But it showing some syntax error Field "PGQ_SP" is unknown. It is neither in one of the specified tables nor defined by a "DATA" statement.
How to resolve this?
Thanks in advance.When checking the syntax of the LDB source code, go to the location of the syntax error (in include DBZMPQ_PGQSXXX), and change all internal table references of PGQ_SP to ZMPQ_PGQ_SP.
-
STRUCTURES of LOGICAL DATABASE?
STRUCTURES of LOGICAL DATABASE?
please explainhi,
Logical Databases
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. -
Hi,
can someone explain me in what cases we use Logical Databses for Reporting and in what case we use other tables?
thanksHi Anil ,
Logical datbases are the ABAP Programs which serves many functions such data selection, data extraction and authorizations.
PNPCE or PNP for Personnel Adminstration ie if you want to extract data from infotypes 0000 to 0999 and 2000 to9999
you will use this logical data base to create infosets
PCH for Organizational Management
if you want to extract data from infotypes 1000 -1999 you will use this logical data base to create infosets
PAP for Recruitment
if you want to extract data from infotypes 4000 -4999 you will use this logical data base to create infosets
Customer specific infotpyes are included in logical databases according to their nature.
Warm Regards,
Kapil Kaushal -
hi experts,
i need standard LDB's related to the tables of sd, mm and fi... can anyone help regarding this.....Ok so here you are, If you want to edit one go to SE36
LDB name
Logical database short text
50V
Delivery in process
AAV
Logical Database RV: Sales Documents
ABCLAIMLDB
Agency Business: Complaints Processing
ABS
ABAP Book: Customer and bookings
ACAC_ACE_LDBDS
Accrual Object Distribution Server Reporting Table
ACAC_ACE_LDBPS
Accrual Engine Posting Server Reporting Database
ACE_FILA_LDBDS
Accrual Object Distribution Server Reporting Table
ACE_FILA_LDBPS
Accrual Engine Posting Server Reporting Database
ACE_SOP_LDBDS
Stock Option Accounting Distribution Server LDB
ACE_SOP_LDBPS
Provisions for Awards: Posting Server LDB
ACEDS_003
Accrual Object Distribution Server Reporting Table
ACEPS_003
Accrual Engine Posting Server Reporting Database
ADA
Assets Database
AFI
Logical database for orders
AGENCYLDB
Agency Business: Logical Database
AKV
Logical Database RV: Sales Documents
ALV
Archiving Deliveries
ARV
Logical Database RV: Sales Documents
ASV
Request Screen for Summary Information
AUK
Settlement documents
AUW
Allocation Table
B1L
Transfer requirements by number
BAF
BAV-Data collector
BAM
Purchase Requisitions (General)
BANK
Logical Database for Table BNKA
BBM
Archiving of Purchase Requisitions
BC405_DIFF_NODES
Example of Different Node Types
BJF
Loans flow records with date restriction(YR
BKK
Base Planning Object
BKM
Purchase Requisitions per Account Assignment
BMM
Documents for Number
BPF
Treasury Business Partner
BRF
Document Database
BRM
Accounting Documents
BTF
Loan portfolios and flows
BTM
Process Order; Print
BUCHUNGSJOURNAL
LDB for Posting Journal
BUD
LDB For Loans Master Data, Conditions, Documents
C1F
Cash Budget Management
CCLDB_AENR
ECH: Change number with status information
CDC
Document structure
CEC
Equipment BOM
CEK
Cost Centers - Line Items
CFK
Data pool for SAP EIS
CIK
Cost Centers - Actual Data
CKA
Costing
CKC
Sales order BOM
CKM
Material master
CKQ
Material Selection for New Costing Solution
CKS
MiniApp. for the Calculator: Sales Order Data
CKS_WAO
MiniApp: Sales Order Items to be Processed
CKW
Costing run: Material Selection
CMC
Material BOM
CPK
Cost Centers - Plan Data
CRC
Work Centers
CRK
Cost Centers - Total
CRZ
Logical database for courses BC220/BC230
CSC
Standard BOM
CSR
Logical database for archiving BOMs
CTC
Functional location BOM
DBM
MRP Documents
DDF
CUSTOMER DATABASE
DPM
Planned Orders
DSF
Loan Debit Position
DVS
Logical database for archiving DMS data
DWF
Loan resubmission
EBM
Purchasing Activities per Requirement Tracking No.
ECM
Purchasing Documents per Material Class
EHS_OH001
Logical Database for Occupational Health
EKM
Purchasing Documents per Account Assignment
ELM
Purchasing Documents per Vendor
EMM
Purchasing Documents for Material
ENM
Purchasing Documents per Document Number
EQI
Logical Database (Equipment)
ERM
Archiving of Purchasing Documents
ESM
Purchasing Documents per Collective Number
EWM
Purchasing Documents per Supplying Plant
F1S
BC: Planned flights, flights and bookings
FDF
Cash management and forecast
FDK
IS-U/FERC: Drill down to line items and paths
FEF
Cash Management - Memo Records
FILA
Lease Accounting
FMF
Funds Management
FPMF
LDB, reads FPAYH and FPAYP
FRF
Drill-down Selection Screen
FSF
Cash Management Totals Records
FTI_BW_CFM_VALUES
Market Values and Simulated Values in Pos. Mgmt
FTI_LO_PERIODS
Loan/CML Period Evaluations
FTI_LO_POSITIONS
Loan /CML Positions
FTI_SWAP_POSITION
Swap Positions
FTI_TR_CASH_FLOWS
Treasury Payment Information
FTI_TR_PERIODS
Treasury: Period-Based Evaluations
FTI_TR_PL_CF
Treasury: Revenue and Cash Flow Reporting
FTI_TR_POSITIONS
Treasury Positions
FTLM_DB01
Limit Management
FUK
IS-U/FERC: Drill back from document line items
G1S
text
GLG
FI-SL Totals and Line Items
GLU3
Flexible G/L
I1L
Inventory data for storage bin
I2L
Warehouse quants for storage bin
I3L
Inventory documents
IBF
Real Estate Logical Database (Lease-Out)
IDF
Real Estate Logical Database
IDFPLUS
Real Estate Plus Logical Database
IFM
Purchasing Info Records: General
ILM
Archiving Purchasing Info Records
IMA
Logical database for investment programs
IMC
IM Summarization (not usable operationally)
IMM
Inventory documents for material
IMR
Approp. requests (not operationally functional)
IMT
Approp. requests (not operationally functional)
INM
Inventory documents
IOC
Shop floor control - order info system
IPM_ACE_LDBDS
Accrual Object Distribution Server Reporting Table
IPM_ACE_LDBPS
Accrual Engine Posting Server Reporting Database
IRM
Reorganization of inventory documents
J5F
Logical Database for new Nota Fiscal Database
K1V
Generating Conditions
KDF
Vendor Database
KIV
Customer Material Information
KKF
Balance Audit Trail of Open Items
KLF
Historical Balance Audit Trail
KMV
SD Documents for Credit Limit
KOV
Selection of Condition Records
L1L
Evaluation Whse Documents
L1M
Stock movements for material
LMM
Stock Movements for Material
LNM
Stock movements
LO_CHANGE_MNMT
Logical database for engineering change management
MAF
Dataset for Dunning Notices
MDF
Logical Database for Master Data Selection
MEPOLDB
Logical Database/Selection of Purch. Order Tables
MIV
BC: Planned flights, flights and bookings
MMIMRKPFRESB
Selection from Reservations
MRM
Reorganization of material documents
MSM
Material master
NOTIF
LDB for Basic Notifications
NOTIFICATIONS
NTI
Logical database object networking
ODC
Shop floor control - orders per MRP controller
ODK
Orders
OFC
Shop floor control - orders per prod.scheduler
OHC
Shop floor control - orders by numbers
OPC
Shop floor control - orders by material
PAK
CO-PA Segment Level and Line Items
PAP
Applicant master data
PCH
Personnel Planning
PGQ
QM: Specs and Results of the Quality Inspection
PMI
Structure database (plant maintenance)
PNI
PM Planning Database
PNM
Planning database
PNM_OLD
Planning Database
PNP
HR Master Data
PNPCE
HR Master Data (Incl. Concurrent Employment)
POH
Production orders database - header
PSJ
Project system
PTRVP
Travel Management
PYF
Database for Payment Medium Print Programs
QAM
Inspection Catalogs: Selected Sets
QAQ
Inspection Catalogs: Selected Sets
QCM
Inspection Catalogs: Codes
QCQ
Inspection Catalogs: Codes
QMI
Logical database (PM notifications)
QMQ
Inspection Characteristics
QNQ
Quality Notifications
QTQ
Logical database for inspection methods
QUERYTESTLDB
Test LDB for InfoSet Query
R0L
Archive selection: Transfer orders (MM-WM)
R1L
Archive selection: Transfer requirements (MM-WM)
R2L
Archive Selection: Posting Change Notices (MM-WM)
R3L
Archive selection: Inventory documents (MM-WM)
R4L
Archive selection: Inventory histories (MM-WM)
RBL
Archiving of transfer requests
REAO
Real Estate: Logical Database for Architecture
REBD
Logical Database for Real Estate Objects
REBP
Logical Database via Partner (Real Estate)
RECN
Real Estate: Selection by Contracts
RECONTRACT
RE Logical Database: (General) Contract
RHL
Archiving of inventory history
RIL
Archiving of inventory documents
RKM
Reservations for Account Assignment
RLI
Logical Database Reference Location
RMM
Reservations for material
RNM
Reservations
RTL
Archiving of transfer orders
RUL
Archiving of Posting Change Notices
S1L
Stock by storage bins
S1L_OLD
Stock by Storage Bins
S2L
Warehouse quant for material
S3L
Stocks
SAK
Completely Reversed Allocation Documents
SD_KUSTA
Logical Database for Sales Summary
SD_ORDER
Logical database for inquiries, contracts
SD_SALES_DOCUMENT
Logical database for inquiries, contracts
SDF
G/L Account Database
SMI
Serial Number Management
T1L
Transfer orders by number
T1L_OLD
Transfer Orders by Number
T2L
Transfer orders for material
T3L
Transfer orders for storage type
T4L
Transfer order for TO printing
T5L
Transfer orders for reference number
TAF
Treasury
TIF
Treasury Information System
TPI
Functional Location Logical Database
U1S
User master reorganization: Password changes
U2S
User master reorganization: Password changes
U3S
User master reorganization: Password changes
U4S
User master reorganization: Password changes
UKM_BUPA
SAP Credit Management: Business Partner
V12L
Pricing Report
VAV
Logical Database RV: Sales Documents
VC1
List of Sales Activities
VC2
Generate Address List
VDF
Customer Database with View of Document Index
VFV
Logical Database RV: Billing Documents
VLV
Logical Database For Deliveries
VVAV
Logical Database RV: Sales Documents
VXV
SD: Billing Document - Export
WAF
Securities position plus additional master data
WOI
Maintenance Item
WPI
Maintenance plans
WTF
Securities positions and flows
WTY
WTY LD
WUF
Sec.-Determ.master data for positions
I hope this will delh -
How to make use of logical database in reports?
hi,
I am working on a Cash Flow Forecast report, which requires the usage of 'PSJ' Logical Database for the selection screen with Profit Center(PRCTR) as one field and the other field being Period ( in MM/YYYY format).
I have not worked on Logical Database before. Since, its for the first time I am working on LDB, I require help on it.
How to proceed for this, can someone help me with it?
On receiving further inputs, I will proceed and might come up with some more queries.
Regards,
RaviHi Hari,
Thanks a lot for being so patient. yeah, I will just send you a code snippet of mine. My code is of 3000 Lines. Hence, I will send few parts of it. Just go through and let me know if you need any further information from my side.
Here is the snippet:
*& TABLES
TABLES: PROJ, "Project definition.
PRPS, "WBS Element Master Data
COSP, "CO: External Table.
COFP, "CO: External Table.
SETLEAF, "Value in sets.
FAGLFLEXT, "Profit Center.
S031, "Statistics: Movements for Current Stocks.
SETHEADERT, "short Description of Sets.
AFVC, "Operation within an Order.
AUFK, "Order master data.
PRHI, "Work Breakdown Structure.
AFKO, "Order header data PP orders.
NRIV, "Number range Intervals.
SKB1, "G/L Account Master (company code).
FMCI. "Commitments Item master data.
Type Pool
TYPE-POOLS: SLIS.
FIELD-SYMBOLS: <DYN_TABLE> TYPE STANDARD TABLE,
<DYN_WA>,
<DYN_FIELD>.
DATA: COUNT TYPE I,
D_PERIOL LIKE COFP-PERIO,
D_PERIOH LIKE COFP-PERIO,
D_GJAHRL LIKE COFP-GJAHR,
D_GJAHRH LIKE COFP-GJAHR,
D_GJAHR LIKE COFP-GJAHR,
D_PERIO LIKE COFP-PERIO,
OBJNR LIKE COSP-OBJNR,
PKOKR LIKE PRPS-PKOKR,
G_NRLEVEL LIKE NRIV-NRLEVEL,
G_BELNR LIKE COFP-BELNR,
I_OBJ-OBJNR LIKE COFP-OBJNR,
G_OPNGBAL LIKE FAGLFLEXT-HSL01,
G_PAYROLL LIKE COSP-WKG001,
G_PYROL_TAX LIKE COFP-WKGBTR,
G_PENSION LIKE COFP-WKGBTR,
G_BTLDGR LIKE COFP-WKGBTR,
G_REIMPYMT LIKE COFP-WKGBTR,
G_INTCORCPT LIKE COFP-WKGBTR,
G_CAPEXP LIKE COFP-WKGBTR,
G_SLSLDGR LIKE COFP-WKGBTR,
G_REIMRCPT LIKE COFP-WKGBTR,
G_TOTPYMNTS LIKE COFP-WKGBTR VALUE 0,
G_TOTRECPTS LIKE COFP-WKGBTR VALUE 0,
G_MVMTFRMNTH LIKE COFP-WKGBTR VALUE 0,
G_CLSGBAL LIKE COFP-WKGBTR VALUE 0.
DATA: LYEAR(4) TYPE N,
LMONTH1(2) TYPE N,
MON1(2) TYPE N.
DATA: HYEAR(4) TYPE N.
DATA: LMONTH(2) TYPE N.
DATA: HMONTH(2) TYPE N.
DATA: TOTAL(10) TYPE N.
DATA: SUM(10) TYPE N.
DATA: G_PSPID LIKE PROJ-PSPID.
DATA: TOTAL1 LIKE COFP-WKGBTR,
TOTAL2 LIKE COFP-WKGBTR.
DATA: G_KOKRS LIKE COFP-KOKRS,
G_FIPOS LIKE SKB1-FIPOS,
G_POSIT LIKE COFP-POSIT,
G_BUKRS LIKE COFP-BUKRS.
DATA: L_RACCT LIKE FAGLFLEXT-RACCT VALUE '0000220000',
H_RACCT LIKE FAGLFLEXT-RACCT VALUE '0000227999'.
DATA: I TYPE I VALUE '74'.
DATA: P TYPE I VALUE '62'.
*& SELECT-OPTIONS
PARAMETERS : S_PRCTR LIKE PROJ-PRCTR. "Profit Center
SELECT-OPTIONS: SL_SPMON FOR S031-SPMON OBLIGATORY. "Period
*INITIALIZATION
INITIALIZATION.
SL_SPMON-SIGN = C_IN.
SL_SPMON-OPTION = C_BT.
SL_SPMON-LOW = SL_SPMON.
SL_SPMON-HIGH = SL_SPMON.
APPEND SL_SPMON.
AT SELECTION-SCREEN
Event which occurs each time the user hits enter on the selection
Screen.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR SL_SPMON-LOW.
PERFORM MONAT_F4.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR SL_SPMON-HIGH.
PERFORM MONAT_F4.
SELECT SINGLE * FROM PROJ WHERE PRCTR = S_PRCTR.
IF SY-SUBRC <> 0 AND NOT ( S_PRCTR IS INITIAL ).
MESSAGE E019.
ENDIF.
ALL WBS ELEMENT SELECTION
SELECT PSPID INTO TABLE I_PROJTAB FROM PROJ WHERE PRCTR = S_PRCTR.
IF SY-SUBRC = 0.
LOOP AT I_PROJTAB.
CALL FUNCTION 'GET_TREE_FROM_PRHI'
EXPORTING
I_POSID = I_PROJTAB-PSPID
I_PSPNR = 00000000
NO_BUFFER = ' '
TABLES
PSP_TREE = I_PRHI
EXCEPTIONS
INPUT_ERROR = 1
PSP_HIERARCHY_ERROR = 2
PSP_NOT_FOUND = 3
OTHERS = 4
ENDLOOP. " PROJTAB
ENDIF.
SELECT * FROM PRPS INTO TABLE I_PRPSVC FOR ALL ENTRIES IN I_PRHI
WHERE PSPNR = I_PRHI-POSNR.
SELECT * FROM AFVC INTO TABLE I_AFVC FOR ALL ENTRIES IN I_PRPSVC
WHERE PROJN = I_PRPSVC-PSPNR.
SELECT * FROM AUFK INTO TABLE I_AUFK FOR ALL ENTRIES IN I_PRPSVC
WHERE PSPEL = I_PRPSVC-PSPNR AND AUTYP NE C_TWENTY.
SELECT OBJNR FROM PRPS INTO TABLE I_OBJ FOR ALL ENTRIES IN I_PRHI
WHERE PSPNR = I_PRHI-POSNR.
IF SY-SUBRC <> 0.
MESSAGE E010.
ENDIF.
I hope that's of some use.
Thanks & Regards,
Ravi -
Advise me on logical databases
hi experts,
I am working with BSEG table now .It is time consuming for me .i have followed all the instructions for using a cluster table but still it is taking time for execution.
how can i apply logical database concepts here.
send some example codes for using LDB.
Regards,
ManikandanHi,
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: i)check functions which check that user input is complete, correct,and plausible. ii)Meaningful data selection. iii)central authorization checks for database accesses. iv)good read access performance while retaining the hierarchical data view determined by the application logic.
dis advantages: 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).
If you need to find the logical database for a table name, you can used SE36 - Logical Database Bulider.
Steps :-
Go to transaction SE36
Click Extras -> Table usage
Supply the Table name and hit enter.
A Display Logical Database will be shown on a pop-up windows.
http://help.sap.com/saphelp_46c/helpdata/EN/9f/db9b5e35c111d1829f0000e829fbfe/content.htm
http://www.thespot4sap.com/Articles/SAP_ABAP_Queries_FunctionalAreas_LogicalDB.asp
Main Functions of the logical database
Standard Selection screen
Data Retrieval
Authorization check
To use logical database PNP in your program, specify in your program attributes.
Standard Selection Screen
Date selection
Date selection delimits the time period for which data is evaluated. GET PERNR retrieves all records of the relevant infotypes from the database. When you enter a date selection period, the PROVIDE loop retrieves the infotype records whose validity period overlaps with at least one day of this period.
Person selection
Person selection is the 'true' selection of choosing a group of employees for whom the report is to run.
Sorting Data
· The standard sort sequence lists personnel numbers in ascending order.
· SORT function allows you to sort the report data otherwise. All the sorting fields are from infotype 0001.
Report Class
· You can suppress input fields which are not used on the selection screen by assigning a report class to your program.
· If SAP standard delivered report classes do not satisfy your requirements, you can create your own report class through the IMG.
Data Retrieval from LDB
1. Create data structures for infotypes.
INFOTYPES: 0001, "ORG ASSIGNMENT
0002, "PERSONAL DATA
0008. "BASIC PAY
2. Fill data structures with the infotype records.
Start-of-selection.
GET PERNR.
End-0f-selection.
Read Master Data
Infotype structures (after GET PERNR) are internal tables loaded with data.
The infotype records (selected within the period) are processed sequentially by the PROVIDE - ENDPROVIDE loop.
GET PERNR.
PROVIDE * FROM Pnnnn BETWEEN PN/BEGDA AND PN/ENDDA
If Pnnnn-XXXX = ' '. write:/ Pnnnn-XXXX. endif.
ENDPROVIDE.
Period-Related Data
All infotype records are time stamped.
IT0006 (Address infotype)
01/01/1990 12/31/9999 present
Which record to be read depends on the date selection period specified on the
selection screen. PN/BEGDA PN/ENDDA.
Current Data
IT0006 Address - 01/01/1990 12/31/9999 present
RP-PROVIDE-FROM-LAST retrieves the record which is valid in the data selection period.
For example, pn/begda = '19990931' pn/endda = '99991231'
IT0006 subtype 1 is resident address
RP-PROVIDE-FROM-LAST P0006 1 PN/BEGDA PN/ENDDA.
Tables used LDB are in hierarchial structure.
Mainly we used LDBs in HR Abap Programming.
Where all tables are highly inter related so LDBs can optimize the performance there.
Check this Document. All abt LDB's
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.highlightedcontent?documenturi=%2flibrary%2fabap%2fabap-code-samples%2fldb+browser.doc
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
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
Gothru the blog which provides info on LDB's:
/people/srivijaya.gutala/blog/2007/03/05/why-not-logical-databases
Sample code
TABLES: SPFLI,
SFLIGHT,
SBOOK,
SCARR.
START-OF-SELECTION.
GET SPFLI.
WRITE:/ SPFLI: , SPFLI-CARRID, SPFLI-CONNID,
SPFLI-AIRPFROM, SPFLI-AIRPTO.
GET SFLIGHT.
WRITE:/ SFLIGHT: , SFLIGHT-CARRID, SFLIGHT-CONNID, SFLIGHT-FLDATE.
GET SBOOK.
WRITE:/ SBOOK: , SBOOK-CARRID, SBOOK-CONNID,
SBOOK-FLDATE, SBOOK-BOOKID.
GET SFLIGHT LATE.
WRITE:/ GET SFLIGHT LATE: , SFLIGHT-FLDATE.
<REMOVED BY MODERATOR>
Cheers,
Chandra Sekhar.
Edited by: Alvaro Tejada Galindo on Feb 22, 2008 6:04 PM -
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 -
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
Maybe you are looking for
-
Backup multiple devices on the same computer?
Can I use Desktop Software 6.0.0.40 to backup 2 separate devices and direct the backups to their respective folders? Both devices carry separate information so I do not want to merge the data.
-
Hi there, we use an iPad2 running iOS version 4.3.3 (8J2 - whatever that means), and we keep running into a persistent problem which is that games keep crashing after a few minutes. I am fairly certain this is somehow connected to how they interact w
-
Yutube, twitter, facebook doesnt work on my mac (10.4.11). I checked my mac with other networks, it worked. I complained to my network provider, but to my surprise, these sites works on other systems (HP/DEL etc) on my network but it doesnt open on m
-
No sound from rented movies....WHY???
Purchased Apple Tv and set up just fine. Watched stuff from You tube no problem, watched movie previews no problem, watched trailers no problem, listened to music no problem, rented two movies for movie night with family and guess what...a problem. S
-
Suggestions for formatting external drive with bad block?
I have a OWC Mercury 300 GB external drive. I wanted to erase it and use it as a backup for one of my laptops. The drive had been working fine as a Time Machine back up for an old (intel) iMac. I told Disk Utility to erase and reformat. It erased,