09-22-2008 5:05 AM
hi experts,
i have declared selection-screen with this codes,
on the basis of p_appfdt i m making calculation
and populating some value in the p_apptdt,i want to make that
field 'p_apptdt' sud be non editable it will only in display
mode with the values which i m populating....
here is my codes....
*SELECTION-SCREEN DECLARATION:
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(31) text-002.
PARAMETERS: p_appfdt TYPE hap_s_dynp_report_1000-appraisal_from_date.
OBLIGATORY.
SELECTION-SCREEN COMMENT 47(8) text-003.
PARAMETERS: p_apptdt TYPE hap_s_dynp_report_1000-appraisal_to_date.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK b1.
AT SELECTION-SCREEN on p_appfdt .
AT SELECTION-SCREEN on p_apptdt.
loop at screen.
BREAK-POINT.
if screen-name = p_apptdt.
screen-input = 0.
modify screen .
endif.
endloop.
clear:begda,
endda,
p_apptdt.
if p_appfdt+6(2) NE '01' and
p_appfdt+6(2) NE '16'.
MESSAGE S016(rp) WITH 'The day should be either 01 or 16'(m08).
ENDIF.
IF p_appfdt+6(2) NE '16' and
p_appfdt+6(2) NE '01'.
MESSAGE S016(rp) WITH 'The day should be either 01 or 16'(m08).
endif.
if p_appfdt+6(2) = '01'.
move '14' to IM_DURATION-durdd.
CALL FUNCTION 'HR_99S_DATE_ADD_SUB_DURATION'
EXPORTING
IM_DATE = p_appfdt
IM_OPERATOR = '+'
IM_DURATION = IM_DURATION
IMPORTING
EX_DATE = mybegda.
move mybegda to p_apptdt.
else.
clear:p_apptdt.
if p_appfdt+6(2) = '16' .
clear:mybegda.
CALL FUNCTION 'LAST_DAY_OF_MONTHS'
EXPORTING
DAY_IN = p_appfdt
IMPORTING
LAST_DAY_OF_MONTH = mybegda
EXCEPTIONS
DAY_IN_NO_DATE = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
clear:p_apptdt.
move mybegda to p_apptdt.
endif.
endif.
09-22-2008 6:37 AM
Hi Raja,
Try this below code. it will work.
PARAMETERS :p_aname LIKE rlgrap-filename MODIF ID gr2 OBLIGATORY.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF screen-group1 = `GR2`.
screen-input = `0`.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
Regards,
Siva.
09-22-2008 5:13 AM
Hi Raja..
The way you did is correct then wht is problem... ??
Regards,
sg
09-22-2008 5:53 AM
09-22-2008 5:16 AM
Hi,
use the AT SELECTION_SCREEN OUTPUT. event
PARAMETERS: p_appfdt TYPE hap_s_dynp_report_1000-appraisal_from_date MODIF ID chr OBLIGATORY.
AT SELECTION-SCREEN OUTPUT .
loop at screen.
if screen-name = p_apptdt.
screen-input = '0'.
modify screen .
endif.
endloop.
or
PARAMETERS: p_appfdt TYPE hap_s_dynp_report_1000-appraisal_from_date MODIF ID chr OBLIGATORY.
AT SELECTION-SCREEN OUTPUT .
loop at screen.
if screen-group = 'chr'.
screen-input = '0'.
modify screen .
endif.
endloop.
Thanks,
Nelson
Edited by: Nelson karunakar on Sep 22, 2008 6:17 AM
09-22-2008 6:37 AM
Hi Raja,
Try this below code. it will work.
PARAMETERS :p_aname LIKE rlgrap-filename MODIF ID gr2 OBLIGATORY.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF screen-group1 = `GR2`.
screen-input = `0`.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
Regards,
Siva.