Adding buttons to a report

Can you add a button to a report component (sql based) and add code to call a stored procedure or an application component). (form layout editor tab)

This thread has been moved from the Oracle9iAS Portal forum to the Oracle9iAS Portal Applications forum. It is unlocked in the Oracle9iAS Portal Applications forum and responses should be posted there.
Thanks,
Rich

Similar Messages

  • Adding button in classical report

    Hi All,
    I have a requirement to add a button in the Classical report.
    Iam new to abap.can anyone please guide me regarding this?
    Thanks in advance

    hi,
    if you use reuse alv grid. you can define your button at pf status. here the example :
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
         i_callback_program                = sy-repid
         i_callback_pf_status_set       = 'MY_PF_STATUS'
         i_callback_user_command     = 'MY_USER_COMMAND'
    then :
    FORM my_pf_status USING it_extab TYPE slis_t_extab.
      SET PF-STATUS 'MY_PF_STATUS'.
    ENDFORM.                    "MY_PF_STATUS
    FORM my_user_command USING ip_ucomm    TYPE sy-ucomm
                                                          ip_selfield TYPE slis_selfield.
      CASE ip_ucomm.
        WHEN 'VBELN'.
        SET PARAMETER ID 'AUN' FIELD ip_sellfield-value.
       CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.
      ENDCASE.
      CLEAR : ip_ucomm.
      ip_selfield-refresh =
      ip_selfield-col_stable =
      ip_selfield-row_stable = 'X'.
    ENDFORM.
    if you use : write for output.
    START-OF-SELECTION.
      SET PF-STATUS 'DENEME'.
      WRITE : 'EXAMPLE'.
    AT USER-COMMAND.
      CASE sy-ucomm.
        WHEN 'EXAM'.
          BREAK-POINT.
      ENDCASE.
    if you use Class for ALV u can find more info at here : [OO ALV Reference|http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e8a1d690-0201-0010-b7ad-d9719a415907]

  • Adding buttons to ALV report

    I am using CL_SALV_TABLE to generate a report. How do I add custom buttons on the application toolbar? Is this done in the menu or screen painter? I have not created any screens yet as I want it to remain a simple ALV report.

    First create a PF status: We need to create a PF status with our own buttons as well as the ALV standard buttons. If we don't add the ALV buttons than it would not provide the standard functions of ALVs. On the other hand it is very tedious to add all the ALV buttons in our PF status manually. So here is the easy way: We will copy the PF-Status using of any standard SALV_DEMO report using the transaction SE41: Menu Painter. After Copying the PF-Status we can add our own buttons.
    Call Method of SALV to display PF: Now we will call this newly created PF status in our ALV using the method SET_SCREEN_STATUS of the reference of the class CL_SALV_TABLE
    In this section we will define the private methods which can be implemented to set the properties of the ALV and can be      called in the
    PRIVATE SECTION.    METHODS:     
    set_pf_status     CHANGING    co_alv TYPE REF TO cl_salv_table.
    In this area we will call the methods which will set the  different properties to the ALV   
    CALL METHOD set_pf_status      CHANGING        co_alv = o_alv.
    In this area we will implement the methods which are defined in  the class definition
      METHOD set_pf_status.
      Calling method to set the PF-Status  
    co_alv->set_screen_status(
        pfstatus      =  'SALV_STANDARD'    
       report        =  'SALV_DEMO_TABLE_SELECTIONS'    
       set_functions = co_alv->c_functions_all ).
      ENDMETHOD.                  "set_pf_status

  • Adding a push button on the report toolbar

    adding a save button on the report toolbar, so that after clicking the button, the data fetched on the report will be stored in the application server.

    Hi
    to automate this process ,best way is to create a Z rport and there u can submit this sap standard report and get its output into an Internal table and then u can write this internal table to application server via following demo code -
    this is code for both (download /upload),u can not use CG3y and CG3z as u want to do it as a background job ..
    *& Report ZGILL_AS *
    REPORT ZGILL_AS message-id rp .
    tables: pa0001,pa0002.
    select-options s_pernr for pa0001-pernr no intervals MODIF ID XYZ.
    parameters: p_dwnld AS CHECKBOX ,
    p_upld AS CHECKBOX DEFAULT 'X'.
    parameters: P_DSNI(75) TYPE C MODIF ID ABG DEFAULT
    '/usr/local/sapdata/amit.dat' LOWER CASE.
    data: begin of itab occurs 0,
    pernr(8),
    sp1(1) value ',',
    werks(4),
    sp2(1) value ',',
    persg(1),
    sp3(1) value ',',
    persk(2),
    end of itab.
    data: s_eof(3).
    start-of-selection.
    if p_upld = 'X'.
    OPEN DATASET P_DSNI FOR OUTPUT IN LEGACY TEXT MODE.
    PERFORM FETCH_DATA.
    STOP.
    elseif p_dwnld = 'X'.
    OPEN DATASET P_DSNI FOR INPUT IN LEGACY TEXT MODE.
    IF SY-SUBRC NE 0.
    MESSAGE E016 WITH
    'Error opening seq. file, RC:' SY-SUBRC.
    EXIT.
    ENDIF.
    CLEAR S_EOF.
    DO.
    PERFORM FETCH_file.
    IF S_EOF EQ 'YES'. stop. ENDIF.
    ENDDO.
    endif.
    END-OF-SELECTION.
    if itab[] is not initial.
    perform print_file1 tables itab.
    else.
    write:/ 'No records exists'.
    endif.
    *& Form FETCH_DATA
    text
    --> p1 text
    <-- p2 text
    FORM FETCH_DATA .
    SELECT * FROM PA0001 WHERE PERNR IN S_PERNR.
    MOVE-CORRESPONDING PA0001 TO ITAB.
    TRANSFER ITAB TO P_DSNI.
    APPEND ITAB.
    ENDSELECT.
    CLOSE DATASET P_DSNI.
    ENDFORM. " FETCH_DATA
    *& Form FETCH_file
    text
    --> p1 text
    <-- p2 text
    FORM FETCH_file .
    READ DATASET P_DSNI INTO itab.
    append itab.
    clear itab.
    IF SY-SUBRC NE 0.
    S_EOF = 'YES'. EXIT.
    ENDIF.
    ENDFORM. " FETCH_file
    *& Form print_file1
    text
    -->P_ITAB text
    FORM print_file1 tables P_ITAB structure itab .
    write:/2 'EmpNo',
    14 'Personnel Area',
    34 'Emp Group',
    47 'Emp SubGroup'.
    skip 1.
    loop at p_itab.
    write:2 p_itab-pernr,
    14 p_itab-werks,
    34 p_itab-persg,
    47 p_itab-persk.
    skip 1.
    endloop.
    ENDFORM. " print_file1
    <b>Reward if usefull</b>

  • Adding button to report to link to master detail form

    I want to add a button to a report to direct me to a blank master detail form to insert a new record. I have used the following code in the additional PL/SQL code section:
    htp.formopen('PORTAL30.wwa_app_module.new_instance?p_moduleid=1271601405');
    htp.formsubmit('p_request','Create New');
    htp.formClose;
    When I click this I get 'Page Not Found'.
    But if I hit refresh I am directed to the correct form with the same url.
    Any ideas on what the issue is?
    Thanks.

    Hi,
    Check this sample code.
    tables:sscrfields. "Fields on selection screens
    selection-screen function key 1.
    selection-screen function key 2.
    Initialization.
      sscrfields-functxt_01 = 'Report'.
      sscrfields-functxt_02 = 'Exit'.
    at selection-screen.
       if sscrfields-ucomm = 'FC01'.
      perform f_alv_sub.
       elseif sscrfields-ucomm = 'FC02'.
       endif.
    Hope it helps.

  • Adding button in report to store report on server

    hi,
    i dont know whether this is the appropriate place to ask this question.. but
    i have the requirement to send data from a report to another instance.
    basically what the users want is to run a report.. check the outcome, if its ok, then send the data to the other system.
    this does not have to be high tech.. the file can be stored on the server in a certain format. (so not the users PC)
    i was thinking of a button in the report which would save the file automatically as CSV on that specific location under a specific name.
    has anyone done that before..
    is it do-able?? in Web also?
    or are there other alternatives
    grtz
    rogier

    pete,
    thank you for your fast reply..
    it is not exactly what i am looking for.
    the file has to be saved as a CSV
    and the file has to be saved in a folder on the server so, not the workbookfolders
    But a method, for example to, to, from the report, trigger a processchain  to run the query again and save the outcome on the server would also be ok. if anyone has any suggestions?
    grtz
    rogier

  • Adding update and delete buttons to a  Report from SQL Query

    There is an option when creating a QBE to add update and delete
    links which i find quite useful, but this option doesn't seem to
    be possible on a Report from SQL Query. Do i need to do
    something special to add them? is the option located in a
    different place?

    Hi,
    You can only add Update ,Delete in QBE Reports,
    there is no option in Portal which can be used to
    have these buttons in the Reports from Query Wizard or
    Report from SQL Query.
    Thanks
    Vineet

  • Adding print button to interactive report

    For now I have the downloaded to PDF option checked so the user can print an interactive report via the widget.
    I would like to have a print button on the report also.
    Has anyone got any of the java script stuff working off of a button?

    Hi willjamu ,
    All you should have to do is call the 'PDF' request to download the same report the drop down will create.
    f?p=355:14:3381437251536222:PDF::::
    I hope I was able to answer your question let me know.
    Mike

  • Add buttons in ALV Report output

    Dear Friends,
    I am developing one ALV report in PP moule for calculating Shelf Life. The output is coming properly in ALV.
      But my additional requirement is ADD coustomise buttons in ALV Reports.
    Please give me an idea how can I insert buttons in my alv report?
    Thanks & Regards
    Vasu

    Hi vasu,
    consider the code given below.
          FORM F4200_PF_STATUS_SET                                      *
    FORM f4200_pf_status_set USING i_extab TYPE slis_t_extab.
      REFRESH i_extab.
      PERFORM f4210_exclude_fcodes CHANGING i_extab.
    The PF status is an exact copy of the PF status 'STANDARD' of program
    SAPLSALV but with command 'CHNG' added to it.
      SET PF-STATUS 'ZSOM_STANDARD' EXCLUDING i_extab.
    ENDFORM.
    *&      Form  f4210_exclude_fcodes
    FORM f4210_exclude_fcodes USING i_extab TYPE slis_t_extab.
      DATA: ws_fcode TYPE slis_extab.
      CLEAR ws_fcode.
      ws_fcode = '&EB9'.            " Call up Report.
      APPEND ws_fcode TO i_extab.
      ws_fcode = '&ABC'.            " ABC Analysis.
      APPEND ws_fcode TO i_extab.
      ws_fcode = '&NFO'.            " Info Select.
      APPEND ws_fcode TO i_extab.
      ws_fcode = '&LFO'.            " Information.
      APPEND ws_fcode TO i_extab.
    ENDFORM.                    " f4210_exclude_fcodes
    *&      Form  f4300_user_command
    FORM f4300_user_command USING ucomm LIKE sy-ucomm
                                             selfield TYPE slis_selfield.
      CASE ucomm.
        WHEN '&IC1'.                              "Double Click line Item
          READ TABLE i_data INDEX selfield-tabindex.
          IF i_data-qmnum NE space.
            SET PARAMETER ID 'IQM' FIELD i_data-qmnum.
            CALL TRANSACTION 'IW52' AND SKIP FIRST SCREEN.
            CLEAR ucomm.
          ENDIF.
        WHEN 'CHNG'.                          " Change Notification Icon
          READ TABLE i_data INDEX selfield-tabindex.
          IF i_data-qmnum NE space.
            SET PARAMETER ID 'IQM' FIELD i_data-qmnum.
            CALL TRANSACTION 'IW52' AND SKIP FIRST SCREEN.
          CLEAR ucomm.
          ENDIF.
      ENDCASE.
      CLEAR ucomm.
    ENDFORM.                    " f4300_user_command
    EXPLANATION
    In this program, first we created a PF status (ZSOM_STANDARD), which was an exact copy of STANDARD of program SAPLSALV through transaction SE41 (Menu Painter). Then we added another button to it,with a new fcode called ‘CHNG’.  After this this we set this PF status instead of STANADRD.
    We initialize a third event USER_COMMAND and associate a form with it. In this form we can capture the function codes and write any functionality under it. If we write functionality for an existing fcode, then this gets precedence over the default functionality that might be associated with it.
    In this example, we capture a standard fcode ‘&IC1’ that is nothing but double clicking a line of the report.  We are capturing the notification number of that line and calling transaction IW52 with it. We are also doing the same when a user clicks on the new ‘Change Notification’ button.
    When the user clicks the “Back’ button in IW52, it comes back to the report.
    Please reward for the same.
    Message was edited by: Prakhar Saxena

  • Print button on Web report.

    Hi gurus,
    We were trying to add a print button on Web report for printing the result area on the Web report.
    We followed the steps which has given in the How-to-guide How To Web Printing with Microsoft
    Excel document.
    In the document it has mentioned that
    1. Support package should be above 19 for BW 3.5 version
    2. Add HTML code in the WAD Template
    3. Import Transport file into the System.
    4. Apply OSS notes 736568 and 737082 to BW
    We upgraded the support package to 22, added the html code in the WAD template, imported the transport file into the BW system and applied the OSS notes as per the mentioned in the document.
    The transport file contains the Package u201CZPK_WEB_PRINTING_WITH_EXCELu201D and ABAP Classes u201CZCL_RSR_XLS_GRIDu201D,
    u201CZCL_RSR_XLS_HELP_WINDOW_PRINTu201D,
    u201CZCL_RSR_XLS_ITEM_CONDITIONu201D,
    u201CZCL_RSR_XLS_ITEM_EXCEPTIONu201D,
    u201CZCL_RSR_XLS_ITEM_GRIDu201D,
    u201CZCL_RSR_XLS_ITEM_TEMPLATEu201D,
    u201CZCL_RSR_XLS_ITEM_TEXT_ELEMENTSu201D,
    u201CZCL_RSR_XLS_TABLEu201D
    After import the transport file into BW, some of the objects in the ABAP Classes were not activated. I was trying to activate manually but those were not activating.
    Please guide me how to resolve the above issue or is there any way to get the printing the web report?
    Thanks in advance.
    Venkata.

    Hi
    If you want to print the web page directly then you can define a button using Java script and you can do it.
    Define java script code to print the page
    for ex define a button and call function for print.
    i cannot attach the code. but you can solve with java script
    Regards
    M.A
    Edited by: M.A on Jul 24, 2008 4:22 PM

  • Help on print button for interactive report

    Hi,
    I have created an interactive report and have also added a print button on the button of the report (unfortunately forgot how I did it). Say my column on the reports was Col_No, Col_First_name, Col_Last_name and a print button when I pressed a would get to choose open or save a pdf file, if I opened or saved it, I would had the same info on my pdf report as above.
    Since I have changed the column order meaning I have Col_No, Col_Last_name, Col_Start_Date, Col_First_name and that is working fine but when I click on the print button I will get the pervious columns.
    I noticed I have created a branches to print the report, basically after processing, when button was pressed an action with f?p=&APP_ID.:0:&SESSION.:PRINT_REPORT=6259824360775969936:&DEBUG.::: is present.
    I need help to fix this and I do very much appreciate any help or suggestions
    -regards
    ahmadii

    Found the answer, thanks.

  • Add a Print button to a Report Page

    I'm trying to add a Print button to a report page to render the page in printer-friendly mode and then give the user the option to send to a printer. I started with just trying to add a print button. I added a button to the region and added to the button request value javascript:window.print();. When I click on the print button, nothing happens. So I tried to add some html code:
    <form>
    <input type="BUTTON" value="Print" onClick="window.print()">
    <form>
    as a condition in Expression 1 when I selected "Current page is NOT in Printer Friendly mode". Nothing happens when I click on the print button. Can anyone offer some steps to create this functionality or point me to documentation on how to do this? I have tried the help documentation within APEX and isn't clear to me.
    Thanks

    The documentation wasn't very clear to me. I did try one suggestion to create a region on the report page and call it Print. The suggestion is then to add the following code to the Source Region section:
    <form>
    <input type='BUTTON' value="Print this page" onClick="window.print()">
    <form>
    The example however leaves out some significant information however. What is the region created as e.g. HTML, Report, Form, URL, etc?

  • Problems with parameter button in Crystal Report Server  2008

    Dear all,
    I have problems with parameter button in Crystal Report Server 2008.
    when I created some parameters and groups in Crystal Report 2008, they showed both parameters in 'Parameter button' and group in 'Group button'  on the left, so I can choose or type without clicking 'Refresh button' But when I added it to Crystal Report Server 2008 and I click parameter button , it doesn't show any parameter. Only click refresh button to choose them. On the other hand, for 'Group Tree' is ok. When go to Default Setting-> Parameter, all parameters are in 'Unused parameter'  First time I think I had problems with my installation, but when I reinstalled it again, it was like before.
    Could any one help me with this?
    I appreciate looking forward to your reply
    Ketya

    Try posting your questionin the correct forum, this is for SAP Business One, not Crystal reports Server

  • How to add a button as a report column

    Hi everyone,
    I am trying to add a button in a report as a column, thus, as the button press, one of column at current row of the report will be filled. Does anyone know how to do it?
    I knew I can do check box as a report column and create a button to process it But request hopes just one button for each row as result.
    Thanks!
    XW

    I am not sure what you are trying to do exactly. Adding a button is something you can do for sure in a report ( make the PK column a link and define the link image as a button ), but am not sur what you want the button to do, is it something like <edit> that when you click on it it takes you to another page (form) to edit that record info ? if yes then this is also doable for sure....let me know
    Sam

  • Hiding refresh button in Webi Report

    Hello experts,
    I would like to hide 'refresh' button on webi report in XI 3.1. One way to do this is using rights which I don't intend to use at this stage.
    Do we have any other way out to do this task?
    Many thanks in advance
    Regards,
    John

    Options:
    a) roll your own viewer/portal  - probably the safest bet, although a bit unwieldy if Infoview works fine and you only want to make this specific change
    b) make changes to Infoview's javascript files that render the toolbar buttons - entirely unsupported by SAP as well as a maintenance headache during upgrades
    c) ...revisit your reasons for not being able to disable refresh of the report to users - surely there's a security matrix that satisfies your requirement.  If there isn't (meaning that, for whatever reason you need these users to refresh against this content area in normal scenarios but want it disabled for this portion of your workflow) - then there are kludgy "work arounds" like adding/removing the user to/from a "no refresh" group you've created in the CMC,  programmatically, when running the report(s)
    good luck

