Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Report (Urgent)

Hi All,

I am trying to build a report, where i want the output to be as follows:

Plant | Mtl | Mtl Descpn | Moving avg price | Fixed Vendor Indicator | Vendor No. | Vendor Name | Net Price

The data for Plant & Mtl (MARC), Descpn (MAKT), Mvg Avg price (MBEW), Fixed Vendor Indicator & Vendor no. (EORD), Vendor name (LFA1), net price (EINE).

I tried joining the tables in SQVI, but did not get the output as desired, i believe this can be done with some ABAp lines in infoset & use this infoset for my SQVI. The logic i am looking for is, if the Fixed vendor indicator is ticked in EORD, i want to display the vendor no. & the net price, if it is not, then i want the fields to remain blank. Hope my problem is clear, await inputs.


Former Member
Former Member replied

Hi Vivek

Do one thing yar. Do u know anything about Creating Views??

If not try with that it may solve your problem

The main aim of a view is to join two or more tables. It will be just like a table output.

For the procedure try like this

Goto Tcode SE11

Click on the Radio button <i><b>View</b></i> Give your view name starting with Z

Then press F5 or click on the create button

It will ask for four options

1)DataBase view

2)Projection View

3)Maintanence View

4)Help view

Database Views Locate the document in its SAP Library structure

Data about an application object is often distributed on several database tables. A database view provides an application-specific view on such distributed data.

Database views are defined in the ABAP Dictionary. A database view is automatically created in the underlying database when it is activated.

Application programs can access the data of a database view using the database interface. You can access the data in ABAP programs with both OPEN SQL and NATIVE SQL. However, the data is actually selected in the database. Since the join operation is executed in the database in this case, you can minimize the number of database accesses in this way. Database views implement an inner join

f the database view only contains a single table, the maintenance status can be used to determine if data records can also be inserted with the view. If the database view contains more than one table, you can only read the data.

Database views should be created if want to select logically connected data from different tables simultaneously. Selection with a database view is generally faster than access to individual tables. When selecting with views, you should also ensure that there are suitable indexes on the tables contained in the view.

Since a database view is implemented in the database, a database view may only contain transparent tables.

The technical settings of a database view control whether the view data should be buffered.

<b>Check this link for clear information on different types of views</b>

For your present instance select <i><b>Database view</b></i>

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 <i>Copy</i> . 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 <i>Copy</i>

You can also include an entire table in the view (see Includes in Database Views).

5. On the Selection conditions tab page, you can (optionally) formulate restrictions for the data records to be displayed with the view (see

Maintaining Selection Conditions for Views).

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 (see Structure link Maintaining Technical Settings). 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 <i>Activate</i>

Hope it may solve your problem



Message was edited by:

Pavan praveen

0 View this answer in context

Helpful Answer

Not what you were looking for? View more on this topic or Ask a question