Friday, March 27, 2009

Mass Maintenance processing - tcode MASS

Introduction:

Mass maintenance is used to make make mass changes to master data such as materials, vendors, purchase orders, purchase requisitions, etc.

The full list of possible "objects" that can be changed are:
BUS0015 Profit center
BUS1001 Materials (industry)
BUS1001001 Materials (retail)
BUS1133 Rental units
BUS2012 Purchase orders
BUS2032 Sales orders
BUS2104 Appropriation reqs
BUS2105 Purchase requisition
BUS3003 Purchasing info recs
BUS3006 G/L accounts
KNA1 Customers
LFA1 Vendors

It is typically used by support staff to maintain / update master data. If your requirement is to complex for Mass Maintenance, then rather use LSMW, it can do even more -- but is more complex to use.

Summary of how the process works:

Run transaction MASS
  • Select what master data element you want to change

  • Select fields for selection and what will be changed

  • Select master data to be changed

  • Indicate what the new value is

  • Save (Run)

For example: for all materials of type RAW1, make the material group 1012. Lets step through this example to show you how easy it is to use.


Running the transaction


SAP Menu: Logistics > Central Functions > Mass Maintenance > Mass Maintenance > Dialog Processing


Transaction MASS




Select the tables for the selection screen. In our case, material type = MARA.


















The materials selected will be listed.Now indicate which field must be change. In our example the material group field.


Enter what the new value (Material Group) must be.

Select the column and copy to all the materials listed below. If you don't want to change all objects -- unselect them at this point



Hit Save -- this will start the action to change the object (material)

A log will be displayed on if it was successful

Two-step movement Plant to Plant

Within SAP Inventory Management, there are two methods how stock are moved between plants using a 2-step process:
  • Stock Transport Orders (UB)
  • Transfer Posting
What does 2-step mean?
Example: Let’s assume stock is moving from Plant A (Storage Location 0001) to Plant B (storage location 0002).

Two step means that two transactions will be used to move the stock. After the first transaction, stock has left plant A but it is not yet available at Plant B. Only after the second transaction is it available for use in Plant B.Some reasons for using 2-step movements (and not 1 step):

Long time span between leaving Plant A and arriving at Plant B. Need to control when goods leave plant A but not received at plant B

Using Stock Transport Orders (STO)Steps:

  • Create a Stock Transport Order (ME21N, Purchase Order doc type UB)
  • Process Goods Issue against STO (MIGO > Goods Issue > PO) – movement type 351
  • Process Goods Receipt against STO (MIGO > Goods Receipt > PO) – movement type 101

The use of Planned Orders and Purchase Requisitions are optional.

Using Transfer Postings (TP)Steps:

  • Process a Transfer Posting (MIGO > Transfer Posting) – movement type 303
  • Process a Transfer Posting (MIGO > Transfer Posting) – movement type 305

The Transfer Posting can be done with reference to a Reservation. Although this is not used a lot.Similarities between Stock Transport Orders (STO) and Transfer Postings (TP)

Both use transaction MIGO for both steps

After first step, goods are already reflected in receiving plant and not availableDifferences between Stock Transport Orders (STO) and Transfer Postings (TP)

Movement types are different351 & 101 for STO303 & 305 for TP
S

tock types at receiving plants are different- In Transfer (MARC-UMLMC) for TP- Stock in Transit (MARC-TRAME)for STO

For STO, 351 and 101 is group together where for TP there is no link between 303 and 305
STO requires more transactions than TP

STO must be configured for the sending plant / receiving plant where no plant specific configuration exists for TP

STO is based on Stock Transport Order (type of Purchase Order). Where no purchasing document is used for TP

STO can be initiated with a Planned Order or Purchase Requisition

Planning (MRP) can be used to initiate movements, but only STO’sConfiguration required to use STOConfig: MM > Purchasing > Purchase Order > Set up Stock Transport Order > Assign Document Type, One-Step Procedure, Underdelivery Tolerance

Here the source plant, destination plant and allowed STO document type is specified.

How to become a SAP consultant?

