MySQL Interview 2


What are HEAP tables in MySQL?
HEAP tables are in-memory. They are usually used for high-speed temporary storage. No TEXT or BLOB fields are allowed within HEAP tables. You can only use the comparison operators = and <=>. HEAP tables do not support AUTO_INCREMENT. Indexes must be NOT NULL.

How do you control the max size of a HEAP table? 
MySQL config variable max_heap_table_size.

What are CSV tables? 
Those are the special tables, data for which is saved into comma-separated values files. They cannot be indexed.

Explain federated tables. ?
Introduced in MySQL 5.0, federated tables allow access to the tables located on other databases on other servers.

What is SERIAL data type in MySQL? 
BIGINT NOT NULL PRIMARY KEY AUTO_INCREMENT

What happens when the column is set to AUTO INCREMENT and you reach the maximum value for that table? 
It stops incrementing. It does not overflow to 0 to prevent data losses, but further inserts are going to produce an error, since the key has been used already.

Explain the difference between BOOL, TINYINT and BIT. ?
Prior to MySQL 5.0.3: those are all synonyms. After MySQL 5.0.3: BIT data type can store 8 bytes of data and should be used for binary data.

Explain the difference between FLOAT, DOUBLE and REAL. ?
FLOATs store floating point numbers with 8 place accuracy and take up 4 bytes. DOUBLEs store floating point numbers with 16 place accuracy and take up 8 bytes. REAL is a synonym of FLOAT for now.

If you specify the data type as DECIMAL (5,2), what’s the range of values that can go in this table? 
999.99 to -99.99. Note that with the negative number the minus sign is considered one of the digits.

What happens if a table has one column defined as TIMESTAMP? 
That field gets the current timestamp whenever the row gets altered.

But what if you really want to store the timestamp data, such as the publication date of the article? 
Create two columns of type TIMESTAMP and use the second one for your real data. 

Explain data type TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ?
The column exhibits the same behavior as a single timestamp column in a table with no other timestamp columns.

What does TIMESTAMP ON UPDATE CURRENT_TIMESTAMP data type do? 
On initialization places a zero in that column, on future updates puts the current value of the timestamp in.

Explain TIMESTAMP DEFAULT ‘2006:09:02 17:38:44? ON UPDATE CURRENT_TIMESTAMP. ?
A default value is used on initialization, a current timestamp is inserted on update of the row.

If I created a column with data type VARCHAR(3), what would I expect to see in MySQL table? 
CHAR(3), since MySQL automatically adjusted the data type.


Click below links for more MySQL Interview Questions and Answers 
MySQL Interview 1

MySQL Interview 1


What's MySQL ?
MySQL (pronounced "my ess cue el") is an open source relational database management system (RDBMS) that uses Structured Query Language (SQL), the most popular language for adding, accessing, and processing data in a database. Because it is open source, anyone can download MySQL and tailor it to their needs in accordance with the general public license. MySQL is noted mainly for its speed, reliability, and flexibility. ...

What is DDL, DML and DCL ? 
If you look at the large variety of SQL commands, they can be divided into three large subgroups. Data Definition Language deals with database schemas and descriptions of how the data should reside in the database, therefore language statements like CREATE TABLE or ALTER TABLE belong to DDL. DML deals with data manipulation, and therefore includes most common SQL statements such SELECT, INSERT, etc. Data Control Language includes commands such as GRANT, and mostly concerns with rights, permissions and other controls of the database system.

How do you get the number of rows affected by query? 
SELECT COUNT (user_id) FROM users would only return the number of user_id’s.

If the value in the column is repeatable, how do you find out the unique values? 
Use DISTINCT in the query, such as SELECT DISTINCT user_firstname FROM users; You can also ask for a number of distinct values by saying SELECT COUNT (DISTINCT user_firstname) FROM users;

How do you return the a hundred books starting from 25th? 
SELECT book_title FROM books LIMIT 25, 100. The first number in LIMIT is the offset, the second is the number.

You wrote a search engine that should retrieve 10 results at a time, but at the same time you’d like to know how many rows there’re total. How do you display that to the user? 
SELECT SQL_CALC_FOUND_ROWS page_title FROM web_pages LIMIT 1,10; SELECT FOUND_ROWS(); The second query (not that COUNT() is never used) will tell you how many results there’re total, so you can display a phrase "Found 13,450,600 results, displaying 1-10". Note that FOUND_ROWS does not pay attention to the LIMITs you specified and always returns the total number of rows affected by query.

How would you write a query to select all teams that won either 2, 4, 6 or 8 games? 
SELECT team_name FROM teams WHERE team_won IN (2, 4, 6, 8)

How would you select all the users, whose phone number is null? 
SELECT user_name FROM users WHERE ISNULL(user_phonenumber);

What does this query mean: SELECT user_name, user_isp FROM users LEFT JOIN isps USING (user_id) ?
It’s equivalent to saying SELECT user_name, user_isp FROM users LEFT JOIN isps WHERE users.user_id=isps.user_id

How do you find out which auto increment was assigned on the last insert?
SELECT LAST_INSERT_ID() will return the last value assigned by the auto_increment function. Note that you don’t have to specify the table name.

What does –i-am-a-dummy flag to do when starting MySQL? 
Makes the MySQL engine refuse UPDATE and DELETE commands where the WHERE clause is not present.

On executing the DELETE statement I keep getting the error about foreign key constraint failing. What do I do? 
What it means is that so of the data that you’re trying to delete is still alive in another table. Like if you have a table for universities and a table for students, which contains the ID of the university they go to, running a delete on a university table will fail if the students table still contains people enrolled at that university. Proper way to do it would be to delete the offending data first, and then delete the university in question. Quick way would involve running SET foreign_key_checks=0 before the DELETE command, and setting the parameter back to 1 after the DELETE is done. If your foreign key was formulated with ON DELETE CASCADE, the data in dependent tables will be removed automatically.

