‎2007 Jun 26 2:18 PM
Hi all,
How can I write user exits, function exits?
For example for a coming values from a textbox from sap standard application, I need to write an user-exit but how?
How can I read this textbox value and then search the structure type internal table?
Thanks.
‎2007 Jun 26 2:40 PM
for a standard sap program, how can I add my own codes?
How can I create subsreens at the end of standard screen?
How can I use cmod?
How can I test the result?
...
User exit is a trouble for me at these days.
Thanks for all of you.
‎2007 Jun 26 2:51 PM
Hi Deniz, generally the user exits is provided for SAP Standar, then your can not create user exits...
If you need to coming values from a textbox and applying validations then you must use field-exits.
For this must use transaction CMOD.
‎2007 Jun 26 2:53 PM
Hi,
I think the below information will clarify you doubts.
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 .
‎2007 Jun 26 3:01 PM
Hi,
If you doesn't find any function user exit you can add your code using the enhancement as of
Implicit Enhancement Option :
Available are various common places examples-
End of executable program, Include Function group, Begin/End of form routine;End of structure; End of Private/Public/Protected Section of a local class .
Explicit Enhancement Option :
At specific source code places (explicitly by SAP)
Belong to specific Enhancement spot.
Reward points if it is usefull.
thanks,
Muthu