Add push button tp Micro-controller

Hi All,
I appreciate if you read my problem and answer me:).
I am using CSMB12 micro controller, which has port S as a SCI. 2 pins of this port is TXT and 2 pins are RXT. Right now i used one pair of these pins for both Bluetooth and LCD. now I need to add push button to my system, whenever I click on the push button, my micro start working and calculating the program, and whenever i click it again, it stops calculating and show the value on the LCD, and use another button for sending data by Bluetooth.
my problem is:
1-I used one SCI for both LCD and Bluetooth, how can I separate them?
2-Do you have a y sample codes for adding push button switch?
If you need my code, i can upload it.
really thank you.
Regards,
Sb

Just create the the UINavigationController wherever you need to show its root view controller. With no storyboard segue you would typically use something like this. I initiated from a UIButton action for this example. Instead of a generic UITableViewController, use the custom view controller class of your root view controller (PauseMenuTableViewController?). If you are using old-school nib/xib, replace initWithStyle with initWithNibName.
- (IBAction)showWhateverViewButtonClick:(id)sender {
    // create whatever view controller type will be the root of the navigation controller
    UIViewController *rootViewController = [[UITableViewController alloc] initWithStyle:UITableViewStylePlain];
    // create a navigation controller using that view controller for the root
    UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:rootViewController];
    // show the navigation controller (modal)
    [self presentViewController:navigationController animated:YES completion:NULL];