When would you use ORDER BY in DELETE statement? 
When you’re not deleting by row ID. Such as in DELETE FROM techpreparation_com_questions ORDER BY timestamp LIMIT 1. This will delete the most recently posted question in the table techpreparation_com_questions.

How can you see all indexes defined for a table? 
SHOW INDEX FROM techpreparation_questions;

How would you change a column from VARCHAR(10) to VARCHAR(50)? 
ALTER TABLE techpreparation_questions CHANGE techpreparation_content techpreparation_CONTENT VARCHAR(50).

How would you delete a column? 
ALTER TABLE techpreparation_answers DROP answer_user_id.

How would you change a table to InnoDB?
ALTER TABLE techpreparation_questions ENGINE innodb;

When you create a table, and then run SHOW CREATE TABLE on it, you occasionally get different results than what you typed in. What does MySQL modify in your newly created tables? 

  1. VARCHARs with length less than 4 become CHARs
  2. CHARs with length more than 3 become VARCHARs.
  3. NOT NULL gets added to the columns declared as PRIMARY KEYs
  4. Default values such as NULL are specified for each column

How do I find out all databases starting with ‘tech’ to which I have access to? 
SHOW DATABASES LIKE ‘tech%’;

How do you concatenate strings in MySQL? 
CONCAT (string1, string2, string3) 

How do you get a portion of a string? 
SELECT SUBSTR(title, 1, 10) from techpreparation_questions;

What’s the difference between CHAR_LENGTH and LENGTH? 
The first is, naturally, the character count. The second is byte count. For the Latin characters the numbers are the same, but they’re not the same for Unicode and other encodings.

How do you convert a string to UTF-8?
SELECT (techpreparation_question USING utf8);

What do % and _ mean inside LIKE statement? 
% corresponds to 0 or more characters, _ is exactly one character. 

What does + mean in REGEXP? 
At least one character. Appendix G. Regular Expressions from MySQL manual is worth perusing before the interview.

How do you get the month from a timestamp? 
SELECT MONTH(techpreparation_timestamp) from techpreparation_questions;

How do you offload the time/date handling to MySQL? 
SELECT DATE_FORMAT(techpreparation_timestamp, ‘%Y-%m-%d’) from techpreparation_questions; 
A similar TIME_FORMAT function deals with time.

How do you add three minutes to a date? 
ADDDATE(techpreparation_publication_date, INTERVAL 3 MINUTE)

What’s the difference between Unix timestamps and MySQL timestamps? 
Internally Unix timestamps are stored as 32-bit integers, while MySQL timestamps are stored in a similar manner, but represented in readable YYYY-MM-DD HH:MM:SS format.

How do you convert between Unix timestamps and MySQL timestamps? 
UNIX_TIMESTAMP converts from MySQL timestamp to Unix timestamp, FROM_UNIXTIME converts from Unix timestamp to MySQL timestamp.

What are ENUMs used for in MySQL? 
You can limit the possible values that go into the table. 
CREATE TABLE months (month ENUM ‘January’, ‘February’, ‘March’,…); INSERT months VALUES (’April’); 



Click below links for more MySQL Interview Questions and Answers 
MySQL Interview 2

SAP Logistics (PP) Interview

Explain how the PP Module is Organized in SAP.
The PP module is made up of the following components: 
  • PP-BD   Basic Data
  • PP-SOP   Sales and Operations Planning
  • PP-MP   Master Planning
  • PP-CRP   Capacity (Requirements) Planning
  • PP-MRP   Material Requirements Planning
  • PP-SFC   Production Orders
  • PP-KAN   Kanban
  • PP-REM   Repetitive Manufacturing
  • PP-PI   Production Planning for Process Industries
  • PP-PDS   Plant Data Collection
  • PP-IS   Information Systems 
Explain How ‘PP’ is ‘Integrated’ with Other Modules.
‘PP’ is one of the modules in SAP R/3 that is complex as the functions cut across many modules. The following modules are tightly integrated with PP:
  • CO   Controlling
  • FI   Financial Accounting
  • MM   Materials Management
  • SD   Sales & Distribution
  • PS   Project Systems
  • PD   Personnel Planning and Development
What is a ‘BOM’?
A ‘BOM (Bill of Material)’ is nothing but a structured list of components (with the object number, quantity, and unit of measure) that go into the making of a product or an assembly. Depending on the industry sector, they may also be called recipes or lists of ingredients. The structure of the product determines whether the bill of material is simple or very complex.

What are the ‘BOM Categories’ Supported by SAP?
The following are the various Categories of BOM: 
  • Equipment BOM
  • Material BOM
  • Sales Order BOM
  • Document Structure
  • Functional Location BOM
  • WBS BOM
What are all the ‘Technical Types of BOM’?
There are two ‘Technical Types of BOM’ supported in SAP:
  • Variant BOM
  • Material BOM
Differentiate ‘Variant BOM’ from ‘Multiple BOM.’
While a ‘Variant BOM’ groups together several BOMs that describe different objects (for example, different models of a car) with a high proportion of identical parts, a Multiple BOM groups together several BOMs that describe one object (for example, a product) with different combinations of materials for different processing methods.
The Variant BOMs are supported for the following BOM categories:
  • Material BOMs
  • Document structures
  • Equipment BOMs
  • Functional location BOMs
  • Multiple BOMs are only supported for Material BOMs.
Is it Possible to Convert a ‘Multiple BOM’ into a ‘Variant BOM’?
No. You can only create a ‘Variant BOM’ from a simple Material BOM. No multiple BOMs can exist for a material.

What is a ‘Work Center’ in PP?
A ‘Work Center’ in PP (PP-BD-BOM) is an organizational unit that can be a combination of machines or groups of craftsmen, people, and production lines, wherein certain operations are carried out to produce some output. Each of the work centers is assigned to a cost center. A work center can be assigned to a work center in SAP-HR, which will enable assignment of employees, qualifications, etc.

