Pushbutton on the application bar on an abap report

Hello All,
I need to have a pushbutton (labelled Download) on the application bar on the abap report screen .
This button should enable me to download the report contents in a file format (like excel).
Please can you guys help me acheive this.How should the button with this functionality be placed in application bar?
Thanks in advance for the kind help
Swati

Hi Swathi,
In such case, as said above, create a new GUi status and then assign to the report using the below statement:
AT PFnn.
Effect
This obsolete statement defines an event block whose event is triggered by the ABAP runtime environment during list display - provided the screen cursor is on a list line and a function is selected using the function code PFnn. Here nn stands for a number between 01 and 24. In the standard list status, these function codes are assigned to the function keys of the input device.
Then what processing needs to be done when the user presses the button, will be written in the below control statement..
AT USER-COMMAND
Effect
This statement defines an event block whose event is triggered by the ABAP runtime environment if, during the display of a screen list, a function with a self-defined function code was chosen.
Note
Self-defined function codes are all those that include character combinations, except for the following:
The function codes "PICK" and "PFnn" ("nn"stands for 01 to 24) do not cause the event AT USER-COMMAND, but the events AT LINE-SELECTION and AT PFnn.
All function codes that start with the character "%" are interpreted as system functions and do not cause the event AT USER-COMMAND. The system functions for lists are listed in the following table 1.
The function codes in the following table 2, likewise, do not cause the event AT USER-COMMAND, but are handled by the list processor.
Table 1
Function code Function
%CTX Call a context menu
%EX Exit
%PC Save to file
%PRI Print
%SC Search for ...
%SC+ Find next
%SL Search in office
%ST Save to report tree
Table 2
Function code Function
BACK Back
P- Scroll to previous page
P-- Scroll to first page
P+ Scroll to next page
P++ Scroll to last page
PFILE name Store list lines in a text file named "abap.lst" in standard character representation in the standard directory of the application server. If a name is entered using name, this is converted to lowercase letters and used as the file name.
PL- Scroll to first line of the page
PL-n Scroll n lines back
PL+ Scroll to last line of the page
PL+n Scroll n lines up
PNOP No effect
PP- Scroll back one page
PP-n Scroll n pages back
PP+ Scroll one page forward
PP+n Scroll n pages forwad
PPn Scroll to beginning of page n
PRI, PRINT Print
PS-- Scroll to first column
PS++ Scroll to last column
PS- Scroll one column to the left
PS-n Scroll n columns to the left
PS+ Scroll one column to the right
PS+n Scroll n columns to the right
PSn Scroll to column n
PZn Scroll to line n
RW Cancel
Example
This program works with a self-defined GUI status MYLIST. The function that is linked there with the function code MY_SELECTION causes the event AT USER-COMMAND during list display and also creates details lists.
REPORT demo_at_user_command.
START-OF-SELECTION.
  SET PF-STATUS 'MYLIST'.
  WRITE 'List line'.
AT USER-COMMAND.
  IF sy-lsind = 20.
    SET PF-STATUS 'MYLIST' EXCLUDING 'MY_SELECTION'.
  ENDIF.
  CASE sy-ucomm.
    WHEN 'MY_SELECTION'.
      WRITE: / 'You worked on list', sy-listi,
             / 'You are on list', sy-lsind.
  ENDCASE.
Regards
Shiva

