Make fields invisible based on selection in module pool screen

I have a several fields in my module pool screen.
There i have a box called Ref Obj.
Inside the box i have fields a b c d e f.
suppose my input has parameter 1.
I need to show only fielda a and b inside the box
suppose my input has parameter 2.
I need to show only fielda c and d inside the box
suppose my input has parameter 3.
I need to show only fielda e and f inside the box
suppose my input has parameter 4.
I should not show any fields and box should be invisible.
I would appreciate if any one could help me regarding this
Thanks in advance

hi,
go through this code, and make the required changes according to u'r requirement but the logic is same.
TABLES: mara , lfa1.
SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME.
PARAMETERS: p_matnr LIKE mara-matnr DEFAULT 'M633640000' MODIF ID m1,
            p_ersda LIKE mara-ersda DEFAULT '30.06.2004' MODIF ID m2,
            p_aenam LIKE mara-aenam DEFAULT 'DOVIND' MODIF ID m3,
            p_matkl  LIKE mara-matkl DEFAULT '0000' MODIF ID m4,
            p_meins LIKE mara-meins DEFAULT 'ST' MODIF ID m5,
            p_mbrsh LIKE mara-mbrsh DEFAULT 'M' MODIF ID m6,
            p_vpsta LIKE mara-vpsta DEFAULT 'KV' MODIF ID m7.
SELECTION-SCREEN: END OF BLOCK b1.
SELECTION-SCREEN: BEGIN OF BLOCK b2 WITH FRAME.
PARAMETERS: p_lifnr LIKE lfa1-lifnr DEFAULT 5070001063 MODIF ID s1 ,
            p_land1 LIKE lfa1-land1 DEFAULT 'FR' MODIF ID s1,
            p_name1 LIKE lfa1-name1 DEFAULT 'HONDA' MODIF ID s3,
            p_ort01 LIKE lfa1-ort01 DEFAULT 'PARIS' MODIF ID s4.
SELECTION-SCREEN: END OF BLOCK b2.
AT SELECTION-SCREEN OUTPUT.
  LOOP AT SCREEN.
    IF screen-group1 = 'M1' .
      screen-input = 0.
      MODIFY SCREEN.
    ELSE.
      IF screen-group1 = 'M2' .
        screen-invisible = 1.
        MODIFY SCREEN.
      ELSE.
        IF screen-group1 = 'M3' .
          screen-intensified = 1.
          MODIFY SCREEN.
        ELSE.
          IF screen-group1 = 'M5' .
            screen-length = 10.
            MODIFY SCREEN.
          ELSE.
            IF screen-group1 = 'M6' .
              screen-active = 0.
              MODIFY SCREEN.
            ELSE.
              IF screen-group1 = 'M7' .
                screen-display_3d = 1.
                MODIFY SCREEN.
              ELSE.
                IF screen-group1 = 'M4' .
                  screen-output = 0.
                  MODIFY SCREEN.
                ELSE.
                  IF screen-group1 = 'S1' AND
                  screen-name = 'P_LIFNR'.
                    screen-values_in_combo = 1.
                    MODIFY SCREEN.
                  ELSE.
                    IF screen-group1 = 'S1' AND
                    screen-name = 'P_LAND1'.
                      MODIFY SCREEN.
                    ENDIF.
                  ENDIF.
                ENDIF.
              ENDIF.
            ENDIF.
          ENDIF.
        ENDIF.
      ENDIF.
    ENDIF.
  ENDLOOP.
<b>please reward points if helpfull.</b>
with regards,
radhika kolluru.

