cancel
Showing results for 
Search instead for 
Did you mean: 

Logical database

Former Member
0 Kudos

Hi,

I would like to create a logical database based on table EKKO.

Now when i'm selecting the fields ekko dynamically I don't want, <b>for example</b>, give the possibility to the user to choose the <b>company code field (EKKO-BUKRS).</b>

is it possible to do it?

thanks you,

joseph

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Joseph,

One option I know of is to create a DDIC Structure similar to EKKO by taking the fields that you want to allow the user to select dynamically and then use it as a LDB Node instead of EKKO.

Sri

Former Member
0 Kudos

You will be able to do this using selection views and for any logical database in the system. You don't need to create another one. Pasted below is the help text regarding that.


<i>Selection views are collections of fields from 
different tables. At runtime, you can define additional selections for the fields of these selection views. The additional selections are passed to the database and reduce the number of database accesses, provided the 
affected programs support the use of selection views.

In the R/3 System, you can identify selection views by their three-character key which denotes:

the origin (SAP view or customer view)
the name
the assignment to a logical database

The assignment to a logical database can be omitted. In this case, the selection view is not assigned to a particular logical database and can be used freely.

This field defines the name.

Dependencies
Please note that you must observe certain rules when
creating dynamic selections on report selection screens:

Selection views must have the name STANDARD and be 
assigned to the logical database used by the report. If 
a customer-specific view (origin CUS) exists, it is 
used. Otherwise, the SAP view (origin SAP) is used. If 
there is no selection view with the name STANDARD 
assigned to the logical database, the creation of 
dynamic selections on selection screens is across all 
fields of all tables of the logical database.
</i>

You can do this in tcode SLDB, enter your logical database name, go in. Once inside, in the menu,

'Extras-->Selection Views'. Remember that this is a client independent setting and so you have to do it in a client that allows it.

If this helps, please reward and close.

Srinivas

Former Member
0 Kudos

Thanks for the reply it's very interresting.

Srinivas, can I do it at runtime?. I mean depending of some conditions I want to enable/disable some fields for selection.

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi Srinivas,

I am looking at selection views for LDBs and what you have posted is CORRECT AND PROPER !!

I was thinking of selection views in general and in case of LDBs once you define STANDARD you cannot have more selection views which is good and should work for Joseph.

Sorry if I have created some confusion. In any case, I got a chance to learn some thing new. Thanks !!

I have used FREE_SELECTIONS_DIALOG

and FREE_SELECTIONS_INIT.

FREE_SELECTIONS_DIALOG is useful (In combination with FREE_SELECTIONS_INIT) if you want to present a dynamic selection screen at run time in a popup or full screen. LDB is optional required for these fm calls, as you can even do with DB tables in generic.

But if you are attaching LDB to the report in attributes then FREE_SELECTIONS_INIT might be useful. Need to check this out.

Sri

Former Member
0 Kudos

Yes I've already use FM FREE_SELECTIONS_DIALOG and FREE_SELECTIONS_INIT in the past and I can tell you guys it's very usefull to create dynamic screens.

But I don't know how to use those FM's in LDB.

I think this is the way to achieve what I want to do... maybe...

anyway your help,

Joseph

Former Member
0 Kudos

Hi Joseph,

Please have a look at function modules FREE_SELECTIONS_INIT and FREE_SELECTIONS_DIALOG. Both have documentation in English. I haven't used them, but they look promising for your requirement.

Srinivas

Former Member
0 Kudos

Srinivas,

Selection Views are meant only for defaulting some dyn. selections and not for limiting/hiding some fields from user correct?

As far as I know, if you define a selection view, user will still be able to select the other fields from the ldb nodes on the selection screen.

Am I missing some thing?

Sri

Former Member
0 Kudos

Hi Sri,

It works for both. Once you are in the creation of this selection view(should be named STANDARD), you can select the tables and the fields. You need to assign the fields into some groups. Those fields that are not assigned any group will not be shown in your dynamic selections. As a test, I did this.

I created a selection view for the standard SAP logical database DDF. In the maintain screen, under functional groups, I entered just one functional group 'a1' description 'test'. In the tables/nodes, I selected just KNA1. Under the Table fields/Node fields, put 'a1' for just KUNNR and left all others blank. I saved it and ran a standard report that uses this LDB. Now when I choose the dynamic selections, I only see the description 'test' and field KUNNR.

I think this is what Joseph wanted to achieve. Please correct me if I am wrong.

Joseph, I will look into the possibility of dynamically changing the dynamic selections, but nothing that I know of. If I find something, I will let you know.

Srinivas

andreas_mann3
Active Contributor
0 Kudos

Hi Joseph,

so you may not use commands:

SELECTION-SCREEN DYNAMIC SELECTIONS FOR TABLE ekko.

or

SELECTION-SCREEN FIELD SELECTION FOR TABLE ekko.

example is ldb BRM

regards Andreas

Former Member
0 Kudos

Do you want to prevent this via selecting entries via SE16?

Or where do you want to use this, in what context i mean..

Former Member
0 Kudos

I want to prevent this selection on a selection screen of a report.