Skip to Content

How to enable a field in selection screen based on the value, selected from a drop down list?

Dear All,

In my selection screen, by default a field is made disable. I want to make this field enable if user chooses a specific condition from a drop down list. Please suggest how to do that.

Thanks.

With regards.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Posted on Jul 18, 2016 at 08:31 AM

    Hi Mr. anonymous,

    use PARAMETER addition USER-COMMAND fcode for the listbox parameter. This triggers PAI and then PBO. In PBO you can use the LOOP AT SCREEN as suggested.

    Regards

    Clemens

    P.S.: Although this is not facebook (albeit looking like) you may use your real name.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 18, 2016 at 07:16 AM

    Just manage it in the PBO (AT SELECTION-SCREEN OUTPUT) trigger this event by assigning some dummy function code to the drop-down list.

    Regards,

    Raymond

    Add a comment
    10|10000 characters needed characters exceeded

    • Dd you miss my

      trigger this event by assigning some dummy function code to the drop-down list.

      Try a code like

      PARAMETERS: p_field1 TYPE text20 AS LISTBOX VISIBLE LENGTH 50 USER-COMMAND dummy, " trigger PAI/PBO cycle

      p_field2 TYPE text20 MODIF ID m2.

      AT SELECTION-SCREEN OUTPUT.

      LOOP AT SCREEN.

      CASE screen-group1.

      WHEN 'M2'.

      IF p_field1 EQ 'SOMEVALUE'. " internal format!

      screen-input = '1'.

      ELSE.

      screen-input = '0'.

      ENDIF.

      ENDCASE.

      MODIFY SCREEN.

      ENDLOOP.

      Regards,

      Raymond

  • Posted on Jul 18, 2016 at 08:18 AM

    Hello,

    You can adjust below code according to your requirement.

    Regards.

    SELECTION-SCREEN BEGIN OF BLOCK a1 WITH FRAME TITLE text-000.

    SELECT-OPTIONS : s_default FOR vbak-erdat MODIF ID S2.

    PARAMETERS : p_dropdwn type spmon MODIF ID S1.

    SELECTION-SCREEN END OF BLOCK a1.

    AT SELECTION-SCREEN OUTPUT.

    LOOP AT SCREEN.

    IF p_dropdwn = 'X' AND screen-group1 = 'S2'.
    screen-active = '0'.
    ENDIF.

    MODIFY SCREEN.
    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.