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

Former Member
0 Likes
1,068

Hi all,

How to make a field in a screen as mandatory, is there any option in the elementary list.

regards,

Ganesh

11 REPLIES 11
Read only

gopi_narendra
Active Contributor
0 Likes
1,046

in the layout double click on the field will popup a attribute popup, in that under the program tab - > choose the drop down REQUIRED.

in the layout u need to select the option REQUIRED for a specific field.

Regards

- Gopi

Read only

0 Likes
1,046

Hi gopi that was really useful answer.

WS_WERKS_INPUT made it mandatory with your help

WS_WERKS_TEXT has to add text how to do that

regards,

Ganesh

Read only

0 Likes
1,046

I could not understand u regd TEXT. please be more clear

Regards

- Gopi

Read only

0 Likes
1,046

Hi ganesh,

1. After entering WERKS, and pressing ENTER,

it will display the text for it.

2. just copy paste

3.

REPORT ABC.

parameters : werks like t001w-werks.

parameters : NAME1 like t001w-name1 modif id DIS.

at selection-screen output.

select single name1

into name1

from t001w

where werks = werks.

loop at screen.

if screen-group1 = 'DIS'.

screen-input = 0.

modify screen.

endif.

endloop.

regards,

amit m.

Read only

0 Likes
1,046

in the screen in general attributes i have those 2 fields

WS_WERKS_INPUT is for input and it is to be mandatory

i have to display a message if user does not enter this field as "Plant is a mandatory field" where shall i include this text.

Read only

0 Likes
1,046

You need not write any text for mandatory fields,

if a field is made mandatory, that is handled by SAP itself, u need not explicitly write a error msg for a MANDATORY field

<b>IS THIS WHAT U WANTED?

CLOSE THIS THREAD IF UR PROB IS SOLVED</b>

Regards

- Gopi

Read only

0 Likes
1,046

if module pool

in se51 flow logic

field ws_werks_input module user_command_2_scrno.

in se38.

module user_commmand_2_scrno.

if ws_werks_input is initial.

message: 'Plant required' type 'E'.

endif.

endmodule.

selection screen in report.

at selection screen on ws_werks_input.

if ws_werks_input is initial.

message: 'Plant required' type 'E'.

endif.

santhosh

Read only

Former Member
0 Likes
1,046

Hi Ganesh,

parameters; matnr like mara-matnr obligatory.

Regards, Dieter

Read only

Former Member
0 Likes
1,046

Hi,

Use key word <b>obligatory</b>

Thanks

Sunil

Read only

Former Member
0 Likes
1,046

If you are designing your screen for module programming there is a parameter called REQUIRED, you need to select the particular checkbox for the defined field.

If it is for a report you can use the variation OBLIGATORY with the parameter/select-option statement.

Read only

gopi_narendra
Active Contributor
0 Likes
1,046

Hi ganesh is that waht u wanted? if u r talking abt Dialog Programming, the way i told u is the ONE to make the field mandatory.

if u r talking abt selection screen. use the key word OBLIGATORY

parameters: p_vbeln like vbak-vbeln OBLIGATORY.

PLEASE CLOSE THE THREAD if ur prob is solved

Regards

- Gopi