SIngle Push Button toggle

On the face of it, when first told it looked a simple requirement : There is a single push - to - on hardware switch which is read by a DAQMX read function as a digital input inside of a 50ms timed loop.  Every time the user pushes the switch momentarily ( momentary can be anything from 100 to 500ms depending on the user's mood), I should toggle the state of a lamp - If its ON it must go OFF and if OFF must come ON.
Enclosing a small code ( in LV8.0) that attempts doing this and  is reasonably successful when the Timed Loop is set for a timing of 1000ms. But do it with 50ms timing ( which is what I want ) and you find getting the required state of the lamp is a challenge of reflexes !!
Yes I can solve the problem easily with a Event structure but the input comes from a field element - hardware switch. And the machine uses code written in LV7.1.
Any suggestions ? 
Raghunathan
LV2012 to Automate Hydraulic Test rigs.
Attachments:
PB_toogle.vi ‏84 KB

Sippy wrote:
Can we do the same thing using hex values. I mean
when 00011110 received I should get 11111110 ( if 7 Led are present in the front panel)
when I  send 00011110 again I should get 11111111 (Last bit toggled)
similarly , when i send 00011101  ---------->  11111101
               when I send 00011101 again -----> 11111101
               when i send 00011011  ---------->  11111011
               when I send 00011011 again -----> 11111011
               when i send 0001011  ---------->  11110111
               when I send 0001011 again -----> 11110111
               when i send 00001111 ---------->  11101111
               when I send 00001111 again -----> 11101111
And any of the bits should not change until I receive the same value again.  And I can send Randamly any of the bit low and corresponding to that my led in front panel should vary.
Plz help me in this.
Your description is ambiguous.  After thte word "similarly", The binary values on the right side do not change.  But in your first statement, the value changes.  It looks like you are wanting a 0 in any bit position meaning to toggle a certain LED.  Yet, your first three binary digits are always 0's and the right side shows no toggling.   You stated you had seven LEDs, but you are showing eight bits.  This is very confusing.  Assuming you had seven LEDs, is this what you want:
               Normal output  1111111
Send 1111110    Output  1111110  (toggles bit 0)
Send 1111111    Output  1111110  (stays the same)
Send 1111110    Output  1111111  (toggles bit 0)
Send 1111101    Output  1111101  (toggles bit 1)
Send 1111101    Output  1111111  (toggles bit 1)
Send 1111010   Outptut  1111010  (toggles bits 0 and 2)
Send 1111101   Outptut  1111000  (toggles bit 1 but leaves 0 and 2 alone)
Send 1111000   Output   1111111  (toggles bits 0,1,2)
In other words, a 0 in any position will toggle the corresponding LED.  Is  this what you want?
- tbob
Inventor of the WORM Global

Similar Messages

  • Push button signal to parallel port to trigger a process

    I just need to connect a push button to the parallel port to set it as a trigger signal for a process.
    When push button is pressed, labview executes a process.
    Kindly help me how to do this, the wiring please
    Regards
    Grugh Mike
    Success is Everything !!
    Solved!
    Go to Solution.

    Data Lines to be used as inputsSome parallel ports can be configured to use the data lines as inputs. It depends a great deal on the way the manufacturer designed the parallel port. With some models the data lines can be read the same way we read the control lines, by driving them to high logic so they will take on the value of an external signal. However, most parallel ports require that you set the direction bit for input. This is bit 5 in the Control register (base+2). If the port is capable of it, setting the direction bit high has the effect of making the lines tri-state so it can be driven externally. Sometimes it is also necessary to toggle bit 6 high or low. However, it should be noted that some manufacturers actually lock these bits so that software cannot change them. An example is shown below in Figure 7.
    To test whether your data lines can be used for input, try the following:
    Set bit 5 of the control register high (at base address+2).
    With nothing connected to the port, write a couple of values to the data port, and read each back after you write it.
    If the reads DON'T match the writes, your port is probably bidirectional. Setting C5 disabled the data outputs and you're reading the open inputs of the data-port buffer. If the reads DO match the writes, your port isn't bidirectional. The data outputs are still enabled, you're reading back what you wrote, and you won't be able to read external signals. If it is possible to use your data lines for input, then you just need to set control register bit 5 high and read from the value of the data lines at the base address.

  • How to edit a particular row in the table ctrl when a push button is clickd

    Hi Experts,
    How to edit a particular row (except the Primary keys) after selecting it in the TABLE CONTROL when a
    push button is clicked in the table control.
    For Eg. If you have a push button say "Modify", the particular row what we select in the table control should be in a
    editable mode after clicking "Modify" Push button.
    Please help me out.
    Thanks in advance.

    Hey Ram,
    Thanks a ton.
    Its working fine...sorry for the late reply.
    The reason behind the delay is because i had modified my code as per your logic it worked fine but the thing is that the whole column was in editable mode but not a single row.
    For E.g  If i want to edit a particular row, first i select the row and then  click on "Modify" button. After i click on the button, the whole column gets in a editable mode including the one which i intentionally selected.
    Here, the solution is that you have to set a flag in PBO so that once it is done with PBO then it need not come back again after we click on "Modify" button.
    And one more query is that after you modify a particular row in the table control ( When it is in editable mode) and click on the "Save" button, it is not getting updated to database.
    To update the database, we need to select the row once again after modifying it and click on the "Save" button.
    Here, database is updating only when it is selected again. If it is not selected, it is not getting updated.
    If you have any alternative solution, then please help me out.( I hope i am clear with the question.)
    Thanks,
    Ananth.

  • Push button set to calculate form

    Hi Friends,
    Ive to create calculator by simple form without any data service. Ive modeled form with push button to assign value from one field to another (push button option->action->system action->dynamic->action->formula with correct pass value from one field to another, but it doesn't work, it means field is empty after push button. do you know how to modeled button to put the result to the field? At the moment value puts to field automatically. I want to control this event by button. How?
    Martin

    Data Lines to be used as inputsSome parallel ports can be configured to use the data lines as inputs. It depends a great deal on the way the manufacturer designed the parallel port. With some models the data lines can be read the same way we read the control lines, by driving them to high logic so they will take on the value of an external signal. However, most parallel ports require that you set the direction bit for input. This is bit 5 in the Control register (base+2). If the port is capable of it, setting the direction bit high has the effect of making the lines tri-state so it can be driven externally. Sometimes it is also necessary to toggle bit 6 high or low. However, it should be noted that some manufacturers actually lock these bits so that software cannot change them. An example is shown below in Figure 7.
    To test whether your data lines can be used for input, try the following:
    Set bit 5 of the control register high (at base address+2).
    With nothing connected to the port, write a couple of values to the data port, and read each back after you write it.
    If the reads DON'T match the writes, your port is probably bidirectional. Setting C5 disabled the data outputs and you're reading the open inputs of the data-port buffer. If the reads DO match the writes, your port isn't bidirectional. The data outputs are still enabled, you're reading back what you wrote, and you won't be able to read external signals. If it is possible to use your data lines for input, then you just need to set control register bit 5 high and read from the value of the data lines at the base address.

  • Dynamic visibility with Push buttons

    Hi ,
    Could anyone please guide me how to use pushbuttons with Dyamic visibilty option.
    Eg:-When I click on Push button1-It should display a bar chart
          When we click on Push button1-It should display a bar chart

    Hopefully it's OK to ask a similar question here rather than create a new thread.
    I would like to use the Label Based Menu component in conjunction with an invisible Toggle Button component (or possibly the new Push Button component).  The hidden button would insert into the same cell that the Label Based Menu component is inserting into.  This allows me to create what looks like a hyperlink in my dashboard that simply affects dynamic visibility.
    This seems to work for the most part, except that the Label Based Menu does not change to reflect the current state accurately.  For example, if both components insert "Apples" or "Bananas" as values into cell A1:
    1. Toggle Button component successfully inserts "Apples" and dynamic visibility works, however
    2. Label Based Menu component still shows "Bananas" as the active menu selection
    I thought I had come across a feature in some components where you could tell the component to update itself based on the changing values in a given insertion cell, but I don't see that now for some reason.

  • Push buttons

    How many application buttons we can put on single selection screen?

    Hi sandeep,
    you use maximum of 83 buttons of size 1 each
    only restriction is that offset you can use can be 83 only
    run the below code
    REPORT  ZUPLOAD line-size 900.
    TABLES sscrfields.
    TYPE-POOLS icon.
    SELECTION-SCREEN:
      BEGIN OF SCREEN 500 AS WINDOW TITLE title,
        PUSHBUTTON 2(2)  but1 USER-COMMAND cli1,
         PUSHBUTTON 4(2)  but3 USER-COMMAND cli3,
          PUSHBUTTON 6(2)  but4 USER-COMMAND cli4,
           PUSHBUTTON 8(2)  but5 USER-COMMAND cli5,
            PUSHBUTTON 10(2)  but6 USER-COMMAND cli6,
        PUSHBUTTON 12(2) but2 USER-COMMAND cli2,
           PUSHBUTTON 14(2)  but9 USER-COMMAND cli9,
         PUSHBUTTON 16(2)  but10 USER-COMMAND cli10,
             PUSHBUTTON 18(2)  but11 USER-COMMAND cli11,
         PUSHBUTTON 20(2)  but12 USER-COMMAND cli13,
          PUSHBUTTON 22(2)  but13 USER-COMMAND cli14,
           PUSHBUTTON 24(2)  but14 USER-COMMAND cli15,
            PUSHBUTTON 26(2)  but15 USER-COMMAND cli16,
        PUSHBUTTON 28(2) but16 USER-COMMAND cli12,
           PUSHBUTTON 30(2)  but7 USER-COMMAND cli7,
         PUSHBUTTON 83(2)  but8 USER-COMMAND cli8,
         PUSHBUTTON 85(2)  but9 USER-COMMAND cli9,
      END OF SCREEN 500.
    AT SELECTION-SCREEN.
    break-point.
      CASE sscrfields.
        WHEN 'CLI1'.
        WHEN 'CLI2'.
      ENDCASE.
    START-OF-SELECTION.
      title  = 'Push button'.
      but1 = 'Button 1'.
    but3 = 'Button 1'.
      but3 = 'Button 1'.
      but4 = 'Button 1'.
      but5 = 'Button 1'.
      but6 = '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.
    at debugger check the value of sscrfields  here you can view every time a button is pressed you get respective values.
    now think you must have got the point
    reward points if info useful

  • LED push button

    Hi,
    Need help in resolving below given 2 issues:
    1. I have a string Combo box(dropdown) having options A,B,C &D. But i need to make these options as  LED push buttons. Is there a way to make a boolean to pass a string value? When pressed A, it should pass the string associated with it(say "Pressure") to the output and when pressed B, it should pass string "Temperature".
    2. I have a device say P1.  it polls for status and value in 2 iterations of a for loop(iteration 0 checks status and iteration 1 checks value). when I create a table, i get 2 entries of the same device, one with status and other with value. I want both value and status in a single entry of the device in the table. Can this be done? If yes then I need to make a subVI of this so that I can make a "show table" button in the mainVI which will display the table only when clicked.
    Please let me know if the above details are not clear. Looking forward to your suggestions and inputs.
    Thanks & Regards,
    Sushruth.
    Solved!
    Go to Solution.

    Thanks a lot for the inputs. Q1 has been resolved. I just made it into an event case. Something like this:
    Its working as I wanted. Regarding the Q2, I will upload the code as soon as possible.
    Regards,
    Sushruth.

  • Push Button Problem in Custom screen

    Hi All..
    Hi All..
    In my custom screen, i have 2 (A1, A2) input boxes with F4 option and a Push Button..
    When i select the data in these input boxes, i will click Push Button (COPY) to transfer the data from these (A1, A2) to other two input Boxes (B1, B2)..
    But data are displaying in (B1, B2), if and only if i click the Push Button 2 times..
    How to make the code to display those data from A1-A2 to B1-B2 by Single click..???

    In PAI, I have coded the lines as follow..
    Still i need to click 2 times to get the data displayed in B1,B2..
    ****PAI*****
    when 'COPY'.
    select bezei from tka01 into (it_sap-name) where kokrs = A1.
    endselect.
    select msehi from tka03 into (it_sap-unit_of_meas)
    where kokrs = A2 and STAGR = A1.
    endselect.
    B1 = it_sap-name.
    B2 = it_sap-unit_of_meas.

  • Trying to create a latching push button using digital inputs

    Hi everyone,
    I'm writing a program to control a motor with 3 push buttons, Up, Down and Stop. I want the Up button to latch when pushed and delatch when Stop or Down are pushed. I've tried the Resettable Latch.vi example program from this website but no luck. It seems like the output  from the AND gate is indeterminate. I've attached my program, Any help would be great! Thanks
    Solved!
    Go to Solution.
    Attachments:
    LatchAttempt.vi ‏140 KB

    Use Index Array to get the single boolean you want from the array.  If you don't wire an index it will give you element 0.  Using this you could have all the switches wired to different pins of the same register on your DAQ device.  Then you could read one byte and sort out which bit does what.  You also need to build the individuale booleans into an array before writing to the DAQ.  Here's a quick example:
    You need to decide which button sets which bit.  I haven't checked the logic of your latch algorithm yet.
    Kelly Bersch
    Certified LabVIEW Developer
    Kudos are always welcome

  • Need to push button sign in

    Hi, 
    Strange behavior occurs on our sharepoint, the sso is in place but when we reach on a page we need to press the bonton sign in to be logguer which was not the case before.
    Have you any idea ?
    Thanks

    Hi,
    According to your post, my understanding is that you needed to push button to sign in after configuring the sso.
    Single Sign On (SSO) has been replaced in SharePoint 2010 by a new service which is called: Secure Store Service (SSS).
    This should get you in the right direction:
    how to create configure consume sharepoint 2010 secure store in business connectivity services
    I recommend to change the IE setting to check whether it works.
    Here is a similar thread for your reference:
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/5b924f7c-ad5a-4331-9134-c99b2bdca24e/sharepoint-2010-single-signon-not-working
    In addition, please check whether the backend server does not support 128-bit NTLM encryption, but UAG was set to require it.
    More information:
    Claims-Based Single Sign-On for Microsoft SharePoint 2010
    SSO (Single Sign On) not working for a published Web Application with UAG
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • How do I use a push button digital trigger with my 6034E DAQ board?

    I am only a Lab View toddler.
    I am currently using a push button, wired to PFIO/TRIG1 and DGND, with a anolog trigger. However noise is causing my program to be triggered. I was told that a digital trigger would help to reduce the random triggering. How do I create a push button digital trigger?
    Thanks

    implement a schmitt trigger.
    Struggling with Labview wrote in message
    <[email protected]>...
    >I am only a Lab View toddler.
    >I am currently using a push button, wired to PFIO/TRIG1 and DGND, with
    >a anolog trigger. However noise is causing my program to be triggered.
    >I was told that a digital trigger would help to reduce the random
    >triggering. How do I create a push button digital trigger?
    >Thanks

  • Push button query!!!!!!! help needed

    hello all,
    I HAVE USED THIS LOGIC FOR MAKING THE DATA ASCENDING AND
    DESECENDING,AND TRIED ALL THE
    SOLUTIONS THAT WERE SUPPLIED BY MY FRIENDS IN THIS GROUP,BUT COULD NOT
    CHANGE THE
    VISUAL ATTRIBUTE OF THE BUTTON.I AM REPEATING MY QUERY.I WANT TO HAVE
    THE
    PUSH BUTTON TO SIGNIFY VISUALLY THE ASCENDING AND DESCENDING DATA I.E
    WHEN THE
    DATA COMES IN THE ASCENDING WAY,THE PUSH BUTTON
    SHOULD HAVE A "inverted v"ACC CODE"" ALONG WITH NAME "ACC CODE" I.E IT SHOULD
    LOOK LIKE "ACC CODE "ACC CODE inverted v "
    AND WHEN THE DATA COMES IN THE DESCENDING WAY,THE PUSH BUTTON
    SHOULD HAVE A " v".I.E IT SHOULD
    LOOK LIKE "ACC CODE "ACC CODE' v' ".SO PLZ HELP me TO GET THIS .
    Any changes should be made to nls_lang parameter in registry???????????
    PLZ LET ME KNOW WHAT IS FONT THAT I SHOULD USE.U CAN CHANGE THE CODING
    THAT I HAVE WRITTEN
    IN THE "WHEN BUTTON PRESSED" TRIGGER OF ACC_CODE.
    BEGIN
    go_block('age_tran');
    BEGIN
    IF
    get_item_property('PB_ACC_ORDER',LABEL)='&Acc Code' THEN
    set_block_property('age_tran',order_by,'acc_code ASC');
    execute_query(no_validate);
    SET_ITEM_PROPERTY('PB_ACC_ORDER',LABEL,'&Acc Code'||'
    '||upper(chr(94)));
    ElSIF
    get_item_property('pb_acc_order',LABEL)='&Acc Code'||'
    '||upper(chr(94)) THEN
    Set_block_property('age_tran',order_by,' acc_code DESC');
    execute_query(no_validate);
    SET_ITEM_PROPERTY('pb_acc_order',LABEL,'&Acc Code'||' '||'v');
    ELSE
    Set_block_property('age_tran',order_by,'BALANCE DESC');
    execute_query(no_validate);
    SET_ITEM_PROPERTY('pb_acc_order',LABEL,'&Acc Code');
    END IF;
    END;
    END;
    THANKING U

    Hi Shiju,
    U can use the combination of fornt slash(/) and back slash(\) to fulfil ur requirement.
    For ascending u can use /\ and for descending u can use \/. Does this solve the purpose?
    I think it will.
    Suprabhat.

  • How can I open a .pdf file in a browser on a click on a push button

    I am using oracle 10g developer suit for form designing.
    There is a .pdf file in the application server.
    I want it to open it in a browser when a push button is clicked.
    Could you please tell me how can I do that?
    Regards

    hi
    u can use web.show_document() for that.
    but if you want to open pdf file only then use
    client_host()
    sarah

  • How to get GUI Status(Push Buttons) in ALV Report

    Hi Friends
    I have a requirement in a way that:
    Once selection-screen was processed,an ALV report has to come and above the ALV List,I need a custom GUI Status(4 Push Button) with Push Buttons Logic.
    Once I had clicks on thesse push button,I need to display one more ALV List and above this List,again I need a custom GUI Status(2 Push Buttons) with Push Buttons Logic.
    Can anyone throw some light how we can achieve this.
    Thanks for your cooperation!
    Regards,
    Madisetty

    data: rt_extab type slis_t_extab,
            g_ucomm like sy-ucomm ,
            g_selfield type slis_selfield.
    form alv_display .
      call function 'REUSE_ALV_LIST_DISPLAY'
         exporting
         i_callback_program             = g_repid
         i_callback_pf_status_set       = 'PF_STATUS'
         i_callback_user_command        = 'USER_COMM'
           it_fieldcat                    = it_fldcat
          tables
            t_outtab                       = it_final1
      perform pf_status using rt_extab.
      perform user_comm using g_ucomm g_selfield .
    endform.  
    form pf_status  using    p_rt_extab.
      set pf-status 'PF_STATUS' excluding p_rt_extab.
    endform.
    form user_comm  using    p_ucomm like sy-ucomm
                             p_selfield type slis_selfield.
      data: l_row type i.
      case  p_ucomm.
        when 'DISPLAY_PO'.
          loop at it_final1 into wa_final1.
            if wa_final1-sel eq 'X' .
              l_row = l_row + 1.
            endif.
            if l_row gt 1.
              message e004.
            endif.
            clear wa_final1.
          endloop.
          p_selfield-fieldname = 'SEL'.
          read table it_final1 into wa_final1 index p_selfield-tabindex .
          set parameter id 'BES' field wa_final1-ebeln.
          call transaction 'ME23N'.
      endcase.
    endform.
    *create user interface for gui status by double clicking on 'PF_STATUS'.
    *Check the above sample code .

  • Push button in alv report

    Dear Experts,
             How to add pushbutton in alv report.....
    *& Report  ZTT_TEST_ALV
    REPORT  ZTT_TEST_ALV.
    *data declarations
    type-pools : SLIS.
    *  data : BEGIN OF wa_kna1,
    *                kunnr type kunnr,
    *                name1 type name1,
    *         end of wa_kna1,
    * it_kna1 like tABLE OF wa_kna1.
    data : begin of wa_mara,
      matnr type matnr,
      end of wa_mara,
      it_mara like table of wa_mara.
      data : it_fcat type slis_t_fieldcat_alv,
             wa_fcat like line of it_fcat.
    *selection screen
      SELECTION-SCREEN begin of block k with frame title text-001.
    *  select-OPTIONS : s_kunnr for wa_kna1-kunnr.
         select-OPTIONS : s_matnr for wa_mara-matnr.
      SELECTION-SCREEN end of block k.
    *select auery
    *SELECT kunnr name1 INTO table it_kna1 from kna1 where kunnr in s_kunnr.
    select matnr into table it_mara from mara where matnr in s_matnr.
    *for displaying fieldcatalog
      PERFORM fcat using '1' 'MATNR' 'material Number' 'C410' '20'.
    *  PERFORM fcat using '2' 'NAME1' 'Customer Name' 'C410' '36'.
    *for displaying output
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    *   I_INTERFACE_CHECK                 = ' '
    *   I_BYPASSING_BUFFER                = ' '
    *   I_BUFFER_ACTIVE                   = ' '
    *   I_CALLBACK_PROGRAM                = ' '
       I_CALLBACK_PF_STATUS_SET          = 'SET_PF_STATUS'
    *   I_CALLBACK_USER_COMMAND           = ' '
    *   I_CALLBACK_TOP_OF_PAGE            = ' '
    *   I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
    *   I_CALLBACK_HTML_END_OF_LIST       = ' '
    *   I_STRUCTURE_NAME                  =
    *   I_BACKGROUND_ID                   = ' '
       I_GRID_TITLE                      = 'Report for Customer Details'
    *   I_GRID_SETTINGS                   =
    *   IS_LAYOUT                         =
       IT_FIELDCAT                       = it_fcat[]
    *   IT_EXCLUDING                      =
    *   IT_SPECIAL_GROUPS                 =
    *   IT_SORT                           =
    *   IT_FILTER                         =
    *   IS_SEL_HIDE                       =
    *   I_DEFAULT                         = 'X'
    *   I_SAVE                            = ' '
    *   IS_VARIANT                        =
    *   IT_EVENTS                         =
    *   IT_EVENT_EXIT                     =
    *   IS_PRINT                          =
    *   IS_REPREP_ID                      =
    *   I_SCREEN_START_COLUMN             = 0
    *   I_SCREEN_START_LINE               = 0
    *   I_SCREEN_END_COLUMN               = 0
    *   I_SCREEN_END_LINE                 = 0
    *   I_HTML_HEIGHT_TOP                 = 0
    *   I_HTML_HEIGHT_END                 = 0
    *   IT_ALV_GRAPHICS                   =
    *   IT_HYPERLINK                      =
    *   IT_ADD_FIELDCAT                   =
    *   IT_EXCEPT_QINFO                   =
    *   IR_SALV_FULLSCREEN_ADAPTER        =
    * IMPORTING
    *   E_EXIT_CAUSED_BY_CALLER           =
    *   ES_EXIT_CAUSED_BY_USER            =
      TABLES
        t_outtab                          = it_mara.
    * 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.
    *CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
    *  EXPORTING
    ****   I_INTERFACE_CHECK              = ' '
    ****   I_CALLBACK_PROGRAM             =
    ****   I_CALLBACK_PF_STATUS_SET       = ' '
    ****   I_CALLBACK_USER_COMMAND        = ' '
    ****   IS_LAYOUT                      =
    *   IT_FIELDCAT                    = it_fcat
    ****   IT_EXCLUDING                   =
    ****   IT_SPECIAL_GROUPS              =
    ****   IT_SORT                        =
    ****   IT_FILTER                      =
    ****   IS_SEL_HIDE                    =
    ****   I_SCREEN_START_COLUMN          = 0
    ****   I_SCREEN_START_LINE            = 0
    ****   I_SCREEN_END_COLUMN            = 0
    ****   I_SCREEN_END_LINE              = 0
    ****   I_DEFAULT                      = 'X'
    ****   I_SAVE                         = ' '
    ****   IS_VARIANT                     =
    ****   IT_EVENTS                      =
    ****   IT_EVENT_EXIT                  =
    ***    i_tabname_header               =
    ***    i_tabname_item                 =
    ****   I_STRUCTURE_NAME_HEADER        =
    ****   I_STRUCTURE_NAME_ITEM          =
    ***    is_keyinfo                     =
    ****   IS_PRINT                       =
    ****   IS_REPREP_ID                   =
    ****   I_BYPASSING_BUFFER             =
    ****   I_BUFFER_ACTIVE                =
    ****   IR_SALV_HIERSEQ_ADAPTER        =
    ****   IT_EXCEPT_QINFO                =
    ****   I_SUPPRESS_EMPTY_DATA          = ABAP_FALSE
    **** IMPORTING
    ****   E_EXIT_CAUSED_BY_CALLER        =
    ****   ES_EXIT_CAUSED_BY_USER         =
    *  tables
    **    t_outtab_header                = it_
    *    t_outtab_item                  = it_kna1.
    **** 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  FCAT
    *       text
    *      -->P_0052   text
    *      -->P_0053   text
    *      -->P_0054   text
    form FCAT  using    fp_col_pos
                        fp_fieldname
                        fp_seltext_m
                        fp_emphasize
                        fp_outputlen..
    wa_fcat-col_pos = fp_col_pos.
    wa_fcat-fieldname = fp_fieldname.
    wa_fcat-seltext_m = fp_seltext_m.
    wa_fcat-emphasize = fp_emphasize.
    wa_fcat-outputlen = fp_outputlen.
    append wa_fcat to it_fcat.
    clear : wa_fcat.
    endform.                    " FCAT
    FORM SET_PF_STATUS                                         .
    SET PF-STATUS 'ZNEWSTATUS' .
    "Copy of 'STANDARD' pf_status from fgroup SALV
    endform.
    i need one push button in alv output display.
    Thanks and Regards,
    Thirukumaran. R

    HI THIRU TRY FOLLOWING CODES:
    *& Report  ZSAMPLE
    REPORT  ZSAMPLE.
    TABLES:MARA.
    TYPE-POOLS: SLIS.
    TYPES:BEGIN OF TY_ITAB,
          MATNR LIKE MARA-MATNR,
          ERSDA LIKE MARA-ERSDA,
          END OF TY_ITAB.
    DATA:ITAB TYPE STANDARD TABLE OF TY_ITAB WITH HEADER LINE.
    DATA:FCAT TYPE SLIS_T_FIELDCAT_ALV,
              WA_FCAT TYPE SLIS_FIELDCAT_ALV,
              LAYOUT TYPE SLIS_LAYOUT_ALV,
              WA_LAYOUT TYPE SLIS_LAYOUT_ALV.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    PARAMETERS:P_MATNR TYPE MARA-MATNR.
    SELECTION-SCREEN END OF BLOCK B1.
    START-OF-SELECTION.
      PERFORM FIELDCAT.
      LAYOUT-ZEBRA = 'X'.
      PERFORM OUTPUT.
    *&      Form  PF_STATUS
          text
         -->RT_EXTAB   text
    FORM PF_STATUS USING RT_EXTAB TYPE SLIS_T_EXTAB.
      SET PF-STATUS 'BUTT'.
    ENDFORM.                    "PF_STATUS
    *&      Form  PUSH_BUTT1
          text
         -->R_UCOMM      text
         -->RS_SELFIELD  text
    FORM GET USING R_UCOMM LIKE SY-UCOMM RS_SELFIELD TYPE SLIS_SELFIELD.
      CASE R_UCOMM.
        WHEN 'GET'.
          IF SY-SUBRC EQ 0.
            CALL TRANSACTION 'SE11'.
          ELSE.
          ENDIF.
        WHEN 'EXIT' OR 'CANCEL' .
          LEAVE PROGRAM.
      ENDCASE.
    ENDFORM.                                                    "PUSH_BUTT1
    *&      Form  FIELDCAT
          text
    -->  p1        text
    <--  p2        text
    FORM FIELDCAT .
      WA_FCAT-SELTEXT_L = 'Select'.
      WA_FCAT-COL_POS = '1'.
      WA_FCAT-FIELDNAME = 'CHECK'.
      WA_FCAT-CHECKBOX = 'X'.
      WA_FCAT-TABNAME = 'ITAB'.
      WA_FCAT-OUTPUTLEN =  '4'.
      WA_FCAT-INPUT(1) = 'X'.
    WA_FCAT-EDIT_MASK(1) = 'X'.
      WA_FCAT-EDIT(1) = 'X'.
      APPEND WA_FCAT TO FCAT.
      CLEAR WA_FCAT.
      WA_FCAT-SELTEXT_L = 'Material Number'.
      WA_FCAT-COL_POS = '2'.
      WA_FCAT-FIELDNAME = 'MATNR'.
      WA_FCAT-TABNAME = 'ITAB'.
      WA_FCAT-OUTPUTLEN =  '18'.
      APPEND WA_FCAT TO FCAT.
      CLEAR WA_FCAT.
      WA_FCAT-SELTEXT_L = 'Date'.
      WA_FCAT-COL_POS = '3'.
      WA_FCAT-FIELDNAME = 'ERSDA'.
      WA_FCAT-TABNAME = 'ITAB'.
      WA_FCAT-OUTPUTLEN =  '8'.
      APPEND WA_FCAT TO FCAT.
      CLEAR WA_FCAT.
    ENDFORM.                    " FIELDCAT
    *&      Form  OUTPUT
          text
    -->  p1        text
    <--  p2        text
    FORM OUTPUT .
      SELECT MATNR ERSDA FROM MARA
        INTO TABLE ITAB
        WHERE MATNR EQ  P_MATNR.
      IF SY-SUBRC EQ 0.
        PERFORM GRID.
      ELSE.
        MESSAGE 'No Records Found' TYPE 'I'.
      ENDIF.
    ENDFORM.                    " OUTPUT
    *&      Form  GRID
          text
    -->  p1        text
    <--  p2        text
    FORM GRID .
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
       I_CALLBACK_PROGRAM              = SY-REPID
       I_CALLBACK_PF_STATUS_SET        = 'PF_STATUS'
       I_CALLBACK_USER_COMMAND         = 'GET'
       IS_LAYOUT                         = LAYOUT
         IT_FIELDCAT                     = FCAT
       I_DEFAULT                         = 'X'
        TABLES
          T_OUTTAB                          = ITAB.
    ENDFORM.                    " GRID
    REGARDS,
    SAKTHIVEL.VT

Maybe you are looking for

  • How can I update my iCloud account?

    A couple months ago I updated my apple ID from [email protected] to [email protected] and now I am having issues with something else and need to restore to a backup to fix my second issue. My primary issue it that I can neither restore or reset my ph

  • GR/IR -Freight GL Balance in B/S

    Hi Everyone , In my project ,while creation of PO they used to give freight percentage and which used to get collected in GR/IR-freight account automatically. GR/IR-freight a/c will get nil only after creation of AP invoice,so in year end its not pos

  • How do I select multiple albums in Revel to start/stop sharing?

    How do I select multiple albums in Revel to start/stop sharing?

  • Buddy Pictures not showing in Messages Chat window

    Is anyone else having the same problem with Messages in OS X Yosemite showing Buddy Pictures just fine in the Buddy List window but NOT in the actual chat window? I have already gone to 'View' 'Show All Buddy Pictures in Conversations' and it doesn't

  • Setting BB Pearl Flip clock to network? Desktop Manager asks for an update to languages.

    The Flip looks appears to require manual time adjustment rather than pulling the date and time information from the local network, either by setting it through options on the clock function, or through the Options - Date & Time menu. My Desktop Manag