Application Development 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: 

Check box in selection screen

Former Member
0 Kudos

hi i placed one check box in selection screen for data downloading ,

and whenever if i select that checkit shuld enable else it should

disable so what is the procdure under which event to place a code ....

and how to get the path i mean RLGRAP ....

THX

4 REPLIES 4

Former Member
0 Kudos

Hi,

u have to wrrite the code in at selection-screen event.

at selection-screen.

if checkbox eq 'X'.

iur code'

endif.

Plzz reward points if it helps.

Former Member
0 Kudos

HI

AT SELECTION-SCREEN

loop at screen

YOUR CODE SHOULD BE WRITEN HERE

endloop.

Former Member
0 Kudos

Hi,

AT SELECTION-SCREEN ON OUTPUT.

LOOP AT SCREEN.

IF SCREEN-NAME = 'p_filename'.

IF p_chk = 'X'.

screen-input = '0'.

ELSE.

SCREEN-INPUT = '1'.

ENDIF.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

Former Member
0 Kudos

Try with below code...


PARAMETERS: p_chb AS CHECKBOX USER-COMMAND chb,
            p_file TYPE localfile.

DATA: i_filetable TYPE filetable,
      wa_filetable TYPE file_table,
      g_rc TYPE i.

AT SELECTION-SCREEN OUTPUT.

  LOOP AT SCREEN.
    IF screen-name CP '*P_FILE*'.
      IF p_chb IS INITIAL.
        screen-active = 0.
      ELSE.
        screen-active = 1.
      ENDIF.
      MODIFY SCREEN.
    ENDIF.
  ENDLOOP.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.

  CALL METHOD cl_gui_frontend_services=>file_open_dialog
    EXPORTING
      window_title            = 'Save As...'
    CHANGING
      file_table              = i_filetable
      rc                      = g_rc
    EXCEPTIONS
      file_open_dialog_failed = 1
      cntl_error              = 2
      error_no_gui            = 3
      not_supported_by_gui    = 4
      OTHERS                  = 5.
  IF sy-subrc EQ 0.
*** Display Local Directories for file selection
    READ TABLE i_filetable INTO wa_filetable INDEX 1.
    MOVE wa_filetable-filename TO p_file.
  ENDIF.

Kind Regards

Eswar