Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

material master

Former Member
0 Likes
1,459

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,428

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

14 REPLIES 14
Read only

Former Member
0 Likes
1,429

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

Read only

0 Likes
1,428

Thanks for your reply.

But how to make use of it ?

Read only

0 Likes
1,428

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

Read only

0 Likes
1,428

Yes, thanks.

Here's my email: sap_macy@yahoo.com.hk

Thanks a lot!

Read only

0 Likes
1,427

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.

Read only

0 Likes
1,427

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...

Read only

0 Likes
1,427

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.

Read only

0 Likes
1,427

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?

Read only

0 Likes
1,427

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.

Read only

0 Likes
1,427

and one more thing, how can I debug the FM ?

Read only

0 Likes
1,427

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

Read only

0 Likes
1,427

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.

Read only

0 Likes
1,427

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?

Read only

Former Member
0 Likes
1,427

Hi,

Check the configuration.. I believe you can configure ..

Tcodes

-


OMT3B

OMS9

Thanks,

Naren