What is a ‘Routing’ in PP?
A ‘Routing’ in PP (PP-BD-RTG) is used to define the sequence of operations (work steps) and resources required to perform certain operations in order to produce a material with or without reference to an order. The standard values of planned time for the various operations need to be entered into the routing.
There are two different types of routing:
  • Routing
  • Rate routing
(A similar concept exists in PS where you define a ‘task list,’ which is similar to ‘routing’ in PP.)

What are All the ‘Sub-components’ of Production Orders?
The following are the ‘Sub-components of Production Orders’ (PP-SFC):
  • Order Planning
  • Order Execution
  • Order Close
What is a ‘Product Hierarchy’?
Used in pricing, a ‘Product Hierarchy’ is an alphanumeric character string consisting of a maximum of 18 characters. It thus defines the product and its composition.
Example:
A product hierarchy represented by ‘00050002000300040005.’ The first four characters ‘0005’ could indicate that the product is a car. The next four characters ‘0002’ could indicate the plant in which the car is manufactured. The third set of characters could indicate the color of the car. The next set may determine its engine capacity and so on. Thus, the product hierarchy helps in defining the product composition.

Define ‘BOM Group.’
A ‘BOM Group’ is a collection of BOMs that lets you describe a product or a number of similar products. The value in the BOM group field uniquely identifies the BOM group. You can use the BOM group as an alternative way of accessing the BOM. A BOM group comprises either all the alternatives of a multiple BOM or all the variants of a variant BOM.
When you create a BOM group, the system checks the special characters you use. Apart from the usual alphanumeric characters, you can use the following special characters: ‘-’,‘/’,‘_.’ You cannot use blanks.

Define ‘SOP’ (Sales & Operations Planning).
Suitable for long/medium-term planning, with an aim to streamline a company’s ‘Sales and Operational Planning, SOP’ is a forecasting tool enabling you to set up sales, production, and other supply chain targets based on existing, future, or historical data. SOP is most suitable for planning finished goods, and not for material component planning.

SOP plans are passed on to Demand Management (DEM) in the form of independent requirements, which in turn is fed into MPS (Master Production Scheduling) and MRP (Material Requirements Planning). The results of SOP can be passed on to profitability analysis, cost center accounting, and activity-based costing.

SOP contains two application components; namely, Standard SOP (PP-SOP) and Flexible Planning (LO-LIS-PLN). The Standard SOP comes pre-configured with the system. Flexible planning can be configured in a variety of ways.

What is known as ‘Demand Management’?
‘Demand Management’ (PP-MP-DEM) helps in determining the requirement quantities and delivery dates for finished goods assemblies. It uses the planned independent requirements and customer requirements (customer requirements come from sales orders). Planning strategies help in deciding the kind of demand program. If production is triggered by sales orders, then it is known as ‘Make-toOrder’ production; if is not then it is known as ‘Make-to-Stock’ production.

What is ‘Capacity Planning’?
‘Capacity Planning’ aims at economic use of resources. It is integrated with SD, PM, PS, and CS. There are two components within capacity planning: Capacity evaluation and Capacity levelling. Capacity planning supports short-term detailed planning, medium-term planning, and long-term rough-cut planning.

Explain ‘MRP’ (Material Requirements Planning).
‘MRP’ aims to guarantee material availability; it is used to procure/produce the required quantities on time (both for internal purposes and for sales and distribution). This involves monitoring of stocks and, in particular, the automatic creation of ‘procurement proposals’ for purchasing and production. PP-MRP assists and relieves MRP Controllers (who are responsible for all the activities from specifying when, what, type, etc., of material requirements) in their area of responsibility. With the automatic planning run in MRP, it is possible to determine any shortages so as to create procurement elements. With the system generating messages for critical parts and unusual situations, you can rework the planning results in the specific area with problems. 

The material requirements can be planned at plant level or for different MRP areas. With MRP at the plant level, the system adds together stocks from all of the individual storage locations, with the exception of individual customer stocks, to determine total plant stock. In the case of material requirements planning on an MRP area level, only the stocks from the storage locations or subcontractor assigned to the respective MRP areas are taken into account.

What are the Three ‘MRP Procedures’?
  • Materials Requirements Planning (MRP) 
  • Master Production Scheduling (MPS) 
  • Consumption-based Planning
What is ‘MPS’ (Master Production Scheduling)?
Executed as that of an MRP, ‘MPS’ is nothing but a special form of MRP, which aims to reduce storage costs and to increase planning stability. With MPS you can flag materials that greatly influence company profits or take up critical resources as master schedule items and check and plan them separately with a series of special tools.

What is ‘Consumption-based Planning’?
Using past consumption data, ‘Consumption-based Planning’ aims at determining future requirements. In the process, it makes use of material forecasts or any other ‘static’ planning procedures. The ‘net requirements’ calculation is triggered when the stock level falls below a reorder point. The net requirements can also be calculated by forecast requirements from a historical consumption pattern. 


Click below links for more SAP Logistics Interview Questions and Answers 
SAP SD Interview
SAP MM Interview

SAP Logistics (MM) Interview

What Functions are Supported in the SAP ‘Material Management’ (MM)?
The MM module of SAP supports the following functions:
  • MRP (Material Requirements Planning)
  • Procurement
  • Inventory Management
  • Inventory Valuation
  • Invoice Verification
What is ‘MRP’?
‘MRP (Material Requirements Planning)’ is nothing but the determination of which materials are required, when and in what quantities, based on current information and forecasts. 

Explain the Basic ‘Organizational Structure’ in MM.
The major Organizational Elements of MM include:
  • Purchasing Organization
  • Plant
  • Storage Location
