Setting screen attributes for select-option in subscreen

Hello SDN Community,  I have researched this extensively in forums and found much helpful information in getting the select-option working in a subscreen.  Also found information that discussed using standard AT SELECTION-SCREEN statements to process the sub-screen with. 
I encountered problems when that from the LOOP AT SCREEN within the AT SELECTION-SCREEN OUTPUT,  I set the INPUT/OUPUT attributes to zero, the field was still open for input when it displayed.  For when I do this on other fields of my screen, they are "greyed out".
Has anyone any experience setting field attributes from within loop at screen for embedded select-option subscreen?  Would appreciate any insight you might have.
Thank you,
Dean Atteberry.
P.S.- I put this thru the debugger and I can see the INPUT and OUTPUT attributes getting changed.  But when displays, it is like the change didn't happen.
Full description of my processing below...
I have a screen with four radio-buttons.  Under the first radio-button is my embedded subscreen with one SELECT-OPTION for AUFNR.  Under the other three radio-buttons are single fields declared regular way in main screen.
In my PBO of main screen I have loop at screen that enables/disables INPUT and OUPTUT attributes based on which radio-button is selected.  This prevents confusion from user entering values in fields other than the one the radio-button is selected for.
For my embedded select-option subscreen, I have an AT SELECTION-SCREEN OUTPUT statement in which I have a LOOP AT SCREEN.  Within that, based on radio-buttons, I either enable or disable the INPUT and OUTPUT attributes for the S_AUFNR-LOW and S_AUFNR-HIGH fields.
Edited by: Dean Atteberry on Mar 25, 2009 4:39 PM

>> I think that you are trying to change select options within main screen, whereby it should be
>> changed in PBO of that subscreen. You said you do it in AT SELECTION-SCRREN OUTPUT which
>>  will be only applicable for selection screen (I guess your main screen here). Do loop at screen in
>>  PBO module of this subscreen not in PBO of the selection screen and see if that helps.
Hi Marcin,  thank you for your reply.  My "main screen" is not my "selection screen".  Please allow me to further clarify...
My "main screen" has four radio buttons with a subscreen area under the first one and single fields under the others.
My "subscreen" is auto-generated by Selection-Screen and Select-Options statements which are in my TOP module.
I call my auto-generated select-option subscreen in my PBO with...
     call subscreen sca_ordr including sy-repid scr_0121.
and in my PAI with...
     call subscreen sca_ordr.
In order to do LOOP AT SCREEN for my system-generated select-option subscreen, I use the AT SELECTION-SCREEN OUTPUT event in which to put my loop. 
When I walk thru this in the debugger, I can see it setting INPUT/OUTPUT fields to zero, but when the screen displays, there are no changes to my subscreen....  Fields should be "greyed out" instead they are open for intput.
Doing my best to accurately describe in as few words as possible.  Thank you for your ideas!
Dean.

