Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

regarding selection screen

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.

Tags:
replied

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.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question