The Purchasing Organization is typically attached to one Company Code. But a single Company Code can have one or more purchasing organizations. One or more Plants are attached to a purchasing organization. One or more Storage Locations are attached to a plant. One or more plants are assigned to a Company Code, but one plant is attached to only one Company Code.
Depending on how the purchasing organization has been structured, you may come across three types of structures as detailed below:
  • Cross-Plant Purchasing Organization - The purchasing organization caters to more than one plant of the same Company Code.
  • Plant-Specific Purchasing Organization - Each Plant has it is own purchasing organization. 
  • Cross-Company Code Purchasing Organization - A single purchasing organization is responsible for the procurement activities of more than one Company Code. The plants attached to this purchasing organization are also cross-Company Code. In this case, the purchasing organization is not attached to any of the Company Codes; instead, the various plants are attached to the purchasing organization. This kind of purchasing organization is known as a central purchasing organization. This kind of organizational structure is essential in the case of centralized procurement in an enterprise.
Define ‘Plant’ in SAP.
‘Plant’ in SAP can denote a manufacturing location, distribution center, or a warehouse. With unique numbers identifying each of the plants, though these are all not all necessarily financial entities, they can still be linked to a Business Area. The Plant is the place where you normally valuate the inventory in SAP. The system, however, checks for the inventory either at the Plant or Plant/Storage Location during an Order entry.

Explain the ‘Storage Location’ in SAP.
A sub-division of a plant, the ‘Storage Location,’ defines a location for materials that can be a warehouse, bin, or a storage area of raw materials/WIP/finished product. You will manage the physical inventory, material movement, picking, cycle counting, etc., at the storage-location level. In Warehouse Management, the storage location is further subdivided.

Explain the ‘Purchasing Organization’ in SAP.
This refers to the organizational structure in SAP that is responsible for procurement of materials. The ‘Purchasing Organization’ is the top-most organizational element in MM, and this can take any one of three forms such as (1) Cross-plant purchasing organizations (catering to more than one plant but within the same Company Code), (2) Plant-specific purchasing organizations (with a 1:1 relationship with the plant), and (3) Cross-company code purchasing organizations (catering to more than one Company Code). Entrusted with the activity of negotiating the price, delivery conditions, etc., of materials from vendors, the Purchasing Organization can further be subdivided into purchasing groups.

Explain the ‘Purchasing Group’ Concept in MM.
The ‘Purchasing Group’ carries out the actual activities of purchasing, and is assigned to a material in the material master. The activities of several purchasing organizations can be done by one purchasing group.

Explain the ‘Valuation Area’ Concept in MM.
The valuation of a material is done at the ‘Valuation Area,’ which can either be at the Company Code level or the Plant level. The level at which the valuation needs to happen is defined in the customizing. Note that once it is defined, you will not be able to change it later!
When the valuation is at the Company Code level, then the valuation of a material is uniform across the plants attached to that Company Code. On the other hand, if the valuation is at the plant level, then the value of the material is plantspecific and will vary from one plant to another. If you are using PP (Production Planning)/MRP in your company, then the valuation has to be at the plant level.

What is a ‘Factory Calendar’?
A ‘Factory Calendar’ is a calendar that is country-specific with a list of public holidays (maintained via the Holiday Calendar) and working days, which are Client-independent. The factory calendar helps in controlling goods issues/receipts. Each plant is assigned a factory calendar, and the calendar must be activated (through ‘CTS functionality’) before using it.

Explain How SD and MM are Connected in SAP.
The goods/services from a plant can be sold by one or more sales organizations. It is also possible that single sales organizations sells goods/services for several plants. When the sales organizations sells for more than one plant belonging to one or more Company Codes, then this is called inter-company sales, and will require you to make some special configurations in the system. A sales organization, attached to a Company Code, is further divided into distribution channels and divisions in SD. A division typically represents a product line, and is assigned to a material in the material master.

Outline the Functions Supported by ‘Material Master.’
The ‘Material Master’ is the central master record catering to various business functions in Logistics. The data stored in this master support a variety of business functions and operations such as:
  • Production Planning
  • MRP
  • Procurement
  • Invoice Verification
  • Inventory Management
  • Product Costing
  • Sales and Distribution
  • Quality Management
The data is stored, within a material master, at different organizational levels. The general data is valid for all the Company Codes at the Client level. The purchasing information is valid at the plant level. The sales information is valid at the sales organization/distribution channel. Lastly, when Warehouse Management is activated, the data is maintained at the warehouse number/storage type level.

Explain Why a ‘Material Master’ is Divided into ‘Views.’
Since the information in a material master needs to be maintained by a number of users across several modules, SAP has structured the master into a number of Views for facilitating easier access and updating of data. The views include:
  • Basic Data
  • Classification
  • Sales
  • Purchasing
  • Purchase Order text
  • Accounting
  • Foreign Trade 
  • Work Scheduling
  • Forecasting
  • Storage
  • Costing
  • Plant/Storage Location stock
  • MRP
What Information is Available in the ‘Accounting View’ of a ‘Material Master’?
The most important information maintained in the ‘Accounting View’ of a material master is the valuation class, which needs to be assigned to individual materials. The valuation class, in turn, helps in determining the relevant GL accounts for posting valuation-relevant transactions such as GR, GI, etc.
You will maintain the price control indicator in the accounting view, which enables determining how the stock of a material is to be valued (at Standard price (S) or Moving average price (V)).

Why do You Need ‘Material Types’ in MM?
One way to group materials is by ‘Material Type’ (the other being by Industry Sector’). This grouping helps determine what information or data is to be made available at the material master level for a particular material.
The material type (for example, FERT, HAWA, HALB, ROH, and so on) is used to control:
  • Which Views can be maintained on the master record
  • Which Fields are mandatory, optional, or for ‘display only’ in the material master
  • What kind of Procurement is allowed for that material (internal or external or both)
  • How to Number (Internal/External) and what Number Range is allowed
  • Whether Quantity and/or Value updating should be done in a particular Valuation Area
  • Which GL Accounts will be posted to (via the Valuation Class) during goods movement
  • The default Item Category Group (S&D) 
  • The default Price Control Indicator (S or V) and
  • Whether the default Price Control Indicator is changeable during material master maintenance
