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 Entry

Former Member
0 Likes
561

Hi,

I have a requirement where in i have 2 entries 1> posting date 2> entry date on my selection screen

If i am entering any value in Posting date then the entry date on the selection screen should be disabled if not

if i enter any value in entry date then the posting date field on the selection screen has to be disabled

Any inputs for this query will be really helpful for me.

Thanks and Regards,

Yamini.A

4 REPLIES 4
Read only

Former Member
0 Likes
537

Hi yamini,

1. ENTER

2. for doing this,

the user will have to

press ENTER

so that event gets triggered

and we can disable the other date field.

3. just copy paste in new program.

REPORT abc.

*----


PARAMETERS : postdate TYPE sy-datum MODIF ID a,

entdate TYPE sy-datum MODIF ID b.

*----


AT SELECTION-SCREEN OUTPUT.

IF postdate IS NOT INITIAL.

LOOP AT SCREEN.

IF screen-group1 = 'B'.

screen-input = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ELSE.

IF entdate IS NOT INITIAL.

LOOP AT SCREEN.

IF screen-group1 = 'A'.

screen-input = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ENDIF.

ENDIF.

regards,

amit m.

Read only

Former Member
0 Likes
537

Hi,

you can do it with the help of event at selection screen output.


at selection-screen output.

loop at screen.
if screen-name = 'ABCD'.
screen-input = 0.
modify screen.
endif.
endloop.

Regards

Vijay

Read only

Former Member
0 Likes
537
*&---------------------------------------------------------------------*
*& Report  YCHATEST                                                    *
*&                                                                     *
*&---------------------------------------------------------------------*
*&                                                                     *
*&                                                                     *
*&---------------------------------------------------------------------*

REPORT  ychatest                                .

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.

PARAMETERS : podate TYPE sy-datum MODIF ID s1.

PARAMETERS : entrydt TYPE sy-datum MODIF ID s2.

SELECTION-SCREEN END OF BLOCK b1.
DATA : input TYPE i.

AT SELECTION-SCREEN OUTPUT.

  if not podate is initial.
     LOOP AT SCREEN.
    IF screen-group1 = 'S2'.
      screen-input = 0..
      MODIFY SCREEN.
    ENDIF.
  ENDLOOP.
 endif.
 if not entrydt is initial.
     LOOP AT SCREEN.
    IF screen-group1 = 'S1'.
      screen-input = 0..
      MODIFY SCREEN.
    ENDIF.
  ENDLOOP.
 endif.
Read only

Former Member
0 Likes
537

Hi,

ABAP is event driven program. Unless the user performs an action PAI event cannot be triggered.

you can achieve your purpose by making a provision for two radiobuttons in the selection screen.

One radio button for Posting Date and one for Entry date.

When the user clicks the radio button corresponding the Posting date, activate POsting date and deactive the Entry date field. Do the vice-a-versa if the user clicks the radio button corresponding to Entry Date.

All you have to do is assign USER-COMMAND to the Radio buttons.

Now in the AT SELECTION-SCREEN OUTPUT event disable the field as per your requirement.

Regards,

Vara