Buttons in Selection Screen

Hi,
In my module pool program, if I click a button, am calling a selection screen using following statement.
      CALL SELECTION-SCREEN 0105 STARTING AT 10 10 ENDING AT 95 16.
also, in TOP include, I have designed the selection screen as follows
SELECTION-SCREEN BEGIN OF SCREEN 0105.
SELECTION-SCREEN BEGIN OF BLOCK proj_def WITH FRAME TITLE text-100.
SELECT-OPTIONS pspid FOR proj-pspid.
SELECTION-SCREEN END OF BLOCK proj_def.
SELECTION-SCREEN END OF SCREEN 0105.
when I execute, there are some default buttons are coming. But I want to include my own buttons and I have to write code for that. Is it possible? How can I do that?
Regards,
SAP Lover.

Hi,
Proceed as follows to achieve your requirement.
1. Click on the button
2. According to your logic you'll get a Selection Screen as POP-UP
3. Now select F1 on that input field
4. Go with Technical Information Option
5. You'll get the necessary info and here you can notice GUI DATA
6. Here you can see the program name as RSSYSTDB and Status as %_CSP
7. Double click on this status.
8. It will lead you to that status. Click on Display <-> Change / CTRL + F1.
9. It will ask for the access key. get the access key from BASIS and then here you go to change according to your requirement.
Hope this helps. Reward if useful.
Thanks and Regards,
Maddineni Bharath.