Explain the ‘Price Control Indicator.’
The ‘Price Control Indicator’ is used by SAP to determine how a material will be valuated, by default. The indicator can be set to:
  • Standard Price (S) or
  • Moving Average Price (V) 
When you set the indicator to ‘S,’ the system carries out all the inventory postings at the standard price. The variances  due to a different price of a material in goods movement or invoice receipts  if any, are all posted to price difference accounts. As a result, the standard price remains the same, unless it is changed intentionally by manual processing. This will be necessary only when the difference between the standard and moving average prices becomes very large. (While updating the price difference accounts, however, the system also updates the moving average price with these variances, so that you get a chance to adjust the standard price should the difference between the standard and moving average prices becomes very substantial.)

On the other hand, when you set the indicator to ‘V’ then all the goods receipts (GR) will be at the GR value. The system will then adjust the price in the material master by the GR price. However, if there is a difference between the moving average price of the material and the goods movement/invoice receipt, then the price difference is moved to the stock account, and the price of the material in the material master is adjusted accordingly.

Explain ‘Prices Maintenance’ for Materials Transferred from ‘Legacy’ to SAP.
Before you transfer the initial inventory from a legacy system to SAP, you need to create the relevant master data for the materials.

If you are planning to maintain a standard price for the materials, then you will create the material masters with ‘S’ as the price control indictor in SAP. With this control, when you enter the material inventory, the system valuates this stock with the standard price defined. In this case, you enter a new price and the system posts the price difference (between the standard price and the new price you entered) to a price difference account.

Similarly, if you are planning to maintain a moving average price for materials, then you will create the material masters with ‘V’ as the Price Control Indictor in SAP. With this control, when you enter the material inventory, the system valuates this stock with the moving average price defined. In this case, you enter a new price and the system adjusts the moving average price accordingly. If you enter only the quantity, and not any new price, the system continues to valuate the stock at the original moving average price, and the price of the material does not change.

What is the ‘Material Status’?
The ‘Material Status’ is a 2-digit code enabling you to control the usability of material for various MM and PP applications. This status key also controls warehouse management, transfers order instructions, quality inspection instructions, decides how the system behaves when a product cost estimate is created, and so on.
The material status can be maintained as (1) Plant-specific material status, (2) Cross-plant material status, and (3) Distribution material status.

What is the ‘EAN’?
The ‘EAN (International Article Number),’ equivalent to the UPC (Universal Product Code) of the United States, is an international standard number for identifying a material, which SAP allows you to assign (done in the ‘Eng./Design or Units of Measure’ screen) to the materials. The EAN is normally assigned to the manufacturer of a material. Made up of a prefix (to identify the country or company from where the material originates), article number, and a check digit (ensures correctness of an EAN number so that no incorrect entries are scanned or entered into the system).

What are Some of the ‘Partner Functions’ of a ‘Vendor’?
Through the definition of ‘Partner Functions’ in the Vendor Master, SAP helps to designate vendors for different roles. The partner role is designated by a 2-digit code.
  • VN   Vendor
  • PI   Invoice Presented by 
  • OA   Ordering Address
  • GS   Goods Supplier
  • AZ   Payment Recipient
A partner schema (also known as a partner procedure) is assigned to a vendor account group. The procedure specifies which partner roles are ‘allowed’/‘mandatory’/‘can be changed’ for a vendor master with that account group. You may assign three different partner schemas to an account group, one for each level of purchasing data, i.e., one at the purchase organization level, one at the VSR level, and one at the plant level. This enables maintaining different partners at different organizational levels.

What is a ‘Batch’ in the Context of ‘Batch Management’?
Representing a quantity of material with a homogenous set of properties/characteristics produced during a particular cycle of manufacturing, a ‘Batch’ is a subset of inventory quantity, which cannot be reproduced again with the same properties. A batch is linked to the classification system, and you can use it only when the classification system has been set up properly for batch management.

A batch is unique for a single material, and is unique at the Client level as well. That is, you will be able to use a batch number only once in the Client regardless of the plant and material. The batch will be known only in the plant where it was created. The batch numbers can either be manually assigned or system generated.

What are the Possible Values for ‘Procurement Types’?
The possible values for ‘Procurement Types’ are:
  • No procurement
  • External procurement
  • In-house production
  • Both procurement types
What are the ‘prerequisites’ for an ‘MRP Run’?
The following are the ‘prerequisites’ for an MRP Run: 
  • MRP activated
  • Valid MRP data for the material 
  • Valid MRP type
  • Valid material status
What is an ‘MRP Area’?
An ‘MRP Area’ is not an organizational structure, but a unit for which you can carry out Consumption-based MRP. The MRP area is used to carry out MRP for the components provided to a sub-contractor. There are three types of MRP areas that you will come across:
  • MRP Area for Storage Locations
  • MRP Area for Subcontracting Vendor Stock
  • MRP Area for the Plant
What is an ‘MRP List’?
An ‘MRP List’ displays the results of the last ‘planning run.’ Using a ‘collective display’ format, you will be able to display planning details for a number of materials for a given set of ‘selection parameters.’

Explain the ‘Re-Order Point’ Procedure.
The ‘Re-Order Point’ is the level of inventory that triggers material procurement. Once the inventory falls below this level, you need to create the order proposal either manually or automatically by the system.
In the case of the manual re-order point procedure, you will define the reorder point and the safety stock in the material master. On the other hand, in the automatic re-order point procedure, the system will calculate the re-order point and the safety stock based on the next period’s consumption pattern.

Explain the ‘Inventory Management’ Submodule.
The ‘Inventory Management’ submodule deals with the GR/GI of materials from/into the inventory. It also manages the transfer of materials from one storage location to another. As an important element of MM, this module is integrated with SD, PP, QM, and PM modules.

