How  to  hide a block  from a  selection screen.

Hello Friends,
  I have a new reqirement in which a main program has two transactions.
Both the transactions have the same fields and parameters.
    Now I am asked to add some fields in only one transaction without disturbing  the other txn.
For this I have created a block and added two fields. But now i want to hide this block for the 2nd transaction.
So please guide me for this...
Thanks in advance.

Hi Sapna,
  If you hide all the fileds that are in a block then that block should also get hidden as far as I know. have you tried assigning a MODIF ID to all the fileds and then using
SCREEN-GROUP1 = 'GROUP NAME'
SCREEN-ACTIVE = 0.
This should work if this is not working then check if you can use the block name and hide it in LOOP AT SCREEN.
Hi I has juse checked this code and it hides the block also.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS: par1 TYPE spfli-carrid MODIF ID par.
PARAMETERS: par2 TYPE spfli-connid MODIF ID par.
SELECTION-SCREEN END OF BLOCK b1.
AT SELECTION-SCREEN OUTPUT.
  LOOP AT SCREEN.
    IF screen-group1 = 'PAR'.
      screen-active = 0.
      MODIFY SCREEN.
    ENDIF.
  ENDLOOP.
MODIFYING your code
<b>SELECTION-SCREEN BEGIN OF BLOCK PARAMETER WITH FRAME TITLE TEXT-053.
PARAMETERS:
P_1 LIKE t-f1 DEFAULT 'USD' MODIF ID par,
P_2 LIKE t-f2 MODIF ID par.
SELECTION-SCREEN END OF BLOCK PARAMETER.
AT SELECTION-SCREEN OUTPUT.
  LOOP AT SCREEN.
    IF screen-group1 = 'PAR'.
      screen-active = 0.
      MODIFY SCREEN.
    ENDIF.
  ENDLOOP.</b>
Regards,
Sesh
Message was edited by:
        Seshatalpasai Madala

