‎2007 Apr 16 5:00 AM
Hello guys,
Can u explain the whole process in Detail to below example.
I want to learn this example.
Coded user exits in SD module. USEREXIT_PRICING_PREPARE_TKOMK was coded to include new header fields and USEREXIT_PRICING_PREPARE_TKOMP was coded to include new item fields for pricing in billing.
Thanks.
Regards,
Reddy.
‎2007 Apr 16 5:13 AM
Hi Reddy,
U can check the available userexits for this transaction code.
After u findout the userexit u can write the codeing fir this transaction.
What is User Exits and Customer Exits?
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.
Rewords some points,
Rgds,
P.Nag
‎2007 Apr 16 5:30 PM
‎2007 Apr 17 5:49 AM
Hi Reddy,
Plz go through this info.
It is given in the step by step.
Creating Custom Screen in XD01
Go to Transaction SPRO à Logistics General à Business Partner à Customers à Control à Adoption of Customers own Master Data fields à Prepare Modification à Free enhancement of Customer Master Record.
Following screen appears:
Go to CHANGE mode and Click New Entries button. Then add a Screen Group (SK here)and meaningful description. Save the entry and then SELECT that entry and Click on Label Tab Pages.
Add a Label Tab Page i.e. enter a Screen Number, Function Code and Meaningful Description.
Save the entry and come back to the SPRO screen. Click Business Add-in: Processing Master Data Enhancements
Create one Implementation by giving implementation name (must start with Z. ZSURESHKUMAR here). Give meaningful description and press enter. The following screen appears.
Go to Interface and Click on CHECK_ADD_ON_ACTIVE method. Add the following code and save.
method IF_EX_CUSTOMER_ADD_DATA~CHECK_ADD_ON_ACTIVE .
data: l_flg_active type BOOLE-BOOLE.
if i_screen_group = 'SK'.
e_add_on_active = 'X'.
endif.
endmethod.
Activate that and come back to SPRO initial screen. Click Business Add-in: Customer Subscreens
The following screen will appear. Create one implementation (ZSURESHKUMAR1 here).
Press enter. The following screen will come. Enter a meaningful Description and Screen Group (which we created earlier) as shown below.
Then go to Interface
Create a Function Pool SAPLZSURESHKUMAR. (See the code of the program for other details). Create a Screen 1111 with field old Customer Number screen group PSK (SE51)
Click on GET_TAXI_SCREEN method and add the following code.
method IF_EX_CUSTOMER_ADD_DATA_CS~GET_TAXI_SCREEN .
case i_taxi_fcode.
when 'SK_TAB'.
e_screen = '1111'. "Eart + Objekt
e_program = 'SAPLZSURESHKUMAR'.
e_headerscreen_layout = ' '.
endcase.
endmethod.
Activate and leave the transaction.
Go to KNA1 (Customer Master) table and add a custom field as shown below. Activate the table.
Now go to XD01 transaction.
The screen we created will appear as shown in the above screen-shot. Click the button. The following screen will appear.
Enter a customer number and save the transaction. Now go to KNA1 table and check the value of the Old Customer Number fields value. The value you entered in this screen will appear on there.
Until now, we wrote code for creating the Custom field. Now we need to disable that field when we are opening the transaction in DISPLAY mode.
Go to include LZSURESHKUMARTOP and enter the following code and activate the program.
Now execute the Transaction in display mode and check the output.
Rewords Points,
Rgds,
P.Nag