Similar Messages

  • Select-option field on module pool screen

    hi all,
    Can anyone pls let me know, how to design and use a field like a select-option field on a Module-pool screen i.e.  how can i get that multiple selections tab after the high field of the select-options.
    thanks in advance,
    vinny

    All you need to do is define your selection screen and then embed it in a subscreen area of your dynpro(screen).  Here is a sample program.
    report zrich_0006 .
    tables: mara.
    * Custom Selection Screen 1010
    <b>selection-screen begin of screen 1010 as subscreen.</b>
    selection-screen begin of block b1 with frame title text-001.
    parameters: p_rad1 radiobutton group grp1 default 'X',
                p_rad2 radiobutton group grp1,
                p_rad3 radiobutton group grp1.
    select-options: s_matnr for  mara-matnr,
                    s_matkl for  mara-matkl,
                    s_mtart for  mara-mtart.
    selection-screen end of block b1.
    selection-screen end of screen 1010.
    start-of-selection.
      call screen 100.
    *&      Module  STATUS_0100  OUTPUT
    module status_0100 output.
    *  SET PF-STATUS 'xxxxxxxx'.
    *  SET TITLEBAR 'xxx'.
    endmodule.
    *&      Module  USER_COMMAND_0100  INPUT
    module user_command_0100 input.
    endmodule.
    <b>* Screen screen 100 with a subscreen area called "subscreen_1010"
    * Screen Flow Logic follows
    *process before output.
    *  module status_0100.
    *  call subscreen subscreen_1010 including sy-repid '1010'.
    *process after input.
    *  call subscreen subscreen_1010 .
    *  module user_command_0100.</b>
    Regards,
    Rich Heilman

  • Module-pool screen field value under POV event

    Hi All,
    I have one issue...please suggest me solution for this.
    In module-pool program i have one screen(1000) which has one field(hrname_1000).
    Under this event:
    PROCESS ON VALUE-REQUEST.
    FIELD hrname_1000  MODULE hrname_1000.
    under this module hename_1000 i have used F4IF_INT_TABLE_VALUE_REQUEST to put a search help for field hrname_1000.
    after that i am trying to retrive HR related stuff's based on the field on module-pool i.e i am using hrname_1000 in the where condition.
    but problem is that im not getting value for hrname_1000 which im giving in the module-pool screen.
    thats y my select query is not working.
    Where as im getting values for the hrname_1000 under PBO & PAI.
    It will look like below.
    PROCESS ON VALUE-REQUEST.
    FIELD hrname_1000  MODULE hrname_1000.
    (under the above module)
      SELECT DISTINCT ename plans FROM pa0001 INTO CORRESPONDING FIELDS OF TABLE itab WHERE stell = '50001026'.
          LOOP AT itab INTO wa WHERE ename = hrname_1000.
          ENDLOOP.
    Please suggest
    Thanks & regards
    Ansumesh

    In some of the cases the screen field is present in the screen but not holding the value in the required structure or field.
    so here u need to check the option of reading the screen field values explictly..
    //once u hit an enter and do the f4 i think the value will be there ...but if u dont hit enter and do an F4 the value cannot hold and i think u r in this case ..
      1.Fill the screen field name in the structure dynpread.
    DATA: BEGIN OF DYNP_VALUES OCCURS 10.
            INCLUDE STRUCTURE DYNPREAD.
    DATA: END   OF DYNP_VALUES.
    DYNP_VALUES-FIELDNAME = 'HRNAME_1000'.
      APPEND DYNP_VALUES.
    * read screen values
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          DYNAME     = HELP_REPID  "call the repid of ur prog
          DYNUMB     = HELP_DYNNR "pass the screen number
        TABLES
          DYNPFIELDS = DYNP_VALUES
        EXCEPTIONS
          OTHERS     = 1.
    now dynp_values hold the field name and field value of the screen .
    now
    SORT DYNP_VALUES BY FIELDNAME.
        READ TABLE DYNP_VALUES WITH KEY 'HRNAME_1000' BINARY SEARCH.
        IF SY-SUBRC EQ 0.
          HELP_XXXX = DYNP_VALUES-FIELDVALUE. "store the value into a variable
          TRANSLATE HELP_XXXX TO UPPER CASE.               
        ENDIF.
    Now check the code with the value if its getting populated which once there will make ur select work ..
    Vijay..

  • How to creat select-option on module pool screen???

    Hi All,
       please tell me how to creat select-option on module pool screen???
    Regards
    Deepak

    Hi Deepak Kumar Sharma,
    There are Two ways to achieve it...
    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.
    Also have a look on below threads
    how to make select option in module pool
    select option in module pool program
    Hope it will solve your problem..
    Thanks & Regards
    ilesh 24x7

  • Module pool screen field should default without pressing enter

    Hi
    I have got a main module pool screen which has a tabstrip with four tabs.
    There are 2 fields in the main screen when we select from F4 for the first field then the field 2 should default in case of a condition.
    This happens only when i press enter. I want the second field to change  as soon as the first field is selected.
    How do I trigger the PAI as soon as the field 1 is selected.
    eg:                           Field 1 :  i/p
                                    Field 2 : display
                                   Field 3 : i/p
    On F4 for field 1  say i select value 'A' then the valu for field 3 should default to value 'B'.  Also field 2 should be displayed based on combination  of field 1 and field 2. But now it does it only on pressing enter.
    How do I solve this problem?Also if i select field 1 value A and dont press enter and go to the subscreen tab then it does not do any thing. It allows to go on the subscreen tab. But actually it should default the field 3 value. It does it only when I press enter.
    Also the F4 is from dictionary that is the screen fields are from dictionary. I have not created any F4 for the fields.
    Please help me solve this problem
    Regards,
    mozila

    Hi
    You can achieve this using List Box only not by Input Field. Since Input field doesn't trigger automatic PAI/PBO
    Go through the below thread
    populate drop down menu based on entry in another field
    or an alternative is--> In PBO use POPUP_GET_VALUES Fm to get the First input field based on that you can enter further values
    unicode error
    Cheerz
    Ram

  • Assigning 2 fields of same table in Module pool screen

    Hi,
    I want to assign similar fields of table in module pool screen.
    In one case i directly use the tablename-fieldname and in other case when i try doing the same i get error. I know that this is not possible.
    Is there any way to get around this. The field i am referring to is attached to a custom domain which is having defined fields. In the second assignment i need to retreive the values of the domain and display it in dropdown mode so that the users are able to select it.
    Regards,
    Imran

    The domain only attached with this field?check the same domain attached to any other field and insert that field in the screen.
    shibu
    reward if helpful

  • Problem in creating a Select-option im a module pool screen

    I've been searching how to do a select option in a module pool screen, I've found this neat tutorial http://sample-code-abap.blogspot.com/2008/06/select-option-in-module-pool-screen.html
    but I'm having trouble to replicate it...
    I've created this conde in my TOP include
    SELECTION-SCREEN BEGIN OF SCREEN 201 AS SUBSCREEN.
       SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME.
        SELECT-OPTIONS: s_matnr FOR mara-matnr.
      SELECTION-SCREEN END OF BLOCK b2.
    SELECTION-SCREEN END OF SCREEN 201.
    and this is my screen flow code
    PROCESS BEFORE OUTPUT.
      MODULE status_0100.
      MODULE pbo_200.
    PROCESS AFTER INPUT.
      MODULE pai.
      MODULE user_command_0200.
    in the screen 200 I have a subscreen area named subs
    but when I do this:
    MODULE pbo_200 OUTPUT.
      CALL subscreen subs including sy-repid '0201'.
    ENDMODULE.                 " pbo_200  OUTPUT
    it doesn't "compile"
    it gives me this error:
    ""." or "ID ... FIELD ..." expected after "SUBSCREEN"."
    what am I missing? it seems its not recognising the "CALL SUBSCREEN" command...

    you can't use CALL SUBSCREEN... in any ABAP section. It is reserved to dynpro flow logic. Just add it after PROCESS BEFORE OUTPUT (and also after PROCESS AFTER INPUT).

  • Getting select options in module pool screen

    hi experts,
    can any one suggest me how to provide select options in module pool screen.
    thank you,
    regards
    vijay

    Hi,
    Take two fields on screen first for low value and other for high value (say vbeln_low and vbeln_high) also design a button next to the high textbox for select-option button used to display popup.
    Using these two input fields append a range (say r_vbeln for vbap-vbeln) for the field to be used (either in query or anywhere).
    ranges : r_vbeln for vbap-vbeln.
      IF NOT vbeln_high IS INITIAL.
        IF NOT vbeln_low LE vbeln_high.
          MESSAGE e899 WITH text-007. "high value is smaller than low value
        ENDIF.
      ENDIF.
      r_vbeln-sign = 'I'.
      r_vbeln-low = vbeln_low.
      IF vbeln_high IS INITIAL.
        r_vbeln-option = 'EQ'. "if user takes only a singlr value
      ELSE.
        r_vbeln-option = 'BT'. "if user takes both low & high value
        r_vbeln-high = vbeln_high.
      ENDIF.
      APPEND r_vbeln. "append range
      CLEAR r_vbeln.
    On the button click call this FM to call a popup for select-options.
    DATA : tab TYPE rstabfield.
    tab-tablename = 'VBAP'.
    tab-fieldname = 'VBELN'.
      CALL FUNCTION 'COMPLEX_SELECTIONS_DIALOG'
       EXPORTING
         title                   = text-002
         text                    = ' '
         signed                  = 'X'
    *         lower_case              = ' '
    *         no_interval_check       = ' '
    *         just_display            = ' '
    *         just_incl               = ' '
    *         excluded_options        =
    *         description             =
    *         help_field              =
    *         search_help             =
         tab_and_field           = tab
        TABLES
          range                   = r_vbeln
       EXCEPTIONS
         no_range_tab            = 1
         cancelled               = 2
         internal_error          = 3
         invalid_fieldname       = 4
         OTHERS                  = 5.
      IF sy-subrc EQ 2.
        MESSAGE s899 WITH text-003. "no value selected
      ELSEIF sy-subrc <> 0 AND sy-subrc <> 2.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    This whole code will append your range r_vbeln to be used in program.
    Hope this solves your problem.
    Thanks & Regards,
    Tarun Gambhir

  • Reg. cursor-selection in module pool....have ur points.

    Hi all,
    Pleas. help me with  a simple example of at cursor-selection in module pool programming.
    with simple code & steps
    <b>Have ur points.</b>
    Regards,
    [email protected]

    Hi Pradeep,
    The Best explanation with example comes from our help.sap.com....
    <i><b>http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbabbd35c111d1829f0000e829fbfe/content.htm</b></i>
    Also this might help...
    <b>MODULE mod [ AT {EXIT-COMMAND|CURSOR-SELECTION} ]
    [ ON {CHAIN-INPUT|CHAIN-REQUEST} ]
    [ SWITCH switch ].
    ... AT CURSOR-SELECTION</b>
    The AT CURSOR-SELECTION addition at the event PAI causes the module mod to be called only if
    The function used to trigger event PAI has function code "CS" and function type "S"
    The cursor is placed on a single input or output field of the screen at the moment of the user action
    The call occurs within the usual PAI processing, meaning that the automatic input checks defined in the system or in the ABAP Dictionary are executed and the MODULE statement is called according to its position in the event block. You can use the addition in connection with the FIELD statement.
    If the PAI event is triggered under the above circumstances, the function code is not passed to sy-ucomm and the OK field. They keep their previous values.
    <b>Note</b>
    The function type and function code of a function are determined in the Screen Painter or in the Menu Painter. We recommend to assign function code "CS" in the Menu Painter to function key F2 in order to simultaneously assign the double-click function of the mouse to it. This allows you to assign dialog modules to the selection of input or output fields.
    <b><u>Refer thread:</u></b> <i><b>Re: MODULE REQUEST
    Hope that helps!!
    <i><b>*Reward useful answers*</b></i>
    Regards,
    Naveenan.

  • Display Select option in module pool screen

    What are the Function modules used to display Select option type fields in a module pool screen?

    hi,
    You can use the SELECT-OPTIONS statement to place a group of fields on the screen that allows users
    to enter complex selections. The selection may be a single value, or any form of interval
    Selection ranges are stored in programs using an internal table.
    The ABAP statement SELECT-OPTIONS <selname> FOR <field> declares an internal table called
    <selname>, containing four fields - SIGN, OPTION, LOW, and HIGH. The fields LOW and HIGH have
    the same type as the field <field>.
    The SIGN field can take the value 'I' (for inclusive) or 'E' (for exclusive).
    The OPTION field can contain relational operators (EQ, NE, LE, LT, GE, GT), pattern operators (CP,NP), and operators that allow you to enter intervals (BT, NB).
    SELECTION-SCREEN BEGIN OF BLOCK conn WITH FRAME TITLE text-001.
    PARAMETERS pa_car LIKE wa_sflight-carrid OBLIGATORY.
    SELECT-OPTIONS: so_car FOR wa_sflight-carrid,
    SELECTION-SCREEN END OF BLOCK conn.
    Hope this helps, Do reward.

  • Selection-options on a module pool screen

    Hi all,
    How to define a field as selection-options on a module pool screen.
    Thanks,
    Chuong

    Hi Chuong,
    You will need to define the screen as a selection screen..
    Else, you can define a subscreen area in your screen, define a subscreen as selection screen and call that screen here..
    Thanks and Best Regards,
    Vikas Bittera.

  • How to do ICON_EXPAND and ICON_COLLAPSE input fields in module pool screen?

    hi frnds.
    My problem is in module pool screen how to do ICON_EXPAND and ICON_COLLAPSE input fields in module pool screen?And how to do GUI STATUS and GUI TITLE? IN SE80.
      ITS URGENT.POINTS WILL BE REWADED.THANKS  IN ADVANCE.

    Hi,
    Go through this thread.
    [expand and collapse|expand and collapse]
    Cheers,
    Simha.

  • Select Option on Module Pool screen

    How to display select options on Module Pool screen ?

    Via the search functionality, you will find something like :
    SELECTION-SCREEN BEGIN OF SCREEN 101 AS SUBSCREEN.
    SELECT-OPTIONS: S_CARRID FOR SPFLI-CARRID,
                    S_CONNID FOR SPFLI-CONNID.
    SELECTION-SCREEN END OF SCREEN 101.
    and to use a CALL SELECTION-SCREEN xxxx in your module pool.
    regards,
    Hans

  • How to create select-options on module pool screen

    Hi all
    I want get a range of values from the user from the module pool screen.
    Is there any element available on module pool screen like select options on the selection screen of reports.
    reply me ASAS.
    Thanks.

    hi krishna
    actually I want to display the details of PO numbers from 45000100 to 45000150. user will enter this range on the module pool screen just as we enter on the selection screen of report. My question is do we have a button like select-option on the module pool screen.
    Plz . reply me ASAP.
    Thanks.

  • Expand/collapse button functionality on module pool screen

    Hi ,
    I want to design a module pool screen with a expand/collapse button on it.
    The desired functionality associated with this button would be something similiar to that available in ME21N screen. When the expand button is clicked it should open up a section of screen that allows the user to enter some parameter. Based on this parameter some selections from DB can be perfomed and then displayed below it.
    Any pointers on how to achieve this? Any kind of help would be appreciated.
    Regards-
    Harmeet Singh.

    example for three pushbutton with expand collapse .
    First of all define your push button as output field with icon tick in the pushbutton characteristick,
    then define this pushbutton in top_include
    include <icon>.
    data : push_a1 like icons-l4,
             push_a2 like icons-l4,
             push_a3 like icons-l4.
    data : a1 ,
             a2,
             a3.
    in pai of the screen
    suppose i had assign function code a1 ,a2 , a3 for repective pushbutton
    module user_command_9002 input.
      okcd = ok_code.
      clear ok_code.
      case okcd.
        when 'A1'.
          if a1 is initial.
            a1 = 'X'.
          else.
            clear a1.
          endif.
        when 'A2'.
          if a2 is initial.
            a2 = 'X'.
          else.
            clear a2.
          endif.
        when 'A3'.
          if a3 is initial.
            a3 = 'X'.
          else.
            clear a3.
          endif.
      endcase.
    endmodule.                 " USER_COMMAND_9002  INPUT
    define three seprate screen -group for three pushbutton say a1 a2 a3
    during pbo you can directly assign name of icon .
    if a1 is initial.
        push_a1 = icon_collapse.
      else.
        push_a1 = icon_expand.
      endif.
      if a2 is initial.
        push_a2 = icon_collapse.
      else.
        push_a2 = icon_expand.
      endif.
      if a3 is initial.
        push_a3 = icon_collapse.
      else.
        push_a3 = icon_expand.
      endif.
    loop at screen.
        if screen-group1 = 'A1'.
          if a1 = 'X'.
            screen-invisible = 1.
            screen-input = 0.
            modify screen.
          else.
            screen-active = 1.
            screen-invisible = 0.
            screen-input = 1.
          endif.
        elseif screen-group1 = 'A2'.
          if a2 = 'X'.
            screen-invisible = 1.
            screen-input = 0.
            modify screen.
          else.
            screen-active = 1.
            screen-invisible = 0.
            screen-input = 1.
          endif.
        elseif screen-group1 = 'A3'.
          if a3 = 'X'.
            screen-invisible = 1.
            screen-input = 0.
            modify screen.
          else.
            screen-active = 1.
            screen-invisible = 0.
            screen-input = 1.
          endif.
        endif.
      endloop.
    regards,
    Alpesh
    Edited by: Alpesh on May 28, 2009 10:28 AM

Maybe you are looking for