Pushbutton

Hi friends,
I need to display two pushbuttons and two parameters on the selection screen, when I click one push button I have to display one parameter and hide the another parameter,same with the second pushbutton.Please give me some sample code.
sathish.

Hello,
Try this code:
DATA: W_COMM LIKE SY-UCOMM.
SELECTION-SCREEN PUSHBUTTON 1(10) P_1 USER-COMMAND PB1.
SELECTION-SCREEN PUSHBUTTON 21(10) P_2 USER-COMMAND PB2.
PARAMETERS: P_f1(10) MODIF ID GP1,
P_f2(10) MODIF ID GP2.
INITIALIZATION.
  P_1 = 'But1'.
  P_2 = 'but2'.
  w_comm = 'PB1'.
AT SELECTION-SCREEN.
  W_COMM = SY-UCOMM.
AT SELECTION-SCREEN OUTPUT.
  LOOP AT SCREEN.
    IF W_COMM = 'PB1'.
      IF SCREEN-GROUP1 = 'GP2'.
        SCREEN-ACTIVE = 0.
        MODIFY SCREEN.
      ENDIF.
    ENDIF.
    IF W_COMM = 'PB2'.
      IF SCREEN-GROUP1 = 'GP1'.
        SCREEN-ACTIVE = 0.
        MODIFY SCREEN.
      ENDIF.
    ENDIF.
  ENDLOOP.
regards,
Naimesh

