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

selection screen help

Former Member
0 Likes
647

Hallow I use a selection screen like that

SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-t02.

SELECT-OPTIONS c_course FOR z_course_table-objid NO INTERVALS NO-EXTENSION.

SELECTION-SCREEN END OF BLOCK b2.

And I wont that c_course will be <b>required</b>.

How can I do that.

thankes

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
624

Hi their I try your suggestion and it don’t bring me a messege and it bring me error when I do f4 to c_course field

AT SELECTION-SCREEN ON VALUE-REQUEST FOR c_course-low.

*======================================================

<b> IF c_course-low IS INITIAL.

MESSAGE 'Enter c_course field' TYPE 'E'.

ENDIF.</b>

REFRESH: c_course.

CLEAR: c_course.

PERFORM get_objid USING 'D'

CHANGING c_course-low.

This is the line of the <b>error</b>

31

>>>>> REFRESH: c_course.

33 CLEAR: c_course.

34

6 REPLIES 6
Read only

Former Member
0 Likes
624

use the option<b> obligatory</b>

I hope u are looking for that c_course as required mandatory.

Tables: z_course_table.

SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-t02.

SELECT-OPTIONS c_course FOR z_course_table-objid obligatory NO INTERVALS NO-EXTENSION.

SELECTION-SCREEN END OF BLOCK b2.

regards,

vijay.

Read only

0 Likes
624

hi sniper

now its not give me the option to do anything but the problem that if i have 5 field how can i now which field is required their any way that i can do a text to the user when he don't fill this field like u have to fill c_course field.

regards

Read only

anversha_s
Active Contributor
0 Likes
624

hi,

you can do this in

At selection-screen

event

eg:

report zchk.
  
selection-screen begin of block b1 with frame.
PARAMETERS : test_field(10) type c.
SELECT-OPTIONS c_course FOR z_course_table-objid NO INTERVALS NO-EXTENSION.
selection-screen end of block b1.
 
at selection-screen.
 
if test_field is initial.
message 'Enter test field' type 'E'.
endif.

if  c_course-low is initial.
message 'Enter c_course field' type 'E'.
endif.

like this u have to check c_course-high.

hope u got an idea.

Regards

Anver

Read only

Former Member
0 Likes
624

hi,

u can do it this way

For example

&----


*--Selection screen

&----


selection-screen : begin of block bk1 with frame title text-001.

select-options : s_vbeln for vbak-vbeln obligatory no intervals.

select-options : s_devcl for tadir-devclass no intervals.

selection-screen : end of block bk1.

&----


*--at selection screen

&----


at selection-screen.

if s_vbeln is initial.

message 'Pleas enter the value for vbeln' type 'E'.

endif.

Read only

Former Member
0 Likes
625

Hi their I try your suggestion and it don’t bring me a messege and it bring me error when I do f4 to c_course field

AT SELECTION-SCREEN ON VALUE-REQUEST FOR c_course-low.

*======================================================

<b> IF c_course-low IS INITIAL.

MESSAGE 'Enter c_course field' TYPE 'E'.

ENDIF.</b>

REFRESH: c_course.

CLEAR: c_course.

PERFORM get_objid USING 'D'

CHANGING c_course-low.

This is the line of the <b>error</b>

31

>>>>> REFRESH: c_course.

33 CLEAR: c_course.

34

Read only

0 Likes
624

change ur code to..

AT SELECTION-SCREEN ON VALUE-REQUEST FOR c_course-low.
*======================================================

IF c_course-low IS INITIAL.
MESSAGE e016(rp) with 'Enter c_course field'.
ENDIF.

*REFRESH: c_course.
*CLEAR: c_course.

PERFORM get_objid USING 'D'
CHANGING c_course-low.

.

~Suresh