Similar Messages

  • How to Remove the underline from the selection screen parameter

    How to remove the underline from a selection screen parameter ?

    >
    Anoop Menon wrote:
    > hi Avinash,
    >
    > I am not able to understand the use of the 'comment line properly.
    >
    > The last part of the statement which says modif id is confusing.
    >
    > Please clarify..... I am unable to activate my code when I put the selection screen commebnt statement.
    Use this and update it to your requierement !
    SELECTION-SCREEN begin of line.
    SELECTION-SCREEN COMMENT 1(30) comm.
    PARAMETERS test(1) type c.
      SELECTION-SCREEN end of line.
    INITIALIZATION.
      comm = 'test'.

  • How to hide the fields in the selection screen

    hi please let me know how to keep hide the fileds in the selection screen  i.e in display mode, for the condition

    Hi Sudhir,
    Check the below code.
    tables: pa0000, pa0001.
    parameters: p_chk1 as checkbox user-command rusr,
    p_chk2 as checkbox user-command rusr,
    p_chk3 as checkbox user-command rusr,
    p_chk4 as checkbox user-command rusr,
    p_chk5 as checkbox user-command rusr.
    selection-screen: begin of block blk1 with frame.
    select-options: s_pernr for pa0000-pernr modif id ABC,
    s_stat2 for pa0000-stat2 modif id DEF,
    s_werks for pa0001-werks modif id GHI,
    s_persg for pa0001-persg modif id JKL,
    s_persk for pa0001-persk modif id MNO.
    selection-screen: end of block blk1.
    AT SELECTION-SCREEN output.
    LOOP AT SCREEN.
    IF SCREEN-GROUP1 = 'ABC'.
    IF p_chk1 = 'X'.
    SCREEN-ACTIVE = 1.
    ELSE.
    SCREEN-ACTIVE = 0.
    ENDIF.
    MODIFY SCREEN.
    ENDIF.
    IF SCREEN-GROUP1 = 'DEF'.
    IF p_chk2 = 'X'.
    SCREEN-ACTIVE = 1.
    ELSE.
    SCREEN-ACTIVE = 0.
    ENDIF.
    MODIFY SCREEN.
    ENDIF.
    IF SCREEN-GROUP1 = 'GHI'.
    IF p_chk3 = 'X'.
    SCREEN-ACTIVE = 1.
    ELSE.
    SCREEN-ACTIVE = 0.
    ENDIF.
    MODIFY SCREEN.
    ENDIF.
    IF SCREEN-GROUP1 = 'JKL'.
    IF p_chk4 = 'X'.
    SCREEN-ACTIVE = 1.
    ELSE.
    SCREEN-ACTIVE = 0.
    ENDIF.
    MODIFY SCREEN.
    ENDIF.
    IF SCREEN-GROUP1 = 'MNO'.
    IF p_chk5 = 'X'.
    SCREEN-ACTIVE = 1.
    ELSE.
    SCREEN-ACTIVE = 0.
    ENDIF.
    MODIFY SCREEN.
    ENDIF.
    ENDLOOP.
    *Note
    *Titles for check boxes and select options
    *P_CHK1 Personal Number
    *P_CHK2 Employment Status
    *P_CHK3 Personnel Area
    *P_CHK4 Employee Group
    *P_CHK5 Employee Sub group
    *S_PERNR Personal Number
    *S_PERSG Employee Group
    *S_PERSK Employee Sub group
    *S_STAT2 Employment Status
    *S_WERKS Personnel Area

  • How to hide default buttons on WD selection screen

    Hi Experts,
    Is there a way to hide default buttons ( Cancel, Check, Reset, Copy ) on web dynpro selection screen ??
    Please let me know how can I achieve this..
    Thanks in advance !
    Anand

    By selection screen do you mean the select-options reusable component?  If so, then there is an API of the component that you can call to disable these fields. Use the SET_GLOBAL_OPTIONS method of the select-options API to acomplish this:
    data: l_ref_cmp_usage type ref to if_wd_component_usage.
      l_ref_cmp_usage =   wd_this->wd_cpuse_select_options( ).
      if l_ref_cmp_usage->has_active_component( ) is initial.
        l_ref_cmp_usage->create_component( ).
      endif.
      wd_this->lv_wd_select_options =
           wd_this->wd_cpifc_select_options( ).
    * init the select screen
      wd_this->lv_sel_handler =
           wd_this->lv_wd_select_options->init_selection_screen( ).
      wd_this->lv_sel_handler->set_global_options(
        EXPORTING
    *      i_display_btn_cancel  = ABAP_TRUE    " Displays "Cancel" Button
    *      i_display_btn_check   = ABAP_TRUE    " Displays "Check" Button
    *      i_display_btn_reset   = ABAP_TRUE    " Displays "Reset" Button
          i_display_btn_execute = abap_false    " Displays "Apply" Button

  • How to hide  some fields in default selection screen in hr abap

    Hi experts,
    I have created default selection screen,in that in the Period option I wants display only 'Today'.
    And in the selection criteria i wants to display personnel number,companycode,personnelsubarea,employee status and instead of payroll area i wants to display 'Org unit'.please tell me step by step procedure,that could be greate helpfull.
    Thanks in advance,
    mohan

    use this logic to display only today in the period option
    **Local constants
       CONSTANTS:
              c_0                   VALUE  '0'  ,
              c_089     TYPE char3  VALUE  '089',
              c_091     TYPE char3  VALUE  '091',
              c_095     TYPE char3  VALUE  '095',
              c_097     TYPE char3  VALUE  '097'.
                     At Selection Screen
    at selection-screen output.
    LOOP AT screen.
          IF
               screen-group4 = c_089 OR
               screen-group4 = c_091 OR
               screen-group4 = c_095 OR
               screen-group4 = c_097  .
          screen-active = c_0.
          MODIFY SCREEN.
         ENDIF.
      ENDLOOP.

  • How to hide particular block in selection screen

    Hi,
    I am having different blocks in a selection screen.
    How to show the blocks dynamically according to a radio button selection.
    means how to Hide/show entire block.
    Thanks,
    anandan

    Hi Anandan,
    Try this program.
    REPORT  zvk_collect.
    SELECTION-SCREEN : BEGIN OF BLOCK b1 WITH FRAME NO INTERVALS.
    PARAMETER : p_plant RADIOBUTTON GROUP g1 USER-COMMAND radio DEFAULT 'X',
                      p_mrp   RADIOBUTTON GROUP g1.
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME NO INTERVALS.
    PARAMETER : p_werks TYPE marc-werks MODIF ID sp1.
    SELECTION-SCREEN END OF BLOCK b2.
    *SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME NO INTERVALS.
    *PARAMETER : p_berid TYPE smdma-berid MODIF ID sp2.
    *SELECTION-SCREEN END OF BLOCK b3.
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        CHECK screen-group1 = 'SP1' OR
              screen-group1 = 'SP2'.
        IF p_plant = 'X'.
          IF screen-group1 = 'SP2'.
            screen-input = 0.
            screen-active = 0.
            screen-required = 1.
            MODIFY SCREEN.
          ENDIF.
        ELSE.
          IF screen-group1 = 'SP1'.
            screen-input = 0.
            screen-active = 0.
            screen-required = 1.
            MODIFY SCREEN.
          ENDIF.
        ENDIF.
      ENDLOOP.
    Execute with Comments ON and Without Comments and See the difference
    Reward if found helpful

  • How to hide a block in Selection screen ?

    Hello abap gurus,
    I have a requirement where I have to hide a block on Selection screen. Can anyone of u give the command for that or code..
    Its urgent !
    Om Sai Ram,
    aRgD

    Hi,
    Just paste the following code in abap editor.
    *Selectionscreen elements..............................................
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
    PARAMETERS:
      p_uname     LIKE sy-uname
                  MODIF ID bl1.            " User name
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME.
    PARAMETERS:
      p_fname(10) TYPE c MODIF ID bl2
                         OBLIGATORY,       " First name
      p_lname(10) TYPE c MODIF ID bl2
                         OBLIGATORY,       " Last name
      p_empid(5)  TYPE n MODIF ID bl2
                         OBLIGATORY.       " Employee id
    SELECTION-SCREEN END OF BLOCK b2.
    *" Data declarations...................................................
    Work variables                                                      *
    DATA:
      w_uname     LIKE sy-uname.           " User name
                 AT SELECTION-SCREEN OUTPUT EVENT                       *
    AT SELECTION-SCREEN OUTPUT.
      PERFORM validate.
                AT SELECTION-SCREEN ON FIELD EVENT                      *
    AT SELECTION-SCREEN ON p_uname.
      PERFORM validate_uname.
                      END OF SELECTION EVENT                            *
    END-OF-SELECTION.
      PERFORM output.
    FORM VALIDATE                                                      *
    This subroutine disables all parameters if user name is not        *
    initialized or user name is not valid.                             *
    There are no interface parameters to be passed to this subroutine. *
    FORM validate.
      w_uname = sy-uname.
      IF p_uname IS INITIAL OR p_uname NE w_uname.
        LOOP AT SCREEN.
          IF screen-group1 EQ 'BL2'.
            screen-active = '0'.
          ELSE.
            screen-active = '1'.
          ENDIF.                           " IF screen-group1 EQ 'BL2'.
          MODIFY SCREEN.
        ENDLOOP.                           " LOOP AT SCREEN.
      ELSEIF p_uname EQ sy-uname.
        LOOP AT SCREEN.
          IF screen-group1 = 'BL1'.
            screen-active = 0.
            MODIFY SCREEN.
          ELSEIF screen-group1 = 'BL2'.
            screen-active = 1.
            screen-output = 1.
            screen-input = 1.
            screen-invisible = 0.
          ENDIF.                           " IF screen-group1 = 'BL1'.
          MODIFY SCREEN.
        ENDLOOP.                           " LOOP AT SCREEN.
      ENDIF.                               " IF p_uname IS INITIAL...
    ENDFORM.                               " VALIDATE
    Form VALIDATE_UNAME                                                *
    This subroutine gives error message and validates the user name.   *
    There are no interface parameters to be passed to this subroutine. *
    FORM validate_uname .
      IF p_uname IS INITIAL.
        MESSAGE 'Enter the user name'(001) TYPE 'E'.
      ELSEIF p_uname NE sy-uname.
        MESSAGE 'Authorization unsuccessful'(002) TYPE 'E'.
      ENDIF.                               " IF p_uname IS INITIAL.
    ENDFORM.                               " VALIDATE_UNAME
    Form  OUTPUT                                                       *
    This subroutine is used to print the output.                       *
    There are no interface parameters to be passed to this subroutine. *
    FORM output .
      IF p_fname IS NOT INITIAL.
        WRITE: / 'First name:'(003),p_fname.
        WRITE: / 'Last name:'(004),p_lname.
        WRITE: / 'Employee id:'(005),p_empid.
      ENDIF.                               " IF p_fname IS NOT INITIAL.
    ENDFORM.                               " OUTPUT
    I think this solves your problem.
    Reward if it helps you.....
    Regards,
    Sandhya

  • How to get the values from html:select? tag..?

    i tried with this, but its not working...
    <html:select styleClass="text" name="querydefs" property="shortcut"
                 onchange="retrieveOptions()" styleId="firstBox" indexed="true">
    <html:options collection="advanced.choices" property="shortcut" labelProperty="label" />
    </html:select>
                        <td align="left" class="rowcolor1">
                        <script language="javascript" type="text/javascript">
                              function retrieveOptions(){
                             var sel = document.querydefs.options;
                             var selectedOption = sel[sel.selectedIndex].value;
                             document.write(selectedOption);
                           </script>

    <td align="left" class="rowcolor1">
                        <script language="javascript" type="text/javascript">
                              function retrieveOptions(){
                             var sel = document.querydefs.options;
                             var selectedOption = sel[sel.selectedIndex].value;
                             document.write(selectedOption);
                           </script>This java script is not working at all..its not printing anything in document.write();
    This is code..
    <td class="rowcolor1" width="20%">
    <html:select styleClass="text" name="querydefs" property="shortcut"
                             onchange="retrieveSecondOptions()" styleId="firstBox"
                             indexed="true">
                             <html:options collection="advanced.choices" property="shortcut"
                                  labelProperty="label"  />
                        </html:select>i tried with this also. but no use..i'm not the getting the seleced option...
    function retrieveOptions(){
    firstBox = document.getElementById('firstBox');
                             if(firstBox.selectedIndex==0){
          return;
        selectedOption = firstBox.options[firstBox.selectedIndex].value;
    }actually , how to get the values from <html:select> ...?
    my idea is to know which value is selected from the combo box(<html:select> ) if that value is equal some string i have enable a hyperlink to open a popup window

  • How to hide a field from table maintenance view?

    Hi,
    How to hide a field from table maintenance view? 
    The field is used for data created date. I need to hide it from display.
    Thanks

    Chk this link.
    http://help.sap.com/saphelp_nw04/helpdata/en/66/33f52010dd11d6999300508b5d5211/frameset.htm
    Maintenance Attributes
    You can assign a maintenance attribute P to individual fields in the maintenance view definition in the Dictionary (SE11). It can be  H (hidden)
    H (hidden)
    A field flagged H is not displayed on the screen. This field must also be filled in the background by a routine at an event.
    The system writes R and H fields to the database like all other fields when a new data record is saved.

  • How to disable the complete block on the selection screen

    Hi,
    I want to disable the complete block of selection screen when user checks on box...how shall i go about this?
    I tried using block name as screen name and then modify screen but of no use..
    Any Pointers...
    Regards
    Gunjan

    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-002.
    PARAMETERS: box as checkbox USER-COMMAND ch.
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-003.
    PARAMETERS: path(150) MODIF ID id1.
    SELECTION-SCREEN END OF BLOCK b3.
    AT SELECTION-SCREEN OUTPUT.
      IF box = 'X'.
        LOOP AT SCREEN.
          IF screen-group1 = 'ID1' .
            screen-active = '1'.
          ENDIF.
          MODIFY SCREEN.
        ENDLOOP.
      ELSE.
        LOOP AT SCREEN.
          IF screen-group1 = 'ID1' .
            screen-active = '0'.
          ENDIF.
          MODIFY SCREEN.
        ENDLOOP.
      ENDIF.
    Hope it will work
    Regards
    Sugumar G

  • How to put a value in a selection screen parameter

    how do i forcefully put a value to a field in the selection screen.
    i mean during runtime.
    and it's a parameter not a selection-option.
    thanks

    Hi,
    Check this sample code.It can help you.Basically you need to use 'DYNP_VALUES_READ' in at selection-screen on value-request for s_posnr-low.
    tables : vbap.         " Sales Document: Item Data
                         Constant Declaration                                      *
    CONSTANTS:
      C_X TYPE C VALUE 'X'.     " Translate to Uppercase
                         Variable Declaration                                      *
    Variable for Table index
      data v_sytabix like sy-tabix.
    Variable for Program name
      data L_NAME LIKE SYST-REPID.
    Range for getting values form selection screen
    DATA: BEGIN OF range1 OCCURS 0,
             SIGN(1),
             OPTION(2),
             LOW  LIKE vbap-vbeln,
             high like vbap-vbeln,
          END OF range1.
    Internal table for Report output
      data: begin of i_vbap occurs 0,
              vbeln like vbap-vbeln,            " Sales Document
              posnr like vbap-posnr,            " Sales Document item
            end of i_vbap.
    Internal table for output to the F4 help
      data: begin of I_DISPLAY occurs 0,
              vbeln like vbap-vbeln,            " Sales Document
              posnr like vbap-posnr,            " Sales Document item
            end of I_DISPLAY.
    Internal table for return value form function module
      DATA: BEGIN OF I_RETURNVAL OCCURS 0.
              INCLUDE STRUCTURE DDSHRETVAL.     " Interface Structure Search
      DATA: END OF I_RETURNVAL.
    Internal table for F4 help field heading
      DATA: I_FIELDTAB LIKE DFIES OCCURS 0 WITH HEADER LINE.
    Internal table for getting screen values from selection screen
      data L_SCR_FIELDS LIKE DYNPREAD OCCURS 1 WITH HEADER LINE.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME title text-001.
      select-options:
            S_VBELN for vbap-vbeln no intervals,
            S_POSNR for vbap-posnr no intervals.
    SELECTION-SCREEN end OF BLOCK B1.
    at selection-screen on value-request for s_posnr-low.
      clear: L_SCR_FIELDS, I_FIELDTAB, i_display, I_RETURNVAL.
      refresh: L_SCR_FIELDS, I_FIELDTAB, i_display, I_RETURNVAL.
      L_NAME = SYST-REPID.
      MOVE 'S_VBELN-LOW' TO L_SCR_FIELDS-FIELDNAME.
      APPEND L_SCR_FIELDS.
    Call the Function module DYNP_VALUES_READ to get the values form
    selection screen
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          DYNAME                         = L_NAME
          DYNUMB                         = SYST-DYNNR
          TRANSLATE_TO_UPPER             = C_X         " X
        TABLES
          DYNPFIELDS                     = L_SCR_FIELDS
       EXCEPTIONS
         INVALID_ABAPWORKAREA           = 1
         INVALID_DYNPROFIELD            = 2
         INVALID_DYNPRONAME             = 3
         INVALID_DYNPRONUMMER           = 4
         INVALID_REQUEST                = 5
         NO_FIELDDESCRIPTION            = 6
         INVALID_PARAMETER              = 7
         UNDEFIND_ERROR                 = 8
         DOUBLE_CONVERSION              = 9
         STEPL_NOT_FOUND                = 10
         OTHERS                         = 11
      IF SY-SUBRC eq 0.
        LOOP AT L_SCR_FIELDS.
          range1-sign = 'I'.
          range1-option = 'EQ'.
          range1-low = L_SCR_FIELDS-FIELDVALUE.
          range1-high = space.
          append range1.
        ENDLOOP.
      ENDIF.
    F4 help Field headings
      I_FIELDTAB-TABNAME = 'I_DISPLAY'.
      I_FIELDTAB-FIELDNAME = 'VBELN'.
      I_FIELDTAB-POSITION = '1'.
      I_FIELDTAB-OUTPUTLEN = '10'.
      I_FIELDTAB-INTTYPE = 'C'.
      I_FIELDTAB-INTLEN = '10'.
      APPEND I_FIELDTAB.
      I_FIELDTAB-FIELDNAME = 'POSNR'.
      I_FIELDTAB-POSITION = '2'.
      I_FIELDTAB-OFFSET = '10'.
      I_FIELDTAB-OUTPUTLEN = '6'.
      I_FIELDTAB-INTTYPE = 'N'.
      I_FIELDTAB-INTLEN = '6'.
      APPEND I_FIELDTAB.
    Retrieve sales document, Sales document item from table Sales
    Document: Item Data(VBAP).
    Primary keys used for selection: VBELN
      select vbeln posnr from vbap
                   into table i_display
                   where vbeln in range1.
    Call the function module F4IF_INT_TABLE_VALUE_REQUEST for F4 values
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          RETFIELD               = 'POSNR'
          WINDOW_TITLE           = 'Line Item'
          VALUE_ORG              = 'S'
          MULTIPLE_CHOICE        = C_X           " (for muliple selection)
        TABLES
          VALUE_TAB              = I_DISPLAY
          FIELD_TAB              = I_FIELDTAB
          RETURN_TAB             = I_RETURNVAL
        EXCEPTIONS
          PARAMETER_ERROR        = 1
          NO_VALUES_FOUND        = 2
          OTHERS                 = 3
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ELSE.
    Star for For single values
      READ TABLE I_RETURNVAL INDEX 1.
       S_POSNR-LOW = I_RETURNVAL-FIELDVAL.
    End for the single values
    Start For multiple selection
       loop at i_returnval.
         s_posnr-sign = 'I'.
         s_posnr-option = 'EQ'.
         s_posnr-low = I_RETURNVAL-FIELDVAL.
         append s_posnr.
       endloop.
       sort s_posnr.
       read table s_posnr index 1.
    End for multiple selection
      ENDIF.
                         Start-of-selection                                        *
    start-of-selection.
    Retrieve sales document, Sales document item from table Sales
    Document: Item Data(VBAP).
    Primary keys used for selection: VBELN
      select vbeln posnr from vbap
                        into table i_vbap
                        where vbeln in s_vbeln
                          and posnr in s_posnr.
    if the above selection is successful continue the process else exit *
    form the report
      if sy-subrc ne 0.
       message e002 with 'No data to display'.
      endif.
    end-of-selection.
      if not i_vbap[] is initial.
        loop at i_vbap.
          write:/ i_vbap-vbeln, i_vbap-posnr.
        endloop.
      endif.

  • Issue In Providing 255 Charcters From The Selection Screen Select-Option

    Dear Guru,
    I am searching for table field with having length = 255 character.
    which i want to use in select-option for proving data from the selection screen.
    I have found the table myhlp and it associated field allvals which is having length = 255.
    I am using it as below in my selection screen for the value to be provided 255 character long.
    SELECTION-SCREEN : BEGIN OF BLOCK b3 WITH FRAME TITLE text-003.
    SELECT-OPTIONS   : s_mlbody FOR myhlp-allvals  NO INTERVALS.
    SELECTION-SCREEN : END OF BLOCK b3.
    Now when i am going for the multiple selection option --> It is providing me the Multiple selection popup and giving me the provision of provide multiple line .
    But the issue is that --> For a particular single value line in the popup i am able to enter only 45 charcters not 255 character.
    But i need to put 255 charcter for particular line in a single value..
    Please give me some guideline how resolve this or any other alternative way of reading the 255 charcter from the selection screen
    Thanks & regards
    Saifur Rahaman

    Hi,
         As said by A@s selction screen with table control will be a good option.
    design a custom screen with SUBSCREEN as screeen attribute using tcode se51.
    For table control sample - go through Tcode ABAPDOCU - abap user dialogs-screens-complex screen- table control
    Try Following,
    REPORT Zsample .
    controls: tc type tableview using screen 200.
    parameters: p_user type myhlp-username.
    data: begin of itab occurs 50,
          field1(255) type c,
          end of itab.
    data: i_out type standard table of myhlp.
    SELECTION-SCREEN BEGIN OF TABBED BLOCK MAX FOR 22 LINES.
    SELECTION-SCREEN TAB (25) TABS1 USER-COMMAND UCOMM1
             DEFAULT SCREEN 200.
    SELECTION-SCREEN END OF BLOCK MAX.
    start-of-selection.
    select * from myhlp into table i_out for all entries in itab
              where username eq p_user
                    and allvals = itab-field1.
    MODULE READ_ITAB INPUT.
    insert itab index tc-current_line.
    ENDMODULE.                 " READ_ITAB  INPUT

  • How to create Option Boxes IN A SELECTION SCREEN

    How to create Option Boxes IN A SELECTION SCREEN.
    Thanks!

    Hi Rajesh,
    The following explanation gives clear picture of what is mean of check box and radio button with coding.....................
    <b>CHECK BOX :</b>
    AS CHECKBOX [USER-COMMAND fcode]
    Effect:
    This addition specifies that the input field in the first position of the selection screen is displayed as a checkbox, with the corresponding description next to it on the right. The checkbox is selected if the value of para is "X" or r "x". Otherwise, it is not selected.
    The parameter must be created with the type c and length 1. An explicit length len is not permitted. If the addition TYPE is used, this can only be followed by the generic type c or a non-generic data type of type c and length 1.
    The addition USER-COMMAND can be used to assign a function code fcode to the parameter. The function code fcode must be directly specified and may have a maximum length of 20 characters. To evaluate the function code, an interface work area of the structure SSCRFIELDS from the ABAP Dictionary must be declared using the statement TABLES. When the user selects the checkbox on the selection screen, the runtime environment triggers the event AT SELECTION-SCREEN and transfers the function code fcode to the component ucomm of the interface work area sscrfields.
    Notes
    If the TYPE addition is used to make a reference to a data type in the ABAP Dictionary of type CHAR and length 1, and for which t the valid values in the domain are defined as "X" and " ", the parameter is automatically displayed as a checkbox on the selection screen.
    If the addition USER-COMMAND is specified without the addition AS CHECKBOX, and the parameter is of type c with length 1, it is also displayed as a checkbox.
    The addition USER-COMMAND can, for example, be used for screen modifications with the addition MODIF ID (see example).
    <b>Coding :</b>
    PARAMETERS show_all AS CHECKBOX USER-COMMAND flag.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
    PARAMETERS: p1(10) TYPE c,
                p2(10) TYPE c,
                p3(10) TYPE c.
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME.
    PARAMETERS: p4(10) TYPE c MODIF ID bl2,
                p5(10) TYPE c MODIF ID bl2,
                p6(10) TYPE c MODIF ID bl2.
    SELECTION-SCREEN END OF BLOCK b2.
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        IF show_all <> 'X' AND
           screen-group1 = 'BL2'.
           screen-active = '0'.
        ENDIF.
        MODIFY SCREEN.
      ENDLOOP.
    <b>RADIO BUTTON COMMAND :</b>
    RADIOBUTTON GROUP group [USER-COMMAND fcode]
    Effect:
    This addition specifies that the input field is displayed as a radio button in the first position on the selection screen, and the output field is displayed next to it on the right. The radio button is selected if the value of para is "X" or "x". Otherwise, it is not selected.
    group is used to define the radio button group for the parameter. The name group is entered directly as a character string with a maximum of 4 characters. Within a selection screen, there must be a minimum of two parameters in the same radio button group. There cannot be more than one radio button group with the same name in one program, even if they are defined in different selection screens.
    The parameter must be specified with the type c and length 1. Explicit length specification using len is not permitted. If the addition TYPE is used, it can only be followed by the generic type c or a non-generic data type of type c and length 1.
    In a radio button group, only one parameter can be defined with the addition DEFAULT, and the specified value must be "X". By default, the first parameter in a radio button group is set to the value "X", and the rest are set to " ".
    The addition USER-COMMAND can be used to assign a function code fcode to the first parameter in a radio button group. The function code fcode must be specified directly, and have a maximum length of 20 characters. To evaluate the function code, an interface work area of the structure SSCRFIELDS from the ABAP Dictionary must be declared using the statement TABLES. When the user selects any radio button of the radio button group on the selection screen, the runtime environment triggers the event AT SELECTION-SCREEN and transfers the function code fcode to the component ucomm of the interface work area sscrfields.
    Note:
    It is recommended to define the radio buttons of a radio button group directly underneath each other. If the selection screen also contains other elements, it is recommended to define each radio button group within a block surrounded by a frame.
    <b>CODING :</b>
    tables : mkpf,mseg,ekko.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    PARAMETER : P_WERKS LIKE MARC-WERKS MODIF ID S1,
                c as checkbox.
    SELECT-OPTIONS : S_EBELN FOR EKKO-EBELN NO INTERVALS MODIF ID S2.
    SELECTION-SCREEN END OF BLOCK B1.
    SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-004.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS : R1 RADIOBUTTON GROUP G1 DEFAULT 'X' USER-COMMAND UC1.
    SELECTION-SCREEN COMMENT 5(20) TEXT-002 FOR FIELD R1.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS : R2 RADIOBUTTON GROUP G1.
    SELECTION-SCREEN COMMENT 5(20) TEXT-003 FOR FIELD R2.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK B2.
    write :/ p_werks,
           / s_ebeln.
    AT SELECTION-SCREEN OUTPUT .
    LOOP AT SCREEN .
    IF R1 EQ 'X' AND SCREEN-GROUP1 EQ 'S2'.
    SCREEN-INPUT = 0.
    SCREEN-REQUIRED = 1.
    clear s_ebeln[].
    clear p_werks.
    MODIFY SCREEN.
    ENDIF.
    IF R2 EQ 'X' AND SCREEN-GROUP1 EQ 'S1'.
    SCREEN-INPUT = 0.
    SCREEN-REQUIRED = 1.
    clear s_ebeln[].
    clear p_werks.
    MODIFY SCREEN.
    ENDIF.
    ENDLOOP.
    Let me knwo if any doubts.
    <b>Reward with points if it helpful</b>
    Regards,
    Vijay

  • How to clear the values from a Tab Screen.

    Hi,
    I have created Two Tab in my report by using the below mentioned code.
    SELECTION-SCREEN BEGIN OF SCREEN 200 AS SUBSCREEN.
    SELECTION-SCREEN BEGIN OF BLOCK BR_ACB WITH FRAME TITLE TEXT-502.
    PARAMETERS: P_VATNUM   TYPE T001-STCEG,
                 P_NAME     TYPE T001-BUTXT,
                 P_STREET   TYPE rfpdo-KQSUSTRAS,
                 P_CITY     TYPE rfpdo-KQSUPADD02,
                 P_CNTRY    TYPE rfpdo-ALLGINLD.
    SELECTION-SCREEN END OF   BLOCK BR_ACB.
    SELECTION-SCREEN END OF SCREEN 200.
    SELECTION-SCREEN BEGIN OF SCREEN 201 AS SUBSCREEN.
    SELECTION-SCREEN BEGIN OF BLOCK br4 WITH FRAME TITLE text-503.
    PARAMETERS: P_IDLU    TYPE LU_IDCODE,
                 P_VATNU   TYPE LU_VATNUM,
                 P_DESIG   TYPE LU_DESIGNATION,
                 p_telf  LIKE rfpdo-asldtelf.       "Telefonnummer
    SELECTION-SCREEN END OF BLOCK br4.
    SELECTION-SCREEN END OF SCREEN 201.
    SELECTION-SCREEN BEGIN OF TABBED BLOCK tabb1 FOR 8 LINES.
    SELECTION-SCREEN TAB (15) tabs1 USER-COMMAND ucomm1 DEFAULT SCREEN 200.
    SELECTION-SCREEN TAB (15) tabs2 USER-COMMAND ucomm2 DEFAULT SCREEN 201.
    SELECTION-SCREEN END OF BLOCK tabb1.
    INITIALIZATION.
      tabs1 = text-500.
      tabs2 = text-501.
    Problem I am facing here is when report loads the screen once and I am filling all the valuse in the Tab Screen 200 and 201 and executing the report and when I am reloading any other variant then it is not clearing the valuse present in the Tab Screen 200 and 201.
    Can any buddy help me regarding this to clear the Tab Screen 200 and 201.
    Thanks and best regards,
    Niteesh Rai

    Hi Niteesh,
    I have tested the scenario which you have mentioned above,  Its working fine for me.
    I have filled all the values in screen 200 and 201 as well and saved it as variant Test1, and again
    I have filled all the values in screen 200 and 201 as well and saved it as variant Test2.
    When I am changing the variants from Test1 to Test2 and vice versa.  I displaying their respective data as well.
    Regards,
    Md Ziauddin.

  • How to pass a default value in selection screen of logical database pnpce

    Dear All,
    Can any one tell me how to pass a default value in selection screen of logical database pnpce .
    Regards
    Rakesh Singh

    Hi Rakesh,
    Go to SE36 (logical database Builder).First enter PNPCE in Logical Database and press documentation,here you will get the details of exactly what is PNPCE and how it works.After that select selections in subojects in se36 only and enter display ,there you have the include from where you acn get the idea.
    Regards,
    Rahul

Maybe you are looking for

  • I can't find a way to purchase my iTunes wish list.

    Using iTunes 11.1 - created a wish list of music to purchase, but there is no "buy" button on the wish list screen (unlike what the help page suggests).  Is this a bug, or am I missing something really obvious? thanks for any help!

  • Can't recognize music files on nano

    when i plug in my nano to my computer it says that it cannot recognize any files on the nano and that i need to use the ipod updater to do a factory reset. I tried a factory reset...a manual reset....and updated all the programs on my computer. I don

  • SMB Sharing User?

    Hello, Since a good long while i've been working with a Macbook. Being a long term windows user i gradually took the opportunity to study on more OS's than just Windows. However, one of the few things i still havn't figured out is the SMB Sharing cap

  • I had computer problems and had to reload itunes. how to open my ipod on line to see what is on it.

    So I had to download the new version of Itunes and have problems finding out what is on my ipod, and finding favorite podcasts. Can you help me?

  • Audio line level input gain too high

    I've had this problem since getting my macbook 3 months ago. The line level input gain seems to be set very high no matter what & it still is too high after going into system preferences/sound & adjusting the input volume all the way down. I bought a