Expand/Collapse a block in a selection screen

Hey Folks,
I have a requirement , where I have a selection screen, with 3 selection blocks. I have a requirement that I need to make 2 of these blocks expandible/collapsible on the toggle of a button.. How can this be achieved.
In case of a normal screen, I would have had to create the blocks as subscreens (one type of screen for expanded state...another for collapsed state) and called it from the main screen. But how do I achieve the same using the selection screens?
I was considering creating the blocks as subscreens in the selection screen and calling them in the PBO of the main selection screen. However, I am unsure if thats a wise thing to do since the screen is generated automatically in case of a selection screen and I do believe its not a good idea to manually alter it.
Does anyone has any pointers on this?
Thanks and Best Regards,
Puja.

Hi,
I have modified the code to show the expand/collapse ICON accordingly..Please check..
TABLES sscrfields.
TYPE-POOLS icon.
* Expand/collapse buttons.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN PUSHBUTTON 2(23)  b1 USER-COMMAND usr1.
SELECTION-SCREEN END OF LINE.
* Block 1
SELECTION-SCREEN BEGIN OF BLOCK b1.
PARAMETERS: p_test1 TYPE char10  MODIF ID m1,
            p_test2 TYPE char10  MODIF ID m1.
SELECT-OPTIONS  s_date  FOR sy-datum MODIF ID m1.
SELECTION-SCREEN END OF BLOCK b1.
* Block 2
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN PUSHBUTTON 2(23)  b2 USER-COMMAND usr2.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF BLOCK b2.
PARAMETERS: p_test3 TYPE char10  MODIF ID m2,
            p_test4 TYPE char10  MODIF ID m2.
SELECTION-SCREEN END OF BLOCK b2.
* Declarations
DATA: v_flag, v_flag1.
INITIALIZATION.
  b1 = 'Button1'.
  b2 = 'Button2'.
  v_flag = 'X'.
  v_flag1 = 'X'.
AT SELECTION-SCREEN.
* Check the user command.
  IF sy-ucomm = 'USR1'.
    IF v_flag IS INITIAL.
      v_flag = 'X'.
    ELSE.
      CLEAR v_flag.
    ENDIF.
  ELSEIF sy-ucomm = 'USR2'.
    IF v_flag1 IS INITIAL.
      v_flag1 = 'X'.
    ELSE.
      CLEAR v_flag1.
    ENDIF.
  ENDIF.
AT SELECTION-SCREEN OUTPUT.
  IF v_flag1 = 'X'.
    CALL FUNCTION 'ICON_CREATE'
      EXPORTING
        name   = icon_expand
        text   = 'Button 2'
        info   = 'Button 2'
      IMPORTING
        RESULT = b2
      EXCEPTIONS
        OTHERS = 0.
  ELSEIF v_flag1 IS INITIAL.
    CALL FUNCTION 'ICON_CREATE'
      EXPORTING
        name   = icon_collapse
        text   = 'Button 2'
        info   = 'Button 2'
      IMPORTING
        RESULT = b2
      EXCEPTIONS
        OTHERS = 0.
  ENDIF.
  IF v_flag = 'X'.
    CALL FUNCTION 'ICON_CREATE'
      EXPORTING
        name   = icon_expand
        text   = 'Button 1'
        info   = 'Button 1'
      IMPORTING
        RESULT = b1
      EXCEPTIONS
        OTHERS = 0.
  ELSEIF v_flag IS INITIAL.
    CALL FUNCTION 'ICON_CREATE'
      EXPORTING
        name   = icon_collapse
        text   = 'Button 1'
        info   = 'Button 1'
      IMPORTING
        RESULT = b1
      EXCEPTIONS
        OTHERS = 0.
  ENDIF.
  LOOP AT SCREEN.
* Expand collapse block1
    IF v_flag = 'X' AND screen-group1 = 'M1'.
      screen-active = 0.
    ELSEIF v_flag IS INITIAL AND screen-group1 = 'M1'.
      screen-active = 1.
    ENDIF.
* Expand collapse block2
    IF v_flag1 = 'X' AND screen-group1 = 'M2'.
      screen-active = 0.
    ELSEIF v_flag1 IS INITIAL AND screen-group1 = 'M2'.
      screen-active = 1.
    ENDIF.
    MODIFY SCREEN.
  ENDLOOP.
Thanks
Naren