From time to time I get emails along the following lines ... “please advise on how do I become a SAP consultant?” Obviously there is no one answer and everyone enters the market slightly differently. Firstly determine in what area you want to specialize. Functional (example SAP SD, MM, FI, ….) or more technical (example BASIS, ABAP) or add-on products (BW, SRM, CRM…..) or end-user training or some other role in the SAP "industry". If you are not 100% sure – speak to fellow consultants or see where the demand might be in your area.. Search job sites to familiarise yourself for who wants what.

Here are some ways that I know how people got into SAP:
  • Join a consulting companyIf you have strong business knowledge (and now you want to to learn SAP)? Join a consulting company that do lots of SAP projects. Deloitte, Accenture, IBM, EDS … etc. This entry point might be easier in boom times.
  • Do the SAP Academy Training. If you can’t find someone to sponsor you – pay for it yourself. Costs is obviously a major factor. By the way – costs of training from SAP is not the same in all countries. Example: I know of people that find it cheaper to fly to South Africa – stay there for 5 weeks, do the SAP Academy and then fly back. All this cheaper than doing it in UK. So look around.
  • Join a SAP client as Trainee or SupportJoin a company that are already using SAP as a Trainee or in the Support organization. This will introduce you to SAP and they may be able to send you for academy training. The tricky bit obviously is trying to persuade them to hire you.
  • Enhance your knowledge of SAP via own studyStart collecting SAP material and notes on SAP. Have a look at SAP website and other websites (like this one). Buddy up with a person that already know SAP to take you through the basics of your area. You still got to have access to a SAP system. See next point
  • Get access to SAPOne can get an IDES training version of SAP to play with (search on Google). It does cost money -- so you may want to share with someone else. You would still need to get notes / training material and ideally someone that knows SAP to take you through the functionality. If possible, do the Academy exam to get at least certified.
  • SAP Support: Join SAP rollout teams looking for people who can help end-usersLook for big companies that are busy with roll-outs. They may be looking for bodies ("lots of people") in some remote spot … nobody want to go – so jump at the opportunity. If you impress the company – they may want to hire you. Or at least you will have some SAP experience on your CV.
  • Join SAP projects as a non-SAP person: Look for projects that might not be 100% SAP. You may have a skill that they require. Example on lots of projects there is a data conversion person – if you are good with databases / SQL – they may take you on. Then pick up SAP.

Configuration of Sales Document Schedule Lines

SAP version used in this post: SAP ERP Central Component (ECC) 5.0

Schedule Line catagory is automatically determined in an order (but may be changed manually if set up) based on the following: Schedule Line category = Item category + MRP Type of material.

Example: If Item category is TAN and MRP Type is VB, then the Schedule Line category is CV



Schedule Line Categories are configured at:IMG: Sales and Distribution > Sales > Sales Documents > Schedule Line > Define Schedule Line Categories - transaction VOV6


Lets look at Schedule Line Category CV

The key fields here are:
  • Movement Type (601): This is the movement type that will take place when a Goods Issue is done.
  • Req. Assembly: Requirement visible in MM (example in tcode MD04)
  • Availability: Availability check to take place

Configuration of Sales Document Item Category


SAP version used in this post: SAP ERP Central Component (ECC) 5.0

Item category is determined automatically by the system based on the following criteria:

Item category = Sales Document type + Item category group (in material master) + Usage indicator (ABAP) + High Level I.Cat

It can be changed manually (if configured).

Sales Document types are configured atIMG: Sales and Distribution > Sales > Sales Documents > Sales Document Item > Define Item Categories -- transaction VOV7



Lets look at Item category TAN






The full list of default Item Categories in SAP are:
0001 - Requisition

AEN - Qtn from Serv. Order

AES - Qtn from Serv. Order

AFC - Configuration

AFN - Inquiry Item

AFNN - Free of Charge Item

AFTX - Text Item

AFX - Inquiry Item

AGC - Config.at Mat.Level

AGE - Service Quotation

AGM - Config.at Comp.Level

AGN - Standard Item