What is ‘Goods Movement’?
‘Goods Movement’ represents an event causing a change in the stock, with the change being value or status, stock type, or quantity. It also represents the physical movement of stock from one location to another. Goods movement is classified into:
  • Receipt of goods/services
  • Issue of materials
  • Stock transfers
What Happens During a ‘Goods Issue’?
The ‘Goods Issue (GI)’ results in a reduction in the stock quantity/value. The GI can be Planned (via sales order, production order, return delivery, delivery for internal, use etc.) or Unplanned (drawing a stock for a sample, scrapping, etc.).
The GI results in:
  • Creation of a Material/Accounting document
  • Update of Reservation for the issue (if any)
  • Update of GL accounts
  • Update of ‘points of consumption’ if applicable (cost center, project, etc.)
  • Update of Stock quantity
Explain ‘Stock Transfers.’
The physical movement of stock between locations is called a ‘Stock Transfer,’ which can be within a plant or between plants. Stock transfers can be carried out either in a single step or in two steps. The stock transfer may be from:
  • Company to Company
  • Plant to Plant
  • Storage Location to Storage Location
If there is a logical change in the stock type/status, then this kind of ‘transfer’ is called a ‘transfer posting.’ The transfer posting may be from:
  • Product to Product 
  • Quality Inspection to Unrestricted Use
  • Consignment Store to Storage Location
What is a ‘Stock Type’?
Used in the determination of available stock of a material, the ‘Stock Type’ is the sub-division of inventory at a storage location based on the use of that inventory. In SAP, there are many kinds of stock types:
  • Unrestricted (use) stock (the physical stock that is always available at a plant/storage location)
  • Restricted (use) stock 
  • Quality inspection stock (not counted for unrestricted use and may be made available for MRP)
  • Stock-in transfer 
  • Blocked stock (not to be counted as unrestricted stock and is not available for MRP)
Besides all of the above, which are all known as valuated stocks, you will also come across one more type called ‘GR blocked stock,’ which is a non-valuated stock.
The GR-blocked stock denotes all the stock accepted ‘conditionally’ from the vendors. This stock is not considered available for ‘unrestricted use.’ You will use the Movement Type 103 for the GR-blocked stock and Movement Type 101 is used for a normal GR.

Explain ‘Return Delivery.’
You will use ‘Return Delivery’ when you return goods to the supplier (vendor) for reasons such as damaged packaging, etc. Note that the ‘reason for return’ is mandatory as this will help you, later on, to analyze problems with a vendor. The system uses the Movement Type 122, and will create a return delivery slip, which will accompany the goods being returned.
If the ‘return’ is from a ‘GR-blocked stock,’ you need to use a different Movement Type: 104.

What are All the Various Types of ‘Physical Inventory’?
The following are the different types of ‘Physical Inventory’ in SAP MM: 
  • Periodic inventory (All the stocks are physically counted on a ‘key date’ (balance sheet date), and all the stock movements are blocked during physical counting)
  • Cycle counting (Physical counting is done at periodical intervals)
  • Sampling (Randomly selected stocks are counted physically, and the system uses this information to ‘estimate’ stock value on a given date)
  • Continuous (Stocks are tracked continuously throughout the fiscal year, with physical stock taking once a year, at least!)
What is a ‘Material Ledger’?
A ‘Material Ledger’ is nothing but a tool for inventory accounting that provides new methods for ‘price control’ for ‘material valuation’ (you can store the material inventory values in more than one currency). It makes it possible to keep the ‘material price’ constant over a period of time (say, over the life of a production order). The moving average price field is used to store a ‘periodic price.’ This periodic price stays constant and is the price used for valuation until you close the material ledger. At closing, the periodic price is updated based on the actual value of invoice receipts received for that material during the period.

Explain ‘Split Valuation.’ Why is it Necessary?
‘Split Valuation’ allows substocks of the same material to be managed in different stock accounts. This allows substocks to be valuated separately, and every transaction is carried out at the substock level. So, when processing a transaction, it is necessary to mention the substock.
The ‘split valuation’ is necessary if the material has:
  • Different Origins
  • Various Levels of Quality
  • Various Statuses
It is also required in situations where you need to make a distinction between ‘in-house produced materials’ and ‘materials procured externally,’ or if there is a distinction between ‘different deliveries.’

Explain the Basic Steps in ‘Configuring Split Valuation.’
The five basic steps for ‘Configuring Split Valuation’ are:
  • Activate ‘Split Valuation’ 
  • Define ‘Global Valuation Types’. For each Valuation type’ you need to specify: (a) whether ‘external’ purchase orders are allowed, (b) whether production orders are allowed, and (c) the account category reference.
  • Define ‘Global Valuation Categories’. For each valuation category specify: (a) default ‘valuation type’ to be used when purchase orders are created and whether this default can be changed, (b) default valuation type to be used when production orders are created and whether this default can be changed, and (c) whether a ‘valuation record’ should be created automatically when a GR is posted for a valuation type for which no record yet exists.
  • Allocate ‘Valuation Types’ to the ‘Valuation Categories’
  • Define which of the ‘Global Categories/Types’ apply to which ‘Valuation Areas’
Outline ‘Stock Valuation Methods’ for Material Revaluation.
There are three methods with which you can revaluate your stock for Balance Sheet purposes. Irrespective of the method you select, you will be able to valuate your stock either at the Company Code level or at the Valuation Area level:
  • LIFO (Last-In-First-Out): This method is based on the assumption that the materials received last were the ones issued/consumed first. The valuation is based on the initial receipt.
  • FIFO (First-In-First-Out): Here the assumption is that the materials received first are the ones consumed/issued first. So, the valuation is based on the most recent receipt. The FIFO method can also be used in conjunction with the lowest value method. By this you can determine whether the system should make a comparison between the FIFO determined price and the lowest value price. You can also determine whether the FIFO price should be updated in the material master record.
  • Lowest Value Method: Here, the stocks are valued at their original price or the current market price whichever is lower. This method is suitable when the inventory needs to be valued to take into account material obsolescence, physical deterioration, or changes in price levels.
