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
507

Hallow I have selection screen for sy-datum and I wont

That the 2 field of date will be required <b>not just the first</b> one

how i can do that

Regards

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

SELECT-OPTIONS so_date FOR sy-datum OBLIGATORY .

SELECTION-SCREEN END OF BLOCK b2.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
488
at selection-screen.
if so_date-high is initial.
  message e001(ZZ) with 'enter TO Date'.
endif.
4 REPLIES 4
Read only

Former Member
0 Likes
488

Hi!

You can change the requred settings statically, by removing/adding the OBLIGATORY keyword.

Or dynamically, like this:


AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
  IF screen-name = 'SO_DATE'.
    screen-required = 0.
    MODIFY SCREEN.
  ENDIF.
ENDLOOP.

Regards

Tamá

Read only

Former Member
0 Likes
489
at selection-screen.
if so_date-high is initial.
  message e001(ZZ) with 'enter TO Date'.
endif.
Read only

Former Member
0 Likes
488

hI..,

check this code..

its working..

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

SELECT-OPTIONS so_date FOR sy-datum OBLIGATORY .

SELECTION-SCREEN END OF BLOCK b2.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF SCREEN-NAME = 'SO_DATE-HIGH'.

SCREEN-REQUIRED = 1.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

regards,

sai ramesh

Read only

Former Member
0 Likes
488

Hi,

You need to write the code in the AT SELECTION-SCREEN Event.

AT SELECTION-SCREEN.

if SO_DATE-HIGH is initial.

message E001 with text-001. " Enter the to date alsol

ENDIF.

Regards

Sudheer