AGNN - Free of Charge Item

AGR - Repair Quotation

AGTX - Text Item

AGX - Quotation Item

ALEN - ALE Standard Order

ALES - ALE Third Party

APX - Quotation Item Proj.

APXS - Quotation Item Stat.

AVC - Configuration

AVN - Standard Item

B1E - Reb.Credit Memo Req.

B1N - Reb.Credit Memo Req.

BI1 - Indirect Item Rebate

BI2 - Indir.Returns Rebate

BVN - Cash Sales

BVNN - Cash Sales:FreeofCh.

CH00 - Request Rent





DCH01 - Cancel.Rent Req.





DCH02 - Request Admin.Cost





DCH03 - Cancel.AdmCo Req.





DCH04 - IEA Request





DCH05 - Cancel.IEA Request





DCH06 - IEA Intern. Deb





CH07 - Cancel.IEA Intern.





DCH08 - Request Rent D Pr.





CH09 - Cancel.Rent P.Req.





DCH10 - IEA Pr. Req.





DCH11 - Cancel





IEA Pr. Req.





DCH12 - IEA pr. Int. Deb.





CH13 - Cancel. IEA Pr. Int.





CH14 - IE Sett.Req





DCH15 - Cancel.IE Sett.Req





DCH16 - CreditMemo IE Sett.





DCH17 - C.CreMemo IE Sett.





DCH18 - IE Sett. Intern





DCH19 - Canc.IE Sett. Int.





DCH20 - IE Sett.Req





DCH21 - Cancel.IE Sett.Req





DCH22 - CreditMemo IE Sett.





DCH23 - C.CreMemo IE Sett.





DCH24 - IE Sett. Intern





DCH25 - Canc.IE Sett. Int.





DCH26 - Request Sec. Dep.





DCH27 - Cancel.Sec.Dep.Req





DCH28 - Sec.Dep. Statement





DCH29 - Cancel.Sec.Dep.Sta





DCH30 - Sec.Dep.Inter.Sta





DCH31 - Cancel.S.D.Int.Sta





DCH32 - Sec.Dep.Res. Req.





DCH33 - Ca.Sec.Dep.Res.Req.





DCH34 - Sec.Dep.Res. Sta.





DCH35 - Ca.Sec.Dep.Res.Req.





DCH36 - Sec.Dep.Inter.Req





DCH37 - Ca.Sec.Dep.Int.Req.





DCHA0 - Payment Statement





DCHA1 - Cancel.Payment Sta





DCHA2 - Request Payment





DCHA3 - RequestCanc.Paymnt





DCHB0 - Depreciation





DCHB1 - C Depriaition





DCHBA - Rebate





CHBB - Rebate Cancellation





CHBV - Clearing





CHBW - Clearing Bonus





CHK0 - Payment Sta.





CCHK1 - Cancel.Payment Sta





DCHK2 - Payment Req.





CCHK3 - Cancel.Payment Req





CCHT0 - Repayment Sta





DCHT1 - Cancel.Repay.Sta





DCHT2 - Request Repayment





DCHT3 - Cancel.Repay.Req.





DCHV0 - Request Refund





DCHV1 - Cancel.Req. Refund





DCHZ0 - Interest Res.





DCHZ1 - Canc.Interest Res.





DCHZ2 - Request Interest





DCHZ3 - Cancel. Inter.Req.





DDIGN - Goods Mov-Inb. Dely





DLN - Stndard Itm w/o Ord.





DLN2 - DFPS Normal Item





DLP - Items from Projects





DLTX - Text Item





DLW - Value Item





DLX - Non-stock item





DOGN - Goods Mov-Outb. Dely





DSI - CMS Stdrd Indiv.Part





DSTP - TransfPostItemCentr





EDK - ExtAgtCorrectionItem





EDK1 - Neg.Correct-Ext Agt





EGN - Rough Goods Receipt





EGSH - Rough GR:SLSMainItem





EGSU - Rough GR:SLS SubItem





ELN - Inbound Delivery





Configuration of Sales Document Types