Similar Messages

  • 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  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

  • 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

  • Radio button in two different blocks in the selection screen

    Hi folks,
             In my selection screen i have two selection blocks. First block to create a new document no, second block to display the list of the created document numbers.User has to go any one of that..can i keep first radio button in the first selection block and the second radio button in the second block...I have already tried..but its not allowing..is this possible..if so please suggest me how...
               Thanks,
               Shyam.

    Hi,
    Hope the following logic will help u.
    selection-screen begin of block input with frame title text-000.
    parameters :desktop     radiobutton group rg_f user-command rg_f,
                       in_file type ibipparms-path modif id ps,
                menu     radiobutton group rg_f,
                       sys_file type ibipparms-path modif id as default  '/sapia/iface/in/comm/sapfin/' .
    selection-screen end of block input.
                                        AT SELECTION-SCREEN.                                       *
    at selection-screen.
      case sy-ucomm.
        when 'RG_F' or 'RG_B'.
          perform f_toggle_finputs.
        when 'ONLI'.
          if ( desktop = c_x and in_file is initial ) or ( menu = c_x and sys_file is initial ).
            message e100.
          endif.
      endcase.
    FORM    :  f_toggle_finputs
    loop at screen.
        if screen-group1 = 'PS'.
          if desktop = c_x.
            screen-input    = 1.
             sys_file = c_server_path.
          else.
            screen-input    = 0.
          endif.
        endif.
        if screen-group1 = 'AS'.
          if menu = c_x.
            screen-input    = 1.
            clear: in_file.
          else.
            screen-input    = 0.
          endif.
        endif.
        modify screen.
      endloop.
    endform. "f_toggle_finputs
    Thanks.

  • Expand /Collapse push button

    Hi Guys,
    I have problem with expand/collapse push button in my selection-screen. In the older version 4.6c icon is displaying  good where as in the ECC6  the instead of symbol, the icon id is displaying.
        How to display the symbol ?
    Regards,
    Narasimha

    Hi Vijay,
        The Icon Id  @k1@ is for expand and the @k2@ is for the collapse
    In the selection-screen instaed of symbol these ID's are displaying.
    Regards,
    Narasimha

  • Problem while hide a block on selection screen on button press

    Hi,
    I have added two buttons on the application toolbar of the selection screen. I have input fields under two blocks on the selection-screen. Initially the second block is hidden. If I press the button 1 the second block should be made visible.
    For this to happen, I captured the button 1 click event using the following statement.
    IF sscrfields-ucomm = 'FC01'.
    Inside the if ... endif, I looped at the screen and made the second block visible. It was working fine.
    loop at screen.
      if screen-group4 = '013'.
         screen-invisible = 1.
         screen-active    = 0.
      endif.
    endloop.
    Later the second button was added. Now when i run the report for the first time, if button 2 is clicked the hidden block appears on the selection screen even though i have not added any code for it.
    Just to check, i commented the logic to display the hidden block on button 1 click event. Even without any code the first time i press any of the two buttons added on the application toolbar the hidden block is displayed.
    I saved a variant for the report.
    During execution of the report, if i select any variant then the hidden block is displayed.
    Can anyone please tell me how to fix this problem.
    Regards,
    T2.

    Hi All,
    The problem is solved.
    Everyone was confusing between the pushbutton on the selectio-screen and on apllication toolbar
    (where you have the execute icon).
    Please find the code below. Thanks for you time and help. I appreciate it.
    REPORT ztest.
    INCLUDE <icon>.
    *  TABLES                                                              *
    TABLES: t001,              " Company Codes
            lfa1,              " Vendor Master (General Section)
            sscrfields.        " Fields on selection screens
    * To capture button press event.
    DATA: gv_button_press       TYPE c.
    * Menu Painter: Program interface for dynamic texts
    DATA: gs_dyntxt             TYPE smp_dyntxt.
    *  SELECTION SCREEN                                                    *
    SELECTION-SCREEN FUNCTION KEY 1.
    SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE text-s01.
    * Company Code.
    SELECTION-SCREEN BEGIN OF BLOCK ccode WITH FRAME TITLE text-s02.
    SELECT-OPTIONS: s_bukrs FOR t001-bukrs OBLIGATORY MEMORY ID buk.
    SELECTION-SCREEN END OF BLOCK ccode.
    SELECTION-SCREEN END OF BLOCK blk1.
    SELECTION-SCREEN BEGIN OF BLOCK dsel WITH FRAME TITLE text-s04.
    * Vendor Master.
    SELECTION-SCREEN BEGIN OF BLOCK vend WITH FRAME TITLE text-s07.
    SELECT-OPTIONS: s_konzs FOR lfa1-konzs MODIF ID aw1.
    SELECT-OPTIONS: s_txcd1 FOR lfa1-stcd1 MODIF ID aw1.
    SELECT-OPTIONS: s_txcd2 FOR lfa1-stcd2 MODIF ID aw1.
    SELECTION-SCREEN END OF BLOCK vend.
    SELECTION-SCREEN END OF BLOCK dsel.
    * INITIALIZATION                                                       *
    INITIALIZATION.
    * Populate the Application toolbar button attributes.
      PERFORM populate_app_toolbar_buttons.
    * Hide the dynamic screen intially.
      PERFORM hide_screenfields.
    * AT SELECTION SCREEN                                                  *
    AT SELECTION-SCREEN.
    * Capture the button press event.
      PERFORM capture_button_press.
    * AT SELECTION-SCREEN OUTPUT.                                          *
    AT SELECTION-SCREEN OUTPUT.
    * Show/Hide the dynamic selection screen based on button press.
      PERFORM adapt_screen.
    *&  Form  populate_app_toolbar_buttons                                 *
    *   Display Icon on the application toolbar buttons. Also set the      *
    *   function codes for these buttons.                                  *
    FORM populate_app_toolbar_buttons.
      CLEAR gs_dyntxt.
      WRITE icon_fencing     TO gs_dyntxt-icon_id AS ICON.
      MOVE  text-b01         TO gs_dyntxt-quickinfo.   " Dynamic Selections
      MOVE gs_dyntxt         TO sscrfields-functxt_01.
    ENDFORM.                    " populate_app_toolbar_buttons
    *&  Form  hide_screenfields                                            *
    *   Initially hide the Dynamic selection screen.                       *
    FORM hide_screenfields.
      LOOP AT SCREEN.
        IF screen-group1 = 'AW1'.
          screen-invisible = '1'.
          screen-active    = '0'.
        ENDIF.
        MODIFY SCREEN.
      ENDLOOP.
    ENDFORM.                    " hide_screenfields
    *&  Form  capture_button_press                                         *
    *   Set the flag based on button press event. Appication bar button    *
    *   tcode is available only at 'At Selection-screen' event.            *
    *   Use the captured data at 'At Selection-screen Output' event.       *
    *   Screen adjustments is possible only under this event.              *
    FORM capture_button_press.
      IF sscrfields-ucomm = 'FC01'.
        IF gv_button_press IS INITIAL.
          gv_button_press = 'X'.
        ELSEIF gv_button_press EQ 'X'.
          CLEAR gv_button_press.
        ENDIF.
      ENDIF.
    ENDFORM.                    " capture_button_press
    *&  Form  adapt_screen                                                 *
    *   Show/Hide the dynamic selection screen based on button press       *
    *   captured at 'At selection-screen' event.                           *
    FORM adapt_screen.
    * If button press flag is initial hide the dynamic selection screen.
      IF gv_button_press IS INITIAL.
        LOOP AT SCREEN.
          IF screen-group1 = 'AW1'.
            screen-invisible = '1'.
            screen-active    = '0'.
          ENDIF.
          MODIFY SCREEN.
        ENDLOOP.
    * Elseif button press flag is 'X' show the dynamic selection screen.
      ELSEIF gv_button_press EQ 'X'.
        LOOP AT SCREEN.
          IF screen-group1 = 'AW1'.
            screen-invisible = '0'.
            screen-active    = '1'.
          ENDIF.
          MODIFY SCREEN.
        ENDLOOP.
      ENDIF.
    ENDFORM.                    " adapt_screen
    Regards,
    T2
    Message was edited by: Titu Joseph

  • Issue with tabbed block in selection screen

    Hi All,
    I have created a report program with the following code.
    SELECTION-SCREEN BEGIN OF SCREEN 100 AS SUBSCREEN.
    PARAMETERS: p1 TYPE c LENGTH 10.
    SELECTION-SCREEN END OF SCREEN 100.
    SELECTION-SCREEN BEGIN OF SCREEN 200 AS SUBSCREEN.
    PARAMETERS: q1 TYPE c LENGTH 10.
    SELECTION-SCREEN END OF SCREEN 200.
    SELECTION-SCREEN: BEGIN OF TABBED BLOCK mytab FOR 10 LINES,
                      TAB (20) button1 USER-COMMAND push1,
                      TAB (20) button2 USER-COMMAND push2,
                      END OF BLOCK mytab.
    INITIALIZATION.
      button1 = 'Selection Screen 1'.
      button2 = 'Selection Screen 2'.
      mytab-prog = sy-repid.
      mytab-dynnr = 0100.
      mytab-activetab = 'PUSH1'.
    AT SELECTION-SCREEN.
      CASE sy-dynnr.
        WHEN 1000.
          CASE sy-ucomm.
            WHEN 'PUSH1'.
              mytab-dynnr = 100.
            WHEN 'PUSH2'.
              mytab-dynnr = 200.
          ENDCASE.
      ENDCASE.
    Execute the program and click on the second tab-page. Now, click on the 'Execute' button or press F8 (there is no specific functionality coded here).
    The issue now is that the first tab-page is displayed, instead of the second tab remaining displayed. I require the navigation to remain within the second tab-page after the EXECUTE button is clicked.
    Could someone help me out with this issue?
    Regards,
    Dinup
    Edited by: Dinup Sudhakaran on Feb 18, 2008 1:40 PM

    Hi,
    Go through below document with example code.
    It will help you.
    Tabstrip Controls on Selection Screens
    As with screens, you can now use tabstrip controls on selection screens. To do this, you must define a tabstrip area and the associated tab pages, and assign a subscreen to the tab pages. You do not have to (indeed, cannot) declare the tabstrip control or program the screen flow logic in your ABAP program, since both are automatically generated.
    To define a tabstrip area with tab pages, use the following statements in your selection screen definition:
    SELECTION-SCREEN: BEGIN OF TABBED BLOCK <tab_area> FOR <n> LINES,
                      TAB (<len>) <tab1> USER-COMMAND <ucom1>
                                  [DEFAULT [PROGRAM <prog>] SCREEN <scrn>],
                      TAB (<len>) <tab2> USER-COMMAND <ucom2>
                                  [DEFAULT [PROGRAM <prog>] SCREEN <scrn>],
                      END OF BLOCK <tab_area>.
    This defines a tabstrip control <tab_area> with size <n>. The tab pages <tab1>, <tab2>… are assigned to the tab area. <len> defines the width of the tab title. You must assign a function code <ucom> area to each tab title. You can find out the function code from the field SY-UCOMM in the AT SELECTION-SCREEN event.
    For each tab title, the system automatically creates a character field in the ABAP program with the same name. Before the selection screen is displayed, you can assign a text to the field. This then appears as the title of the corresponding tab page on the selection screen.
    You must assign a subscreen to each tab title. This will be displayed in the tab area when the user chooses that title. You can assign one of the following as a subscreen:
    A subscreen screen defined using the Screen Painter.
    A selection screen subscreen, defined in an ABAP program.
    You can make the assignment either statically in the program or dynamically at runtime. If, at runtime, one of the tab titles has no subscreen assigned, a runtime error occurs.
    Static assignment
    Use the DEFAULT addition when you define the tab title. You can specify an ABAP program and one of its subscreens. If you do not specify a program, the system looks for the subscreen in the current program. When the user chooses the tab title, it is activated, and the subscreen is assigned to the tabstrip area. The static assignment is valid for the entire duration of the program, but can be overwritten dynamically before the selection screen is displayed.
    Dynamic assignment
    For each tab area, the system automatically creates a structure in the ABAP program with the same name. This structure has three components – PROG, DYNNR, and ACTIVETAB. When you assign the subscreens statically, the structure contains the name of the ABAP program containing the subscreen, the number of the subscreen, and the name of the tab title currently active on the selection screen (and to which these values are assigned). The default active tab page is the first page. You can assign values to the fields of the structure before the selection screen is displayed, and so set a subscreen dynamically.
    If you assign a normal subscreen screen to a tab title, the dialog modules containing its flow logic must be defined in the current ABAP program. If the subscreen is a selection screen, user actions will trigger the AT SELECTION-SCREEN event and its variants (see Selection Screen Processing). This includes when the user chooses a tab title. If one selection screen is included on another, AT SELECTION-SCREEN will be triggered at least twice – firstly for the "included" selection screen, then for the selection screen on which it appears.
    REPORT demo_sel_screen_with_tabstrip.
    DATA flag(1) TYPE c.
    SUBSCREEN 1
    SELECTION-SCREEN BEGIN OF SCREEN 100 AS SUBSCREEN.
    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 END OF SCREEN 100.
    SUBSCREEN 2
    SELECTION-SCREEN BEGIN OF SCREEN 200 AS SUBSCREEN.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME.
    PARAMETERS: q1(10) TYPE c OBLIGATORY,
                q2(10) TYPE c OBLIGATORY,
                q3(10) TYPE c OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK b2.
    SELECTION-SCREEN END OF SCREEN 200.
    STANDARD SELECTION SCREEN
    SELECTION-SCREEN: BEGIN OF TABBED BLOCK mytab FOR 10 LINES,
                      TAB (20) button1 USER-COMMAND push1,
                      TAB (20) button2 USER-COMMAND push2,
                      TAB (20) button3 USER-COMMAND push3
                                       DEFAULT SCREEN 300,
                      END OF BLOCK mytab.
    INITIALIZATION.
      button1 = text-010.
      button2 = text-020.
      button3 = text-030.
      mytab-prog = sy-repid.
      mytab-dynnr = 100.
      mytab-activetab = 'BUTTON1'.
    AT SELECTION-SCREEN.
      CASE sy-dynnr.
        WHEN 1000.
          CASE sy-ucomm.
            WHEN 'PUSH1'.
              mytab-dynnr = 100.
              mytab-activetab = 'BUTTON1'.
            WHEN 'PUSH2'.
              mytab-dynnr = 200.
              mytab-activetab = 'BUTTON2'.
          ENDCASE.
        WHEN 100.
          MESSAGE s888(sabapdocu) WITH text-040 sy-dynnr.
        WHEN 200.
          MESSAGE s888(sabapdocu) WITH text-040 sy-dynnr.
      ENDCASE.
    MODULE init_0100 OUTPUT.
      LOOP AT SCREEN.
        IF screen-group1 = 'MOD'.
          CASE flag.
            WHEN 'X'.
              screen-input = '1'.
            WHEN ' '.
              screen-input = '0'.
          ENDCASE.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
    ENDMODULE.
    MODULE user_command_0100 INPUT.
      MESSAGE s888(sabapdocu) WITH text-050 sy-dynnr.
      CASE sy-ucomm.
        WHEN 'TOGGLE'.
          IF flag = ' '.
            flag = 'X'.
          ELSEIF flag = 'X'.
            flag = ' '.
          ENDIF.
      ENDCASE.
    ENDMODULE.
    START-OF-SELECTION.
      WRITE: / 'P1:', p1,'Q1:', q1,
             / 'P2:', p2,'Q2:', q2,
             / 'P3:', p3,'Q3:', q3.
    This program defines two selection screens – 100 and 200, as subscreens, and places a tabstrip control area with three tab pages on the standard selection screen. A subscreen screen 300 (from the same program) is assigned statically to the third tab page.
    The layout of screen 300 is:
    The input/output fields P1 to Q3 are defined by using the parameters from the ABAP program The pushbutton has the function code TOGGLE.
    The screen flow logic for screen 300 is as follows:
    PROCESS BEFORE OUTPUT.
      MODULE init_0100.
    PROCESS AFTER INPUT.
      MODULE user_command_0100.
    Both dialog modules are defined in the ABAP program.
    When you run the program, the standard selection screen appears. In the INITIALIZATION event, the texts are defined on the tab titles, the subscreen selection screen 100 is assigned to the tab area, and the first tab title is activated.
    User actions on the selection screen are processed in the AT SELECTION-SCREEN event block. In particular, it is here that the subscreens are assigned and tab titles activated when the user chooses one of the first two tab titles. This is not necessary for the third tab title, since the dynamic assignment (screen 300) is always placed in the structure MYTAB when the user chooses it.
    Before the subscreen screen is displayed, the PBO module INIT_100 is executed. User actions on the subscreen screen trigger the PAI module. This includes when the user chooses a tab title. After that, the AT SELECTION-SCREEN event is triggered.
    Messages in the status line show where an action has been processed.

  • Can I define a vertical SELECTION-SCREEN block ?

    Hi, I started getting to know the SELECTION-SCREEN statements now, I was wondering if there's a way to define a vertical screen block instead of an horizontal one.
    Also, can I set the size of a given block ? Let's say I don't want it to extend to the right margin of the screen. Can I limit it to the middle, for instance ?
    Here's a code excerpt so you can understand a little what I'm intending to do (I want to place the operators vertically on the screen).
    SELECTION-SCREEN BEGIN OF BLOCK BOX1 WITH FRAME TITLE S_TBOX1.
      SELECTION-SCREEN BEGIN OF LINE.
        SELECTION-SCREEN COMMENT 20(10) S_COMM.
      SELECTION-SCREEN END OF LINE.
      SELECTION-SCREEN BEGIN OF BLOCK BOX2 WITH FRAME TITLE S_TBOX2.
        SELECTION-SCREEN BEGIN OF LINE.
          SELECTION-SCREEN PUSHBUTTON (3) S_PB1 USER-COMMAND 'XXX'.
          SELECTION-SCREEN PUSHBUTTON (3) S_PB2 USER-COMMAND 'XXX'.
          SELECTION-SCREEN PUSHBUTTON (3) S_PB3 USER-COMMAND 'XXX'.
          SELECTION-SCREEN PUSHBUTTON (3) S_PB4 USER-COMMAND 'XXX'.
        SELECTION-SCREEN END OF LINE.
      SELECTION-SCREEN END OF BLOCK BOX2.
      SELECTION-SCREEN BEGIN OF LINE.
        SELECTION-SCREEN PUSHBUTTON (3) S_PB5 USER-COMMAND 'XXX'.
      SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK BOX1.
    INITIALIZATION.
      S_COMM = 'CALCULATOR'.

    Ok, I thought of that but... now I need the answer for the 2nd question I posted: is it possible to limit the extension of the block, so it ends right after the 4 buttons column ?
    SELECTION-SCREEN BEGIN OF BLOCK BOX1 WITH FRAME TITLE S_TBOX1.
      SELECTION-SCREEN BEGIN OF LINE.
        SELECTION-SCREEN COMMENT 20(10) S_COMM.
      SELECTION-SCREEN END OF LINE.
      SELECTION-SCREEN BEGIN OF BLOCK BOX2 WITH FRAME TITLE S_TBOX2.
        SELECTION-SCREEN BEGIN OF LINE.
          SELECTION-SCREEN PUSHBUTTON (3) S_PB1 USER-COMMAND 'XXX'.
        SELECTION-SCREEN END OF LINE.
        SELECTION-SCREEN SKIP.
        SELECTION-SCREEN BEGIN OF LINE. 
          SELECTION-SCREEN PUSHBUTTON (3) S_PB2 USER-COMMAND 'XXX'.
        SELECTION-SCREEN END OF LINE. 
        SELECTION-SCREEN SKIP.
        SELECTION-SCREEN BEGIN OF LINE. 
          SELECTION-SCREEN PUSHBUTTON (3) S_PB3 USER-COMMAND 'XXX'.
        SELECTION-SCREEN END OF LINE. 
        SELECTION-SCREEN SKIP.
        SELECTION-SCREEN BEGIN OF LINE.
          SELECTION-SCREEN PUSHBUTTON (3) S_PB4 USER-COMMAND 'XXX'.
        SELECTION-SCREEN END OF LINE.
      SELECTION-SCREEN END OF BLOCK BOX2.
      SELECTION-SCREEN BEGIN OF LINE.
        SELECTION-SCREEN PUSHBUTTON (3) S_PB5 USER-COMMAND 'XXX'.
      SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK BOX1.
    INITIALIZATION.
      S_COMM = 'CALCULATOR'.

  • How to display a block next to another bock in a selection screen?

    Hi,
    I want to show several blocks in a selection screen, but they are displayed one below the other. How can I display them parallel?
    My Coding:
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001 NO INTERVALS.
    *parameters
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-001 NO INTERVALS.
    *parameters
    SELECTION-SCREEN END OF BLOCK b2.

    use like following in Report :
    SELECTION-SCREEN BEGIN OF LINE.
      PARAMETERS SESSION RADIOBUTTON GROUP CTU.  "create session
      SELECTION-SCREEN COMMENT 3(20) TEXT-S07 FOR FIELD SESSION.
      selection-screen position 45.
      PARAMETERS CTU RADIOBUTTON GROUP  CTU.     "call transaction
      SELECTION-SCREEN COMMENT 48(20) TEXT-S08 FOR FIELD CTU.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
      SELECTION-SCREEN COMMENT 3(20) TEXT-S01 FOR FIELD GROUP.
      selection-screen position 25.
      PARAMETERS GROUP(12).                      "group name of session
      SELECTION-SCREEN COMMENT 48(20) TEXT-S05 FOR FIELD CTUMODE.
      selection-screen position 70.
      PARAMETERS CTUMODE LIKE CTU_PARAMS-DISMODE DEFAULT 'N'.
                                          "A: show all dynpros
                                          "E: show dynpro on error only
                                          "N: do not display dynpro
    SELECTION-SCREEN END OF LINE.

  • Retaining the selected tab in a tabbed block of selection screen

    Hi,
    My report has a selection screen with a tabbed block displaying 3 tabs. I want to retain the tab that was selected before executing the report and display that tab as the activetab when the user back navigates from the output list of the report to the selection screen.
    I tried to store the value of 'activetab' component of the tabbed block in a global variable and assigned the global variable to the 'activetab' component. But it is not working.
    Is there any other way by which we can do this?
    Thanks and Regards,
    Tongston

    I had a similar problem some time ago. One clarification first, global variables will not work because when you come back from report output, all the global/local variables are initialized that is when you come back to selection screen from report output, it is like a new instance of report.
    To resolve this you can use Export to memory ID / Import from memory ID statements, as these will retain the data across report instances.
    Now the following code is doing exactly what you wanted. You should copy/ paste it in an abap program and run it to see for yourself how I retained active tab.  Hope this will help you.
    REPORT  yy_test002.
    TABLES: bkpf, bseg, glt0, fdes, lfa1.
    DATA: g_acttab(132) TYPE c.
    SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME.
    PARAMETERS: p_bukrs LIKE bkpf-bukrs,  "obligatory,
                p_upto LIKE bkpf-budat.
    SELECTION-SCREEN END OF BLOCK blk1.
    SELECTION-SCREEN BEGIN OF SCREEN 101 AS SUBSCREEN.
    SELECT-OPTIONS: s_hkon1 FOR bseg-hkont NO-EXTENSION,
                    s_lifn1 FOR bseg-lifnr.
    SELECTION-SCREEN END OF SCREEN 101.
    SELECTION-SCREEN BEGIN OF SCREEN 102 AS SUBSCREEN.
    SELECT-OPTIONS: s_hkon2 FOR bseg-hkont NO-EXTENSION,
                    s_lifn2 FOR bseg-lifnr.
    SELECTION-SCREEN END OF SCREEN 102.
    SELECTION-SCREEN BEGIN OF SCREEN 103 AS SUBSCREEN.
    SELECT-OPTIONS: s_hkon3 FOR bseg-hkont NO-EXTENSION,
                    s_lifn3 FOR bseg-lifnr.
    SELECTION-SCREEN END OF SCREEN 103.
    SELECTION-SCREEN BEGIN OF BLOCK blk2 WITH FRAME.
    PARAMETERS: p_dued LIKE bseg-fdtag.
    SELECTION-SCREEN BEGIN OF TABBED BLOCK tbblk FOR 8 LINES.
    SELECTION-SCREEN TAB (18) tabname1
    USER-COMMAND 'UTB1' DEFAULT SCREEN 101.
    SELECTION-SCREEN TAB (18) tabname2
    USER-COMMAND 'UTB2' DEFAULT SCREEN 102.
    SELECTION-SCREEN TAB (18) tabname3
    USER-COMMAND 'UTB3' DEFAULT SCREEN 103.
    SELECTION-SCREEN END OF BLOCK tbblk.
    SELECTION-SCREEN END OF BLOCK blk2.
    INITIALIZATION.
      tabname1 = 'GL Accounts set 1'.
      tabname2 = 'GL Accounts set 2'.
      tabname3 = 'GL Accounts set 3'.
      IMPORT g_acttab FROM MEMORY ID 'zssfsdfr3'.
      IF sy-subrc = 0.
        tbblk-prog = sy-repid.
        tbblk-activetab = g_acttab.
        CASE g_acttab.
          WHEN 'UTB1'.
            tbblk-dynnr = 101.
          WHEN 'UTB2'.
            tbblk-dynnr = 102.
          WHEN 'UTB3'.
            tbblk-dynnr = 103.
          WHEN OTHERS.
        ENDCASE.
      ENDIF.
    START-OF-SELECTION.
      g_acttab = tbblk-activetab.
      EXPORT g_acttab TO MEMORY ID 'zssfsdfr3'.
      WRITE:/ 'current active tab:', g_acttab.
      WRITE:/ 'bye'.

  • Selection screen block is invisable when radiobutton is selected

    Hi Experts,
    i am sending the my code...........my requerment is  : Radiobutton(rb_cdr1)   is checked donu2019t show the  Fourth & Sixth block and no output files will be generated in those respective blocks. Only Show option a & b in the Fifth block. If the Radio button in unchecked donu2019t show the options a & b in the Fifth block)
    if Radiobutton(rb_csr1) donu2019t show the  fifth Sixth block . iam try to using loop at scrren and
    IF screen-group1 = 's1'.
       screen-invisible = '0'.
    But it's not working..........plz help me on this........
    file download option for dazel system.
    SELECTION-SCREEN BEGIN OF BLOCK b4 WITH FRAME TITLE text-h04.
    PARAMETERS: rb_dzlcl RADIOBUTTON GROUP gr2 MODIF ID s1,
                rb_dzapp RADIOBUTTON GROUP gr2 MODIF ID s1,
                p_dzfl   TYPE rlgrap-filename.
    SELECTION-SCREEN END OF BLOCK b4.
    SELECTION-SCREEN BEGIN OF BLOCK b7 WITH FRAME TITLE text-h07.
    PARAMETERS: rb_cdr1   RADIOBUTTON GROUP gr5 ,
                rb_csr1  RADIOBUTTON GROUP gr5  .
    SELECTION-SCREEN END OF BLOCK b7.
    Contibution detail report & UNIX File option
    SELECTION-SCREEN BEGIN OF BLOCK b5 WITH FRAME TITLE text-h05.
    PARAMETERS: rb_cdr   RADIOBUTTON GROUP gr3 MODIF ID s1,
                rb_loca  RADIOBUTTON GROUP gr3 MODIF ID s1,
                rb_appl  RADIOBUTTON GROUP gr3 MODIF ID s1,
                p_flnam TYPE rlgrap-filename.
    SELECTION-SCREEN END OF BLOCK b5.
    Contibution Summary report & UNIX File option
    SELECTION-SCREEN BEGIN OF BLOCK b6 WITH FRAME TITLE text-h06.
    PARAMETERS:  rb_csr  RADIOBUTTON GROUP gr4 MODIF ID s2,
                 rb_loc  RADIOBUTTON GROUP gr4 MODIF ID s2,
                 rb_app  RADIOBUTTON GROUP gr4 MODIF ID s2,
                 p_fln TYPE rlgrap-filename.
    SELECTION-SCREEN END OF BLOCK b6.
    Thanks in advance........

    hi !
    try the following one and make some changes that you want
    SELECTION-SCREEN BEGIN OF BLOCK b4 WITH FRAME TITLE text-h04.
    PARAMETERS: rb_dzlcl RADIOBUTTON GROUP gr2 MODIF ID s1,
    rb_dzapp RADIOBUTTON GROUP gr2 MODIF ID s1,
    p_dzfl TYPE rlgrap-filename MODIF ID s1.
    SELECTION-SCREEN END OF BLOCK b4.
    SELECTION-SCREEN BEGIN OF BLOCK b7 WITH FRAME TITLE text-h07.
    PARAMETERS: rb_cdr1 RADIOBUTTON GROUP gr5 MODIF ID s3 ,
    rb_csr1 RADIOBUTTON GROUP gr5 DEFAULT 'X'.
    SELECTION-SCREEN END OF BLOCK b7.
    Contibution detail report & UNIX File option
    SELECTION-SCREEN BEGIN OF BLOCK b5 WITH FRAME TITLE text-h05.
    PARAMETERS: rb_cdr RADIOBUTTON GROUP gr3 MODIF ID s1,
    rb_loca RADIOBUTTON GROUP gr3," MODIF ID s1,
    rb_appl RADIOBUTTON GROUP gr3," MODIF ID s1,
    p_flnam TYPE rlgrap-filename MODIF ID s1.
    SELECTION-SCREEN END OF BLOCK b5.
    Contibution Summary report & UNIX File option
    SELECTION-SCREEN BEGIN OF BLOCK b6 WITH FRAME TITLE text-h06.
    PARAMETERS: rb_csr RADIOBUTTON GROUP gr4 MODIF ID s2,
    rb_loc RADIOBUTTON GROUP gr4 MODIF ID s2,
    rb_app RADIOBUTTON GROUP gr4 MODIF ID s2,
    p_fln TYPE rlgrap-filename MODIF ID s2.
    SELECTION-SCREEN END OF BLOCK b6.
    AT SELECTION-SCREEN OUTPUT.
    LOOP AT SCREEN.
    IF screen-group1 = 'S2' or
       screen-group1 = 'S1'.
      IF rb_csr1 = 'X'.
        screen-active = 0.
      ELSEIF rb_cdr1 = 'X' .
         screen-active = 1.
      ENDIF.
    ELSEIF screen-group1 = 'S3'.
      IF rb_cdr1 eq 'X'.
        screen-active = 1.
      ELSEIF rb_csr1 = 'X' .
         screen-active = 1.
      ENDIF.
    ENDIF.
    MODIFY SCREEN.
    ENDLOOP.

  • Dynamically hide a block in selection screen

    Hi All,
    Can we hide a whole block in a selection screen dynamically.
    If so, then how?
    Regards,
    Bhaskar Tripathi

    Hi,
    Refer this code
    *&      Form  sub_select_report
          text
    FORM sub_select_report .
      IF ( p_post  EQ c_chk ).
        LOOP AT SCREEN.
          IF ( screen-group1 EQ 'MD1' ) OR
             ( screen-group1 EQ 'MD2' ) OR
             ( screen-group1 EQ 'MD3' ) OR
             ( screen-group1 EQ 'MD4' ).
            screen-input   = c_ok.
            screen-active  = c_ok.
          ENDIF.
          IF ( screen-group1 EQ 'MD5' ) OR
             ( screen-group1 EQ 'MD6' ).
            screen-input   = c_1.
            screen-active  = c_1.
          ENDIF.
          MODIFY SCREEN.
        ENDLOOP.
      ELSEIF p_rpt EQ c_chk.
        LOOP AT SCREEN.
          IF ( screen-group1 EQ 'MD5' ) OR
             ( screen-group1 EQ 'MD6' ).
            screen-input   = c_ok.
            screen-active  = c_ok.
          ENDIF.
          MODIFY SCREEN.
        ENDLOOP.
      ENDIF.
    ENDFORM.                    " sub_select_report
    Regards,
    Prashant

  • Hiding a block in selection screen

    Hi everybody,
             My requirement is to hide the entire block of a particular selection screen, find the below selection screen code.  with my piece of code,iindividual fields are getting hidden, please let me know how to hide the entire block.
              If I select rb_det then the block b2 should hide.
    Selection screen :
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-t02.
    PARAMETER: rb_sum RADIOBUTTON GROUP rtyp DEFAULT 'X' USER-COMMAND DISP,
    rb_det RADIOBUTTON GROUP rtyp.
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-t04.
    PARAMETER: cb_asco AS CHECKBOX DEFAULT 'X' modif id SEL,
    cb_divi AS CHECKBOX modif id SEL,
    cb_buen AS CHECKBOX modif id SEL,
    cb_prod AS CHECKBOX modif id SEL,
    cb_bupa AS CHECKBOX modif id SEL,
    cb_inob AS CHECKBOX modif id SEL.
    SELECTION-SCREEN END OF BLOCK b2.
    Existing code :
    A T S E L E C T I O N - S C R E E N *
    at selection-screen output.
    loop at screen.
    if screen-group1 = 'SEL'.
    if rb_det = 'X'.
    if screen-name = 'CB_ASCO' or
    screen-name = 'CB_DIVI' or
    screen-name = 'CB_BUEN' or
    screen-name = 'CB_PROD' or
    screen-name = 'CB_BUPA' or
    screen-name = 'CB_INOB' .
    screen-active = 0.
    modify screen.
    endif.
    endif.
    endif.
    endloop.
    Thanks in advance...
    Regards,
    Ravi

    Hi,
    A block will be made invisible if everything inside it is inactive. If you give all of them a MODIF ID, too, the block will disappear.
    SELECTION-SCREEN BEGIN OF BLOCK processing WITH FRAME TITLE text-030.
      SELECTION-SCREEN BEGIN OF LINE.
      PARAMETERS pa_xmanu LIKE rm08mrbr-manu DEFAULT 'X'
      RADIOBUTTON GROUP val MODIF ID id1.
      SELECTION-SCREEN COMMENT 3(30) text-040 FOR FIELD pa_xmanu MODIF ID
    id1.
      SELECTION-SCREEN POSITION 40.
      PARAMETERS pa_xauto LIKE rm08mrbr-auto
      RADIOBUTTON GROUP val MODIF ID id1.
      SELECTION-SCREEN COMMENT 43(30) text-050 FOR FIELD pa_xauto MODIF ID
    id1.
      SELECTION-SCREEN END OF LINE.
      SELECTION-SCREEN BEGIN OF LINE.
      PARAMETERS: pa_xskto LIKE rm08mrbr-skto AS CHECKBOX MODIF ID id1.
      SELECTION-SCREEN COMMENT 3(30) text-055
      FOR FIELD pa_xskto MODIF ID id1.
      SELECTION-SCREEN END OF LINE.
      SELECTION-SCREEN END OF BLOCK processing.
      AT SELECTION-SCREEN OUTPUT.
        LOOP AT SCREEN.
          IF screen-group1 = 'ID1'.
            screen-active = 0.
            MODIFY SCREEN.
          ENDIF.
    Regards,
    Priyanka.

  • 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

Maybe you are looking for

  • How do I find and delete large images in iPhoto 11?

    Hi! I have a large iPhoto library containing more than 16000 images, among them a slew of HD movies. Some of these images and movies can be deleted and I would like to find the largest ones in order to save them on an external drive and remove them f

  • 4 iphone users each with own itunes acct

    we have 4 iphone users in the house.  4 authorized computers. (though we only have 3 computers in the home-the other authorized pc is dead) seems to be that to get my music that I d/l on the mac to itunes I need to erase and sync my phone as it's ass

  • IPhoto 6.0.5 and iTunes 7.0.2 not recognized

    I will run Norton Utilities 8 to correct any problems and when complete I try to open iPhoto or iTunes and neither will open. They had been up and running before I ran Norton. The icons for the program will bounce once in the dock and the program wil

  • Using the earbuds with clicker I'm not able to advance my music

    using the earbuds with clicker I'm not able to advance my music

  • How do I re-download Photoshop Elements 6 for Macintosh?

    I have been using Photoshop Elements 6 on my Mac for years and I'm used to how it works. I have a new computer and I need to download it. I have my SN # and all and it is registered on my Adobe account. The question is where do I get the download for