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
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.
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
*&---------------------------------------------------------------------* *& 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.
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
Add a comment