How Does ‘Automatic Account Assignment’ Work in MM?
  1. ‘GL accounts’ are assigned to ‘Transaction Keys’ (BSX, WRX, PRD, UMG, GBB, etc.). 
  2. Transaction Keys identify which GL Accounts are to be debited or credited.
  3. Transaction Keys are assigned to ‘Value Strings’ (for example, WA01).
  4. ‘Movement Types’ (for example, 901) are associated with a ‘Value String.’
Explain ‘Automatic Account Assignment’ Configuration in MM.
There are four steps required to complete the ‘Automatic Account Assignment’ configuration settings for MM:
  • Finalize the ‘valuation level.’ 
  • Activate the ‘valuation grouping code’ option. (For this you need to group valuation areas using valuation grouping codes.)
  • Maintain ‘valuation classes’ and ‘account category references’ and their linkage to ‘material types.’ 
  • Maintain the ‘GL accounts’ for each combination of Chart of accounts, valuation grouping code, valuation class, and transaction key.
You may use the ‘automatic account determination wizard’ to complete the configuration settings, as the wizard guides you step-by-step.

Explain the ‘Transaction Keys’ in MM.
Also known as ‘process keys,’ the ‘Transaction Keys’ are pre-defined in the system to enable transaction postings in Inventory Management and Accounting (Invoice Verification). For each of the movement types in MM, there is a value string that stores these possible transactions.
The pre-defined transaction keys are:
  • BSX (used in Inventory Postings)
  • WRX (used in GR/IR Clearing Postings)
  • PRD (used to post Cost/Price differences)
  • UMB (used to post Revenue/Expenses from revaluation)
  • GBB (used in offsetting entries in Stock postings)
BSX, WRX, and PRD are examples of transaction keys that are relevant for a GR with reference to a purchase order for a material with standard price control. The transaction key UMB is used when the standard price has changed and the movement is posted to a previous period. Likewise, GBB is used to identify the GL account to post to as the offsetting entry to the stock account (when not referencing a purchase order) such as miscellaneous goods receipts, goods issues for sales orders with no account assignment, and scrapping. 

How Does the System Determine the Correct ‘GL a/c’ for a Posting?
Imagine that you are posting a goods movement.
  • Since the goods movement is from a plant, and the plant is assigned to a Company Code, the goods movement identifies the relevant Company Code.
  • As the Company Code has already been assigned to the Chart of Accounts, the system is able to identify the GL accounts.
  • The plant also determines the valuation area (and the optional ‘valuation grouping code’).
  • Since each movement type is assigned to a ‘value string’ which in turn is identified with a transaction key, the goods movement determines the correct transaction key.
  • Since each of the transaction keys is associated with the relevant GL accounts, through the value string, the movement type now identifies the relevant GL Account, and the transaction is posted.



Click below links for more SAP Logistics Interview Questions and Answers 


SAP Logistics (SD) Interview

What are the components of the SAP SD Module?
The important components in SAP Sales & Distribution module include:
  • Master data
  • Basic functions
  • Sales (including foreign sales and sales support)
  • Shipping and transportation
  • Billing
  • Sales support
  • Information systems
What are the important Organizational Elements of SAP SD?
The important Organizational Elements in SAP Sales & Distribution include:
  • Sales organization
  • Distribution channel
  • Division
  • Sales area
  • Sales group
  • Sales person
Explain the ‘Sales Organization.’ How it is assigned to a ‘Plant’?
The ‘Sales Organization’ is the top-most organizational element in SD. It represents and takes care of all the transactions relating to the selling and distribution of products or services. A distribution channel is assigned to one or more sales organization. The customer master can be maintained with different sales organization views.

The sales organization, identified by a 4-character code, is assigned to one or more plants. These plants are, in turn, assigned to a Company Code. So, it follows that any number of sales areas can be brought under a single Company Code.

Even though it is possible that you may have any number of sales organizations, it is recommended that you have a minimum number of these units in your setup. Ideal recommendation is for a single sales organization per Company Code. If you are selling the same product or service from more than one sales organization, then there is a clear indication that you have more sales organizations defined than what would ideally be required.

What is a ‘Distribution Channel’?
A ‘Distribution Channel’ depicts the channel through which the products or services reach the customers after they are sold (for example, wholesale, retail, direct sales, etc.). Represented by a 2-digit identifier, the distribution channel is assigned to one or more sales areas. As a result, one customer may be serviced through more than one distribution channel. Such as in a sales organization, the customer master data may have different distribution channel views.

What is a ‘Distribution Chain’?
A ‘Distribution Chain’ represents the possible combinations of sales organization(s) and distribution channel(s).

What is a ‘Division’?
A ‘Division’ depicts the product or service group for a range of products/services. For each division, you may define and maintain customer-specific parameters such as terms of payment, pricing, etc. The division may come under one or more distribution channels. 

What is a ‘Sales Area’?
A ‘Sales Area’ is a combination of the sales organization, distribution channel, and division.

Explain how ‘Human Elements’ are organized in SD.
There are three distinct organizational units in SD from the human angle:
  • Sales Office
  • Sales Group
  • Sales Person
The Sales Office represents the geographical dimension in sales and distribution. A sales office is assigned to a sales area. The staff of a sales office may be grouped into Sales Groups. This corresponds to sales divisions. A Sales Person is assigned to a sales group. This assignment is done at the personnel master record level. 

Where and how is a ‘Business Area Assignment’ done?
Business area assignment is done at two levels:
  • Plant level
  • Valuation area level