Similar Messages

  • How to add push button in function module

    I want to add Push button( yes/no) in same screen. I used POPUP_TO_CONFIRM,
    but this popup is coming on next screen when I click on cancel button.

    There is no scope to create a push button in application tool bar. Instead of that we can add in a menu bar.

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

  • 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

  • How to add push button in alv display with out class or method

    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

    You should post your question in the ABAP forum.
    ABAP Development

  • How to add push button in application tool bar in SAP transaction VA01

    How to add push button in application tool bar in SAP standard transaction VA01 and how to implement the code for that function code.

    There is no scope to create a push button in application tool bar. Instead of that we can add in a menu bar.

  • I need to add push button to last extended price unit in sale order item B

    i need to add push button to field  last extended price unit in sale order item additional data B

    i need to add push button to field  last extended price unit in sale order item additional data B

  • How to add push button in report.

    Hi,
    how to add a push button in the standard list report and on clicking which the line-size of the screen should reduce from 300 to 100.
    how to proceed.
    Can anyone help me.
    Regards
    Guhapriyan

    Hii Guhapriyam,
    You can ceate PUSHBUTTON in selection-screen like Below
    SELECTION-SCREEN PUSHBUTTON 2(10) text-004 USER-COMMAND CL1.
    Create a variable to hold the processed PUSHBUTTON value like
    DATA v_flag TYPE flag.
    The PUSHBUTTON will be processed at the event AT SELECTION-SCREEN. So write your code like below
    AT SELECTION-SCREEN.
       IF sy-ucomm EQ 'CL1'.
         v_flag = 1.          "Buttob clicked
       ENDIF.
    START-OF-SELECTION.
    IF v_flag EQ 1.
         NEW-PAGE LINE-SIZE 100.
    ENDIF.
    OR
    The best way of doing this by setting PF-STATUS like
    START-OF-SELCTION.
    SET PF-STATUS 'ZSTATUS'.  "Double click on this and set the pushButton in standard toolbar option and in function key specify the BACK, EXIT and CANCEL button .
    Then write your logic at the event AT USER-COMMAND.
    AT USER-COMMAND.
       CASE sy-ucomm.
         WHEN 'RED'.
           NEW-PAGE LINE-SIZE 100.
         WHEN 'BACK' OR 'CANCEL' OR 'EXIT'.
           LEAVE SCREEN.
         WHEN OTHERS.
       ENDCASE.
    regards
    Syed

  • How to add push button on UI?

    Hi,
    I would like to add a push button 'PROCESS' on one assignment block. When user selects the pushbutton I would like to execute some custom functionality. How do I achieve this?
    Regards,
    Akash

    Hi,
      Please add the below code in the htm page of your view
    <thtmlb: button id = Search
    on Click = Search
    text = Search
    tooltip = Search />
    Regards,
    Lakshmi.Y
    Edited by: Lakshmi Soujanya on Jun 7, 2011 11:09 AM
    Edited by: Lakshmi Soujanya on Jun 7, 2011 11:11 AM

  • Wan to add push button in the output of ALV Grid display.

    Hi Friends,
    I wan to add a Push button in the output of ALV GRID display with STANDARD ikons.
    How to copy standard ikons of GRID output.
    How to apply the copied status into my code.
    Regards,
    Viji

    Hi,
    Goto SE41, create a pf-status for your alv report program.
    On the next screen, click menu EXTRAS --> click option ADJUST TEMPLATES and select radiobutton LIST VIEWER --> you will get all standard buttons of alv in the pf-status.
    Delete the unwanted buttons and also you can add new buttons if reqd.
    Activate pf-status --> and apply in alv program.
    Now to apply this pf-status in your alv report follow code:-
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
         i_callback_program                = v_rep_id       " report id
         i_callback_pf_status_set          = 'PF'           " for PF-STATUS
         i_callback_user_command           = 'USER_COMMAND' " for User-Command
         is_layout                         = wa_layout      " for layout
         it_fieldcat                       = it_field       " field catalog
         it_sort                           = it_sort        " sort info
        TABLES
          t_outtab                          = it_final      " internal table
       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  pf
    *       SUB-ROUTINE PF IS USED TO SET THE PF-STATUS OF THE SCREEN
    *       ON WHICH THE ALV GRID IS DISPLAYED
    *       -->RT_EXTAB
    FORM pf USING rt_extab TYPE slis_t_extab.
      SET PF-STATUS 'ZTG_STAT'. "<--pass pf-status name here
    ENDFORM.                    "pf
    *&      Form  USER_COMMAND
    *       SUB-ROUTINE USER_COMMAND IS USED TO HANDLE THE USER ACTION
    *       AND EXECUTE THE APPROPIATE CODE
    *      -->LV_OKCODE   used to capture the function code
    *                     of the user-defined push-buttons
    *      -->L_SELFIELD   text
    FORM user_command USING lv_okcode LIKE sy-ucomm l_selfield TYPE slis_selfield.
    * assign the function code to variable v_okcode
      lv_okcode = sy-ucomm.
    * handle the code execution based on the function code encountered
      CASE lv_okcode.
        WHEN '<function_code>'. "<--to handle user actions
      ENDCASE.
    ENDFORM.                    "USER_COMMAND
    Hope this helps you.
    Regards,
    Tarun

  • Add  push button to Serial number tab in migo transaction

    Hi all,
    I need to add an upload push button to the tab screen of serial numbers in migo transaction.Is there any exit, or badi,or enhancement spot for this.
    Thanks & regards,
    Srilakshmi.

    Hi Ritvik,
    you will not need it.
    The item methods will process exactly the item what the addional item data are related to. In PBO_DETAIL and PAI_DETAIL, use parameter I_LINE_ID for the item reference.
    Note: Not only read SCN etc,  also the parameters desciption of the methods used.
    Regards,
    Clemens

  • 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 push button in alv list

    Dear all,
         I am doing ALV report, in that i have some requirements as mentioned below
    6.     In the main report screen, each row should have a selection button at the left end. The entire row should be selectable by clicking on this button. By clicking on the button a second time the row gets deselected. The user should be able to select only one row at a time (i.e. he should not be able to select multiple rows simultaneously).
    7.     All Report screens should have standard SAP Navigation buttons.
    8.     The main Report Screen should have a “Refresh” Button. When the user clicks on this Refresh button the program should remember and re-execute (i.e. refresh) the “last selection of the user in the Selection Screen above” and the Main Report Screen should be re-displayed accordingly.
    pleae help on me,
    Regards ,
    Sudhakar.

    hi
    good
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e8a1d690-0201-0010-b7ad-d9719a415907
    http://www.sap-img.com/abap/what-are-the-events-in-alv.htm
    reward point if helpful.
    thanks
    mrutyun^

  • How to add a push button in ALV Grid Top-of-page

    Is it possible to add a push button to the top-of-page in Alv grid display?if yes, then how? I am not using OO ABAP and am using reuse_alv_grid_display with top-of-page event.

    Hi,
    I am not sure whether we can add push button in top-of -page or not. But instead of that if you want to add button on toolbar as per your requirement then follow below link. it will useful.
    http://www.sap-img.com/abap/example-of-a-simple-alv-grid-report.htm
    Ram.

  • Need to add push botton in my selection screen

    Hi
    I am doing a report program . I need to add PUSH BUTTON in my selection screen can u give me any code or suggestions for this.
    IF i press this push button i should get the basic list.
    Regards
    Rasheed.

    Hi Here is a another example.
    U can place a Push button on selection screen by using the satatement..
    SELECTION-SCREEN PUSHBUTTON 2(10) butt USER-COMMAND cli3.
    The push button will start from second character position on Selection screen and of length 10 characters !!
    check this program...
    TABLES sscrfields.
    DATA flag(1) TYPE c.
    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.
    MESSAGE i888(sabapdocu) WITH text-001 sscrfields-ucomm.
    CASE sscrfields-ucomm.
    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.
    Reward me if its helpful.
    Regards
    Ravi

Maybe you are looking for