SAP version used in this post: SAP ERP Central Component (ECC) 5.0

Order Types represent business scenarios and are mostly selected by the user when creating the sales document.

Sales Document types are configured at:IMG: Sales and Distribution > Sales > Sales Documents > Sales Document Header > Define Sales Document Types -- transaction VOV8

Lets look at settings for Order type OR (Standard Order).

The following document types are available in a standard SAP system for use:
01 - Cust.Independent Req
AA - Promotion Order
AE - Qtn from Serv. Order
IN - Inquiry
QT - Quotation
AP - Project Quotation
AR - Repair Quotation
AS - Service Quotation
SI - Sales Information
AV - Quotation f.Contract
B1 - Reb.Credit Memo Req.
B1E - Exptd RebateCredMemo
B2 - Rebate Correctn Rqst
B3 - PartRebSettl.Request
B3E - Exp.PartRebSettl.Req
B4 - Reb.Req.f.Man.Accrls
BIND - Indir. Sales Rebate
BK1 - Agrmt Cred.Memo Req.
BK3 - Agrmt Cred.Memo Req.
BM1 - Agrmnt Deb.Memo Req.
BM3 - Agrmnt Deb.Memo Req.
BV - Cash Sale
CH - Contract Handling
DHU - SlsDocTypeDelyHUmvmt
DL - Order Type Sched.Ag.
DLR - Ord.Type Returns Del
DZL - Dec. Dely Order Type
ED - Issue by Ext. Agent
EDKO - Correction f.ExtAgnt
CR - Credit Memo Request
G2WT - Credit Memo Req. Val
GK - Master Contract
KA - Consignment Pick-up
KAZU - ConsignPick-up Comp
SKB - Consignment Fill-up
KE - Consignment Issue
FD - Deliv.Free of Charge
CQ - Quantity Contract
SD - Subs.Dlv.Free of Ch.
KR - Consignment Returns
KRZU - ConsignReturn Comp
SDR - Debit Memo Request
L2DM - Expense DebitMemoReq
L2DP - Expense:Payment Req.
L2WT - Debit Memo Req Value
LA - Ret.Packaging Pickup
LK - Sched.Agreement ExAg
LN - Ret.Packaging Issue
LP - Scheduling Agreement
LV - Deb.MemoReq. f.Ctrct
LZ - Sched. Agr. w/ Rel.
LZM - SchedAgrt w/Dly Ord.
LZS - SA:Self-bill w/Inv.
MAKO - Dely Order Correctn
MV - Rental Contract
NL - Replenishment Dlv.
PLPA - Pendulum List Req.
PLPR - Pendulum List Ret.
PLPS - Pendulum List Cancel
PV - Item Proposal
RA - Repair Request
RAS - Repairs / Service
RE - Returns
RK - Invoice Correct.
ReqRM - Delvy Order Returns
RZ - Returns Sched.Agrmnt
SO - Rush Order
OR - Standard Order
TAF - Standard Order (FPl)
TAM - Delivery Order
TAV - Standard Order (VMI)
TSA - Telesales
WA - Rel. to Value Contr.
WK1 - Value Contract- Gen.
WK2 - Matl-rel. Value Cont
WMPP - WM Prod.Supply
WV - Service and Maint.

Notes:
1. This list differs between SAP versions.
2. As a guide, the most common document types are marked with bold.A client will only use a few of above depending on requirements. Mostly copies are made of those being used. For example copy Order Type OR to ZOR. This way one can make changes to ZOR while still keeping the original configuration of the basic order types.

Doc Type, Item category & Schedule Line Category in a Sales Order

SAP version used in this post: SAP ERP Central Component (ECC) 5.0

Sales Orders have three major levels of information:
  • Header

  • Item

  • Schedule line
Within these three levels the main indicator that describes the behaviour of the Sales Order is the:
  • Sales Document Type (Header level)

  • Item Category (Item level)

  • Scedule Line Category (Schedule Line level)

Lets create a very basic sales order and have a look at these three levels and indicators.

Menu: Logistics > SD > Sales > Order > Create - VA01


