Add a button on normal screen ?

hi,
what's the screen for showing the content of ' write' statement,  and i want to add a button on this screen, how ?
thanks

Hi Zhang,
Please refer this code from help.sap.com
TABLES sscrfields.
TYPE-POOLS icon.
SELECTION-SCREEN:
  BEGIN OF SCREEN 500 AS WINDOW TITLE title,
    PUSHBUTTON 2(10)  but1 USER-COMMAND cli1,
    PUSHBUTTON 12(30) but2 USER-COMMAND cli2
                           VISIBLE LENGTH 10,
  END OF SCREEN 500.
AT SELECTION-SCREEN.
  CASE sscrfields.
    WHEN 'CLI1'.
    WHEN 'CLI2'.
  ENDCASE.
START-OF-SELECTION.
  title  = 'Push button'.
  but1 = 'Button 1'.
  CALL FUNCTION 'ICON_CREATE'
    EXPORTING
      name   = icon_information
      text   = 'Button 2'
      info   = 'My Quickinfo'
    IMPORTING
      RESULT = but2
    EXCEPTIONS
      OTHERS = 0.
  CALL SELECTION-SCREEN '0500' STARTING AT 10 10.
Reward points if useful.
Regards,
Atish

Similar Messages

  • 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

  • Add a button on ME53N screen

    Hi All,
    My requirement is to add a button to the application toolbar in the same line where we find "Document Overview On" button in ME52N/ME53N and add some functionality to it. I have searched for user exits and BADI's but no luck yet. Does anyone know a User exit or BADI or a way to get this done?
    Any help is greatly appreciated.
    Regards,
    Min.

    No
    Don't clone the program
    I think it shold be better to add the button in the screen-exit and manage them there,
    but if you really need to add the button in the toolbar, then you need to change it, so you need to change the user-command too,, but you can try to use the badu me_process_req_cust
    Max

  • FI Report Painter (FGI1) - add new button in output screen

    Hi all,
    I have a report created by tcode FGI1 (Create Drill-down Report) which bases on form 0SAPBSPL-01 (Fin. Statement: Actual/Actual Comparison). I wanna know if there are any ways to add a new button in output screen after report execution (i.e to print the content into smartforms).
    Thanks in advance.
    Solaris.

    Instead of creating after the output you can add the button to create the form on the main screen itself i.e. program SAPMKCEE screen1125. Either on the application tool bar or on the screen 1125.

  • ADD push button in selection-screen

    Hi Guys,
    I have a requirement.
    In the selection screen on the report, I need a push button "Click".
    When i "Click"  First Time this it should display all the selection screen Blocks B1,B2,B3 from my selection screen.
    For second "Click" it should Hide the Blocks B1,B2,B3.
    I am doing the following code in my report:
    But for first Click it is displaying the Blocks.And for the Second click it is not Hiding.
    Please suggest on this.....
    initialization.
      if screen-group1 = 'A1' .
                screen-active = 0.
                modify screen.
              endif.
            endloop.
            loop at screen.
              if screen-group1 = 'A2' .
                screen-active = 0.
                modify screen.
              endif.
            endloop.
            loop at screen.
              if screen-group1 = 'A3' .
                screen-active = 0.
                modify screen.
              endif.
            endloop.
    I am using " At selection screen:
    at selection-screen.
    if gv_flag = space.
            loop at screen.
              if screen-group1 = 'A1' .
                screen-active = 1.
                modify screen.
              endif.
            endloop.
            loop at screen.
              if screen-group1 = 'A2' .
                screen-active = 1.
                modify screen.
              endif.
            endloop.
            loop at screen.
              if screen-group1 = 'A3' .
                screen-active = 1.
                modify screen.
              endif.
            endloop.
            gv_flag = 'X'.
          elseif gv_flag = 'X'.
                  loop at screen.
              if screen-group1 = 'A1' .
                screen-active = 0.
                modify screen.
              endif.
            endloop.
            loop at screen.
              if screen-group1 = 'A2' .
                screen-active = 0.
                modify screen.
              endif.
            endloop.
            loop at screen.
              if screen-group1 = 'A3' .
                screen-active = 0.
                modify screen.
              endif.
            endloop.
            gv_flag = space.
    endif.

    You are hiding it in INITIALIZATION block which means it hides only once before PBO. If you want to show/hide it in turn simply place all your code in PAI, not just part of it.
    Regards
    Marcin
    Sorry didn't notice part of the code in the bottom
    The logic should go like
    at selection-screen.
    if gv_flag = space.
    loop at screen.
      case screen-group1.
         when 'A1' or 'A2' or 'A3'    
            screen-active = 1.
            modify screen.
         when others.
       endcase.
    endloop.
    gv_flag = 'X'.
    elseif gv_flag = 'X'.
       loop at screen.
          case screen-group1.
               when 'A1' or 'A2' or 'A3'.
                screen-active = 0.
                modify screen.
             when others.
        endcase.
    endloop.
      gv_flag = space.
    endif.
    Regards
    Marcin
    Edited by: Marcin Pciak on Apr 1, 2011 12:33 PM

  • How to add display button(ICON) on standard report screen?

    Hi,
    I have to add display button after the excute button on the standard selection screen of the report.
    could you please guid me how to do that i was trying with below but it does not reflect.
    TABLES:  sscrfields.
    TYPE-POOLS: slis, icon.
    INITIALIZATION.
    Add display button to selection screen
      functxt-icon_id   = ICON_DISPLAY.
      functxt-quickinfo = text-007.
      sscrfields-functxt_01 = functxt.
    Thanks,
    Rajesh
    Edited by: Rajesh Gupta on Nov 16, 2010 3:28 PM

    Hi
    TABLES: sscrfields.
    TYPE-POOLS: slis, icon.
    PARAMETERS: p_bukrs LIKE t001-bukrs.
    SELECTION-SCREEN FUNCTION KEY 1.
    INITIALIZATION.
    * Add display button to selection screen
      sscrfields-functxt_01 = icon_display.
    In selection-screen you need to active the button by statament SELECTION-SCREEN FUNCTION KEY
    Max

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

  • Add custom button in MR11

    Hi,
    We want to add cusotm button on output screen of MR11.
    How can we add button on output screen of MR11?
    Regards,
    Jigar Thakkar.

    Hi Husalban,
    We added customer button in the rfx iview.
    When you finish the configuration adding, you can go to the WDA component 'FPM_OIF_COMPONENT'/View:CNR_VIEW/Methord:ONACTIONBUTTON_PRESSED.
    You can make repair here or continue to find the rfx PDO class.
    Please be careful when you decide to make repair code and considerate the upgrade.
    In the methord ONACTIONBUTTON_PRESSED,please refer to follow code:
    ***---->Add By lorry for test Action
        IF lv_event_id = 'ZAPPWLF' OR lv_event_id = 'ZAPPWLF_VIEW'.
    *****************Get the Parameter Vaule
          DATA:lt_keys TYPE STANDARD TABLE OF string,
               lv_key        LIKE LINE OF lt_keys.
          TYPES:BEGIN OF y_parameters,
                name TYPE string,
                value TYPE string,
                END OF y_parameters.
          DATA lt_parameters TYPE STANDARD TABLE OF y_parameters.
          DATA ls_parameter LIKE LINE OF lt_parameters.
          lt_keys = lo_fpm->mo_app_parameter->get_keys( ).
          LOOP AT lt_keys INTO lv_key.
            ls_parameter-name = lv_key.
            lo_fpm->mo_app_parameter->get_value(
             EXPORTING
             iv_key = lv_key
             IMPORTING
             ev_value =  ls_parameter-value
            INSERT ls_parameter INTO TABLE lt_parameters.
          ENDLOOP.
          DATA:ls_boid   TYPE bbp_guid,
               ls_botype TYPE string,
               ls_mode   TYPE string.
          CLEAR ls_parameter.
          READ TABLE lt_parameters INTO ls_parameter WITH KEY name = 'SAPSRM_BOID'.
          ls_boid = ls_parameter-value.
          CLEAR ls_parameter.
          READ TABLE lt_parameters INTO ls_parameter WITH KEY name = 'SAPSRM_BOTYPE'.
          ls_botype = ls_parameter-value.
          IF ls_botype = 'BUS2200'.
          ENDIF.
    ENDIF.

  • Add Print button

    Hi All,
    I need to add print button to the screen can you please help with the issue
    Thanks in Advance
    Ritika

    You are working in Web Dynpro ABAP. It may be a better idea to post your query in [right forum|Web Dynpro ABAP;.

  • Add button to SNC screen

    Dear Experts,
    I have a requirement in SNC system.
    Requirement: Add a new button on screen Due List for Purchasing Documents, if we click on the button it has to open a new screen where we should have a file browse filed, browse and upload buttons to upload ASN details from presentation server.
    am using,
    WebDynpro Component: /SCF/UIWD
    WebDynpro Application: /scf/snc_s
    I have used following details to add button and acheived to add button alone, but how can I assing action/event, where can I create the screen, where can I write code and how can I assign this to button action.
    ApplicationID: ICH
    ScreenID: DUELIST
    ComponentID: DLRLTLR1
    Please help me out, almost from 2 weeks am doing R and D on it.
    Thanks in advance
    Pallu

    Thanks for your inputs Sai, but here the screen design is not static as normal webdynpro, normally we add a button and in OnAction property we create new action and we write code for the corresponding method, but in my case (expecially in SNC) everything I need to do with configurations, the transaction for screeen configuraitons is /N/SCF/SCREENCFG, and the BADI which I used for adding button is /SCF/UIMDL_APPCUST, you can find these details only in SNC (Supply Network and Collaboration) system.
    Please try with inputs again.
    Thanks again in advance!
    Pallu!!

  • How to add push buttons in out put screen of ALV

    Hai,
    How to add push buttons in out put screen of ALV (tool bar) with out using classes or methods .I want to know using normal ALV .
    Thanks in advance .
    kiran

    Hi Kiran,
    Here is the sample code.If you are using reuse_alv_grid_display, no need to write code in PBO.
    Just double click the 'TEST' which is written in code.Then create a GUI Status.In Application toolbar,type the name of the button you want(say BUTTON).Then double click that name.Then enter the ICON name and function text.Activate it.This itself will work.If you want all the functionalities,then try to do as Vinod told.
    TYPE-POOLS: slis.
    DATA: i_qmel LIKE qmel OCCURS 0.
    data v_repid type repid.
    SELECT * FROM qmel INTO TABLE i_qmel.
    v_repid = sy-repid.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
       I_CALLBACK_PROGRAM                = v_repid
       I_CALLBACK_PF_STATUS_SET          = 'SET_PF_STATUS'
       I_CALLBACK_USER_COMMAND           = 'USER_COMMAND'
       i_structure_name                  = 'QMEL'
      TABLES
        t_outtab                          = i_qmel
      EXCEPTIONS
        program_error                     = 1
        OTHERS                            = 2.
    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 set_pf_status using rt_extab type slis_t_extab.
    set pf-status '<b>TEST</b>'.
    endform.
    FORM user_command USING ucomm LIKE sy-ucomm
                             selfield TYPE slis_selfield.
    data lv_ucomm type sy-ucomm.
    lv_ucomm
    = sy-ucomm.                                        
      CASE lv_ucomm.
        WHEN 'BUTTON'.                              "Double Click line Item
          call transaction 'MM01'.
      endcase.
    endform.

  • The Add Printer button on the eprintcenter website on my screen is not working.

    I just registerd on the eprintcenter.com site and now I am trying to click on the +Add Printer button/icon to add my printer and it is not working. I have tried it in all different web browsers and it doesn't take me anywhere on any of the browsers. Sometimes I get the "javascript&colon;void(0)" message down in the left hand bottom portion of my screen when my mouse goes over that button. What is wrong? Is it your site or my computer?

    I'm having same problem

  • I'm trying to add my Linux netbook to my sync account but both my windows computers will not show the "Add Device" button in any of the sync management screens

    I'm trying a new Linux build on a net book that I use for playing with non windows OS. In the process of setting up the fresh OS install I wanted in get my Firefox account set up to that I didn't have to spend lots of time working on that one thing. I'm no stranger to the browser sync and have attached several of my computers and tablets with a number of different OS to the account with little trouble including the Firefox of the previous Linux build that was on the net book. The problem now is that on both of my to main computers, a windows 7 desktop and a windows 8.1 tablet, both running the latest Firefox, I am unable to find the "add device" button in any of the sync management screens. This includes the browsers built in options screen as well as the Firefox manage account page. The first gives me options for disconnecting the account, going to the manage screen, several check boxes for what can be synced, and the device name. The manage screen, after logging in, only give me options for signing out, changing password, and deleting the account. Any help figuring out why the add device button seem to be missing from both these devices would be greatly appreciated.

    Please check your Firefox Installation's version. (can be found by clicking the main menu, either clicking or hovering over the help button, and then clicking about firefox in the sub menu). depending on how long ago you set up sync you may still be using the older sync version. firefox 29 introduced a new (and might i add far less tedious) sync version. see [[How to update to the new Firefox Sync|this Mozilla support article]] for information on upgrading your sync to the new version.

  • How to add a button in Sales Order screen?

    Hi,
    Basically I want to add a new button "Show My lookup" in sales order screen and when clicking the button I want to show a form.
    Please anyone tell me how to do this?.
    thanks in advance
    Mina

    Here is a sample ItemEvent that adds a custom button to Sales Order Entry, and loads a form from XML when it is clicked.  Make sure you give the forms unique identifiers when you create them - the sample just uses a hardcoded value.
    Hope it helps,
    John
    Private Sub sboApp_ItemEvent(ByVal FormUID As String, pVal As SAPbouiCOM.IItemEvent, BubbleEvent As Boolean)
        On Error GoTo ErrorHandler
        Dim sboForm                 As SAPbouiCOM.Form
        Dim sboItem                 As SAPbouiCOM.Item
        Dim sboBtn                  As SAPbouiCOM.Button
        Dim objXMLDoc               As MSXML2.DOMDocument
        Dim objXMLErr               As IXMLDOMParseError
        Dim objXMLElem              As MSXML2.IXMLDOMElement
        Dim strIdentifier           As String
        If pVal.EventType = et_FORM_LOAD And pVal.Before_Action = False And pVal.FormType = 139 Then
            'Add Custom Button
            Set sboForm = sboApp.Forms(FormUID)
            Set sboItem = sboForm.Items.Add("AZU_BTN", it_BUTTON)
            sboItem.Top = sboForm.Items("1").Top
            sboItem.Width = "80"
            sboItem.Left = sboForm.Width - 105
            Set sboBtn = sboItem.Specific
            sboBtn.Caption = "Custom Button"
        End If
        If pVal.EventType = et_ITEM_PRESSED And pVal.Before_Action = False And pVal.ItemUID = "AZU_BTN" And pVal.FormType = 139 Then
            strIdentifier = "AZU_XXX" 'You should set this to a unique value each time
            Set objXMLDoc = New MSXML2.DOMDocument
            objXMLDoc.async = False
            objXMLDoc.validateOnParse = True
            objXMLDoc.Load (App.Path & "\Config\AZU_CUSTOM.srf")
            Set objXMLErr = objXMLDoc.parseError
            If (objXMLErr <> 0) Then
                MsgBox "Failed to load XML screen definition."
                Exit Sub
            Else
                For Each objXMLElem In objXMLDoc.getElementsByTagName("form")
                    objXMLElem.setAttribute "uid", strIdentifier
                Next
                sboApp.LoadBatchActions objXMLDoc.xml
            End If
        End If
        Exit Sub
    ErrorHandler:
        MsgBox Err.Number & " " & Err.Description
    End Sub

  • Add new button on SAP R/3 Logon screen( R/3.4.7) to "Forgot the Password"

    HI
    We wanted to add a new option( Forgot password option) on the SAP Logon screen to Change password when they forgot the password.
    But the user exit EXIT_SAPLSUSF_001 only triggers after the Logon.
    *Our Current SAP Version is SAP R/3 4.7
    Is there any other way, which allows,
    1. add a button/ menu option on R/3 LOGON screen to include :"forgot apssword" option.when preseed/selected, it has to execute some piece of  code( our own)  with validation to change the password.
    OR. is it possible to add an hyperlink next to password, and when pressed to execute /call a BSP(??) application to change the password in R/3. ?
    Thanks.

    Hi,
    I think you can try with  GuiXT script.
    Thanks,
    Anitha A

Maybe you are looking for

  • DBMS_MVIEW.ESTIMATE_MVIEW_SIZE rows returned different that the count of..

    Hi, I have done the following... 1.Gathered table stats... SQL> EXEC DBMS_STATS.GATHER_TABLE_STATS('SCOTT','STRDET'); PL/SQL Procedure executed successfully SQL> EXEC DBMS_STATS.GATHER_TABLE_STATS('SCOTT','DETAILS_DET'); PL/SQL Procedure executed suc

  • Bex: overall Result: number of decimal places

    Good day How to I change the number of decimal places for the "Overall result" in a query? Your assistance is appreciated. Cj Faurie

  • I want to stop in frame 1

    I want to stop every action on keyframe  1. I have so many movie clip on layer 1 and layer 2 and so on. Now, I want to stop all movie cip.

  • OS X 10.5.8 cant update

    I checked my mac for software updates.  It currently has Mac OS X 10.5.8 and tells me no software updates are available.  When I try to sync with iTunes it tells me I need to update software to update iTunes.  Any clues??  I just want to update my so

  • JAVA SCRIPT

    I am doing a project in ASP and i wanted to know how can i disable the CLOSE [X] button in IE??.. I want to disable it b'coz the project what i am doing is related to a questionnaire and i want the user to answer all the questions without closing the