Similar Messages

  • Problem with icons in the application bar (Photoshop CS4)

    My computer's OS is WinXP Pro SP3.
    I just now noticed a problem with all icons in the application bar in PS CS4 (v. 11.0.1).
    When I bring mouse over icons (except for zoom level icon), all icons turn into blank (white) boxes.
    For "Arrange Documents" bar, when I click on its blank icon, the top two columns are empty but show the the rest of three columns.
    Please advise me how to fix this problem.  I hope to avoid uninstalling -reinstallinlg.  Thanks.

    ATI no longer supports your card so I don't think you will see any updated drivers from them to correct your problem. You might want to look into investing in a newer card.
    http://support.amd.com/us/gpudownload/windows/Legacy/Pages/radeonaiw_xp.aspx?type=2.4.1&pr oduct=2.4.1.3.23&lang=English

  • How can I disable the Application Bar in Flash 11?

    How can I turn off viewing the Application Bar and associated window it is attached to without quitting Flash in Flash 11?

    No, here is my OS chrome, which is perfectly fine:
    I would like to completely disable the Application Bar. This is something that can be done in Dreamweaver, another Adobe CS product.

  • Where has the Application Bar gone in CS6 and can I get it to show?

    I use this a lot in CS5 and notice it isn't showing in CS6, is there any way to make it show?

    The Application Bar was intentionally removed. A majority of users told us they'd rather have the extra vertical space for their images than the Application Bar.
    All of the commands are available elsewhere or can be access more easily with keyboard shortcuts:
    Mini-bridge is accessible from the bottom panel (now a part of the default UI).
    Cmd + Opt + o (Mac) Ctrl + Alt + o (Windows) to launch Bridge.
    Show Guides: Cmd + ; (Mac) Ctrl + ; (Win)
    Show Grids: Cmd + ' (Mac) Ctrl + ' (Win)
    Show Rulers: Cmd + r (Mac) Ctrl + r (Win)
    Zoom level can be controlled via keyboard shortcuts or UI found at the bottom of the document window.
    You can access the arrange options under the Window>Arrange> menu
    Screen mode has been added back to the bottom of the tool bar.
    CS Live has been discontinued.

  • The report I published on the SQL server report server is not showing in the application we use to retrieve reports.

    The report I published on the SQL server report server is not showing in the application we use to retrieve reports. My cell phone number is {removed}
    Thanks.

    Hello Roger Tenn,
    Thank you for posting in the TechNet Forum.
    As this issue is related to SQL server report server, to receive better report, it is recommended to ask in the SQL server forum.
    https://social.technet.microsoft.com/Forums/en-US/home?category=sqlserver
    The professionals here will be glad to help you.
    Best regards,
    Fangzhou CHEN
    Fangzhou CHEN
    TechNet Community Support

  • Why has my safari icon disappeared from the applications bar after the recent software update?

    Everything was working perfectly until I uploaded the most recent software update. When I restarted my laptop I found that the Safari icon had disappeared from my applications bar.  If I go to my 'recent places' and click on Safari it then reappears but only until I close the laptop down as the next time I start it up, it's nowhere to be seen.  Can anyone help?  

    by applications bar you mean "dock"? After you click on recent places and start safari it will reappear in the dock and at this point you will want to control + click (right click) on the SAFARI icon and hover to options, make sure that "KEEP IN DOCK" has a check mark next to it. If it does not, click that option. Now it will keep the Safari Icon in your dock.

  • The Application bar: where is the Designer dropdown workspace in CC?

    Running Dreamweavercc 13.2  on PC how do i get the application to show up ?  i have looked everywhere ?

    Looks like a dual monitor setup and you have the Application Frame for DW on the right hand monitor.
    It also appears you are NOT missing the menu I specifically asked about?
    If you are looking for more tools in your toolbar, you may need to open the relevant window from the Window menu, then click and drag the named tab of the window up to the top of your Application Frame until it highlights. When you release, the window will stick to whichever part of the Application Fram you designate.
    You can also right click in the toolbar below the Title: Chats text field to bring up the toolbar options.
    My guess is you want the Insert menu located at Window > Insert. Once the window is open, you can turn it into a tool bar by following the steps above.

  • Why I can't see the stroke on the Application bar on this view?

    Instead I have essentials, covering something behind? I tried restore to default and didn't work. And anyway, I shouldn't need to do that. I'm using a Mac.
    Thanks.

    What have you got selected?
    What tool are you using?
    What have you got checked in the control bar’s flyout menu?
    Your screen shot doesn’t help much.

  • Displaying a Push button in the application toolbar for an ALV report

    Hello everyone,
    Query:
    Is it possible to display a custom push button in the application tool bar while displaying an ALV report(1st one)?
    On pressing this custom push button will I be able to display another ALV report(2nd one) based on the selection made on the current ALV report(1st one)?

    Yes u can have pushbutton on application toolbar.
    You just have to use the new pf status in your report program.
    You should copy the 'STANDARD' GUI status from program SAPLKKBL using transaction SE90 >Programming SubObjects> Gui Status.
    Execute this transaction to get to next screen. select status using checkbox. click on GUI Status --> Copy.
    Enter your Z program name and the name you what for this status - you can keep it as 'STANDARD' to be simple.
    Then you can edit the new status to add or delete buttons. This will also bring in the standard SAP ALV functionality.
    Have a look at below code for using the new status.
    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 'TEST'.
    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
    **Write ur functinality here
    endcase.
    endform.
    Also have a look at below links.
    http://www.sap-basis-abap.com/abap/add-button-to-alv-toolbar-with-reuse-alv-list-display.htm
    ALV report
    Best Regards,
    Vibha
    *Please mark all the helpful answers

  • How to display BAR-CODE through ABAP report

    Hi,
    Could you please help me, how to display BAR-CODE through the ABAP report.
    I am writing below code, but BAR-CODE is not displaying on report.
               PRINT-CONTROL FUNCTION 'SBP01'.
                WRITE: 20  BAR_CODE1 NO-GAP.
               PRINT-CONTROL FUNCTION 'SBS01'.
    Regards,
    SSRAJU.

    Hi RAJU,
    you can see this forum link and its sub-links, here it is clear about it.
    Re: Barcode printing on report
    Thanks & Regards,
    Dileep .C

  • Reports are note retreieved by the application if opened in Crystal Report

    Hi to all.
    I am trying to modify one report used by an application I use. The application is made with .NET and, when I launch a preview or a print of this report, the report is not loaded if it is already opened in Crystal Report. To have it loaded, I must close it from Crystal.
    Some time ago (july 2011), this was not a problem. I don't know if .NET version is changed or if Crystal is upgraded. I have CR Developer 12.2.0.290 version installed and the application runs under .NET frameworks from 2 to 4. In tehs erver machine are also installed CR Basic Runtime for V.S. 2008 and C.R 11_5 NetSetup.
    Does anybody know if I can try previews whit RPT opened in C.R ?
    Many Thanks.

    You should be able to. I am not aware of this being a problem with CR 2008 (12.x). There was an issue like this with CR2010, but SP2 solved that. Lets' see what SP4 for CR 2008 does for you:
    SP4
    https://smpdl.sap-ag.de/~sapidp/012002523100008782452011E/cr2008sp4.exe
    SP4 MSI
    https://smpdl.sap-ag.de/~sapidp/012002523100008782532011E/cr2008sp4_redist.zip
    SP4 MSM
    https://smpdl.sap-ag.de/~sapidp/012002523100008782522011E/cr2008sp4_mm.zip
    Ludek
    Follow us on Twitter http://twitter.com/SAPCRNetSup
    Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]

  • How should we we validate the pn structure in hr abap reports?

    Hi Experts,
       i am done some coding by using LDB PNP , in that program i got selection screen for PN and PERNR tables.
    but when i am validating the program by using pernr structure it will pic up the data given by the pernr and personel area.
    when i am given dates in pn structure it will will not trigger . i am not getting how should i go through pn structure .
    Please give some help on that.
    Thanks in advance.
    Venkat.

    Hi Experts,
       i am done some coding by using LDB PNP , in that program i got selection screen for PN and PERNR tables.
    but when i am validating the program by using pernr structure it will pic up the data given by the pernr and personel area.
    when i am given dates in pn structure it will will not trigger . i am not getting how should i go through pn structure .
    Please give some help on that.
    Thanks in advance.
    Venkat.

  • I used to get all my emails no problem. Now I get a "Can't Load Mail ... there is a problem with the application error. I have reported it many times but zero response from Apple

    help plz

    Hello,
    Thank you for visiting Apple Support Communities.
    Here are a couple troubleshooting resources I would recommend when experiencing issues with iCloud Mail.
    iCloud: Troubleshooting iCloud Mail
    http://support.apple.com/kb/TS4002
    iCloud: Account troubleshooting
    http://support.apple.com/kb/TS3988
    If all steps have been processed, see the section labeled Additional Information in the first article.
    Cheers,
    Jason H.

  • Application Bar doesn't open in the JDeveloper 11g

    hi all,
    I'm a newbie, i'm have a problem where in the application bar doesn't open along with the launch of the application
    and the files in the application also don't open on double click...
    thanks in Advance
    Jyothi

    Shut down JDeveloper and erase &lt;Oracle Middleware&gt;\jdeveloper\system\system11.1.1.0.31.51.88\o.ide\windowinglayout.xml and start JDev again.
    If that doesn't help...
    Shut down JDeveloper and erase folder &lt;Oracle Middleware&gt;\jdeveloper\system\system11.1.1.0.31.51.88\ and start JDev again.
    Note: you will loose all your settings in JDev!!!
    If that doesn't help...
    Reinstall JDev.

  • The Title property is showing instead of the filename at top of application bar

    We have a need to rename a series of files from their original name to a new name.  After renaming the files in Windows (BRU000003.PDF in the example above), we opened one of the files in Adobe Acrobat.  We were surprised to see that the "name" displayed in the application bar at the top of that window was the Title property (000010.pdf in the example above) and not the file name.
    Is there a way to programatically remove the Title property or to make Adobe Acrobat display the Filename and not the Title property?

    If you need to do this to multiple files, a batch process is the way to go. You can use the Open Options command to display the file's name instead of the title.
    You can also use a simple JavaScript to reset the title, or to replace it with the file's current name.