The Order Type is selected by the user, we take OR. OR is a order type available in standard SAP system.



We now need to enter the customer that we sell the goods to and the material that we sell. This master data was created beforehand.

In our case, the customer (Sold-to party) is AA1122 and material being sold (material master) is 77. Also type in quantity, in our case it is 1. And press SAVE.

You will get a Sales Order number, number 318 in our case.

Lets look at the Sales document using Sales Order Change - VA02.

Lets first look at the Header to verify our Sales Document Type.

Menu: Goto > Header > Sales.

Note the Sales Document Type (OR)Menu:



Goto > Item > Schedule Lines. Note the Item category (TAN) and Schedule Line Category (CV).

User Exits in SAP SD

Suppose we want to see the available sales module user exits. Go to transaction SE81. Click on SD, then click "edit" on the menu bar and choose select subtree. Click on "information system," Open Environment node, customer exits, and enhancements. Press F8 to get all the user exits for that module. In brief: SE81->SD->Select subtree->Information System->Envir->Exit Techniques->Customers exits->enhancements->Execute(F8)


USEREXIT

Userxits allow us to add our own functionality to SAP standard program
without modifying it . These are implemented in the form of subroutines and hence are also known as FORM EXITs. The userexits are generally collected in includes and attached to the standard program by the SAP.
All Userexits start with the word USEREXIT_...

FORM USEREXIT_..
z..
ENDFORM.

The problem lies in finding the correct userexit and how to find it if one exists for the purpose. Once the correct userexit is found the necessary customer code is inserted in the customer include starting with the z.. in the form routine.

e.g. USEREXIT_SAVE_DOCUMENT_PREPARE


Certain application like SD still provide this form of enhancement using userexit but this practice is no longer being followed for newer extensions
instead they are using EXITs which come bundeled in enhancement packages . Neverthiless existing USEREXITS will be supported by SAP an all the newer versions of SAP.

HOW TO FIND USEREXITS

Userexits can be found in number of ways:
1) To find userexits in SD module , goto object navigator(SE80) and select
development class from the list and enter VMOD in it. All of the userexits in SD are contained in the development class VMOD. Press enter and you will find all the includes which contain userexits in SD for different functions like PRICING, ORDER PROCESSING etc. Select the userexit according to the requirement and read the comment inserted in it
and start coding .

Some examples of userexits in SD(SALES & DISTRIBUTION ) are:

1)ADDING OF NEW FIELDS IN PRICING

In Pricing in SD the fields on the basis of which pricing is done are derived from the FIELD CATALOG which is a structure KOMG .This structure is used to transfer transaction data to the pricing procedure in SD and is also known as communication structure.This structure KOMG consists of two tables KOMK for Header related fields and KOMP for item related fields.

The fields which are not in either of the two tables KOMK and KOMP cannot be used in pricing .Sometimes a need arises when the pricing is to be based on some other criteria which is not present in the form of fields in either of the two tables.

This problem can be solved by using USEREXITS which are provided for pricing in SD.
Pricing takes place both when the SALES ORDER ( Transaction VA01) is created as well as when INVOICING ( Transaction VF01) is done.Hence SAP provides 2 userexits ,one for sales order processing which is

USEREXIT_PRICING_PREPARE_TKOMP or
USEREXIT_PRICING_PREPARE_TKOMK

Depending upon which table (KOMK or KOMP) the new fields were inserted we use either of the above two userexits.These userexits are found in include MV45AFZZ of the standard SAP sales order creation program SAPMV45A.

In the case of userexit which will be called when invoicing is done ,these
are provided in the include RY60AFZZ which is in the standard SAP
program SAPMV45A. The name of the userexits are same. i.e
USEREXIT_PRICING_PREPARE_TKOMP or
USEREXIT_PRICING_PREPARE_TKOMK

These userexits are used for passing the data from the communication structure to the pricing procedure, for this we have to fill the newely created field in the communication structure KOMG for this we fill the code in the above userexit using the MOVE statement after the data that has to be passed is taken from the database table by using the SELECT statement. The actual structure which is visible in these userexits and which is to be filled for that particular field is TKOMP or TKOMK.

