‎2007 Feb 09 2:39 AM
Hi all,
Is there any method (configurations/user exits) to make so that I can restrict user to input certain values(mat. gp A and B) in material group for a mat. type in MM01?
Thanks.
‎2007 Feb 09 2:45 AM
Hi,
For this you need to use Field Exit which is used for validations. Field exit can be implemented specifc to programs and screens.
See the utility program RSMODPRF which is used for creating field exit..
Cheers
VJ
‎2007 Feb 09 2:45 AM
Hi,
For this you need to use Field Exit which is used for validations. Field exit can be implemented specifc to programs and screens.
See the utility program RSMODPRF which is used for creating field exit..
Cheers
VJ
‎2007 Feb 09 2:56 AM
‎2007 Feb 09 3:25 AM
Hi,
Execute the program and specify the data element for which you wish to implement a field exit.
You can drop me an email and i can send u one document giving the details.
Cheers
VJ
‎2007 Feb 09 5:26 AM
Yes, thanks.
Here's my email: sap_macy@yahoo.com.hk
Thanks a lot!
‎2007 Feb 09 5:28 AM
How to work on field exit.
1. Run the program RSMODPRF and LEAVE THE TWO INPUT FIELDS BLANK
2. Hit execute
3. You should see an empty report with some headings
4. From the Field exit menu select Create.
5. Enter your data element
6. This takes you to the SE37 transaction where you can create your FM
Example for coding:
FUNCTION field_exit_maktx.
*"----
""Lokale Schnittstelle:
*" IMPORTING
*" REFERENCE(INPUT)
*" EXPORTING
*" REFERENCE(OUTPUT)
*"----
DATA h_maktx(40).
DATA htext(25).
h_maktx = input.
MOVE h_maktx+15(25) TO htext.
IF NOT htext IS INITIAL.
MESSAGE e000(yp) WITH 'pls fill only the first 15 places of maktx!'.
ENDIF.
ENDFUNCTION.
7. Create the FM and activate it
8. Hit F3 back to the program RSMODPRF
9. There should now be a row in the report corresponding to your field exit.
10. Select this line and hit the button Assign prog./screen
11. Enter the program and screen (you can leave the field exit number blank)
12. Hit save!
It should now be done. Importantly, for field exits to work, the system parameter abap/fieldexit must be set to 'YES'. If this was not already set, then you will need to set it and restart your application server.
‎2007 Feb 09 6:38 AM
Thanks Kishan, it's very useful to me, but should I create a function group myself for the FM or use an existing one?
and after I activate the FM, there is no entry in the report RSMODPRF.
I guess if it is due to the function group that I wrongly use...
‎2007 Feb 09 6:49 AM
ya check the function group it is activated or not , if u want to use existing.
otherwise u also make new nop proble but it is activated.
‎2007 Feb 09 6:56 AM
Oh, really thanks!
I can create an entry there in the report, but the status remains inactive even I have activated the FM, what's wrong there?
‎2007 Feb 09 7:08 AM
i don't understand what u want to say.
do like that
go to se80>function group->object name(function groupname)->right click on that->activate-->it activate all the function module.
‎2007 Feb 09 7:09 AM
‎2007 Feb 09 7:11 AM
You cannot debug a Field Exit.
You can however debugg the FM in SE37.
Note: Field Exit will only work if the parameter abap/fieldexit is set to 'X' in Parameter settings ( RSPARAM)
Cheers
VJ
Message was edited by:
Vijayendra Rao
‎2007 Feb 09 7:15 AM
Unfortunately we cannot debug a field exit.. Give some unconditional message of type I or S.as the very first line of your code in field exit. This way u will come to know,whether the field exit is proper or not. For getting any variable value also,
we have to use message.
‎2007 Feb 09 7:33 AM
Thanks very much!
It works finally when I run MM01!
a follow up question is that, I have to check the input of mat. gp MARA-MATKL when creating a material before saving, but it can't detect the field MARA-MATKL as it hasn't saved to the DB, which structure for the field should I use in the field exit?
‎2007 Feb 09 3:02 AM
Hi,
Check the configuration.. I believe you can configure ..
Tcodes
-
OMT3B
OMS9
Thanks,
Naren