Saturday, 21 May 2016

Ad-hoc Query

Ad-hoc Query

Most of the reporting needs of an organization can be addressed through Adhoc Queries. 
They provide 3 different kinds of reports:

  • Basic List : For simple reporting
  • Statistics : Reports with statistical functions such as percentages, etc.
  • Ranked list : for easy analysis of the reports

Queries are the actual reports that an end-user can run within SAP, these can be set up in Ad Hoc Query.


This document will cover below area

·  Creating Query area

·  Creating  User Group 

·  Creating  Infoset 

·  Creating  Adhoc query


Query Areas define whether the report is available cross client (Global Area) or only in the client that it is built (Standard Area). If SAP is set to Global Area, then it is not possible to see any reports built in the Standard Area and vice versa. 

Infosets define which infotypes and which fields within those infotypes you can report on

User Groups define which groups of end users can see different infosets

Steps needs to perform for creating ad-hoc query

SQ01 : It is used to report the infoset data by creating ad-hoc query.

SQ02 : Here we will include all of our tables or infotypes (e.g. PA/OM) that will provide us data for our queries.

SQ03 : To create a new user group go to transaction SQ03 and create a new user group and assign users to that user group.



Go to the transaction SQ03





Select Query areas under the menu item Environment. Select the radio button ‘Global Area’


Create a user group which will specify the users who will be authorized to run the query. It will always be associated with the functional area


Give short meaningful description & Save


Go to the T-code SQ02 to create the infoset


Give a name to the infoset and click on create.


Provide the Infoset attributes as show below. Here we are using PNP LDB in the example.



A window with the provision to choose all required infotypes pops up(here PA infotypes as PNP LDB is used). Open the node ‘Empl. Contract data’ as in our example we want to report some personal and org related data of the employees





Select the infotypes 0001 and 0002 by selecting the check boxes against them.



The following screen of the created infoset appears as below. Click on save and then Generate the infoset



Go to the main screen and click on Role/User group assignment








Select the assigned user group that we created earlier i.e. ZDEMO_LND and save it.

Now go to the transaction SQ01 to create the Ad-hoc query to report the data from the infoset.

Give a name for the Query (here ZDEMO_QRY) and click on create


Choose our required infoset name which will navigate to below screen.

Provide the query title and other info as shown below. Save and go back to main screen.

Click on Infoset query button below.The Infoset query window opens as below.






Upon expanding the nodes at the left, choose appropriate fields for selection criteria and also for display in the report output




From the menu item Query, save the query with a name

Go back and Execute the query using F8



SD CIN INDIA Localization

Wednesday, 18 May 2016

Carryout availability check in sales order

In the sales menu you select Environment -> Availability Overviwe to display availability status for a material with reference to the plant and checking rule

To check the availability over follow menu path Logistics ->Materials Management -> Environment -> Stock -> Availability Overview (CO09)

An advantage of this availability overview will show sales order quantity, sales order number, an line item number, and requirement class for each schedule line for which demand is created

During order creation, availability check can be carried out by clicking on the button as shown in the screenshot. We can also display item availability as shown in the screen shot




On the Availability Control screen, we can choose between the following delivery proposals:

1) One-time delivery on the requested delivery date

2) Complete delivery

3) Delivery proposal: In this section, the system checks whether and for which dates partial deliveries can be made. 







On the Availability Overview screen, we can view:

1) Availability Checking Group and Checking Rule.

2) Scope of Check

3) Quantity available and simulated requirements and the number of storage location



In the delivery document, we can go to the availability overview screen by using the path: Environment – Availability. The availability overview screen is shown as the second screenshot in the previous slide.



Availability of a material can be displayed as below: 

Stock for a material by storage location and plant

SAP Menu -> Logistics -> Materials Management ->Environment -> Stock-> MMBE – Stock Overvie







To check Stock Availability for a material by plant

SAP Menu -> Logistics -> Materials Management ->Environment -> Stock-> MB53 – Stock of Material by Plant