Before the coding for these userexits is done ,it is necessary to create a new field in either of the two tables KOMK or KOMP .For this purpose includes are provided in each of them .
To create the field in header data(KOMK) the include provided is KOMKAZ
and to create the field in item data(KOMP) the include provided is KOMPAZ.

One possible example for the need of creating new fields can be e.g. Frieght to be based upon transportation zone ,for this no field is available in field catalog and hence it can be created in KOMK and then above userexits can be used to fill the transportation data to it.

2)The other method of finding userexit is to find the word USEREXIT in the
associated program of the transaction for which we want to determine userexit using SE38.

3)The other method of finding userexits is to find the include in case of SD/MM applications where the userexits are located ,this can be found in the SAP reference IMG generally in the subfolder under SYSTEM MODIFICATION.

Some other examples of userexits in SD are:

USEREXIT_NUMBER_RANGE
This userexit is used to assign a different internal document number to the
sales order(VA01) when it is created depending on some criteria like a different SALES ORGANIZAION(VKORG) .

USEREXIT_SAVE_DOCUMENT_PREPARE
This userexit is used to insert the ABAP code which will be called when
the document (sales order VA01) is just about to be saved.This userexit is used generally for custom checks on different fields , to display some information before the order will be saved or for making changes to certain fields before the sales order will be saved.

Exits & Enhancements
There are mainly six types of EXITs in sap which have been collected in the form of enhancement packages and attached to standard code in SAP.
These are different from USEREXIT in the way that they are implemented
in the form of FUNCTIONs while in USEREXITS we use form routines for their implementation. These are also sometimes known as function exits .
These start from the word EXIT_ followed by the program name and then followed by a three digit number.

e.g. EXIT_SAPMV45A_002
This exit is found in SD in enhancement V45A0002.

TYPES OF EXITS

1)MENU EXITS
2)FUNCTION EXITS
3)TABLE EXITS
4)SCREEN EXITS
5)KEYWORD EXITS
6)FIELD EXITS

We use SAP transactions CMOD and SMOD to manage exits. Before implementing an exit , it is required to create the project by using CMOD
selecting the enhancement e.g. V45A0002 and selecting the component
(one which fulfills our need) i.e the exit which will be implemented in SMOD and after coding has been done the project has to be activated.
An exit can be coded only once.


FUNCTION EXITS
These are used to add functionality through ABAP code . These start from the word EXIT_programname_NNN ending in a 3 digit number. No access code is required to implement any tupe of exit including function exits.
The function exits are called from the standard SAP program in the form
of ABAP statement
CALL CUSTOMER-FUNCTION 'NNN'

This is in contrast to USEREXITs where PERFORM statement is used to call
the required userexit.
To implement the FUNCTION EXITs first of all the project is created and a suitable enhancement package is selected and from its compnents the function exit to be implemented is selected and on double clicking it the exit code will appear in ABAP EDITOR(se38) where a Z include will be found and the customer code should be entered in this include.


e.g.

ADDING A DEFAULT SOLD-TO-PARTY in Sales Order Creation
To show a default sold-to-party in this field when the user creates a sales order (VA01) we can use a function exit .This function exit is located
in enhancement no V45A0002 . Before we can choose the exit we have to
create a project in CMOD after that enter V45A0002 in the enhancement field and click on the components . In the components you will see the
exit EXIT_SAPMV45A_002 . This exit is used for our purpose.

Double clicking on this exit will takes us to function builder (SE37) . This
function exit has one exporting parameters and two importing parameters, we are interested in exporting parameter which is E_KUNNR
of type KNA1-KUNNR i.e if we move the desired customer name to this
structure(E_KUNNR) it will be shown in the field as the default value when we create the sales order.
This function also contains a customer include ZXVVA04 . This include
will be used to write our custom code .
Double clicking on this include and it will prompt us that this include does not exists do you want to create this object ,select yes and the include will be created .In this include we can write our own code that will fill the field E_KUNNR.
e.g. E_KUNNR = 301.