Similar Messages

  • Md04 - additional columns as pushbutton

    Implementing the badi MD_ADD_COL_EZPS
    How can I add a column and the content of the column is a pushbutton ????
    thanks in advance
    Stephan

    Hi Stephen,
                        I just made this particular enhancement. You first have to check if the BADI - MD_ADD_COL_EZPS - is activated. If it is then you will have to do the enhancement using the BADI, else you can use the combination of the two following User-exits :
    EXIT_SAPLM61R_001, EXIT_SAPMM61R_001.
    Thanks & Regards,
                         Aditya

  • Down Payment Clearing pushbutton in MIRO (SAP ECC6 EP4) after F-48

    Hi,
    I have tried all sorts of steps, but I am unable to see this Down Payment Clearing pushbutton in MIRO transaction.
    Required package - LOG_MMFI_P2P is already installed and found OK in SFW5.
    Down payment maintained in PO, request created in F-48 and now I am trying to clear it in MIRO, but this button is not visible.
    Any clue?
    Please revert.
    Regards,
    Dipak

    Dear Experts,
    As i am trying to do the same process in my organisation to post the DP in PO at header or item level and after that following the ME2DP process for posting DP and then i do MIGO.
    After GR as i do MIRO process and select the PO there is no DOWN PAYMENT Push button on header level on MIRO Screen.
    I already re-started the Business Function "LOG_MMFI_P2P" after that also it is not showing the push button.
    Please kindly help in this to get that DOWN PAYMENT clearing button?
    Regards
    Arun Rai

  • Custom pushbutton in ME21N should display a popup window with item details

    Hello,,
    The requirement is to
    1. Add a custom pushbutton in ME21N screen at header level.
    2. The user will select some PO line items and will click on this push button.
        This inturn should trigger a popup window with item details only for those selected PO line items along with schedule line qty.
    I have created the custom push button in a custom tab using the BADI ME_GUI_PO_CUST.
    Now I am not able to retrieve item details and schedule line details inside the PAI of the custom tab..
    i.e., when i click on the custom push button, I am not able to retrive the item data and schedule line data.
    Please help me to retrive PO line item data and schedule line data.
    Regards,
    Sharah

    JSF is not so relevant in this question. It's all about how the generated client side code look like. Which is usually a bunch of HTML/CSS/JS (open page in browser, rightclick and view source). If you know HTML, you should know that using target="_blank" in a <form> or <a> element would open a new window. If you know JS, you should know that using window.open() would open a new window.
    Apply this so in the JSF source code so that the generated HTML/JS output is exactly what you want.

  • Regarding pushbutton operation in alv report

    hi,
    I have a requiement in which i will get list display which contains certain no of records(let us say 10  records)...now the issue is *if i selet one record and if it is correct record* and if i hit the insert pushbutton it should go and insert into z-table which i hav created.....and if the record which i hav selected is error record.....it should throw an error message saying that it is the error record....as error record stops further process i hav used it as information message and i used 'display like 'E''....so that it wont affect further proceedings.....
    and if i select the 2nd record and if i hit the pushbutton it is taking to the sap initial screen which i dont want .....
    how to solve this issue?
    can anyone plz help me in this issue....

    Hi Needy ,
      M giving you a sample code where you can set your pf-status and how to handle the check box etc .
    This code shows you hoe to select and deselect the check boxes ..
    All that you have to do is apply your logic...
    set pf-status 'SELECT' .
    at user-command .
      describe table t_lpr lines w_lines .
      case sy-ucomm .
        when 'SELECTALL' .
          set pf-status 'SELECT' excluding 'SELECTALL' immediately.
          do w_lines times .
            read line w_line field value w_check . " INTO W_CHECK .
            if w_check = space .
              w_check = 'X' .
              modify line w_line field value w_check.    "INTO W_CHECK .
              add 1 to w_line .
            endif .                        " IF W_CHECK = ' '
          enddo .                          " DO W_LINES TIMES
          clear w_line .
        when 'DESELECT' .
          set pf-status 'SELECT' excluding 'DESELECT' immediately.
          do w_lines times .
            read line w_line field value w_check .
            if w_check = 'X' .
              w_check = space .
              modify line w_line field value w_check .
              add 1 to w_line .
            endif .                        " IF W_CHECK = 'X' .
          enddo .                          " DO W_LINES TIMES
          clear w_line .
         Here w_line : Line that is being read
                 w_lines : Total number of lines in your table(or list if you use 'list number of lines w_lines)
                w_check is my checkbox .
    Hope your need will be done!!
    Much Regards ,
    Amuktha .

  • Display a cell in ALV report as Pushbutton

    Hi,
    I am having an ALV report. I want to display one cell of the ALV report as a Pushbutton. How is it possible ?
    Thanks and regards.

    Hi WTM,
      To display a cell as pushbutton in container display of a simple, two-dimensional table, use the cell type BUTTON.
    cell type -->
    In the content of your ALV output, you are able to display various elements in place of text. Some of these elements can be treated as a click area for the user. You are able to display the following elements:
    ·        Checkbox
    In list-type ALV ouputs, the checkbox is disabled. With the content of the column, you are only to display whether the checkbox is set or not.
    In the tree structure, however, you are able to handle users actions on this element using an event.
    ·        Pushbutton
    You are able to handle user actions on this element with an event.
    ·        Hyperlink
    You specify the Internet addresses (URLs). Users can then call up the corresponding page in the Internet browser by clicking on one of these Internet addresses.
    ·        Click Area
    You are able to handle user actions on this element with an event.
    Hope this helps u,
    Regards,
    Nagarajan.

  • Tooltip on pushbutton on alv report selection screen

    Hi Experts,
    I have a selection screen with two pushbuttons i want to provide tooltip on this button when user takes his cursor on it .. some part of my code
    Selection screen:
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-t01.
    SELECTION-SCREEN: BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(20) text-t02 FOR FIELD p_info.
    PARAMETERS: p_info TYPE string.
    SELECTION-SCREEN: PUSHBUTTON 68(10) but1 USER-COMMAND cli1.
    SELECTION-SCREEN : END OF LINE.
    PARAMETERS:      r_exe_im  RADIOBUTTON GROUP rb1.
    PARAMETERS:      r_st  RADIOBUTTON GROUP rb1.
    SELECTION-SCREEN SKIP 1.
    SELECTION-SCREEN: PUSHBUTTON /1(20) exec1 USER-COMMAND cli2.
    SELECTION-SCREEN: FUNCTION KEY 1.
    SELECTION-SCREEN END OF BLOCK b1.
    please tell me on these selection fields how to display tool tip.
    Thanks and regards,
    Roshan.

    Hi,
    After completing your executable program in SE38, activate it and goto SE51(Screen painter).
    Here give the name of your program and screen number as 1000.
    Click on Change.
    Goto Element List Tab.
    Here you will find all your elements from your program.
    Select the required element and click on Properties.
    Here you will find a Tooltip Text property. Click on the button 'Text' of this property.
    You will be given 2 options 1) Text from Text element 2) Text from Variable
    Enter as per requirement
    Save and Activate.
    Hope this will be useful
    Regards
    Bhupal

  • Pushbutton disabled in a table

    Hello.
    I would like to see a pushbutton enabled at the end of each row depending the result of the comparaison of two fields in my table.
    To explain much better, I want that only the personne who created the recording in the table would be allowed to delete its. So I check if the ID of the recording creator is the same as the current user, and depending this result, the pushbutton to delete the row has to be enabled.
    So I marked the checkbox "disabled" in my pushbutton options and written the following condition :
    bool ( if ( @ID == @CurrentID , 1 , 0 ))
    The function is ok (I checked by displaying the result in another variable)... But it doesn't work !!!
    So I tried to write directly "true" or "false" in the display condition, and : There is no difference between both, the pushbutton is desactivated in each case. So I don't understand.
    Can Somebody help me please ?

    Hi,
    I tried the same and it worked for me the way it should. Just make sure that you have assigned some action to the button because if we haven't assigned any action then it would always be disabled.
    Also, your table is set as Editable and not Read Only
    Regards,
    Murtuza

  • Pushbutton not holding sy-ucomm

    I have 2 pushbuttons on my screen using screen painter. But when I debug they dont hold sy-ucomm or ok_code. DEL and CLR are pushbuttons but the  code is not working because they dont hold sy-ucomm value. However the other buttons are working as they are not pushbuttons but are on the menu bar or application bar. Any idea why this is happening?
    PROCESS AFTER INPUT.
    MODULE user_command_0100.
    MODULE user_command_0100 INPUT.
    save_ok = ok_code.
      CLEAR ok_code.
      CASE save_ok.
        WHEN 'BACK'.   LEAVE PROGRAM.
        WHEN 'EXIT'.   LEAVE PROGRAM.
        WHEN 'CANCEL'. LEAVE PROGRAM.
        WHEN 'CREATE'.
        WHEN 'DEL'. LEAVE PROGRAM.
        WHEN 'CLR'. LEAVE PROGRAM.
        WHEN OTHERS.   CALL SCREEN 100.
      ENDCASE.

    Hi,
    Just Double click on the Pushbutton, then the attributes window will open, there Fctcode will be there, give the Function code over there, and beside that you will find the function type, that function tpe should be blank
    Regards
    Sudheer

  • Invoking A pushbutton from  another pushbutton

    Hi ,
    I want to invoke a pushbutton on jspx page from another pushbutton which is on different jspx page.
    How can a achive this ?

    Hi,
    You can invoke a push button from JavaScript. So after the page is loaded, you use JavaScript added in a trh:script tag at the bottom of the page to evaluate e.g. a request parameter (assuming a GET request). Then you search for a button contained on this page and call queue on the JS class shown below
    http://download.oracle.com/docs/cd/E15523_01/apirefs.1111/e12046/oracle/adf/view/js/event/AdfActionEvent.html
    Frank

  • How to create a pushbutton delay in the FPGA module in Labview 8.2

    I am a very inexperienced programmer of Labview, and I have what I thought would be a simple problem. I have a CompactRIO system that utilizes Labview 8.2 as well as RT and FPGA modules. I am running an end of line tester that uses a pushbutton to start the test. I am looking to force an operator to hold the test start pushbutton for one second before testing begins. If the pushbutton is released before the second is up, the test will not start. In the FPGA module, I cannot figure out how to accomplish this. I have tried using both flat sequence and while loops, but I cannot get the program to work as stated above. With the flat sequence there is not a way, that I could see, to break out of the sequence should the pushbutton be released. Using the while loop, I was closer to a solution, but could not get the program to read the input consistently. I did verify that the 24Vdc signal is getting to the input card whenever the pushbutton is pressed. The program worked fine without trying to add the delay when I was just looking for a transistion to 24Vdc on the input card when the pushbutton was pressed.
    Any ideas?  Thanks!

    Here's how you might do it with a button on-screen in LabVIEW for Windows.  If you need more specific help, post your code, or a small portion of it that demonstrates the bit that you can't get working.  (The snippet is in LabVIEW 2009 since that's what I'm using, but the attached VI is saved for 8.2)
    Attachments:
    Hold 1 Second.vi ‏8 KB

  • Creation of Pushbutton in CRMD_ORDER

    Hello All,
    I have a query.Is it possible to create a custom pushbutton on fast entry screen of CRMD_ORDER without changing the standard SAP.I have to call a screen when a user clicks this button and this screen would enable user to enter some data,save it and return back to the original screen.Also,once the data is entered,user should be able to also view it whenevr he wants.
    Let me know your suggestions on this.
    I thought of achieving it by creating a z transaction and calling it in order_save badi and doing all coding in the z tcode.But by this way user cannot come back to view his entered values unless he presses "save" again.
    Looking forward to your inputs:
    Regds
    vlp

    Unanswered

  • Problems in at selection-screen output - setting pushbutton invisible

    Hello,
    I hope I can get some help here
    I have a problem with setting a pushbutton invisible
    i have a field (long-text) in my screen - and behind this a pushbutton for calling the editor
    if in a variant the parameters field is set invisible i also want to set the pushbutton invisible
    i have no idea why in the at selection-screen output event screen-invisible is always 0 - but in the variant the field is set invisible.
    i need to know if the parameters field is invisible to set the pushbutton the same
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(31) S_TXB_L1.
    PARAMETERS S_TXT_L1 TYPE ZHR_FC_STRING.
    SELECTION-SCREEN PUSHBUTTON 79(15) P_LTX_1 USER-COMMAND YLTXT1.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(31) S_TXB_L2.
    PARAMETERS S_TXT_L2 TYPE ZHR_FC_STRING.
    SELECTION-SCREEN PUSHBUTTON 79(15) P_LTX_2 USER-COMMAND YLTXT2.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(31) S_TXB_L3.
    PARAMETERS S_TXT_L3 TYPE ZHR_FC_STRING.
    SELECTION-SCREEN PUSHBUTTON 79(15) P_LTX_3 USER-COMMAND YLTXT3.
    SELECTION-SCREEN END OF LINE.
    AT SELECTION-SCREEN OUTPUT.
    LOOP AT SCREEN.
        IF SCREEN-NAME(7) = 'S_TXT_L'.
          MERK_INVISIBLE = SCREEN-INVISIBLE.
        ENDIF.
        IF SCREEN-NAME(6) = 'P_LTX_'.
         SCREEN-INVISIBLE = MERK_INVISIBLE.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
    Thanks very much...
    Helmut

    I agree - there seems to be some confusion here. In the variant the field can only be "hidden" while in the code it is possible to make the field completely invisible. 'Hiding' the field in the variant merely hides it by default and adds a 'plus' button to the toolbar, by clicking which the hidden elements can be exposed.
    As far as changing the screen fields goes, I find it usefull to use MODIF ID. Perhaps this blog could be helpful:
    http://friendlyabaper.blogspot.com/2009/07/my-super-awesome-selection-screen.html
    P.S. Please use the code tags for the code, per Forum Rules.

  • How to Enable Pushbutton at runtime in MPP

    Hi Expert,
    I have problem in the following scenario..
    I design screen say '0230' and set property of one push button(Show) is invisible.
    I am calling screen '0230' multiple time based on run time.
    When I calling screen '0230' in third time I want to enable that push button(show).
    How could I do this.
    Please explain me....
    Regards,
    Rajavel Nj

    Hi,
    Keep a counter variable to count how many time the screen has been called.
    Each time a call is made of the screen increase the counter.
    In the PBO of the screen called screen where you want to hide the button, Modify the pushbutton invisible attribute by LOOP AT SCREEN.
    Regards,
    Ashish

  • In need of a pushbutton event handler for a cl_gui_custom_container

    Greetings Experts:
    Here is the situation...
    I have two cl_gui_custom_containers. Container1 has a double click event reciever that when fired displays longtext using the READ_TEXT function module displaying in Container2.  I am trying to add a pushbutton to Container2 to print contents of the screen (but not the Container1 ALV).
    It seems I am in a bit of a stand still and am in need of some advice.
    Thanks in advance.
    - Dan -

    Here is a little example program, it is not a 100% solution, but you should be able to get the idea here.  It is implemented into a docking container, so that this example is a cut/paste example.  Here we are splitting the docking container into two parts, buttom is the text editor, the top is our toolbar, notice the only button there is Print,  if you click this this will fire an event and will write out what you have typed into the text editor control.
    report zrich_0001.
    type-pools: icon.
    data:
          dock_sub_cont1   type ref to cl_gui_container,
          dock_sub_cont2   type ref to cl_gui_container,
          splitter         type ref to cl_gui_splitter_container,
          dockingleft      type ref to cl_gui_docking_container,
          text_editor      type ref to cl_gui_textedit,
          gui_tb           type ref to cl_gui_toolbar,
          repid type syrepid.
    data: itext type table of tline-tdline,
          xtext type tline-tdline.
    *       CLASS lcl_event_handler DEFINITION
    class lcl_event_handler definition.
      public section.
        class-methods:
        handle_pushbutton_click
                   for event function_selected
                           of cl_gui_toolbar importing fcode.
    endclass.
    *       CLASS lcl_event_handler IMPLEMENTATION
    class lcl_event_handler implementation.
      method  handle_pushbutton_click.
        case fcode.
          when 'PRINT'.
            call method text_editor->get_text_as_r3table
               importing
                     table              = itext
               exceptions
                     others             = 1.
            leave to list-processing.
            loop at itext into xtext.
              write:/ xtext.
            endloop.
        endcase.
      endmethod.
    endclass.
    parameters: p_check.
    at selection-screen output.
      repid = sy-repid.
      check dockingleft is initial.
      create object dockingleft
                  exporting repid     = repid
                            dynnr     = sy-dynnr
                            side      = dockingleft->dock_at_left
                            extension = 1070.
      create object splitter
                            exporting parent = dockingleft
                                      rows    = 2
                                      columns = 1.
      call method:
                      splitter->get_container
                        exporting row            = 1
                                  column         = 1
                                  receiving container = dock_sub_cont1,
                      splitter->set_row_height
                        exporting id             = 1
                                  height         = '3',
                      splitter->get_container
                        exporting row            = 2
                                  column         = 1
                                  receiving container = dock_sub_cont2.
      perform create_toolbar.
      create object text_editor
                  exporting
                       parent     = dock_sub_cont2.
      set handler:
                   lcl_event_handler=>handle_pushbutton_click for gui_tb.
    start-of-selection.
    *       FORM create_toolbar                                           *
    form create_toolbar.
      data: event type cntl_simple_event,
           events type cntl_simple_events.
    * Create the toolbar object
      create object gui_tb
        exporting
          parent             = dock_sub_cont1
        exceptions
          cntl_install_error = 1
          cntl_error         = 2
          cntb_wrong_version = 3
          others             = 4.
    * Set up events  for toolbar
      clear event. refresh events.
      event-appl_event = 'X'.
      event-eventid = gui_tb->m_id_function_selected.
      append event to events.
    * Register the events
      call method gui_tb->set_registered_events
        exporting
          events = events
        exceptions
          cntl_error                = 1
          cntl_system_error         = 2
          illegal_event_combination = 3.
    * Add Buttons to toolbar
      call method gui_tb->add_button
        exporting
          fcode            = 'PRINT'
          icon             = icon_print
          butn_type        = '0'
          text             = '  Print'
        exceptions
          cntl_error       = 1
          cntb_btype_error = 2
          cntb_error_fcode = 3
          others           = 4.
    endform.
    Regards,
    RIch Heilman

  • Logical Database selection screen pushbutton

    Hello All,
    I need to create a pushbutton on a selection screen of a logical database.  Basically this pushbutton when clicked will either display or suppress some fields on the screen.  I have tried to use the SSCRFIELDS option to create a pushbutton, however that never displays for me.  Logical Database DDF has an example of a pushbutton that I am looking to create, however the functionality will be different.  I am not sure what I am missing, can anyone help?  Thanks.
    John

    Hello All,
    Thanks for your replies. However, there is something that is causing these options not to work.  For some reason when using SSCRFIELDS nothing displays.  For the SELECTION-SCREEN PUSHBUTTON command, we see the push button however our code for some reason is not working.  I have another developer working this with me and we are both stumped.  We are mirroring that DDF Logical Database and are not having any luck so far.  Does anyone have any further suggestions?
    John

Maybe you are looking for