Logical database builder
where the data of ldb wil be store in the system?plzz tell
where the data of ldb wil be store in the system?plzz tell
Did you mean the META DATA or the Data
Normal Data is stored in Infotypes
Similar Messages
-
Hi All, I am quite familiar with Logical Databases but I need to understand the following.
1) I am using LDB ADA, but I want to use my own Selection Screen and not the default one that the LDB provides. I know I must put something in AT SELECTION-SCREEN but am unsure what.
2) Once I get the data, I want to store the data in an internal table - how do I go about doing this? If you can provide a code example that would be great.
Points for any relevant help.Hi,
A logical database is a special ABAP/4 program which combines the contents of certain database tables. You can link a logical database to an ABAP/4 report program as an attribute. The logical database then supplies the report program with a set of hierarchically structured table lines which can be taken from different database tables.
Logical database structures
There are three defining entities in an SAP logical database. You must be clear on all three in order to create and use one.
Table structure: Your logical database includes data from specified tables in SAP. There is a hierarchy among these tables defined by their foreign keys (all known to SAP), and you are going to define a customized relationship between select tables. This structure is unique and must be defined and saved.
Data selection: You may not want or need every item in the referenced tables that contributes to your customized database. There is a selection screen that permits you to pick and choose.
Database access programming: Once youve 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
Heres 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) Youll be prompted for a short text description of your new logical database. Enter one. Youll then be prompted to specify a development class.
4) Specify a root node, or a parent table, as the basis of your logical database structure. You can now place subsequent tables under the root table as needed to assemble the data object you want. You can access this tree from this point forward, to add additional tables, by selecting that root node and following the path Edit | Node | Create. Once youve 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 dont have to write a single line of code.
Noted point is we cant add any selection criteria thru our se38 program if you are attaching any LDB to program.Ist of no use.
If you want to change selection criteria to the existing LDB, you have to goto SE36 tcode and provide LDB name and choose "Change" mode by selecting "Selections" Radio button.
declaration of params is different compared to normal se38 program in some aspects.
PARAMETERS :p_curr LIKE bkpf-waers FOR TABLE bkpf OBLIGATORY.
this BKPF table should be one of the node in the "Structure" Radio button.
Thanks
Sivaparvathi
Please reward points if helpful. -
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. -
How to pass a default value in selection screen of logical database pnpce
Dear All,
Can any one tell me how to pass a default value in selection screen of logical database pnpce .
Regards
Rakesh SinghHi Rakesh,
Go to SE36 (logical database Builder).First enter PNPCE in Logical Database and press documentation,here you will get the details of exactly what is PNPCE and how it works.After that select selections in subojects in se36 only and enter display ,there you have the include from where you acn get the idea.
Regards,
Rahul -
Regarding Logical database and select statement..
Hi
Experts.
i would like to know the diff b/w logical data base & select statement while using report.
wt is the use of logical databases in R/3. is there any advantage used in the reports.
Thanks & Regards..
Spandana.Dear Spandana,
Go through the below description of LDB. I hope you wil get a fair amount of idea.
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.
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.
Regards
Arindam -
Hoe to creat own logical database inhr
hi all,
can anyone send the codefor creating the own logical databse like pnp in HR.<b>Creating a Logical Database</b>
Open the Logical Database Builder (<b>SE36</b>)
1. Enter a name on the initial screen of the Logical Database Builder and choose Create.
2. A dialog box appears. Enter a short text. You can change this later by choosing Extras -> Short text or Administration info.
3. Once you have entered the short text, you must define the root node of the logical database. Enter the node name and its attributes. There are three different types of nodes:
The logical DB gets created.
Then to edit the logical DB, use the following steps.
The structure editor of the Logical Database Builder appears. On the left is the name of the root node, followed by a code for the node type: T for a database table, S for a ABAP Dictionary type, and C for a type from a type group. The new logical database now has a structure with a single node.
You can now extend the structure as described in Editing the Structure.
If you choose Next screen (right arrow in the application toolbar), a screen appears on which you can enter a search help for the logical database as described under Editing Search Helps.
If you choose Next screen (right arrow in the application toolbar), a dialog box appears, asking you whether the system should generate the selections for the logical database. When you have confirmed the dialog box, a list appears, on which you can select all of the nodes that you want to use for field selections or dynamic selections. The fields that you select are included in the source code generated by the system for the selection include.
The generated selection include is displayed in the ABAP Editor. You can change it as described in Editing Selections.
If you choose Next screen (right arrow in the application toolbar), a dialog box appears, asking you whether the system should generate the database program for the logical database. The database program is generated from the structure and the selection include. It has a modular structure, consisting of several include programs and all of the necessary subroutines, with proposals for the statements that will read the data.
The generated database program is displayed in the ABAP Editor. You can change it as described in Editing the Database Program.
If you repeatedly choose Previous screen (left arrow in the application toolbar), you can display and change the general attributes of the logical database.
Finally, you can maintain optional selection texts and documentation.
<b>Reward if helpful</b> -
An sample progam how to reterieve values from logical database
i need to reterieve prart, vernr, verna, from the table prps using the logical database psj, i know if i give psj in the logical database of the report attributes, but i should not give in the attributes, but i need to use the logical database.
i need a sample programHere is the help on the subject.
<i>
Addition 2
... DEFINING DATABASE ldb
Effect
This addition shows that the current program is the database program of the logical database ldb. The name of this logical database has a maximum length of 20 characters. Logical databases are maintained with the tool Logical Database Builder of the ABAP Workbench, in which the framework program is generated automatically including the statement REPORT. The name of the framework program is SAPDBldb.
Example
Introduction of the logical database F1S.
REPORT sapdbf1s DEFINING DATABASE f1s.
</i>
This is leading me to believe that this extension DEFINING DATABASE F1S is used only when actually building the logical database via the LDB Builder, not for use when actually using it in a program. I don't think that you can use this extension in your case.
Regards,
Rich Heilman -
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 -
hi
when i am creating logical database i am getting error with top page, although i am not doing any thing with top of page.
could any one tell me steps to create logical database using mara and marc table.
thanx in advance.
rockyhi,
Procedure for Creating a Logical Database
Enter a name on the initial screen of the Logical Database Builder and choose Create.
A dialog box appears. Enter a short text. You can change this later by choosing Extras ® Short text or Administration info.
Once you have entered the short text, you must define the root node of the logical database. Enter the node name and its attributes. There are three different types of nodes:
§ Database tables. The table must be active in the ABAP Dictionary. Tables always have a flat structure. The name of the node must correspond with the name of the table.
§ Data types from the ABAP Dictionary: The node may refer to any data type in the ABAP Dictionary. The node name and the name of the data type do not have to be the same. You can use deep data types as nodes.
§ Data types from type groups: The node can also refer to a data type from a type group in the ABAP Dictionary. Enter the name of the type group in the corresponding field. You must choose Other types before specifying this type. Data types in type groups were the forerunners of real data types in the ABAP Dictionary. Wherever possible, you should use ABAP Dictionary data types. They have all of the semantic properties of their underlying data elements. This is useful, for example, when you use a logical database to create ABAP Queries.
You can use the Text from Dictionary function to adopt the text stored in the ABAP Dictionary for the relevant table or data type.
The structure editor of the Logical Database Builder appears. On the left is the name of the root node, followed by a code for the node type: T for a database table, S for a ABAP Dictionary type, and C for a type from a type group. The new logical database now has a structure with a single node.
You can now extend the structure as described in Editing the Structure.
If you choose Next screen (right arrow in the application toolbar), a screen appears on which you can enter a search help for the logical database as described under Editing Search Helps.
If you choose Next screen (right arrow in the application toolbar), a dialog box appears, asking you whether the system should generate the selections for the logical database. When you have confirmed the dialog box, a list appears, on which you can select all of the nodes that you want to use for field selections or dynamic selections. The fields that you select are included in the source code generated by the system for the selection include.
The generated selection include is displayed in the ABAP Editor. You can change it as described in Editing Selections.
If you choose Next screen (right arrow in the application toolbar), a dialog box appears, asking you whether the system should generate the database program for the logical database. The database program is generated from the structure and the selection include. It has a modular structure, consisting of several include programs and all of the necessary subroutines, with proposals for the statements that will read the data.
The generated database program is displayed in the ABAP Editor. You can change it as described in Editing the Database Program.
If you repeatedly choose Previous screen (left arrow in the application toolbar), you can display and change the general attributes of the logical database.
Finally, you can maintain optional selection texts and documentation.
for more info on LDB chk this link
http://help.sap.com/saphelp_46c/helpdata/en/9f/db9bed35c111d1829f0000e829fbfe/frameset.htm
hope this helps.
PLZ reward if helpful. -
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 -
To use logical database PNP in class builder
Hi
Inside the class builder (SE24), i have a created a method.
Now while implementing that method, that is between method and endmethod
statement can i implement logical database PNP or PNPCE.
If 'yes' how to use it.
if 'no' what is the other way to implement authorization.
Pls help meHello,
assume that the routines GET_ITnnnn are written by yourself. For reading infotypes ABAP Objects provides us with same very helpful classes as shown below:
* define data
DATA:
gif_employee type ref to if_pt_employee,
go_employee type ref to cl_pt_employee,
gt_infotypes TYPE tim_tmw_itlist_tab,
go_control TYPE REF TO if_pt_td_control,
go_data TYPE REF TO if_pt_td_base,
go_pnnnn TYPE REF TO if_pt_td_itnnnn,
gt_p0001 TYPE TIM_P0001_TAB,
gt_p0002 TYPE TIM_P0002_TAB,
gt_p0003 TYPE TIM_P0003_TAB.
start-of-selection.
GET pernr.
<b>* Create employee instance</b>
gif_employee = cl_pt_employee=>get_employee( pernr ).
go_employee ?= gif_employee.
<b>* Get master infotypes (0001, 0002)</b>
CALL METHOD go_employee->get_master_data
EXPORTING
im_begda = id_fromdate
im_endda = id_todate
IMPORTING
* EX_I0000 =
EX_I0001 = gt_p0001
EX_I0002 = gt_p0002
* EX_I0007 =
* EX_I0008 =
<b>* Append all other required infotypes to itab</b>
APPEND '0003' TO gt_infotypes.
CALL METHOD go_employee->get_infotypes
EXPORTING
i_itlist = gt_infotypes
i_fromdate = id_fromdate " start date
i_todate = id_todate " end date
* I_FILTER =
i_noauthcheck = 'X'
IMPORTING
e_result = gt_infty_request
e_retcd = gd_retcd.
* Please see documentation of parameter e_retcd...
LOOP AT gt_infty_request INTO go_control.
go_data = go_control->data. <b>" get data object</b>
* Casting
TRY.
go_pnnnn ?= go_data.
CATCH cx_sy_move_cast_error.
CONTINUE.
ENDTRY.
<b>* Convert infotype (semi-transparent -> transparent)</b>
CALL METHOD cl_hr_pnnnn_type_cast=>prelp_to_pnnnn
EXPORTING
prelp = lo_pnnnn->prelp
IMPORTING
pnnnn = gs_p0003.
APPEND gs_p0027 TO gt_p0003.
ENDLOOP.
The class CL_PT_EMPLOYEE provides us already with very easy access to so-called master infotypes (000, 0001, 0002, 0007 and 0008). All other infotypes can be read using method GET_INFOTYPES.
Using these classes we have a very convenient and standardized way of accessing all kinds of infotypes.
Vasanth -
HR Logical database PNP. OO to fill table dynamic table from PNP ?
Hi all
I want to get some stuff from the HR logical database into a dynamic table
Here's a real simple example that writes info out to a normal list.
(report is based on using Logical DB PNP)
tables: pernr.
INFOTYPES: 0001, "Organizational Assignment
0002. "Personal Data
SELECT-OPTIONS: language FOR p0002-sprsl.
INITIALIZATION.
pnptimed = 'D'.
GET pernr.
PROVIDE * FROM p0002 BETWEEN pn-begda AND pn-endda.
CHECK language.
WRITE: / p0002-pernr,
sy-vline,
p0001-ename,
sy-vline,
p0002-sprsl,
sy-vline,
p0002-gbdat.
ENDPROVIDE.
endform.
Now what I want to do is replace the write stuff by appending the entries into a dynamic table which I will display as an ALV Grid.
so I add my structure in the data declarations
types: begin of s_elements,
pernr type p0002-pernr,
ename type p0001-ename,
sprsl type p0002-sprsl,
gbdat type p0002-gbdat.
drop_down_handle type int4.
types: end of s_elements.
include zz_jimbo_incl.
build the dynamic table
create data dref type s_elements.
assign dref->* to <fs>.
i_routine = 'POPULATE_DYNAMIC_ITAB'.*
i_names = 'NAME_COLUMNS'.
i_gridtitle = 'HR TEST'.
invoker = sy-repid.
i_zebra = 'X '.
i_edit = ' '.
call function 'ZZ_CALL_SCREEN'
exporting
invoker = invoker
my_line = <fs>
i_gridtitle = i_gridtitle
i_edit = i_edit
i_zebra = i_zebra
i_names = i_names
i_routine = i_routine
importing
z_object = z_object
dy_table = dy_table.
Now to populate the dynamic Itab the routine below is entered.
form populate_dynamic_itab changing dy_table.
assign dy_table->* to <dyn_table>.
create data dy_line like line of <dyn_table>.
assign dy_line->* to <dyn_wa>.
However I can't use GET / PROVIDE / ENDPROVIDE in a Form.
Anyway round this ---seems HR has an aversion to OO.
Cheers
jimboHi,
well, GET_PERNR is a so called event_statement. It has nothing to do with ABAP 00.
Normally it will be like this:
START-OF-SELECTION.
GET_PERNR.
PROVIDE ....
END-OF-SELECTION.
-> and here the CALL SCREEN NNNN for ALV-Display.
Provide-statements you can use in forms of course, and as many times you want during GET and END-OF-SELECTION.
But as I understood : you just want to save the write-statements?
I always develop a DDIC-Structure, declarate the data objects in the programm, read the data via Provide into the infotypes, and then make a move-corresponding to my structure. and display it.
Normally no problem.
kind regards
maik -
Using infoset based on logical database gives lots of selection parameters
Hi
I'm trying to assist a new Crystal user in getting up on running on Crystal using infosets from SAP. Presently a simple infoset based on logical database PNPCE has been built using fields from just three infotypes (to keep things simple).
When the user logs onto crystal and selects either this infoset, or a query based on the infoset, the very next step requires the user to set 80+ parameters to be null before running the report, and unfortunately those values cannot be saved to if in order to re-run the user has to manually set all the vallues to null again. Clearly this makes it pretty frustrating to use!
This initial screen does not appear if using an infoset based on table joins, but unfortunately the logical database needs to be used to fulfill certain reporting requirements.
I've tried saving a selection variant against a query and forcing it's use but these setting don't seem to be picked up by Crystal.
Are there any Crystal/Query experts out there that can help with this?
Regards
PhilHi,
Is there anyone out there that can help with this? Seems to me like an issue that there 'should' be a soluton to...but I haven't found it yet!
As a bit of additional info - the use of table join based infosets is not an option primarily because there are a lot of reports required that pull in the OM 'additional fields' that come through automatically when using an LDB. However, for table joins, it requires custom coding to be required to the infoset, which clearly restricts the user base from the ability to build their own reports.
Regards
Phil -
How to display selection screen of logical database on a screen
Hi Experts,
I create a screen 100, how do I display a selection screen of logical database on this screen.
Thanks!
Anthonyhi
if u are making HR report then goto attribute -> Logical database -> write PNPCE to create in build selection scree.
regards,
Abhilash -
Can I use logical databases in a WebDynpro ABAP program?
can I use logical databases in a WebDynpro ABAP program?
I need to build a WDA screen that is similar to the SAPDBPNP selection screen (user can find the personnel number based on several criteria, such as last_name/first_name of the employee). So it seems that the existing logical databases have already many nice features already built (like the selection screens, the logic behind the screens etc). So I was wondering if/how I can use them in my WDA application.Hello, Tiberiu.
You cannot use LDB directly within your WDA programa. BUT, you can fetch results from this LDB by using FM LDB_PROCESS. This function module can be called anytime from any kind of ABAP program. But you will still have to create the screen, as it only processes data, not screens.
Regards,
Andre
PS: Pls reward points if it helps.
Maybe you are looking for
-
"My Music" app .. song name displayed in error
Hi, I have a C1-01. I have stored some mp3s on the memory card, and I checked with an ID3 editor on my PC, they have their ID3 tags correct. But in the "My Music" app on the phone, when I go to "All Songs", many songs have their name displayed in err
-
Oracle 8i Lite Sql*Plus error
When attempting to connect to Sql*Plus I get the error ORA-21526 in an infinite loop. Any ideas how to get around it? I am running under Windows 98. null
-
New Tab above New Window in FF 3.x
Hi, so I recently used Firefox 4+ for the first time, and I like the way it puts the "Open link in new tab" above the "Open link in new window" (when one right-clicks on a link). It takes a bit of getting used to at first, but it's actually a lot mor
-
Occasional system crashes while using my iBook G4
Could someone tell if my iBook has a hardware problem that's causing OS X to crash? It passes the "Extended Test" of the Apple Hardware Test in one of the CDs that came with the Mac. Here is the contents of panic.log in /Library/Logs: Sun Dec 25 22:5
-
Question about project "production"
Once I complete a project I'm working on I'm planning on burning 1 master to a Taiyo Yuden White Inkjet Hub Printable 16X DVD-R disc. Once I burn the master I plan on using Toast to replicate all the discs to the same Taiyo Yuden media and then final