Maybe you are looking for

  • Installing 11gr2 release 11.2.0.2 database in Windows 7 32 bit

    Hi everyone, I want to Install 11gr2 release 11.2.0.2 database in Windows 7 32 bit. I have searched on download.oracle.com but i was not able to findout proper database compatible with windows 7. They had 11gEX db but i want to install simple 11gr2.

  • Number of repeated characters in string array

    Hi, I m trying to get number of repeated characters in string array. I couldnt figure out where am i doing mistake. thank you, For example: count({"alpha, beta,"}, 'a') a is repeated 3 l is repeated 1 etc. public class Test public static int count(St

  • Changing the existing dataset

    I have a report that has been developed by a past developer and for the life of me cannot understand how he even created it. I need to change the list of database fields in this report to include an additional field. But the report is not connected t

  • An error was encountered while processing images

    Huge document, full of pictures and graphics. Created in Word for Mac 2011. Saved as pdf it's 38M. When I try to reduce the size, I get an error, "An error was encountered while processing images". No other info. Any clues?

  • Creating a hierarchy to drill-in from fiscal years to fiscal months

    Hi All, TRYING TO IMPLEMENT:- Creating a hierarchy to drill-in from fiscal years to fiscal months METHOD THAT I FOLLOWED:- (It worked for Calendar Years) I have a table fiscal years which has the columns fiscal_year,fiscal_months..... I have created