The ‘business area’ is assigned to the combination of ‘plant’/‘valuation area’ and the ‘division.’
A ‘Plant’ is Assigned to Which of the Entities in the SD Organization?
A Plant is assigned to:
  • Company Code
  • Combination of Sales Organization & Distribution Channel
  • Purchasing Organization
How is the ‘Shipping Point’ determined by the system?
The ‘Shipping Point’ is determined by the combination of shipping condition, loading group, and plant assigned to a shipping point. 

What are the important ‘Customer Master Records’?
Some of the important customer records are:
  • Sold-to-Party record
  • Ship-to-Party record
  • Bill-to-Party record
  • Payer record
What are the various sections of the ‘Customer Master Record’?
The different sections in a master record are:
  • General Data - You will be able to create general data such as addresses, telephones, contact persons, unloading points, etc., either from the accounting side or from the sales side.
  • Company Code Data - You will be able to create data in account management (credit management, payment details, taxations, insurance, etc.) that pertains to the Company Code in which the customer is created. You do this from the accounting side.
  • Sales & Distribution Data - The data for pricing, shipping, etc., comes under this category of information. You will create this from the SD area. You can have data for different sales areas for a single customer.
What is a ‘Customer-Material Information Record’?
The information relating to a material that applies only to a specific customer is known as ‘Customer-Material Information.’ This is nothing but the description of your ‘material by the customer,’ and you record this customer-specific information in the customer-material information record.

What is a ‘Sales Order’?
A ‘Sales Order’ is a contract between your Sales Organization and a Customer for supply of specified goods and/services over a specified timeframe and in an agreed upon quantity or unit. All the relevant information from the customer master record and the material master record, for a specific sales area, are copied to the sales order. The sales order may be created with reference to a ‘preceding document’ such as a quotation, then all the initial data from the preceding document is copied to the sales order.
The ‘sales order’ contains:
  • Organizational Data (sales organization, distribution channel, division, sales document type, pricing procedure, etc.).
  • Header Data (sold-to-party, sales office, sales group, pricing date, document date, order reason, document currency, price group, sales district, customer group, shipping condition, incoterms, payment terms, billing schedule, PO number, etc.).
  • Item Data (item category, order quantity, material, batch number, product hierarchy, plant, material group, shipping point, route, delivery priority, customer material, item number, etc.).
  • Schedule Line Data (schedule line, schedule line number, delivery date, order quantity, confirmed quantity, material availability date, loading date, proposed goods issue date, transportation date, movement type, shipping point, etc.).
What are the ‘Special Sales Document Types’?
  • SO   Rush Order
  • G2   Credit
  • RE   Return Order
  • KN   FoC (Free-of-Charge) Subsequent Delivery Order
  • RK   Invoice Correction Request
What is the ‘Consignment Stock Process’?
In the ‘Consignment Stock Process,’ you allow your stock or material to be at the customer’s site. You may also allow your stock or material to be made available at your site, but reserved for a particular customer. And you will allow the customer to sell or consume as much stock as he wants from this. You will then bill the customer only for the quantities that he has consumed or sold.

You will monitor the consignment stock—also known as special stock—in your system customer-wise and material-wise. You will use the standard sales order document type KB and standard delivery type LF for processing a consignment sales order.

Explain ‘Sales Document Blocking.’
You may be required to block a specific sales document type from further processing, when you want to block undesirable customers. You can achieve this for a specific customer or for a specific document type. You may also block it, in the customer master record, for a single sales area or for all the sales areas attached to the customer.

The blocking is done in customizing by assigning blocking reasons to the sales document types. Then in the customer master record do the necessary document block.

Can you ‘Block’ a transaction for a material that is ‘Flagged for Deletion’?
When you set the ‘deletion flag’ for a material at the plant level, you will still be able to enter an order even though the system will ‘warn’ you that the material has been flagged for deletion. If you need to block any transaction for a material, then you need to use the ‘Sales Status’ field in the ‘Sales Organization View’ of the material master. 

Can Items in a ‘Sales Order’ belong to different ‘Distribution Channels’?
No. The various items in a ‘Sales Order’ should belong to a single distribution channel only. However, the various items in a delivery can belong to different distribution channels.

Can the Items in a ‘Billing Document’ belong to different ‘Distribution Channels’?
No. The various items in a ‘Billing Document’ should belong to a single distribution channel only.

Differentiate between a ‘Sales Area’ and a ‘Sales Line.’
A ‘Sales Area’ is comprised of sales organization, distribution channel, and division whereas a Sales Line is the combination of the sales organization and the distribution channel.

Can a ‘Sales Area’ belong to different Company Codes?
No. A ‘Sales Area’ can belong to only one Company Code.

What is the ‘Storage Location Rule’?
The ‘Storage Location Rule’ assigned in the Delivery Document type determines the Storage Location, even when the storage location is entered during delivery creation. This is based on the following rules:
  • MALA: Shipping Point/Plant/Storage condition
  • RETA: Plant/Situation/Storage condition
  • MARE: MALA then RETA
How do you configure the ‘Partner Determination Procedure’ in SD?
The ‘Partner Determination Procedure’ is configured as outlined in the following steps:
  1. Create an account group
  2. Create and assign a number range to that account group 
  3. Create and assign the partner functions to the account group
  4. Create a partner determination procedure
  5. Assign the partner functions to the partner determination procedure
  6. Finally, assign the partner determination procedure to the account group
Where do you define ‘Unloading Points’ and ‘Goods Receiving Hours’?
The ‘Unloading Points’ and ‘Goods Receiving Hours’ are defined in the Customer Master>General Data>Unloading Points tab.

Where do you define the ‘Terms of Payment’ for a Customer?
The ‘Terms of Payment’ for a specific customer is defined in the Customer Master>Company Code Data>Payment Transactions Tab, and also in the Billing Document Tab in the Sales Area Data of the Customer Master.


Click below links for more SAP Logistics Interview Questions and Answers 
SAP MM Interview
SAP PP Interview