Maybe you are looking for

  • Merging multiple rows in to a single row (when rows meet merging criteria)

    Hi  I have a scenario to merge multiple rows in to a single rows when the data in those rows fall in merge criteria .Below is how my data is  Now the merging logic for the above rows is , we need to combine multiple rows in to a single row when the d

  • Itunes and ipad remote

    I have itunes 10.5.2.1 running on a windows 7 pc and have my music organised into albums, some albums are taken from CDs and other albums are made up of music from various sources. When I select an album to play thru itunes on the pc, it plays the wh

  • Abap query, join between same tables

    Hi, I have an Abap Query (SQ01), I need to create a join between the same table (ESLL-ESLL) to obtain the services from a PO. The join is with the packno from ESLL to subpackno from ESLL (the same table). But I don't know how I can do that with Abap

  • Want to know about SAP course and SAP modules

      I am Sandeep, done BBM and have 3 years experience as Medical Representative(Pharma sales), and i'm perusing MBA in Sikkim Manipal University Distance Education, i came to know that SAP course has lot of scope in major industries, so that want to k

  • Pal to NTSC can I do it in Premiere or After Effects

    I have been asked to create a video for a client which is to be shown in Denver USA. I am shooting on a Sony FZ1 and will be working in Pal widescreen. Can I export it as NTSC footage or is this a specialist area, is After Effects a better programe f