Application Development 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: 

Mandatory

Former Member
0 Kudos

Hi all,

I have several fields in my screen.

In that there r two fields, Telephone number and Mailid.

If the user enters telephone number, then the mailid shouldn't be a mandory.

Whereas if the user doent enters the telephone no, then the mailid should be mandatory...

How to do this? Pls tell me....

Points will be rewarded...

1 ACCEPTED SOLUTION

Former Member
0 Kudos

AT SELECTION-SCREEN

IF sy-ucomm EQ 'ONLI'.

IF <tel_number> IS INITIAL AND

<mail id> IS INITIAL.

Message E000(00) WITH 'Enter Mail Id'.

ENDIF.

4 REPLIES 4

Former Member
0 Kudos

AT SELECTION-SCREEN

IF sy-ucomm EQ 'ONLI'.

IF <tel_number> IS INITIAL AND

<mail id> IS INITIAL.

Message E000(00) WITH 'Enter Mail Id'.

ENDIF.

Former Member
0 Kudos

Hi

If u want make botht the fields mandatory perform like this

parameters: emailid like <table Name> Obligatory.

parameters: Number like <table Name> Obligatory.

Regards

Pavan

Former Member
0 Kudos

Hi ,

Build up a logic as below in start-of-selection.

plant = telephone

test = mail id.

IF s_plant IS INITIAL.

IF s_test IS INITIAL.

MESSAGE' material number is mandatory' TYPE 'I'.

ENDIF.

ENDIF.

tc

saji

Former Member
0 Kudos

To define the input field of a parameter as a required field, you use the following syntax:

PARAMETERS p ...... OBLIGATORY ......

When you use this option, a question mark appears in the input field for parameter p. The user cannot continue with the program without entering a value in this field on the selection screen.

REPORT demo_sel_screen_param_obligato.

PARAMETERS field(10) TYPE c OBLIGATORY.