Similar Messages

  • MM06E005 - how to set screen attributes for custom fields?

    Hi all,
    I have implemented enhancement MM06E005. I have added my custom fields to CI_EKPODB.  I have created and activated all the dynpros.  I modified subscreen 0111 (items) to contain my new custom fields.  I have activated the function exits (016,017,018) for the item screens.  I am able to save data using the new custom fields on subscreen 0111.
    What I am having trouble with is modifying the screen attributes for the new custom fields that I placed on subscreen 0111. I know it should be in exit 016(PBO) and I need to check the action type.  I tried a "loop at screen" but my fields were not there. 
    How do I modify the screen attributes?  Also, can I change the "Tab" text from "Customer Data" to be something else?
    Any help would be appreciated.
    Thanks, Mark

    Hi,
      In the PBO of the screen 0111, create a module. And in that module you can do LOOP AT SCREEN..where the screen elements will be available..
    Thanks
    Naren

  • Set parameter id for select-options to fill more than one value

    FROM MY CUSTOM PROGRAM I AM CALLING A TRANSACTION CODE. IN MY REPORT I WANT TO SELECT MORE THAN ONE RECORD AND TO CALL THE TRANSACTION BY PASSING THE SELECTED VALUES TO THE SELECT-OPTIONS OF THE TRANSACTION.
    IF IT IS A PARAMETER I CAN WRITE SET PARAMETER STATEMENT FOR ONE VALUE AND EASILY CALL THE TRANSACTION. BUT I WANT TO FILL THE SELECT-OPTIONS OF THE TCODE.
    CAN ANYBODY PLEASE PROVIDE ME THE LOGIC HOW TO FILL THE SELECT-OPTIONS FROM MY REPORT FOR CALLING THE TRANSACTION.
    REGARDS,
    VASU.

    Hi..
    Instead of calling the Transaction
    Call the Report directly using:
    (First declare the Ranges)
    ranges : R_matnr for mara-matnr.
    (Fill the values into Ranges Table and call the report )
    SUBMIT <REPORT>
      With s_matnr in R_matnr.
    <b>Reward if helpful.</b>

  • Remove screen values for select options after report runs

    I have a report that runs and when it is finished there is garbage in 3 select-option fields.  I put it there because i want the report to run if the field is blank.  here is a sample of that code.
    IF SO_APS = '  '.
        SO_APS = 'IEQn'.
        APPEND SO_APS.
      ENDIF.
    what happens is that there is an displayed after the report is finished, and I don't want to confuse the end users.

    You can try clearing it as the last statement.
    clear  SP_APS.   Refresh SO_APS.
    If that doesn't work, then try FREE MEMORY as the last executable statement.
    Regards,
    Rich Heilman

  • Set of default values for Select-Options

    Hi Gurus,
    I have a requirement where I need to set default values for select options
    ex: SELECT-OPTIONS: S_MTART FOR MARA-MTART
    default values must be ERSA - HIBE- FHMI - DIEN - GEST
    Please tell me how to do it.
    Effective replies will be rewarded with full points
    Karthik

    Hi,
    For each SELECT-OPTION, you can only specify one DEFAULT.
    You must specify the default value g in its internal format, e.g. "SELECT-OPTIONS DATE FOR SY-DATUM DEFAULT '19931224'", not "... DEFAULT '24.12.1993'".
    The default value g should normally be a literal because, at runtime when you use SUBMIT, it is transferred to the selection options table sel so early that no value can be assigned to the field g. System fields like SY-DATUM are an exception here because the system usually assigns values to them as soon as the report processing starts.
    When you use user-defined selection screens in your programs that you do not call using SUBMIT, the DEFAULT value is transfered when the selection screen is first called. In this case, therefore, you can use other fields g.
    regards,
    sowjanya
    Message was edited by: sowjanya suggula

  • Reg: EQ Operator for Select-Options..

    Normally we use IN Operator for comparing selection-screen fields for select-options, Rarely we use EQ also when working with Select-Options, why we go for this EQ operator.
    Kindly let me know.
    Thanx in Advance.
    Akshitha.

    Hi there. You should use IN when you know that there will be or may be multiple values chosen for the select-option.  For instance, if the user is going to enter a range of personnel numbers on the selection screen, you could use something like:
    IF ws_pernr IN p_pernr
    (where p_pernr is your select-option selection screen field).
    But if you know that the select-option field will only have one value assigned to it (or you are referencing either the high value or the low value of the select-option) then you can use EQ; the term EQ checks for equality against a single value.
    - April King

  • How to set default value in select option for ABAP query

    Hi experts,
    What is the way to set up default values for select-options in ABAP query.
    e.g.
    I have one field 'Year' in my ABAP query selection screen.
    I want value of current year to be appeared here whenever user execute report
    Thanks in Advance
    -Harkamal

    Hi Harkamal,
    execute your Query via SQ01. On Selection-Screen
    goto save Variant. Mark your field
    as selection variable an press Button election variable.
    Take variable from TVARV and use it.
    Than save the Variant.
    Look at TVARV if the 'Year' is updated to the actualYear!
    regards, Dieter

  • Select-option on subscreen for Module pool

    Hi all,
    I need to add some elements on standard screen of a standard transaction. Everything works fine, but the problem starts when I want to add select-option. It is displayed, but when I press on Multiple selection button no action occurs, no window appears...I simplified the case and created test program with test screen and also I get the same behaviour. Anyone had similiar problem?
    Thnak you in advance for help,
    Anna

    I donot know how u have created the select-option. but u can try these 2 methods to create it. And I have checked that both of them work fine.
    1) How to create a select-options in a module pool screen.
    Method 1
    a) Create a subscreen area in your screen layout where you want to create the select options.
    b) In the top include of  your module pool program declare a selection screen as a subscreen e.g.
           SELECTION-SCREEN BEGIN OF SCREEN 100 AS SUBSCREEN.
                 select-options s_matnr for mara-matnr.
           SELECTION-SCREEN END OF SCREEN.
    c) In the PBO and PAI of the main screen where the select options needs to be created do a call subscreen of the above screen (100).
           CALL SUBCREEN sub_area INCLUDING  <program>   <screen>
      This call subscreen statement is necessary for transport of values between screen and program.
    Note: All validations of the selection screen fields e.g. the s_matnr field created above should be done in selection screen events like AT SELECTION-SCREEN etc and not in PAI. These selection screen validations etc should be done in the top include only.
    Method 2
    a) Create 2 separate fields in your screen layout - one for the low value and one for the high value. Insert an icon beside the high value which will call the multiple selections popup screen on user command. Use function module COMPLEX_SELECTIONS_DIALOG to achieve this.
    struc_tab_and_field-fieldname = con_cust.  " 'KUNNR'
    struc_tab_and_field-tablename = con_kna1.  " 'KNA1'.
    CALL FUNCTION 'COMPLEX_SELECTIONS_DIALOG'
              EXPORTING
              TITLE                   = ' '
                text                         = g_titl1                                " 'Customers'
                tab_and_field     = struc_tab_and_field
              TABLES
                RANGE                   = rng_kunnr
              EXCEPTIONS
                NO_RANGE_TAB          = 1
                CANCELLED                    = 2
                INTERNAL_ERROR     = 3
                INVALID_FIELDNAME = 4
                OTHERS                           = 5.
    IF NOT rng_kunnr[] IS INITIAL.
             Read the very first entry of the range table and pass it to
             dynpro screen field
               READ TABLE rng_kunnr INDEX 1.
               IF sy-subrc = 0.
                  g_cust = rng_kunnr-low.
    ENDIF.
    You can use the return table rng_kunnr to populate your own internal range table with the values entered by the user. Basically here you are just simulating the work of a select-options parameter by module pool screen elements.
    Regards,
    Joy.

  • How to set default values in initialization event for select option

    Abapers,
    I have 3 GL account like 0024831231,0024831238,0024831245.
    Please help me how to set default values in select-options ( s_hkont ) in INTIALIZATION event
    Thanks

    Select option is table <Structure> with fields, low, high, sign & option
    you need to append the value into the select option, with appropriate value in low or
    example:
    S_HKONT-low  = <value>
    S_HKONT-SIGN = 'I'
    S_hkont-OPTION = 'EQ'
    append s_hkont.
    Default value for select-option also can be added directly in select-option statement.
    Regards,
    Mahesh

  • Input Negative values in selection screen  for select-options field

    I am not able enter negative values for
    SELECT-OPTIONS V_ERFMG FOR MSEG-ERFMG.
    It says negative values are not allowed but I need to check for negative values. Kindly provide me solution.

    You can't put the negative values here...because the Domain which is attached to MSEG-ERFMG has not the "Sign" checkbox on.
    Try with this code:
    tables:wbrp.
    SELECT-OPTIONS V_ERFMG FOR WBRP-menge.
    Regards,
    Naimesh Patel

  • How to get calender in f4 help for select options in module pool (URGENT)

    Hi All,
    how to get calender in f4 help for select options in module pool
    Please help .
    Thanx in advance,
    amruta

    Hi Amruta,
    First of all, you can not create select-options directly in module pool.
    For creating <b>select-option is dialog prog</b> follow these steps:
    1. create your selection screen model as subscreen by:
    SELECTION-SCREEN BEGIN OF SCREEN 2000 AS SUBSCREEN.
    PARAMETRS: P_MATNR LIKE MARA-MATNR.
    SELECT-OPTIONS: S_BISMAT FOR MARA-BISMAT.
    SELECTION-SCREEN END OF SCREEN 2000.
    2. create a screen ( example 100 ) in your module-pool dedicated for selection-screen. on this screen layout sketch a sub-screen name like subscree_2000.
    3. write this bit of code in PBO and PAI of the screen 100;
    CALL SUBSCREEN SUBSCREEN_2000.
    4. include this code in PBO:
    INCLUDING SY-REPID '2000'
    6. write user_command of PAI, call screen which is going to executable after selection-screen.
    5. create a transcation for this dialog module pool with screen 100.
    6. execute this transaction and you can see it's behaving like cool with select-options.
    After that in [bprocee on value-request]</b>, use F4_DATE for both from and to option field.
    Hope it will solve the problem.
    Regards
    Krishnendu

  • How to add OBLIGATORY for SELECT-OPTIONS

    Hi experts,
    I can use OBLIGATORY for PARAMETERS
    PARAMETERS :s_WMno  TYPE LINK-LGNUM DEFAULT 'SCA' OBLIGATORY.
    I want to add OBLIGATORY for SELECT-OPTIONS. How to do this?
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME .
        SELECT-OPTIONS:  s_matnr FOR mara-matnr .
    SELECTION-SCREEN END OF BLOCK b1.
    Many thanks.

    Hi,
    TABLES spfli.
    SELECT-OPTIONS : carrid FOR spfli-carrid OBLIGATORY. " This makes only Low field Obligatory
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        IF screen-name = 'CARRID-HIGH'. " To make High field also obligatory
          screen-required = 1.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
    Cheerz
    Ram

  • How to do validations for select-options

    Hi gurus,
    can you suggest me
    how to do validations for select-options
    Thanks&ragards,
    Kals.

    HI,
    TABLES: BKPF.
    TYPES: BEGIN OF TY_BKPF,
           BUKRS TYPE BUKRS,   "COMPANY CODE
           GJAHR TYPE GJAHR,   "FISCAL YEAR
           MONAT TYPE MONAT,   "FISCAL PERIOD
    DATA: T_BKPF TYPE TABLE OF TY_BKPF,
          W_BKPF TYPE TY_BKPF.
    SELECTION-SCREEN : BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    SELECT-OPTIONS: S_CODE   FOR BKPF-BUKRS,
                    S_YEAR   FOR BKPF-GJAHR,
                    S_PERIOD FOR BKPF-MONAT.
    SELECTION-SCREEN: END OF BLOCK B1.
                        AT SELECTION-SCREEN                           *
    IF S_CODE IS INITIAL OR S_YEAR IS INITIAL OR S_PERIOD IS INITIAL.
      MESSAGE E000(0) WITH 'ENTER VLAUES'.
    ENDIF.
    SELECT SINGLE * FROM BKPF WHERE BUKRS IN S_CODE.
      IF SY-SUBRC <> 0.
      MESSAGE E000(0) WITH 'ENTER VALID VALUES'.
      ENDIF.
    reward if useful
    thanks and regards

  • Standard Match Code for Selection Options with Example

    Hi Guys,
                 Can anybody tell me Standard Match Code or Search help for Selection Options.
             ex: MBEW-MATNR , MBEW-BWKEY and MBEW-BWTAR. can anybody tell how to keep Search Help or Match Code for the Above Fields in ECC 6.0 with Example
              Very Urgent.
    Thanks,
    Gopi.

    Well Gopi.. as per your requirement no need to use collective search help.
    I guess you have three fields in selection-screen,out 3 fields you have two fields contains search help.
    Create your user defined search help BWTAR ..
    Check the below links for creation search help :
    http://help.sap.com/saphelp_46c/helpdata/EN/cf/21ee2b446011d189700000e8322d00/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/41/f6b237fec48c67e10000009b38f8cf/content.htm
    Hope you got it.
    Thanks
    Seshu

  • How to display the selection screen fields for selected checkboxes

    Hi all,
             I have 7 checkboxes, for each check box we have some seletion screen fields.if i select first check box,i want to display first slection screen fields only.
    and if we select more than one check box how to display the selection screen fields for selected check boxes,please help me this
    Thanks
    sriman.

    hi,
    Try this code
    report z_13317_sdn2.
    tables : mara, marc, dd03l.
    parameters : p_chk1 as checkbox user-command ABC,
                 p_chk2 as checkbox user-command PQR,
                 p_chk3 as checkbox user-command XYZ.
    select-options : s_matnr for mara-matnr modif id A,
                     s_ersda for mara-ersda modif id A,
                     s_werks for marc-werks modif id B,
                     s_lvorm for marc-lvorm modif id B,
                     s_tab for dd03l-tabname modif id C.
    data: v_chk1,
          v_chk2,
          v_chk3.
    at selection-screen output.
      loop at screen.
        if screen-group1 = 'A' or
           screen-group1 = 'B' or
           screen-group1 = 'C'.
            screen-input = 0.
           modify screen.
        endif.
      endloop.
      loop at screen.
        if v_chk1 = 'X'.
          if screen-group1 = 'A'.
            screen-input = 1.
            modify screen.
          endif.
        endif.
        if v_chk2 = 'X'.
          if screen-group1 = 'B'.
            screen-input = 1.
            modify screen.
          endif.
        endif.
        if v_chk3 = 'X'.
          if screen-group1 = 'C'.
            screen-input = 1.
            modify screen.
          endif.
        endif.
      endloop.
    at selection-screen.
      if sy-ucomm = 'ABC'.
        if v_chk1 = ' '.
          v_chk1 = 'X'.
        else.
          v_chk1 = ' '.
        endif.
      endif.
      if sy-ucomm = 'PQR'.
        if v_chk2 = ' '.
          v_chk2 = 'X'.
        else.
          v_chk2 = ' '.
        endif.
      endif.
      if sy-ucomm = 'XYZ'.
        if v_chk3 = ' '.
          v_chk3 = 'X'.
        else.
          v_chk3 = ' '.
        endif.
      endif.
    Regards,
    Sailaja.

Maybe you are looking for

  • Why it takes long time to execute on Production than staging?

    Hi Experts, Any help apreciated on below issue. I have one anonymous block for updating around 1 million records by joining 9 tables. This is proceeded to production by following environments. And all env have exact equal volume of data. development-

  • Invoice on wrong PO - how to void from FI

    Hello, My problem is that we have  invoice which was vouchered on the wrong PO and now weu2019re trying to reverse it and voucher it on the correct PO and repost a manual payment. Just not sure if once we reverse the clearing document, we can void th

  • Implementing Non deliverable Forward

    Dear SAP Experts, We are implementing a non deliverable forward. I created a new product type T6C with Non deliverable forward as Settlement Indicator. I assigned the flow types 1000    Buy foreign exchange    Principal Increase 1031    Cash settleme

  • Change ListViewItems style when SelectionMode is set to Multiple

    I have a ListView with SelectionMode = None . When I change it to "Multiple" I want the items in the list to change their style and add a border around each of them so the user knows he can select them (see images). I'm using MVVMLight so please help

  • Tasks - Workspace & personal

    Hi! I'm wondering if there is a posible to connect / link workspace tasks that applies to a user to be shown also in personal task (calendar component) as default? If I assign an employee to a certain task it's shown only in workspace task list for a