Activate the include and Activate the project. Now when ever the SALES ORDER will be created , sold-to-party field will come up with a predefined
customer .
FIELD EXITS
The field exits are managed,created,activated through program RSMODPRF. The field exit is associated with a data element existing in ABAP dictionary and hence to the screen field using that data element.
The format of field exit is :

FIELD_EXIT_dataelement_A-Z or 0-9
If a particular screen and program name is not specified than the field exit will effect all the screens containing that data element.
The function module associated with field exit shows two parameters
INPUT and OUTPUT. Input parameter contains the data passed to the field exit when the field exit was invoked by the R/3 , We can write our own code to change the output parameter depending upon our requirements.
Before the field exit can have any effect the system profile parameter
ABAP/FIELDEXIT in all the application servers should be set to YES

ABAP/FIELDEXIT = YES.

Difference between user exits & customer exits:

User exit - A user exit is a three character code that instructs the system to access a program during system processing.

SXX: S is for standard exits that are delivered by SAP. XX represents the 2-digit exit number.

UXX: U is for user exits that are defined by the user. XX represents the 2-digit exit number

Customer exit - The R/3 enhancement concept allows you to add your own functionality to SAP’s standard business applications without having to modify the original applications. SAP creates customer exits for specific programs, screens, and menus within standard R/3 applications. These exits do not contain any functionality. Instead, the customer exits act as hooks. You can hang your own add-on functionality onto these hooks. *-- Mani

The following document is about exits in SAP :-

The R/3 enhancement concept allows you to add your own functionality to SAP’s standard business applications without having to modify the original applications.

SAP creates user exits for specific programs, screens, and menus within standard R/3 applications. These exits do not contain any functionality. Instead, the customer exits act as hooks. You can hang your own add-on functionality onto these hooks.

Types of Exits There are several different types of user exits. Each of these exits acts as hooks where you can attach or "hang" your own add-ons.

Menu Exits Menu exits add items to the pulldown menus in standard SAP applications. You can use these menu items to call up your own screens or to trigger entire add-on applications.

SAP creates menu exits by defining special menu items in the Menu Painter. These special entries have function codes that begin with "+" (a plus sign). You specify the menu item’s text when activating the item in an add-on project.

Screen Exits Screen exits add fields to screens in R/3 applications. SAP creates screen exits by placing special subscreen areas on a standard R/3 screen and calling a customer subscreen from the standard screen’s flow logic.

Function Module Exits Function module exits add functions to R/3 applications. Function module exits play a role in both menu and screen exits.
When you add a new menu item to a standard pull down menu, you use a function module exit to define the actions that should take place once your menu is activated.

Function module exits also control the data flow between standard programs and screen exit fields. SAP application developers create function module exits by writing calls to customer functions into the source code of standard R/3 programs.

These calls have the following syntax:
CALL CUSTOMER-FUNCTION ‘001’.

Field Exits Field exits allow you to create your own programming logic for any data element in the Dictionary. You can use this logic to carry out checks, conversions, or business-related processing for any screen field. Example: The data element BBBNR identifies a company’s international location number. You might want to set up your R/3 System so that all international location numbers are larger than 100.

The field exit concept lets you create a special function module that contains this logic.
You assign the special function module to the data element BBBNR. You then assign the module to any programs and screens in which users can add new international location numbers. When you activate your field exit, the system automatically triggers your special routine whenever a user enters a company location number.

In 4.6c, you can use "RSMODPRF" program to create field exits.

An example of a user exits :-

MODULE user_exit_0001 INPUT CASE okcode. WHEN 'BACK OR EXIT'. CASE sy-dynnr. WHEN '100'. SET SCREEN 0. LEAVE SCREEN. WHEN '200'. ****************************************************************************** **** Note that you can write any code that satisfy your needs. **** **** But in this case, this was wrote as a sample code for reference sake. **** **** And you can test it. **** ****************************************************************************** SET SCREEN 100. LEAVE SCREEN. ENDCASE. ENDCASE.