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

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

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

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

  • 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 button to the grouped data in an AdvancedDataGrid?

    Hi,
    Can anyone please suggest how to add a button to the grouped data in the AdvancedDataGrid?
    I have tried extending the AdvancedDataGridGroupItemRenderer and using it as the groupItemRenderer but its not reflecting.
    For the leaf node the itemRenderer property works just fine.
    Please help!

    HI ,
    I want to add a push button on the ALV list out put which is comming as a pop up and I want this using classes and methods.
    I have got a method IF_SREL_BROWSER_COMMANDS~ADD_BUTTONS from class cl_gos_attachment_list  but still I am unable to get any additional button on the output ALV popup.
    Please help.
    Regards,
    Kavya.

  • 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];

  • How to add multiple button/choices in  button choice

    HI all ,
            How to add multiple button/choices in  button choice ?

    Initialize a cluster array (CrsrList type) with as many cursors as you think you would ever need.   Setup your cursors dynamically, then delete the unused cursors (array elements) and then update your CursorList property.
    Message Edited by vt92 on 03-20-2009 04:04 PM
    "There is a God shaped vacuum in the heart of every man which cannot be filled by any created thing, but only by God, the Creator, made known through Jesus." - Blaise Pascal
    Attachments:
    cursors.PNG ‏5 KB

  • How to add Refresh button

    Hello...
    This is my code. How to add REFRESH button in this code
    package sample.view;
    import javax.faces.event.ActionEvent;
    public class Student {
        public Student() {
            super();
        private String name;
        private String id;
        private String course;
        public void setName(String name) {
            this.name = name;
        public String getName() {
            return name;
        public void setId(String id) {
            this.id = id;
        public String getId() {
            return id;
        public void setCourse(String course) {
            this.course = course;
        public String getCourse() {
            return course;
        public void dosubmittoActionisterner() {
            // Add event code here...
            System.out.println(getName() + " " + getId() + " " + getCourse());
        public void dorefershActionlistener(ActionEvent actionEvent) {
            // Add event code here...

    Hi,
    is this a home work you are working on? Even as a student you should be able to express questions more clearly.
    Frank

  • How to ijntroduce PUSH Button in KD_GET_FILENAME_ON_F4

    Dear Experts,
    I am new to ABAP.
    I know how to use push button in Sel-Screen. But my requirement is:
    1)How can I use a push button in "KD_GET_FILENAME_ON_F4" so that on hitting the push button a PopUp screen appears.
    2) This Pop up screen should be a file directory screen from which I can select a file.
    3) This file on one click should get considered as "file_name" of the call function "KD_GET_FILENAME_ON_F4."
    Looking forward for advise from experts.
    Regards
    Chandan Kumar

    Dear Mr Klaus,
    Thanks for your reply. The method suggested by you will definitely help the user to directly open a file dialogue box. But I want the code to make it more simpler for the user. After I execute the code The use should get a Push Button. On hitting this push button a POP UP screen should appear. This pop up screen should lear us to the target folder.
    In your suggestion it was possible to open a folder path pop up screen. just I want to intriduce a PUSH button there. Also I want multi selection to be possible. In your suggestion above when I wrote the code as:
    DATA: file_str1 type string.
    data: it_tab TYPE STANDARD TABLE OF file_table,
          lw_file LIKE LINE OF it_tab,
          gd_subrc TYPE i.
    SELECTION-SCREEN begin of block blk with frame title text-100.
    SELECTION-SCREEN SKIP 2.
    parameters : p_file like rlgrap-filename .
    SELECTION-SCREEN end of block blk.
    *F4 input file
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
    CALL METHOD cl_gui_frontend_services=>file_open_dialog
    EXPORTING
    window_title = 'Select only Text File'
    default_filename = '.azt'
    multiselection = 'X'
    CHANGING
    file_table = it_tab
    rc = gd_subrc.
    READ TABLE it_tab INTO lw_file INDEX 1.
    p_file = lw_file-FILENAME.
    Start-of-Selection.
      file_str1 = P_file.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        filename                      = file_str1
    *    filename                      = '\\10.10.1.92\Volume_1\_projekte\Zeiterfassung-SAP\test.azt'
      tables
        data_tab                      = it_string
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    In the above code when I use Multiselection = 'X' then in the folder pop up multiselection is possible but the multiselection deosn't
    gets selected for upload.
    Looking forward for your suggestions.
    That is my requirement.
    Regards,
    Chandan

  • How to add linked button in grid?

    Hi,
    Does anyone know how to add linked button in a grid? I can't find it but i saw someone ask similar question but seems none of them works.
    Thanks a lot!
    P.S. For some reason, i can't use matrix because the data is from a SQL query.
    Lan

    Hi,
    as far as I know it is not possible, since this adjustment is made for the whole column. I have created a grid and I open the shown document by double clicking the row header. In the grid I can see if it is sales or purchase and so I use a workaround by opening the specific system form (e.g. sales invoice) in find mode and search the document by document number (also shown in the grid).
    Sample:
    oSBOapp.ActivateMenuItem("2053"); //sales invoice
    oForm = oSBOapp.Forms.ActiveForm;
    oForm.Mode = SAPbouiCOM.BoFormMode.fm_FIND_MODE;
    oEdit = (SAPbouiCOM.EditText)oForm.Items.Item("8").Specific;
    oEdit.Value = Convert.ToString(dNum);
    oForm.Items.Item("1").Click(SAPbouiCOM.BoCellClickType.ct_Regular);
    By the click event, you get the specific row number. Hope it helps...
    Regards
    Sebastian

  • How to add close button in pannel ?

    hai friends,
        how to add close button in pannel ? give any example.
    regards,
    welcomecan

    Hi Welcomecan,
    You can use the TitleWindow as suggested by Subeesh for having a built in close button...The TitleWindow is infact an extension of the Panel container. TitleWindow is most generally
    used for creating PopUp Windows.
    Check the below link for examples...
    http://blog.flexexamples.com/?s=TitleWindow
    Thanks,
    Bhasker

Maybe you are looking for

  • Using null for parameterized "newInstance(Object [])" method in Object[].

    I have a really serious problem. I am creating instances of specific classes by using reflection techniques. I am reading a flat file, finding class from its name and creating it by using its parameterized constructor. Example: line 1: Dummy("A",Dumm

  • Export to PDF with scaling

    Hello I have completed a book in InDesign at a specific page size Now, we decided we want the book to be 7% larger (a proportionate scale) Is there a way to export to PDF from InDesign to a specific scale ratio? I am asking this question here because

  • Windows 2003 Guest cannot access "SCSI" virtual Disks with /PAE enabled

    I created a Windows 2003 EE R2 guest with 16 GB memeory, 48 GB System disk and 4 virtual SCSI disks for Microsoft Cluster services. It all worked, but limited Windows to 3.75 GB memory. When I added the /PAE option to boot.ini, the memory was availab

  • BUG: NEXT BUTTON IN REPORT (PORTLET)

    If I run a report as a portlet and pass a parameter to the page containing the portlet and press the next-button of the report, the parameter is not passed again to the page... My intention is to write my "own" provider implementation to adjust page_

  • G5 - Apple doesn't know how to fix it

    Hi, Last April I have some freezing in my G5 and sent it to Apple here in Brazil. To make a long story short, they sent it back to me 4 times, with new motherboard, new processor, new memory and new power supply. None solved the problem. A few weeks