Skip to Content
-2

My selection screen breaks when I added a file upload option.

Hi fellow abapers,

I've my code working for disabling screen input based on radio button selection. But it seems to break when I added a third option for file upload. If commented out the code for "AT SELECTION SCREEN ON" and below. It is working fine.

I guess AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file. and AT SELECTION-SCREEN ON p_file

break my current selection screen output logic. Anyone know how to solve this?

AT SELECTION-SCREEN OUTPUT.
  LOOP AT SCREEN.
    CASE 'X'.
      WHEN p_rad1.
        IF screen-group1 = 'RB1'.
          screen-input = 1.
        ELSEIF screen-group1 = 'RB2' OR screen-group1 = 'RB3'.
          screen-input = 0.
        ENDIF.
      WHEN p_rad2.
        IF screen-group1 = 'RB2'.
          screen-input = 1.
        ELSEIF screen-group1 = 'RB1' OR screen-group1 = 'RB3'.
          screen-input = 0.
        ENDIF.
      WHEN p_rad3.
        IF screen-name = 'RB3'.
          screen-input = 1.
        ELSEIF screen-group1 = 'RB1' OR screen-group1 = 'RB2'.
          screen-input = 0.
        ENDIF.
    ENDCASE.
    MODIFY SCREEN.
  ENDLOOP.


"Below code will break my selection screen.


AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
  "F4 File Request Pop Up
  CALL METHOD ycl_otc_cust_lot=>get_local_file
    IMPORTING
      ev_file = p_file.

AT SELECTION-SCREEN ON p_file.
  "In Screen Validation for File Name
  CALL METHOD ycl_otc_cust_lot=>check_if_excel_format
    EXPORTING
      iv_file = p_file
    IMPORTING
      ev_ext  = gv_ext.
Add a comment
10|10000 characters needed characters exceeded

  • Please provide your Data statements for the Radio Button and how you grouped.

  • SELECTION-SCREEN: BEGIN OF BLOCK b4 WITH FRAME TITLE TEXT-011.
    PARAMETERS : p_rad1 RADIOBUTTON GROUP g1 DEFAULT 'X' USER-COMMAND on MODIF ID r1.
    PARAMETERS : p_rad2 RADIOBUTTON GROUP g1 MODIF ID r2.
    PARAMETERS : p_rad3 RADIOBUTTON GROUP g1 MODIF ID r3.
    SELECTION-SCREEN: END OF BLOCK b4.
    
    SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME TITLE TEXT-001.
    SELECT-OPTIONS s_werks FOR  ycust_lot_data-werks MODIF ID rb1.
    SELECT-OPTIONS s_date  FOR  ycust_lot_data-erdat MODIF ID rb1.
    SELECTION-SCREEN: END OF BLOCK b1.
    
    SELECTION-SCREEN: BEGIN OF BLOCK b2 WITH FRAME TITLE TEXT-009.
    SELECT-OPTIONS p_date  FOR  ycust_lot_data-erdat MODIF ID rb2.
    SELECTION-SCREEN: END OF BLOCK b2.
    
    SELECTION-SCREEN: BEGIN OF BLOCK b3 WITH FRAME TITLE TEXT-010.
    PARAMETERS:    p_file  TYPE rlgrap-filename MODIF ID rb3.
    SELECTION-SCREEN: END OF BLOCK b3.
  • I tested your code (with correction -> IF screen-group1 = 'RB3' instead of screen-name), and I'm able to select the radio button. Sorry! If you don't believe me, please paste the code you have posted in a new program and try. So please provide the additional code and information that will help us reproduce (and solve) your issue.

Assigned Tags

Related questions

1 Answer

  • Posted on Mar 21 at 03:09 PM
    -1

    Hi

    Please change your code == screen-name to screen-group

          WHEN p_rad3.
            IF screen-group1 = 'RB3'.  <================ change here
              screen-input = 1.
            ELSEIF screen-group1 = 'RB1' OR screen-group1 = 'RB2'.
              screen-input = 0.
            ENDIF.
    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.