Similar Messages

  • Error during creation of push button on selection screen

    Hi,
    I wanted to create push buttons on selection screen,
    Code:
    DATA DB1 TYPE VBAP-WERKS.
    DATA DB2 TYPE MARA-MATNR.
    SELECT-OPTIONS : SPLANT FOR DB1,
                                    SCLASS FOR DB2.
    SELECTION-SCREEN:  FUNCTION KEY 1,
                                        FUNCTION KEY 2,
                                        FUNCTION KEY 3.
    INITIALIZATION.
    DATA FUNCTXT TYPE SMP_DYNTXT.
    CLEAR FUNCTXT.
    DATA: FUNCTXT_01 TYPE SSCRFIELDS-FUNCTXT_01.
    FUNCTXT-TEXT = 'DEL'.
    SSCRFIELDS-FUNCTXT_01 = FUNCTXT.
    CLEAR FUNCTXT.
    FUNCTXT-TEXT = 'EDIT'.
    SSCRFIELDS-FUNCTXT_02 = FUNCTXT.
    CLEAR FUNCTXT.
    FUNCTXT-TEXT = 'CRE'.
    SSCRFIELDS-FUNCTXT_03 = FUNCTXT.
    But during activating, I'm getting the error as : Field "SSCRFIELDS-FUNCTXT_01" is unknown. It is neither in one of the specified tables nor defined by "DATA" statement.
    Please suggest solutions to overcome this error.
    Regards
    Darshan MS

    Hi,
    trans. for examples of selection screen : BIBS
    regards
    Fred

  • Error in search help button at selection-screen

    hi all,
    i have a small issue.
    i have created a seach help button in selection screen .
    my code is as bellow.
    TYPES: BEGIN OF ty_ZSD_SNID,
           KUNNR TYPE KUNNR,
           BAREA TYPE WERKS_D,
          END OF ty_ZSD_SNID.
    DATA : it_z TYPE STANDARD TABLE OF ty_ZSD_SNID.
    selection-screen : begin of block b with frame title text-000.
    select-options : skunnr for zsd_snid-kunnr.
    parameters :     pbarea like zsd_snid-barea obligatory.
    selection-screen : end of block b.
    INITIALIZATION.
      SELECT KUNNR BAREA FROM ZSD_SNID INTO TABLE it_z.
      SORT it_z BY BAREA KUNNR.
      DELETE ADJACENT DUPLICATES FROM it_z COMPARING BAREA KUNNR.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR SKUNNR-low.
      IF it_z[] IS NOT INITIAL.
        CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
                 EXPORTING
              DDIC_STRUCTURE         = ' '
                   retfield               = 'KUNNR'  " data base table field name
              PVALKEY                = ' '
                  dynpprog               = sy-repid " program name
                  dynpnr                 = sy-dynnr          "screen name
                  dynprofield            = 'SKUNNR-LOW'  " layot field name
              STEPL                  = 0
              WINDOW_TITLE           =
              VALUE                  = ' '
                  value_org              = 'S'
              MULTIPLE_CHOICE        = ' '
              DISPLAY                = ' '
              CALLBACK_PROGRAM       = ' '
              CALLBACK_FORM          = ' '
              MARK_TAB               =
            IMPORTING
              USER_RESET             =
                 TABLES
                   value_tab              = it_z[]   " internal talble name
              FIELD_TAB              =
              RETURN_TAB             =
              DYNPFLD_MAPPING        =
            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.
        ENDIF.
      ELSE.
        MESSAGE E000(zsdsn).
      ENDIF.
    my issue is , its working properly if records are there in my z table.
    if no records are there in the table then if i do comment the last message statement then its working.
    if i do uncomment like the above code, then its dumming.
    what i should i do ??
    kind regards

    closed because of no answer.

  • Creating push button on Selection screen application toolbar

    Hi Friends,
    this is a HR-ABAP report. I have to create a push button on Selection screen. when user clicks on that push button 'MODAL DIALOG BOX' has to be displayed containing some data.
    plz kindly give some sample code to do this.
    Regards,
    Radhika Dasharatha.

    Hi,
    1)Use SELECTION-SCREEN  PUSHBUTTON /10(20) PUSH USER-
      COMMAND 'ABC'. in selection screen.
    2) Give the static name to button in INITIALIZATION event like PUSH = 'PRESS'.
    3) At selection screen.
      if sy-ucomm eq 'ABC'.
    call FM HR_BE_GE_MODAL_DIALOG
    endif.
    Thanks
    Sandeep
    Reward if useful

  • Push button on selection screen

    Hi,
    I have provided push button on selection screen after input fields I mean just below to input fields by using the syntax selection screen pushbutton…..   And it is appearing on the selection screen.  As per the requirement I need to enter material number on the selection screen and if I press corresponding push button I need to call one transaction using bdc program.  I wrote case sy-comm and corresponding user command ( whatever is there in the selection screen syntax) in when condition under start of selection event.
    But the control is not going to that place after I press push button. If I put that code inside of at selection screen it is going. But I can not write all the bdc program and select queries inside of at selection screen event if so please suggest me how I can proceed.
    I will give the points.
    Thanks a lot in advance.

    Hi,
    SELECTION-SCREEN BEGIN OF BLOCK b_2 WITH FRAME TITLE text-018.
    SELECT-OPTIONS s_fields FOR qpmk-mkmnr NO-DISPLAY.
    SELECTION-SCREEN PUSHBUTTON /1(24) name USER-COMMAND flds.
    SELECTION-SCREEN END OF BLOCK b_2.
    AT SELECTION-SCREEN.
    IF sscrfields-ucomm = 'FLDS'.
        PERFORM display_fields.
      ENDIF.

  • Radio Buttons on Selection Screen

    Hi,
    I have four radio buttons on selection screen in a frame, all belonging to the same group.
    When the program is called using transaction 1, first two radio buttons are displayed. When the program is called using transaction 2, bottom two radio must be displayed.
    I am doing this using the following code.
    The problem is : When last two are displayed, there is empty space left on the top and first two are displayed there is empty space left in the bottom of the frame. How can this be taken care of such there are no empty spaces in the box frame?
    Code:
    Radio Buttons for Table Name
    SELECTION-SCREEN BEGIN OF BLOCK bl1 WITH FRAME TITLE text-005.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS : p_ot   RADIOBUTTON GROUP grp1 MODIF ID one.
    SELECTION-SCREEN COMMENT 5(31) text-001 FOR FIELD p_ot.
    SELECTION-SCREEN END   OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS : p_exp   RADIOBUTTON GROUP grp1 MODIF ID one.
    SELECTION-SCREEN COMMENT 5(31) text-002 FOR FIELD p_exp.
    SELECTION-SCREEN END   OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS : p_cost   RADIOBUTTON GROUP grp1 MODIF ID two.
    SELECTION-SCREEN COMMENT 5(31) text-003 FOR FIELD p_cost.
    SELECTION-SCREEN END   OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS : p_att   RADIOBUTTON GROUP grp1 MODIF ID two.
    SELECTION-SCREEN COMMENT 5(31) text-004 FOR FIELD p_att.
    SELECTION-SCREEN END   OF LINE.
    SELECTION-SCREEN END OF BLOCK bl1.
    Initialization
    INITIALIZATION.
    Display Table Names depending on transaction calling the program
      PERFORM display_table_names.
    FORM display_table_names.
      DATA : l_mod_id(3) TYPE c.
      IF sy-tcode EQ 'ZVTEST1'.
        l_mod_id = 'ONE'.
      ELSEIF sy-tcode EQ 'ZVTEST2'.
        l_mod_id = 'TWO'.
      ENDIF.
      LOOP AT SCREEN.
        IF screen-group1 EQ l_mod_id.
          screen-invisible   = '1'.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
    ENDFORM.                    " display_table_names

    Hi,
    REPORT  Z_SALES MESSAGE-ID ZZ                          .
    *                             Variables                                *
    DATA: IT_BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE,
          IT_MSGS LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
    DATA: V_FILE TYPE STRING.
    *                         Internal Tables                              *
    DATA: BEGIN OF IT_SALES OCCURS 0,
            AUART,
            VKORG,
            VTWEG,
            BSTKD,
            KUNNR_KUNAG,
            KUNNR_KUNWE,
            KETDAT,
            KPRGBZ,
            PRSDT,
            BSTKD_1,
            KUNNR_KUNAG1,
            KUNNR_KUNWE1,
            KETDAT_1,
            KPRGBZ_1,
            PRSDT_1,
            ZTERM_1,
            INCO1,
            INCO2,
            MABNR,
            KWMENG,
            BSTKD_2,
            KUNNR_KUNAG2,
            KUNNR_KUNWE2,
            KETDAT_2,
            KPRGBZ_2,
            PRSDT_2,
            ZTERM_2,
            INCO1_1,
            INCO2_2,
            KSCHL,
            KBETR,
          END OF IT_SALES.
    *                       Selection-Screen                               *
    *Selection Screen 1
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    PARAMETERS : P_FILE(25) TYPE C,
                 O_FILE(25) TYPE C.
    SELECTION-SCREEN END OF BLOCK B1.
    *Selection Screen 2
    SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-002.
    PARAMETERS: CAL_TRA RADIOBUTTON GROUP G1 USER-COMMAND FLAG,
                SESSION RADIOBUTTON GROUP G1 DEFAULT 'X'.
    SELECTION-SCREEN END OF BLOCK B2.
    *Selection Screen 3
    SELECTION-SCREEN BEGIN OF BLOCK B3 WITH FRAME TITLE TEXT-003.
    PARAMETERS: MODE DEFAULT 'X' MODIF ID BL1,
                UPDATE DEFAULT 'X' MODIF ID BL1.
    SELECTION-SCREEN END OF BLOCK B3.
    *Selection Screen 4
    SELECTION-SCREEN BEGIN OF BLOCK B4 WITH FRAME TITLE TEXT-003.
    PARAMETERS: SES_NAM(25) MODIF ID BL2,
                KEP_TRAS TYPE C DEFAULT 'X' MODIF ID BL2,
                LOC_DATE TYPE SY-DATUM MODIF ID BL2,
                USER TYPE SY-UNAME DEFAULT SY-UNAME MODIF ID BL2.
    SELECTION-SCREEN END OF BLOCK B4.
    *                     At  Selection-Screen Output                      *
    AT SELECTION-SCREEN OUTPUT.
      IF CAL_TRA = 'X'.
        LOOP AT SCREEN.
          IF SCREEN-GROUP1 = 'BL1'.
            SCREEN-ACTIVE = '1'.
          ENDIF.
          IF SCREEN-GROUP1 = 'BL2'.
            SCREEN-ACTIVE = '0'.
          ENDIF.
          MODIFY SCREEN.
        ENDLOOP.
      ENDIF.
      IF SESSION = 'X'.
        LOOP AT SCREEN.
          IF SCREEN-GROUP1 = 'BL1'.
            SCREEN-ACTIVE = '0'.
          ENDIF.
          IF SCREEN-GROUP1 = 'BL2'.
            SCREEN-ACTIVE = '1'.
          ENDIF.
          MODIFY SCREEN.
        ENDLOOP.
      ENDIF.
    *                     At  Selection-Screen                             *
    AT SELECTION-SCREEN.
      PERFORM VALIDATE_MANDATORY_FIELDS.
    *****************            INITIALIZATION         ********************
    INITIALIZATION.
      LOC_DATE  = SY-DATUM - 1.
    *                       Start of Selection                             *
    START-OF-SELECTION.
      V_FILE = P_FILE.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          FILENAME                = V_FILE
          FILETYPE                = 'ASC'
          HAS_FIELD_SEPARATOR     = ' '
        TABLES
          DATA_TAB                = IT_SALES
        EXCEPTIONS
          FILE_OPEN_ERROR         = 1
          FILE_READ_ERROR         = 2
          NO_BATCH                = 3
          GUI_REFUSE_FILETRANSFER = 4
          INVALID_TYPE            = 5
          NO_AUTHORITY            = 6
          UNKNOWN_ERROR           = 7
          BAD_DATA_FORMAT         = 8
          HEADER_NOT_ALLOWED      = 9
          SEPARATOR_NOT_ALLOWED   = 10
          HEADER_TOO_LONG         = 11
          UNKNOWN_DP_ERROR        = 12
          ACCESS_DENIED           = 13
          DP_OUT_OF_MEMORY        = 14
          DISK_FULL               = 15
          DP_TIMEOUT              = 16
          OTHERS                  = 17.
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    *&      Form  VALIDATE_MANDATORY_FIELDS
    *       text
    FORM VALIDATE_MANDATORY_FIELDS.
      IF P_FILE IS INITIAL OR O_FILE IS INITIAL.
        MESSAGE E000 WITH 'ENTER BOTH THE FILE NAMES'.
      ENDIF.
      IF CAL_TRA = 'X'.
        IF MODE IS INITIAL OR UPDATE IS INITIAL.
          MESSAGE E000 WITH 'ENTER BOTH THE OPTIONS'.
        ENDIF.
        IF SY-SUBRC <> 0.
          IF MODE <> 'A' OR MODE <> 'E' OR MODE <> 'N'
          OR MODE <> 'a' OR MODE <> 'e' OR MODE <> 'n'.
            MESSAGE E000 WITH 'Mode should be either A, E or N'.
          ENDIF.
          IF UPDATE <> 'S' OR UPDATE <> 'A'
          OR UPDATE <> 's' OR UPDATE <> 'a'.
            MESSAGE E000 WITH 'Mode should be either S or A'.
          ENDIF.
        ENDIF.
      ENDIF.
      IF SESSION = 'x'.
        IF SES_NAM   IS INITIAL
        OR KEP_TRAS  IS INITIAL
        OR LOC_DATE  IS INITIAL
        OR USER      IS INITIAL.
          MESSAGE E000 WITH 'ENTER ALL THE FIELDS'.
        ENDIF.
      ENDIF.
    ENDFORM.                    "VALIDATE_MANDATORY_FIELDS
    Regards
    vijay

  • How to disable save button on selection screen (1000) run from other report

    Hi Experts,
    Can any one let me know how to disable save button on selection screen (1000) run from other report.
    Say I am running from report R1 which submits report R2, but the save button should be disabled on
    report R2(selection screen 100).
    Thanks in advance.
    Regards
    RP.

    Hi RPReddy16 ,
    Try this:
    DATA :BEGIN OF t_extab occurs 0,
                     fcode like rsmpe-func,
                 END OF t_extab.
    REFRESH T_EXTAB.
    MOVE 'SAVE' TO T_EXTAB-FCODE.
    APPEND T_EXTAB.
    CLEAR T_EXTAB.
    SET PF-STATUS 'STATUS' EXCLUDING T_EXTAB.
    Regards,
    José

  • How to disable execute button in selection-screen

    Hi,
    I have already placed a execute button in selection screen but now I want to diable
         1. All std  buttons including F8
         2.   but excluding F1
    regards
    paul

    Hi
    Check this FM : RS_SET_SELSCREEN_STATUS
    sample code :
    DATA: BEGIN OF i_exc OCCURS 0,
           code LIKE sy-ucomm,
       END OF i_exc.
      DATA: ws_repid like sy-repid.
      CLEAR i_exc.
      i_exc-code = 'ONLI'.
      APPEND i_exc.
      MOVE: sy-repid TO ws_repid .
      CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'
        EXPORTING
          p_status  = ' '
          p_program = ws_repid
        TABLES
          p_exclude = i_exc.
    Laxman
    Message was edited by: Laxmana Kumar

  • How to Add Push Button On Selection Screen

    Hi Experts,
    How to add Push button on Selection Screen.
    Points will b rewarded for useful help.
    Bohra.

    Hi,
    To create a pushbutton on the selection screen, you use:
    SELECTION SCREEN PUSHBUTTON [/]<pos(len)> <push>
    USER-COMMAND <ucom> [MODIF ID <key>].
    The [/]<pos(len)> parameters and the MODIF IF addition have the same function as for the formatting options for underlines and comments.
    <push> determines the pushbutton text. For <push>, you can specify a text symbol or a field name with a maximum length of eight characters. This character field must not be declared with the DATA statement, but is generated automatically with length <len>. The field must be filled before the selection screen is called.
    For <ucom>, you must specify a code of up to four characters. When the user clicks the pushbutton on the selection screen, <ucom> is entered in the UCOMM of the SSCRFIELDS interface work area. You must use the TABLES statement to declare the SSCRFIELDS structure. The contents of the SSCRFIELDS-UCOMM field can be processed during the AT SELECTION-SCREENevent.
    Ex.
    REPORT DEMO.
    TABLES SSCRFIELDS.
    DATA FLAG.
    SELECTION-SCREEN:
    BEGIN OF SCREEN 500 AS WINDOW TITLE TIT,
    BEGIN OF LINE,
    PUSHBUTTON 2(10) BUT1 USER-COMMAND CLI1,
    PUSHBUTTON 12(10) TEXT-020 USER-COMMAND CLI2,
    END OF LINE,
    BEGIN OF LINE,
    PUSHBUTTON 2(10) BUT3 USER-COMMAND CLI3,
    PUSHBUTTON 12(10) TEXT-040 USER-COMMAND CLI4,
    END OF LINE,
    END OF SCREEN 500.
    AT SELECTION-SCREEN.
    CASE SSCRFIELDS.
    WHEN 'CLI1'.
    FLAG = '1'.
    WHEN 'CLI2'.
    FLAG = '2'.
    WHEN 'CLI3'.
    FLAG = '3'.
    WHEN 'CLI4'.
    FLAG = '4'.
    ENDCASE.
    START-OF-SELECTION.
    TIT = 'Four Buttons'.
    BUT1 = 'Button 1'.
    BUT3 = 'Button 3'.
    CALL SELECTION-SCREEN 500 STARTING AT 10 10.
    CASE FLAG.
    WHEN '1'.
    WRITE / 'Button 1 was clicked'.
    WHEN '2'.
    WRITE / 'Button 2 was clicked'.
    WHEN '3'.
    WRITE / 'Button 3 was clicked'.
    WHEN '4'.
    WRITE / 'Button 4 was clicked'.
    WHEN OTHERS.
    WRITE / 'No Button was clicked'.
    ENDCASE.
    This example defines four pushbuttons on a selection screen that is displayed as a
    dialog box. The selection screen is defined in a statement chain for keyword
    SELECTION-SCREEN.
    If the text symbols TEXT-020 and TEXT-040 are defined as 'Button 2' and 'Button 4',
    the four pushbuttons appear as follows on the selection screen displayed as a dialog box.
    Regards,
    Bhaskar

  • Radio button in selection screen and push button

    Hi experts,
    I want to give radio button in selection screen side by side.
    how we can do this on slection screen.
    secondly i want to resize push button on selection screen.
    please provide me the exact solution.
    thanks
    babbal

    Hi babbal,
    For Your Requriment yo can go to tcode se51 & then give ur program name & give screen number as 1000 because 1000 is default screen for all the programs and in se51 Press Layout button & then you can make changes to the Selection screen according to your requriment
    Hope it will be Helpfull.......!!
    Thanks & Regards,
    Bhushan

  • Button on selection screen to link with PDF

    Hello,
    I have a customer request to provide documentation for each transaction on its selection screen. So they want to have a button on selection screen which should download PDF file stored on SAP application server. Is this possible (they said it is) and where can I found some instructions how to implement this.
    Thanks for your answers.
    Tomi

    Ok guys ... thanks but I found solution just in case someone else needs it:
    It works ... just upload PDF document with SMW0 and this program can display it:
    data: docu_key TYPE WWWDATATAB VALUE 'ZPP_DOCU_ZPPGM',
          DOC_BEZ(10) TYPE C VALUE '123test'.
      DATA:
            l_tmp_path            TYPE rlgrap-filename,
            l_filename            TYPE rlgrap-filename,
            l_extension           TYPE rlgrap-filename,
            l_file                TYPE string.
    l_filename = doc_bez.
      CONCATENATE 'MI' docu_key INTO docu_key.
      CALL FUNCTION 'WWWPARAMS_READ'
        EXPORTING
          relid                  = docu_key-relid
          objid                  = docu_key-objid
          name                   = 'fileextension'
        IMPORTING
          value                  = l_extension
        EXCEPTIONS
         ENTRY_NOT_EXISTS       = 1
          OTHERS                 = 2
      IF sy-subrc NE 0.
        "MESSAGE s521 RAISING no_docu_disp.
        EXIT.
      ENDIF.
      CALL FUNCTION 'GUI_GET_DESKTOP_INFO'
        EXPORTING
          type   = 4
        CHANGING
          return = l_tmp_path.
      concatenate l_tmp_path '\' l_filename l_extension into l_tmp_path.
      call function 'DOWNLOAD_WEB_OBJECT'
           exporting
                key         = docu_key
                destination = l_tmp_path
           changing
                temp        = l_filename.
      l_file = l_tmp_path.
      CALL METHOD cl_gui_frontend_services=>execute
        EXPORTING
          document               = l_file
          synchronous            = ' '
          operation              = ' '
        EXCEPTIONS
          cntl_error             = 1
          error_no_gui           = 2
          bad_parameter          = 3
          file_not_found         = 4
          path_not_found         = 5
          file_extension_unknown = 6
          error_execute_failed   = 7
          synchronous_failed     = 8
          not_supported_by_gui   = 9
          OTHERS                 = 10.

  • Command Button on selection screen application tool bar

    Hi All,
    I want to add command Button on selection screen application bar.
    it is my z progarm .
    please suggest one sample code .
    regards,
    Ajay reddy

    Goto SE41, create a Status and the call it in your app.
    SET PF-STATUS 'TEST'.
    Greetings,
    Blag.

  • Custom button at selection screen toolbar

    Hi All,
    I have a requirement to add button at selection screen toolbar. Once this button was hit another program should be called.
    Do you have any idea on how to do this. Appreciate your help.
    Thanks in advance.

    Hi,
    To add custom Button to your selection screen see the below example-
    TABLES: SSCRFIELDS.
    TYPE-POOLS ICON.
    PARAMETERS: p_bukrs TYPE bukrs.
    INITIALIZATION:
      V_FUNCTXT-ICON_ID = ICON_XXX.                          " Add Icon to button if you want.
      V_FUNCTXT-QUICKINFO = 'xxxx'.                            " Text to be displayed when you hover mouse over the button
      V_FUNCTXT-ICON_TEXT = 'yyyy'.                           " Text to be dsipalyed on button.
      SSCRFIELDS-FUNCTXT_01 = V_FUNCTXT.
    AT SELECTION-SCREEN.
      CASE SSCRFIELDS-UCOMM.
        WHEN 'FC01'.                                                           " Handle the click on button. By default this function code will be
    to your
          "Your logic
      ENDCASE.

  • Code for execute button on selection screen to get result

    hi experts,
    I need a help for writing a code for execution button on selection screen.Like in normal report on abap editor
    we insert selection criteria like number and we get the result according that particular number on next screen.
    same thing i am trying here also. So i am writing a code on button that when i press the button it will go to the next
    screen according to the selection criteria.
    Plz help me helpful answers are appriatiated !!!
    Thanks & regards
    Vipul Gupta

    hi,
    In the OnAction write :
    1. get the values entered in selection criteria using :
    DATA lo_nd_cn_check TYPE REF TO if_wd_context_node.
        DATA lo_el_cn_check TYPE REF TO if_wd_context_element.
        DATA ls_cn_check TYPE wd_this->element_cn_check.
        DATA lv_ca_check LIKE ls_cn_check-ca_check.
      navigate from <CONTEXT> to <CN_CHECK> via lead selection
        lo_nd_cn_check = wd_context->get_child_node( name = wd_this->wdctx_cn_check ).
      get element via lead selection
        lo_el_cn_check = lo_nd_cn_check->get_element(  ).
      get single attribute
        lo_el_cn_check->get_attribute(
          EXPORTING
            name =  `CA_CHECK`
          IMPORTING
            value = lv_ca_check ).
    Now lv_ca_check has your value entered in Selection criteria.
    2.  write the select query to fetch data according to selection criteria.
        select *  from <table> into correponding field of table <internl table>
           where Field = lv_ca_check.
    3. Now in the internal table <internl table> you have values according to search criteria.
    4. Bind the internal table with node  which is binded to table to show data.
    lo_nd->bind_table( internaltable ).
    I hope it is clear .

  • Button in selection screen

    Hello Gurus ,
    I want to insert data from selection screen into my ztable , I have activated save button in menu bar , with function text SAVE and function type , E , S ,  null , H , P all I have tesated , but it is not working , with case sy-ucomm , when 'SAVE' .
    In same way Print is working but not save .I am not getting the prob .
    Is there any problem , plz help me , I m in hurry .
    I am waiting for  all of your valuable reply .
    Regards,
    Joy .

    Hi Joy,
    Check out the below related threads for placing the push buttons ... Frame logic accordingly as per your requirement ..
    push button in selecion screen
    Push button on selection screen
    push button on selection screen\
    PUSH Button in Selection Screen

  • Radio button and selection screen

    hi
    my requirement is that if the user enters some particular combination of value in the select options and clicks a particular radio button there should be an error message displayed.
    1)  I am getting the error message in the form a dialog box , but it has only option of  exit , and the user is thrown of the screen. my requirement is that after the error message the user must still be at the same screen so that he can enter new values.
    2)  the code that i have written also has one more anamoly that the displaying of error depends upon the sequence of  actions .
      if  i enter the value in the select option first and then click the radio button then the error message is displayed which is correct.
    but it doesnt work i click the radio button first and then enter the value, the program is executed and NO ERROR message is flashed.
    here is what i have written
    SELECTION-SCREEN BEGIN OF BLOCK blk WITH FRAME.
    SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE  text-001.
    SELECT-OPTIONS: p_year  for  s021-spmon obligatory ,
                    p_kunag  FOR vbrk-kunag  ,
                    p_matnr  FOR vbrp-matnr  ,
                    p_augru  FOR vbrp-augru_auft modif id a1 ,
                    p_vbeln  FOR vbrk-vbeln  .
    SELECTION-SCREEN END OF BLOCK blk1.
    SELECTION-SCREEN BEGIN OF BLOCK blk2 WITH FRAME TITLE  text-002.
    PARAMETERS:  nrw RADIOBUTTON GROUP g1 user-command check,
                 mwd RADIOBUTTON GROUP g1 ,
                 rws RADIOBUTTON GROUP g1 ,
              edu RADIOBUTTON GROUP g1 ,
             standard RADIOBUTTON GROUP g1 default 'X' .
    SELECTION-SCREEN END OF BLOCK blk2.
    SELECTION-SCREEN END OF BLOCK blk.
    at selection-screen output.
       loop at screen.
       if nrw = 'X' and p_augru-low EQ 'MWD'.
           MESSAGE e000(oo) WITH '<Please Enter the correct Order Reason>'.
    endif.
       endloop.
    START-OF-SELECTION.
    CASE 'X'.
    WHEN nrw.
    PERFORM set_dates_nrw.
          PERFORM load_data_nrw.
          PERFORM get_cust_info_nrw.
          PERFORM set_alv_field_cat_nrw.
          PERFORM display_alv_nrw.
    endcase.

    Hi
    Change this piece of code
    at selection-screen output.
    loop at screen.
    if nrw = 'X' and p_augru-low EQ 'MWD'.
    MESSAGE e000(oo) WITH '<Please Enter the correct Order Reason>'.
    endif.
    endloop.
    by
    <b>at selection-screen.
    if nrw = 'X' and p_augru-low EQ 'MWD'.
    MESSAGE e000(oo) WITH '<Please Enter the correct Order Reason>'.
    endif.</b>
    Reward points if useful.
    Regards,
    Atish

Maybe you are looking for