Você está na página 1de 8

SAPNuts.

com
You are here / SAPNuts.com / Courses / SAP ABAP / Enhancements in SAP / Customer exit real-time business example SAP

Customer exit real-time business example SAP


Last Updated: October 31st 2013 by Ashok Kumar Reddy

+ -

Business Requirement: When ever we create a customer. We need to check weather the customer
belongs to Country : GERMANY and if Region is equal to space .Then, Raise an Error message.
For this requirement we need to implement Function Module exit.

Technical requirements:
Tcode is : XD01/ XD02/ XD03.
Country Field is : LAND1 .
Region Field is : REGIO.
Table name is : KNA1 .
The above tables and fields are given by functional consultants.
To implement the Customer exit for this we need to follow the below steps.
Step1: Find the function exit.
Step2: Verify the customer exit.
Step1: Create project for customer exit.
Step4: Implement the Customer exit.

Find the function exit


Go to SE93 (maintain Transaction) T-code, provide XD01, display.

Double click on Program name SAPMF02D.Click on Find icon, main program, find CALL CUSTOMER, enter.

converted by Web2PDFConvert.com

A list of call customer functions will be displayed.


Based on requirement, Check Import/Export Parameters for each Function Module And roughly select some Customer Function Modules .

As per this requirement, we need KNA1 Table details, So we can use the below Customer Function Module which has an exporting parameter I_KNA1.

Verify the Customer Exit


Then verify the customer exit (function module) wheather it will full-fill requiremnt.
Double click on Function module name and put the break point .
Go to SE11-KNA1-Display, get a customer and go to XD02.

converted by Web2PDFConvert.com

Provide a customer, save (Ctrl S ), wait for breakpoint to trigger.

Stop the Debugging and now implement the Functional Module Exit. As this exit is triggered, this is the suitable Functional Module Exit for our
requirement.

Create Project in CMOD to implement customer exit.


Go to T-code CMOD (Project Management), provide a project name, create.

converted by Web2PDFConvert.com

To implement we need to provide enhancement name but we don`t have enhancement name, we just have customer exit name, now we need to find
enhancement name.
Follow the below steps to find enhancement for a customer exit.
All the enhancements for customer exits will be stored in MODSAP table, we can get enhancement name by using our customer exit.
Get Function module name from customer exit, double click on CALL CUSTOMER FUNCTION '001'.

Not down the Function Module name, go to SE11, provide table name MODSAP, display, contents and provide enhancement/member as
EXIT_SAPMF02D_001, execute.

converted by Web2PDFConvert.com

You will find the enhancement name for the function exit.

Now go to CMOD and to project ZXD01_EX and click on enhancement assignments and add enhancement as SAPMF02D, enter and click on components.
You will find Function module name, double click on function exit.

You will find a include inside the function module, double click to create and add your own code.

And add below code.

converted by Web2PDFConvert.com

Click BACK, activate Function Module.


Again click BACK,

Exit is implemented, test the object.


Go to XD02 .
Enter a Customer

Change Country to DE and Region to space .

converted by Web2PDFConvert.com

We will get a error message.

Learner Questions
Is it possible to update custom table through Badi?
Hi, this was pretty useful, but can you please guide me regarding this, how can we pass default values to the newly enhanced sub-screen
fields while working with SCREEN EXITS with an example. Thanks in Advance.

Please Sign in to ask a question

Was this lesson helpful to you? Yes No 27 People out of 27 think this lesson helpful

Learn SAP Courses online, SAP Certification mock exams and SAP tutorials
SAP ABAP Tutorials, SAP ABAP Online Training, SAP Webdynpro for ABAP, Webdynpro for ABAP tutorials, Webdynpro for ABAP online training, SAP
Workflow training, SAP Online Training, SAP Certification, SAP Training, SAP mock exams, SAP Exams, SAP ERP, SAP Interview questions, SAP ABAP
interview Questions

SAP ABAP Course Content


SAP Introduction
SAP ABAP Consultant
System Landscape and Introduction to ABAP/4
Data Dictionary
Internal Tables and Work Areas
Select Statements types
Selection Screen Design using SAP ABAP
Modularization techniques in SAP ABAP
Classical Reports in SAP ABAP

converted by Web2PDFConvert.com

Interactive Reporting in SAP ABAP


Menu painter in SAP
ALV Reports
Sapscripts
Smartforms
Batch Data Communication
Open SQL Statements in SAP ABAP
SAP memory and ABAP memory
Performance Tuning in SAP ABAP
Control break statements in sap abap
Enhancements in SAP
BADI in SAP
SD and MM flows in SAP
Dialog Module Pool Programming
String Operations and field symbols
SAP ABAP real-time scenarios
MM Basics for ABAP Consultants
SD Basics for ABAP Consultants

Sap Modules

Sap ABAP

Sap Course

Customer Sap

Lesson Navigation
User exit real time business example SAP Previous Chapter

Next Chapter Difference between user exit and customer exit in SAP

2015 SAPNuts.com Contribute Terms About Contact Feedback Facebook Twitter Google

converted by Web2PDFConvert.com

Você também pode gostar