Field Exit and Field Enhancement
Field Exit and Field Enhancement
Field Exit:
Field exit is used to write your custom logic against field, it is no longer used by SAP after 4.6C as SAP has come up with lots of user exit and enhancement options. However this document illustrates the way we can use field exit in our SAP.
Go to Transaction Code CMOD then put Transaction Code PRFB in Command Prompt.
Then Go to Menu option ‘Field Exit -> Create’, it will come to below shown screen.
Or
Run the Program RSMODPRF without parameters.
Execute the program.
Now, once we create FIELD_EXIT_XXXX function Module, then it will get triggered every time we use that field.
Set the profile parameter abap/field exit = YES and restart the system.
And before using this field exit, we need to assign it to program and screen.
To assign field exit to a screen, go to Transaction Code PRFB and select your Data Element and click on Assign program/ screen.
Field Enhancement:
Example: As we can see in below screen shot, we have VBAK-AUART field with Data Element description ‘SD document category’. Now we will use Field Enhancement Technique to Change this Data Element Description to “Test Document Category”.
Go to Transaction Code CMOD and follow the path as shown in below screen.
Make Changes to description.
Save it and now check the changes.
What exactly is the used of this Field-exit feature? Does it rename the field labels for the particular data element?
- Suhas
Suhas,
You can use field exit for validations, as explained in document, we create function module for exit, and we assign program and screen number to this field exit, so whenever the program gets executed this exit will get triggered for respective field. you can use it like customer exit.
Hi Sujeet,
Using field enhancements, can the lables for any standard field can be changed ?
BR,
Shankar.
Hi Shankarnarayan,
Yes, you can change labels of any standard field.
Regards,
Sujeet
Good piece of knowledge. I never knew this.
good one
Thanks Thomas.. 🙂
Regards,
Sujeet
Hello Sujeet ,
I guess there is no need to create Field Exit in order to rename the label.
As I was able to change the description of AUART using CMOD itself.
What I think the exact requirement of field exit is for validation , if you could please highlight how can it be done.
The above technique has already been posted in SD Section ( renaming label )
I mean how can we use that FM FIELD_EXIT_AUART ?
Hi Sijin,
Thanks for your review.
In this document, we have two separate part, One is for Field-Exit and other is for Field Enhancement. Field Exit does not rename the Label.. It's mentioned in Field Enhancement section to rename it's Label. as you said we can rename Label using CMOD only and same is explained.
Field-Exit : Ref. below link for more details..
http://wiki.sdn.sap.com/wiki/display/ABAP/Field+exits
Regards,
Sujeet
Fine Sujeet ,
In the first part you explained about Field Exit creation and without giving any example for its usage , you mentioned about the Field Enhancement . That's why I linked both of them with respect to your document.
My mistake 🙂
The link which you have highlighted in the previous comment , I have gone through the same already and created one also.
But can you please paste a sample code or a scenario explaining the usage of Field Exit ( Function Module ) , I mean how that IMPORT Parameter , EXPORT Parameter can be utilized . This has not been mentioned in this document also.
my system says error msg...
does it have any effect or first i have to configure the system:
Hello Abhishek,
FIeld Exit is deactivated by default since NW 6.10, and is obsolete since SAP Basis 4.6a.
Activation of Field Exit :
Go to Transaction Code RZ10 and Set the Profile parameter abap/fieldexit = 1.
Regards,
Sujeet
Good One..