Skip to Content

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

problem in selection screen

Hi All,

problem in selection screen when i am trying to select the second radio button it as to show me the error that enter the document date instead it is still asking me to enter the period

here is the code and plz make the corrections and send it to me..

thanks in advance

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-100.

SELECT-OPTIONS: bldat FOR bkpf-bldat MODIF ID gr1,

monat FOR bkpf-monat MODIF ID gr2,

gjahr FOR bkpf-gjahr MODIF ID gr2 NO INTERVALS NO-EXTENSION,

xblnr FOR bkpf-xblnr,

blart FOR bkpf-blart,

frmty FOR j_1ifrdtot-j_1ifrmtyp.

SELECTION-SCREEN END OF BLOCK b1.

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

PARAMETERS: rd1 RADIOBUTTON GROUP grp DEFAULT 'X' USER-COMMAND rad,

rd2 RADIOBUTTON GROUP grp.

SELECTION-SCREEN END OF BLOCK b2.

AT SELECTION-SCREEN OUTPUT.

*selection screen when the period & year enabled then date is disabled and viceversa

PERFORM selection_screen_output.

************************************************************************

  • AT SELECTION SCREEN *

************************************************************************

AT SELECTION-SCREEN.

  • This perform will check the mandatory fields

PERFORM f_mandatory_fields.

  • This perform will validate the fields

PERFORM f_validate_sel_screen.

FORM selection_screen_output .

LOOP AT SCREEN.

IF rd1 = 'X'.

IF screen-group1 = 'GR1'.

screen-input = '0'.

MODIFY SCREEN.

ENDIF.

ENDIF.

IF rd2 = 'X'.

IF screen-group1 = 'GR2'.

screen-input = '0'.

MODIFY SCREEN.

ENDIF.

ENDIF.

ENDLOOP.

ENDFORM.

FORM f_mandatory_fields .

IF sy-ucomm <> 'RAD'.

  • blank document date is not allowed

IF bldat[] IS INITIAL.

MESSAGE e020.

ENDIF.

  • blank period is not allowed

IF monat[] IS INITIAL.

MESSAGE e008.

ENDIF.

  • blank fiscal year is not allowed

IF gjahr[] IS INITIAL.

MESSAGE e009.

ENDIF.

ENDIF.

ENDFORM. " f_mandatory_fields

Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question