Skip to Content

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

Report developement Requirement.

Dear Experts,

I want know detaily about the reoprting in materials management.

a) What is the difference between Script, Forms and Report.

b) What is ABAP query, which functional consultant can use. Is it permanent report which can be used by users for long time?

c) If suppose i want to develope a report like -

Report Output -

a) Material Code

b) Vendor Code

c) Purchase Requisition number

d) Purchase Order Number

e) Purchase Order Quantity

f) PO date

g) Material Document number (For the same PO)

h) Posting date of Material Document

i) Amount in Local Currency

j) Invoice number (For same PO)

k) Invoice Quantity

l) Invoice Amount

Report input fields -

a) Material Code

b) Vendor Code

c) From date to date

d) Material Group

e) Plant

All the data stored in number of different Tables.

Please explain the logic of how interlink these different tables with required fields in Connection with input fields.

Thanks in Advance



ABAP query

Whenever Developers or Functional Consultants need to generate reports without doing any ABAP coding in a quick span of time, we take the help of ABAP Queries. Sometimes, we require data to test our program. In such cases, we have to get records from different tables that satisfy our requirement, say, requirement which needs invoices whose value is greater than 1000 and order reason free of charge sample (105).

The whole process comprises of three steps.

1)Creation of user group

2)Creation of infoset

3)Creation of queries

The transaction codes associated with ABAP Query are

SQ01 - ABAP Query

SQ02 - Infoset

SQ03 - User group.

ABAP query is used when we just want to fetch the data from the database tables and display them. We cant do any calculation or data manipulation by using query.

The basic concept of ABAP query is that of views in programing.

It is something similar to our database with the values.

About the programing logic u have asked:

The requirement u have said is not correct as you haven't mentioned whether the date is PO date or PR date.Anywayz i will explain the logic.

The logic is like we will do the selection as per the input fields in the database tables.

For example in the case u have asked, initially we will do the filtering in the purchase requisition table EBAN with the date range in the input.

Then we will be having many values. Then we will do the filtering using the field plant WERKS in EBAN using a select statement.

Thus the data with us will be getting smaller.Next with the material group and so on.

After the selection from the requisition table EBAN, we need the purchase order details.

In the purchase order item detail table EKPO and the requisition table EBAN, we have the common field, the requisition number.

Now we will get all the details available from the EKPO table by filtering with the requisition number.Since the vendor details are stored at the header level in a purchase order, we will fetch the data from EKKO table ie the purchasing document header table using the purchase order number as that is the common field in the tables EKKO and EKPO.

Now moving on to the Goods receipt area, the tables are MKPF for header details and MSEG for material document item.

The purchase order number will be the field with which we select the required information from those tables.ANd thus go on.

Hope the concept is clear now


Gregory Mathews

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