Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

creating db view?

Former Member
0 Likes
1,296

hi all,

As inner join is not allowed on BSEG table...i want to create db view of it so that join could be acheived? Is that ok? How to create db view?

1 ACCEPTED SOLUTION
Read only

dani_mn
Active Contributor
0 Likes
1,166

HI,

you can't use bseg in views, because it is a cluster table.

you can create views using transaction 'SE11'.

REgards,

8 REPLIES 8
Read only

dani_mn
Active Contributor
0 Likes
1,167

HI,

you can't use bseg in views, because it is a cluster table.

you can create views using transaction 'SE11'.

REgards,

Read only

Former Member
0 Likes
1,166

Hi Viswanath,

U cant use inner join in BSEG table as well as Views as its a cluster table.

Use 'FOR ALL ENTRIES IN ITAB' for solving ur problem.

That will work.

Pls reward me points if u satisfy with the solution.

Thanks

Manas Ranjan Panda

Read only

0 Likes
1,166

i want to have two fields from bseg table into a inner join. how to achieve this?

Read only

Former Member
0 Likes
1,166

hi,

Here is the procedure for creating db view but this can not be created for cluster tables.

1. Enter an explanatory short text in the field Short text.

You can for example find the view at a later time using this short text.

2. Define the tables to be included in the view in the Tables field of the Tables/Join

conditions tab page.

Keep in mind that you can only include transparent tables in a database view.

3. Link the tables with join conditions .

If there are suitable foreign keys between the tables, you should copy the join conditions

from these foreign keys .

Place the cursor on a table name and choose Relationships. All foreign keys to other

tables defined for this table are displayed. Select the foreign keys and choose Copy.

The join condition is now derived from the definitions in the foreign key.

If you only want to see the foreign key relationship existing between two tables, you must

first select these two tables (click on the first column of the input area Tables) and then

choose Relationships.

4. On the View fields tab page, select the fields that you want to copy to the view.

Choose Table fields. All the tables contained in the view are displayed in a dialog box.

Select a table. All the fields contained in this table are displayed. You can copy fields by

selecting them in the first column and choosing Copy.

You can also include an entire table in the view.

5. On the Selection conditions tab page, you can (optionally) formulate restrictions for the

data records to be displayed with the view

The selection conditions define the data records that can be selected with the view.

6. With Goto Technical settings, you can (optionally) maintain the technical settings of

the database view.

You can define whether and how the database view should be buffered here. Proceed as

for the technical settings of a table Note

that only the settings for buffering can be maintained for database views.

7. On the Maintenance status tab page, select the maintenance status of the

database view.

If the view contains more than one table, the maintenance status read only cannot be

altered.

8. Save your entries. You are asked to assign the view a development class.

You can change this development class later with Goto Object directory entry.

9. Choose activate.

When a database view is activated, the corresponding view is also automatically created in the

database if the base tables of the view were already created there.

At activation, a log is written; it can be displayed with Utilities Activation log. If errors or

warnings occurring when the view was activated, they are displayed directly in the activation log.

If the base tables are not yet created in the database, this is recorded in the activation log. The

view is nevertheless activated in the ABAP Dictionary. In this case you can create the relevant

view on the database later with the database utility.

Regards,

Sailaja.

Read only

Former Member
0 Likes
1,166

Hi,

Innner join is not possible on cluster tables

besg is cluster table .

You can't create view on bseg table also is simulation of inner join.

Regards

amole

Read only

0 Likes
1,166

Hi,

i want to have two fields from bseg table and two fields from t001 table into a single table. since bseg is a cluster table so inner join is not possible. Any other method to acheive the purpose?

Read only

0 Likes
1,166

Use a coding like this:

SELECT * FROM sbeg

INTO TABLE it_bseg

WHERE ...

SELECT * FROM t001

INTO TABLE it_t001

FOR ALL ENTRIES IN it_bseg

WHERE bukrs = it_bseg-bukrs.

Enjoy

Tamá

Read only

Former Member
0 Likes
1,166

Hi

You can use for all entries option.

First select the fields what ever you want from t001 then select fields from bseg table using for all entries option into the single internal table by giving where condition.

Regards

Haritha.