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

Mandatory Field

Former Member
0 Likes
503

Hi,

Is it possible to make a field Mandatory in the standard transaction?

Its urgent.Please Help.

Thanks,

Supriya Manik.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
484

Hello Supriya,

Please also try field Exit as an alternative solution since you need only a mandatory field check.....

To create a field Exit

1)For field exits in R/3 4.6C, execute transaction CMOD. Then type PRFB in the command field.

2)on the top menu...click on Field exit-> create ->enter the name of data element

3)enter the data element required for screen field to be mandatory and Execute

4)another screen comes with a function module name FIELD_EXIT_name of data element

5)Click create and save it to corresponding function group

6)you will get a function module with

import parameter as : INPUT

export parameter as : OUTPUT

7) in the source code write the code :

if input is initial.

message 'SALES FIELD MADATORY' type 'E'.

endif.

8)again to activate execute transaction CMOD. Then type PRFB in the command field. on the top menu...click on Field exit->Activate

now wherever data element is used the mandatory check will come but you need it only for your program ,so in the same screen click on Assign prog./screen tab and write the name of the program and screen number where you want the particular check

I believe field exit are not possible if structure field is on the screen...please do the above and check..you can also run the report RSMODPRF to create a field exit

Hope the suggestions proved useful.

Reward points if it was of any help

Regards

Byju

Hi,

Is it possible to make a field Mandatory in the standard transaction?

Its urgent.Please Help.

Thanks,

Supriya Manik.

3 REPLIES 3
Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
484

Hi,

Use transaction SHD0 to create a Transaction variant for the standad transaction, for the field that you want to make mandatory select the checkbox "Required" in the process of creating Transaction variant.

Then in SE93 create a Variant transaction using this Transaction Variant.

And use this new transaction instead of the standard transaction.

Regards,

Sesh

Read only

Former Member
0 Likes
485

Hello Supriya,

Please also try field Exit as an alternative solution since you need only a mandatory field check.....

To create a field Exit

1)For field exits in R/3 4.6C, execute transaction CMOD. Then type PRFB in the command field.

2)on the top menu...click on Field exit-> create ->enter the name of data element

3)enter the data element required for screen field to be mandatory and Execute

4)another screen comes with a function module name FIELD_EXIT_name of data element

5)Click create and save it to corresponding function group

6)you will get a function module with

import parameter as : INPUT

export parameter as : OUTPUT

7) in the source code write the code :

if input is initial.

message 'SALES FIELD MADATORY' type 'E'.

endif.

8)again to activate execute transaction CMOD. Then type PRFB in the command field. on the top menu...click on Field exit->Activate

now wherever data element is used the mandatory check will come but you need it only for your program ,so in the same screen click on Assign prog./screen tab and write the name of the program and screen number where you want the particular check

I believe field exit are not possible if structure field is on the screen...please do the above and check..you can also run the report RSMODPRF to create a field exit

Hope the suggestions proved useful.

Reward points if it was of any help

Regards

Byju

Read only

Former Member
0 Likes
484

Thanks a lot for all the help.Thank you.