Skip to Content
author's profile photo Former Member
Former Member

Check box in selection screen

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 28, 2008 at 07:52 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 28, 2008 at 07:44 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 28, 2008 at 07:45 AM

    HI

    AT SELECTION-SCREEN

    loop at screen

    YOUR CODE SHOULD BE WRITEN HERE

    endloop.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 28, 2008 at 07:49 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.