Trigger change badi when click a custom button

hello guys i want to trigger the change badi when a user clicks on a button.  Any help would be create?
I am using the set change by client setting it to true and then firing the refresh but it is not working?  Any clues?  Thank you.

As I told you in that linked thread, I'd suggest trying to use SET_CHANGED_BY_CLIENT method on the context of your webdynpro. This is sufficient to make the system aware of a change and trigger the CHANGE badi.
As far as I've observed doing my tests, the CHANGE badi is then triggered after an event that will follow the SET_CHANGED_BY_CLIENT execution.
So I'd suggest two test:
- pre-exit of the method you trigger when the user press your custom buttom: set_changed_by_client and then execute your code. See if the badi is then triggered;
- if not: you could "force" a subsequent action after the button press, for example, a simple REFRESH of the view. Then I'm sure that, after the set_changed_by_client method, the badi will surely be triggered.
Please be aware that I'm absolutely NOT a guru on these arguments, so I'm trying to give you some workarounds I implemented on an SRM 7 system. Probably some guru will have better and cleaner solution for your task, but as far as I've seen, these ones should meet your needs.

Similar Messages

  • ALV  issue - capturing user changes in editable fields using custom button?

    Hi,
    I created a custom button in ALV tool bar.   And also in my ALV grid I have couple of fields Editable option. User can change values for these 2 fields.
    My question is -
    After changing values for these editable fields(more than 1 record)  , user will click on custom button and then I have to update all the user changed values in to my internal table(lt_tab)  and then I have to process logic.
    Problem is when user click on Custom button in ALV tool bar it is not having the changed values in lt_tab table.
    Only when user clicks  some thing on ALV grid records or fields then it is getting all the changed values in to lt_tab.
    Can any one tell me how I can get changed values when user clicks on custom button?
    1. Can we place custom button in ALV Grid? instead of ALV tool bar? 
    or
    How I can capture user changes when they click on custom button?
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    TABLES
          T_OUTTAB                          = lt_tab
    Please check this logic-
    CASE r_ucomm.
        WHEN '&IC1'.
    - It_tab  having all changed field values
      WHEN 'custom button'.
          lt_tab  - not having any changed values - showing all initial lt_tab values.
    I highly appreciate your answers on this.
    Thanks.
    Rajesh.

    Hi,
    Use this code, its working:-
    *&      Form  ALV_DISPLAY
    *       SUB-ROUTINE ALV_DISPLAY IS USED TO SET THE PARAMETERS
    *       FOR THE FUNCTION MODULE REUSE_ALV_GRID_DISPLAY
    *       AND PASS THE INTERNAL TABLE EXISTING THE RECORDS TO BE
    *       DISPLAYED IN THE GRID FORMAT
    FORM alv_display .
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
    *     I_INTERFACE_CHECK                 = ' '
    *     I_BYPASSING_BUFFER                = ' '
    *     I_BUFFER_ACTIVE                   = ' '
         i_callback_program                = v_rep_id       " report id
         i_callback_pf_status_set          = 'PF'           " for PF-STATUS
         i_callback_user_command           = 'USER_COMMAND' " for 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                      =
    *     I_GRID_SETTINGS                   =
         is_layout                         = wa_layout      " for layout
         it_fieldcat                       = it_field       " field catalog
    *     IT_EXCLUDING                      =
    *     IT_SPECIAL_GROUPS                 =
         it_sort                           = it_sort        " sort info
    *     IT_FILTER                         =
    *     IS_SEL_HIDE                       =
    *     I_DEFAULT                         = 'X'
         i_save                            = 'A'
         is_variant                        = wa_variant     " variant name
    *     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_final      " internal table
       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.
    ENDFORM.                    " ALV_DISPLAY
    *&      Form  USER_COMMAND
    *       SUB-ROUTINE USER_COMMAND IS USED TO HANDLE THE USER ACTION
    *       AND EXECUTE THE APPROPIATE CODE
    *      -->LV_OKCODE   used to capture the function code
    *                     of the user-defined push-buttons
    *      -->L_SELFIELD   text
    FORM user_command USING lv_okcode LIKE sy-ucomm l_selfield TYPE slis_selfield.
    * assign the function code to variable v_okcode
      lv_okcode = sy-ucomm.
    * handle the code execution based on the function code encountered
      CASE lv_okcode.
    * when the function code is EXECUTE then process the selected records
        WHEN 'EXECUTE'. "user-defined button
    * to reflect the data changed into internal table
          DATA : ref_grid TYPE REF TO cl_gui_alv_grid. "new
          IF ref_grid IS INITIAL.
            CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
              IMPORTING
                e_grid = ref_grid.
          ENDIF.
          IF NOT ref_grid IS INITIAL.
            CALL METHOD ref_grid->check_changed_data.
          ENDIF.
    * refresh the ALV Grid output from internal table
          l_selfield-refresh = c_check.
      ENDCASE.
    ENDFORM.
    This will reflect all the changes in the internal table. Now you can include your logic as per your requirement.
    Hope this solves your problem.
    Thanks & Regards,
    Tarun Gambhir

  • Adobe reader opens "save as" box when clicking on save button rather than saving in the same file

    Hi everybody,
    I have a fillable PDF form designed in Livecycle designer and it is reader extended. When I fill that form on MAC it let me fill and save the form as many times as I like. Everytime I make any change I just click the save button it saves changes in the same form. BUT is is behaving differently on Windows. After filling the form out when I click on save button it opens up "Save as " dialogue box to save a new copy with those changes. I have Adobe reader XI and Adobe Acrobat XI installed on windows. I know I can do that with Acrobat but I want that in reader for users who dont have acrobat.
    Please help me.....
    Thanks

    What are you filling out the form with on the MAC?

  • Opening a Support document when clicked on a button in Webdynpro-ABAP.

    Hi All,
    We have a requirement that when clicking on a button it should open a file which has file name stored in a table. How to make this possible.
    The path of the file should not be hardcoded, since the user can change the file and its name anytime, he will just update the name in that table. Our report has to fetch that exact file.
    Please help me in this.
    Thanks,
    Selvakumar M.

    Hi Radhika,
    We will be having the file stored in the common shared path, file may be of either .Pdf or .doc.
    I have not used the file upload option before, so i am not sure about it.
    But my requirement is not upload, it has to open a file from a path. Sorry if i mistook the meaning of the file upload option.
    Thanks for quick turnaround.
    Selva M.

  • Links change size when clicked

    I have a site done in Dreamweaver CS5 that the links in the navbar change size when clicked.  The bar is set to 95% but the links look like they are abound 50% when the mouse button is pressed.  All references to the size of the links in the HTML and CSS Page Properties are set to 95%. None of the other links properties; a, a:visited, a:hover, a:active, a:link, a:focus change the size.
    I've looked for several hours for solutions.  Anybody got any ideas?  BTW, this is my first site in Dreamweaver.

    I don't see any change in font-size in Firefox 3.6 on Win.  But your code is a bit confusing.
    Change this:
    a {
        font-size: 95%;
    a {
        font-size: 95%;
    a:visited {
        text-decoration: none;
        color: #960;
    a:hover {
        color: #2A3FFF;
        text-decoration: none;
    a:link {
        text-decoration: none;
        color: #626262;
    a:active {
        text-decoration: none;
        color: #626262;
        font-size: 95%;
    To this:
    a {font-size: 95%; text-decoration: none}
    a:link {color: #626262;}
    a:visited {color: #960;}
    a:hover {color: #2A3FFF;}
    a:active, a:focus {color: #626262;}
    The order in which link styles are defined matters in some browsers.  LiVHA is an easy memory device for link, visited, hover, active.
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    http://alt-web.com/
    http://twitter.com/altweb

  • IPhoto 6.0.5 crashes when clicking the Edit button

    On some of my albums....not all of them.... When clicking the Edit button or double clicking one of the photos in that album, to make it bigger so you can use the arrows to move throught the pictures, iPhoto crashes.
    It does this every time with certain albums. They are all jpeg, and the ones that are crashing worked fine before this last upgrade of iPhoto. Is there a known problem with this? I have looked around and seems as though people have had some problems similar to this but not exaclty the same.
    Is there something that can be done that I don't know about to remedy this?
    Any and all help/suggestions would be much appreciated.
    Thanks

    Scott:
    It may be a color profile issue. Download the Automator workflow "Embed sRGB Profile" file from Toad's Cellar and unzip it. Then export one of the problem files to the desktop and drop on the workflow application. Then import the file and see if it will edit OK. If so you can find the files in the Originals folder that are giving you problems and drag them onto the workflow application file. BUT, just in case make a temp backup copy of the iPHoto Library folder beforehand.
    Do you Twango?
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.

  • Running abap reports in the background when clicked on Webdynpro Button

    Hi Experts,
    I have requirement where when clicked on a Button in a Webdynpro application, it needs to run an abap reports in the background and I need to pass some parameters to the report.
    Is it possible to do that? if yes, please guide me though.
    Reward points for useful tips.
    Sabbir
    Edited by: Sabbir Ahmed on Oct 17, 2008 8:05 AM
    Edited by: Armin Reichert on Oct 24, 2008 10:05 AM

    you can use rfc's model  for this na?
    pass the parameters to the RFC and through that RFC run the report,
    with regards
    shanto aloor.

  • I want to do banners ,how can we do  when click the same button (next button)  it must show differen

    i want to do banners ,how can we do  when click the same button (next button)  it must show different images . cam any one help

    Check out my blog with samples on Edgehero.
    http://www.edgehero.com/articles/interactivity

  • How to maintain dynamic rows with data when click on Previous button?

    Hi,
    I have 1 aspx page and divided into 3 pages using panels.Each panel has "Next" and Previous buttons
    I have created and deleted dynamic table rows when click on Add button using javascript. whenever i click on Next button it will navigate to same page of next panel.
    when i click on previous button then it goes to previous panel but whatever i have added dynamic table rows in 1st panel that got removed.
    Can u please help me for how to maintain state of dynamic table rows with entered data when click on Previous button?
    How to get dynamic table rows with entered data in previous panel when click on Previous button?
    Please find the below javascript code:
    function insertRow() {
    if (index >= 2) {
    document.getElementById('deleteRow').style.display = "inline";
    else { document.getElementById('DeleteRow').style.display = "none"; }
    var table = document.getElementById("myTable");
    var row = table.insertRow(table.rows.length);
    cell1 = row.insertCell(0);
    t1 = document.createElement("select");
    t1.options[t1.options.length] = new Option('--Select--', '0');
    t1.id = "ddlYear" + index;
    cell1.appendChild(t1);
    for (var i = 1975; i <= 2015; i++) {
    opt = document.createElement("option");
    opt.value = i;
    opt.text = i;
    t1.add(opt);
    t1.style.width = "155px";
    var cell2 = row.insertCell(1);
    t2 = document.createElement("Select");
    t2.options[t2.options.length]=new Option('--Select--','0');
    t2.options[t2.options.length]=new Option('State Board','1');
    t2.options[t2.options.length]=new Option('CBSE','2');
    t2.options[t2.options.length]=new Option('ICSE','3');
    t2.options[t2.options.length] = new Option('Others', '4');
    t2.style.width = "155px";
    t2.id = "ddlCourse" + index;
    cell2.appendChild(t2);
    var cell3 = row.insertCell(2);
    t3 = document.createElement("input");
    t3.id = "txtCity" + index;
    cell3.appendChild(t3);
    var cell4 = row.insertCell(3);
    t4 = document.createElement("input");
    t4.id = "txtInstitute" + index;
    cell4.appendChild(t4);
    var cell5 = row.insertCell(4);
    t5 = document.createElement("Select");
    t5.options[t5.options.length] = new Option('--Select--', '0');
    t5.options[t5.options.length] = new Option('English', '1');
    t5.options[t5.options.length] = new Option('Hindi', '2');
    t5.options[t5.options.length] = new Option('Telugu', '3');
    t5.options[t5.options.length] = new Option('Others', '4');
    t5.style.width = "155px";
    t5.id = "ddlMedium" + index;
    cell5.appendChild(t5);
    var cell6 = row.insertCell(5);
    t6 = document.createElement("input");
    t6.id = "txtSpecialization" + index;
    cell6.appendChild(t6);
    var cell7 = row.insertCell(6);
    t7 = document.createElement("input");
    t7.id = "txtFnl" + index;
    cell7.appendChild(t7);
    index++;
    function DeleteRow(index) {
    var table = document.getElementById("myTable");
    table.deleteRow(index);
    // if (index = 2) { alert("There is no rows added.Please add the new row"); }
    Design:
    <tr style="font-size: 12pt" id="trSecond" runat="server">
    <td colspan="3">
    <table id="myTable" width="100%" border="0">
    </table>
    <tr>
    <td colspan="3" align="right">
    <input type="button" title="Add" value="Add" onclick="insertRow();" />
    <input type="button" id="deleteRow" title="Delete" value="Delete Row" onclick="DeleteRow(this);" style="display:none" />
    </td>
    </tr>
    Thank you.

    Put the button click into an action listener and build the new frame there. The code I have below isn't exactly what you're doing (it's amazingly oversimplified), but it's probably similar enough to get your wheels turning in the right direction.
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.*;
    public class sample
         public static void main(String[] args)
              JFrame frame = new JFrame("Sample");
              frame.setSize(400,400);
              Container content = frame.getContentPane();
              content.setLayout(new FlowLayout());
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              final JTextField text = new JTextField(10);
              content.add(text);
              JButton button = new JButton("Send");
              content.add(button);
              frame.setVisible(true);
              button.addActionListener(new ActionListener()
                   public void actionPerformed(ActionEvent ae)
                        JFrame myframe = new JFrame("Results");
                        myframe.setSize(200,200);
                        Container mycontent = myframe.getContentPane();
                        mycontent.setLayout(new FlowLayout());
                        String mytext = text.getText();
                        JLabel label = new JLabel();
                        label.setText(String.valueOf(mytext));
                        mycontent.add(label);
                        myframe.setVisible(true);
    }

  • Is there any function or way to get a text when clicked on a button

    Hi all,
    I need to get a file name when clicked on a button at user-command(just after the selection ends and the output came, there are some buttons on the screen).
    Any function, thanks.

    If you want user to supply a file name, you should popup a file selection dialog box. Depending on where the file might reside, use one of the following function modules.
    F4_FILENAME      
    F4_FILENAME_SERVER

  • I run DeviceDemo sample to send email, when click send email button after f

    I run DeviceDemo sample to send email, when click send email button after filling all fields, it took me to EverNote application, can not send email. does anyone has this kind experience? how to fix it?

    Hi,
    ADF Mobile cannot directly send emails as this is a security precaution of your mobile phone (imagine all applications could send mails without you confirming). Instead the send mail functionality launches the mail client you have configured and fill in the information you provided in the application. The mail function by the way is implemented through Cordova.
    Frank

  • Making buttons change colour when clicked on, sounds simple......

    hello could somebody please give me the code to make a jbutton change colour when it is clicked on, muuuuuuuuuch appreciated, thanks!!!!!!!!!!!!!!!!!!!!

    w e l l - k e w l !
    I made a few adjustments here. Mainly for myself:- you know when you JUST CANNOT FIND THAT DARN COLOUR !!! - 'Pandavas' sexy little program is right on the button!
    Click on the button and it cycles through colours randomly and tells you the RGB value ...import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class ColorChanges extends JFrame implements ActionListener {  
      int red = 0;
      int blue = 0;
      int green = 0;
      java.util.Random rand = new java.util.Random();
      JButton button = new JButton("Colour Me!");
      JLabel label1 = new JLabel("                  The new colours are:                ");
      JLabel label2 = new JLabel("");
      public ColorChanges() {
        super("RGB VALUES:");
        setSize(200,108);
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);  
        button.addActionListener(this);
        getContentPane().setLayout(new FlowLayout() );
        getContentPane().add(button);
        getContentPane().add(label1);
        getContentPane().add(label2);
        setVisible(true);  
      public void actionPerformed(ActionEvent eve) {    
            red = (Math.abs((rand.nextInt())%255));
            blue = (Math.abs((rand.nextInt())%255));
            green = (Math.abs((rand.nextInt())%255));
            cooller();
      public void cooller() {   
          button.setBackground(new Color(red,green,blue));
          label2.setText("RED: "+red+" GREEN: "+green+" BLUE: "+blue);      
      public static void main(String[] args) {
          new ColorChanges();  
    }

  • WCEM:clicking on custom button(Excel Downlaod) giving message "An error occurred; please try again. If the error persists, please contact technical support."

    Hi Expert,
    I need help.
    I created a custom button to download data to an excel sheet. after clicking the button I am getting message
    "An error occurred; please try again. If the error persists, please contact technical support.".
    I tried debugging WCEM, but it is not even reaching that point.
    Your help will be highly appreciated.
    here is the code.
    BitContentview.XHTML
    <wec:commandButton  id="bdtexcel" immediate="true" actionListener="#{cc.vch.DownloadBITData}" type="submit" value="#{i18n['invoices.ui.openitems.printSelected']}"/>
    UI-repository.xml
      <ViewComponent name="BITContentView"  componentHandlerClassName="com.cpr.cprwec.app.comm.module.ebpp.ui.handler.impl.BITDetailViewVCHandler"/>
    BITDetailViewVCHnadler.java
    package com.cpr.cprwec.app.comm.module.ebpp.ui.handler.impl;
    import com.cpr.cprwec.app.comm.module.ebpp.backendobject.interf.EbppBackend;
    import java.io.IOException;
    import java.text.ParseException;
    import java.text.SimpleDateFormat;
    import java.util.Date;
    import java.util.List;
    import javax.faces.context.FacesContext;
    import javax.faces.context.FacesContext;
    import javax.faces.event.ActionEvent;
    import javax.servlet.ServletOutputStream;
    import javax.servlet.http.HttpServletResponse;
    import com.cpr.cprwec.app.comm.module.ebpp.modulemgmt.impl.EbppModuleAccessImpl;
    import com.cpr.cprwec.app.comm.module.ebpp.modulemgmt.interf.EbppModuleAccess;
    import com.cpr.cprwec.app.comm.module.ebpp.ui.dto.impl.DisputeDataDTOImpl;
    import com.cpr.cprwec.app.comm.module.ebpp.ui.dto.impl.OpenItemDTOImpl;
    import com.cpr.cprwec.app.comm.module.ebpp.ui.dto.interf.DisputeDataDTO;
    import com.cpr.cprwec.app.comm.module.ebpp.ui.dto.interf.OpenItemDTO;
    import com.cpr.cprwec.app.comm.module.ebpp.ui.dto.impl.BITDataDTOImpl;
    import com.cpr.cprwec.app.comm.module.ebpp.ui.dto.interf.BITDataDTO;
    import com.cpr.cprwec.app.comm.module.ebpp.ui.dto.impl.BITDetailDTOImpl;
    import com.cpr.cprwec.app.comm.module.ebpp.ui.dto.interf.BITDetailDTO;
    import com.sap.wec.app.common.module.common.attachment.businessobject.interf.Attachment;
    import com.sap.wec.tc.core.backend.sp.jco.JCoConnection;
    import com.sap.wec.tc.core.businessobject.BusinessObjectException;
    import com.sap.wec.tc.core.common.exceptions.ApplicationBaseRuntimeException;
    import com.sap.wec.tc.core.common.logging.WCFLocation;
    import com.sap.wec.tc.core.common.searching.businessobject.impl.GenericSearch;
    import com.sap.wec.tc.core.common.searching.businessobject.interf.GenericSearchReturnResultData;
    import com.sap.wec.tc.core.common.util.GenericFactory;
    import com.sap.wec.tc.core.common.util.Message;
    import com.sap.wec.tc.core.common.util.MessageList;
    import com.sap.wec.tc.core.common.util.table.Table;
    import com.sap.wec.tc.core.common.util.table.TableRow;
    import com.sap.wec.tc.core.modulemgmt.ForeignModuleAccess;
    import com.sap.wec.tc.core.modulemgmt.ModuleAccess;
    import com.sap.wec.tc.core.modulemgmt.exceptions.ModuleInactiveException;
    import com.sap.wec.tc.core.modulemgmt.exceptions.ModuleLifecycleException;
    import com.sap.wec.tc.core.runtime.WecFrameworkRuntime;
    import com.sap.wec.tc.core.runtime.WecSession;
    import com.sap.wec.tc.core.runtime.jsf.WecFrameworkRuntimeJSF;
    import com.sap.wec.tc.core.runtime.jsf.composition.PageManagerBean;
    import com.sap.wec.tc.core.runtime.navigation.NavigationCondition;
    import com.sap.wec.tc.core.ui.composition.menu.MenuManager;
    import com.sap.wec.tc.core.ui.composition.menu.MenuMetadataException;
    import com.sap.wec.tc.core.ui.vc.BuildTime;
    import com.sap.wec.tc.core.ui.vc.NavigationParameterBinding;
    import com.sap.wec.tc.core.ui.vc.RequestParameterBinding;
    import com.sap.wec.tc.core.ui.vc.impl.ViewComponentHandlerBaseImpl;
    import com.cpr.cprwec.app.comm.module.ebpp.businessobject.interf.BIT;
    import com.cpr.cprwec.app.comm.module.ebpp.businessobject.impl.BITImpl;
    public class BITDetailViewVCHandler extends
            ViewComponentHandlerBaseImpl<EbppModuleAccess> {
        protected static final WCFLocation LOCATION = WCFLocation
                .getInstance(BITDetailViewVCHandler.class.getName());
        public BITDataDTO bitDataDTO;
        public BITDetailDTO bitDetailDTO;
        public List<BITDataDTO> BITDataDTOList;
        public List<BITDetailDTO> BITDetailDTOList;
        public boolean noBITData;
        public boolean noBITDetail;
        public boolean renderPanel = true;
        public boolean isDownloadBITData;
        public boolean isDownloadBITDetail;
        public boolean downloadStarted=false;
        public boolean BITFound =false;
        public boolean isBITFound() {
            return BITFound;
        public void setDownloadStarted( boolean downloadStarted ){
            this.downloadStarted = downloadStarted;
        public boolean getDownloadStarted(){
            return this.downloadStarted;
        public void setBITFound(boolean BITFound) {
            this.BITFound = BITFound;
        public String getObjectID() {
            return objectID;
        public void setObjectID(String objectID) {
            this.objectID = objectID;
        public List<BITDataDTO> getBITDataDTOList() {
            return BITDataDTOList;
        public List<BITDetailDTO> getBITDetailDTOList() {
            return BITDetailDTOList;
        public Boolean getNoBITData() {
            return noBITData;
        public Boolean getNoBITDetail() {
            return noBITDetail;
        public Boolean getRenderPanel() {
            return renderPanel;
        private static final int DEFAULT_BUFFER_SIZE = 1024000;
        public Attachment attachmentData;
        public Attachment getAttachmentData() {
            return attachmentData;
        @RequestParameterBinding(maxLength = 1024)
        protected String objectID;
        @BuildTime
        public String processBuildTime() throws BusinessObjectException {
            BIT BIT = null;
            noBITData = noBITDetail = false;
            renderPanel = true;
            if (isLoggedIn()) {
                if ( isDownloadBITData == true ){
                    this.downloadBITDataExcel();
                else {
                this.getModuleAccess().getBITBO().clearMessages();
                BIT = this.moduleAccess.getBITBO().getBITFromBackend(objectID);
                BITDataDTOList = BIT.getBITDataDTOList();
                BITDetailDTOList = BIT.getBITDetailDTOList();
                MessageList objectData = this.getModuleAccess().getBITBO()
                        .getMessageList();
                if (objectData.size() > 0) {
                    noBITData = noBITDetail = true;
                    renderPanel = false;
                    this.addMessageList(objectData);
            return checkLoginCondition();
        private boolean isLoggedIn() {
            return checkLoginCondition() == null;
        private String checkLoginCondition() {
            NavigationCondition navCondition = getNavigationCondition("login");
            if (!navCondition.isFullfiled()) {
                navCondition.addToNavigationStack();
                return navCondition.getOutcome();
            return null;
        public String downloadBITData(){
            downloadStarted = true;
            isDownloadBITData = true;
            downloadBITDataExcel();
            return checkLoginCondition();
        public void downloadBITDataExcel() {
        //    dummyDebug("downloadBITDataExcel", BITDataDTOList.size(), "", "" );
            if (BITDataDTOList.size() > 0) {
                try {
                    attachmentData = this.getModuleAccess().getDownloadBO()
                            .getBITDataExcel(BITDataDTOList);
                    if (attachmentData != null) {
                        FacesContext faces = FacesContext.getCurrentInstance();
                        HttpServletResponse response = (HttpServletResponse) faces
                                .getExternalContext().getResponse();
                        response.reset();
                        response.setContentType(attachmentData
                                .getAttachmentMimeType());
                        response.setContentLength(attachmentData
                                .getAttachmentContent().length);
                        response.setHeader("Content-disposition",
                                "attachment;filename="
                                        + attachmentData.getAttachmentName());
                        response.setBufferSize(DEFAULT_BUFFER_SIZE);
                        ServletOutputStream out;
                        try {
                            out = response.getOutputStream();
                            out.write(attachmentData.getAttachmentContent());
                            out.flush();
                            faces.responseComplete();
                        } catch (IOException e) {
                            throw new ApplicationBaseRuntimeException(
                                    "Problem opening file", e);
                        } finally {
                            attachmentData = null;
                } catch (BusinessObjectException e) {
                    e.printStackTrace();
            isDownloadBITData = false;

    Thanks Hamendra for checking the issue.
    I am setting up breakpoints in WCEM, tab JAVA EE then from menu RUN->Toggle brekpoints and then debug configuration.
    the breakpoints are in several places in  handler class BITDetailviewVCHandler class including method  downloadBITData.
    this method I am calling from BitContentview.XHTML
    <wec:commandButton  id="bdtexcel" immediate="true" actionListener="#{cc.vch.DownloadBITData}" type="submit" value="#{i18n['invoices.ui.openitems.printSelected']}"/>
    When the BIT page is loading the control stops at the breakpoint.
    but it is not stopping there  when i click the 'Excel Download' button.
    How do I get the log file. I am very new to WCEM, please guide me.
    I tried to debug the UI using Google chrome. it is giving me the following error.
    POST https://<>/<>/<>/<>HomePage.jsf?wec-appid=<>MAINAPP6&wec-locale=en_US 500 (Internal Server Error)
    when I expand the node
    c.event.trigger:<>/<>/javax.faces.resource/sap/comp.theme/templates/jquery/lib/jquery-1.4.2.min.js.jsf:54
    c.event.trigger:<>/<>/javax.faces.resource/sap/comp.theme/templates/jquery/lib/jquery-1.4.2.min.js.jsf:54
    c.event.trigger:<>/<>/javax.faces.resource/sap/comp.theme/templates/jquery/lib/jquery-1.4.2.min.js.jsf:66
    (anonymous function):<>/<>/javax.faces.resource/sap/comp.theme/templates/jquery/lib/jquery-1.4.2.min.js.jsf:30
    c.extend.each:<>/<>/javax.faces.resource/sap/comp.theme/templates/jquery/lib/jquery-1.4.2.min.js.jsf:24 c.fn.c.each:<>/<>/javax.faces.resource/sap/comp.theme/templates/jquery/lib/jquery-1.4.2.min.js.jsf:66 c.fn.extend.trigger:<>/<>/javax.faces.resource/<>dev/comp.theme/templates/jquery/js/commandButton.js.jsf:31
    com.sap.wec.commandButton.submitForm:<>/<>/main/<>HomePage.jsf?wec-appid=<>MAINAPP6&objectID=500000233&page=D61CFFF8E75D48A1B348F315D209EFF9&wec-locale=en_US:48 onclick
    Navigated to https://wsapdjd803.<>.ca:<>/<>/main/<>HomePage.jsf?wec-appid=<>MAINAPP6&wec-locale=en_US
    Seems to be it is failing somewhere commandButton-related JavaScript functions
    Thanks
    Subassish

  • Crystal Report/STRUTS: Error (404) when clicking on Control Buttons (Print, Export, Next, Previous, etc...) on report viewer

    Post Author: jwenny
    CA Forum: Deployment
    Need help badly!!!
    We are using the crystal reports plugin for STRUTS.
    We are able to display the report in the crystal report viewer.  However, when we click any control buttons (print, export, etc...), then we get:
    JSPG0036E:  Failed to find resource /Report-viewer.jsp
    We then moved Report-viewer.jsp to the WebContents folder (root directory) and got a different error when we clicked any control button:
    Error:  400 page not found
    Does anyone know how to solve this problem?  For instance, is there a setting or parameter that needs to be set?
    Greatly appreciate any help!

    HI,
    Whenever we print the viewer does an auto postback, I believe due to this some of the values are getting missed. Moreover we are referring to the viewer and reportdocument object, it seems. So can you try this simple code in an application to see if it helps:
    ReportDocument rdoc = new ReportDocument();
    rdoc.Load("C:\TASKECrystalReports\Intraday.rpt");
    rdoc.SetDatabaseLogon("uid","pwd");
    rdoc.SetParameterValues("parameter name","value");
    CrystalReportViewer.ReportSource = rdoc;
    Helps?
    Thanks.

  • CRM Header data not getting refreshed in BADI when clicked in New order

    We have used a ORDERADM_H BADI, header badi to populate some custom field values.
    Step 1) While creating sales order in CRM(CRMD_ORDER), we are giving inputs such as sold to party , material etc.
    Step 2) Before actually saving the order, we found that we dont need this order to be created and again click on create new button in the transaction. In order header BADI, order data for the previous order is not getting refreshed. The previous GUID is still there and function module CRM_ORDER_READ still retrieves the old order values which was cancelled in the previous step. It is causing lot of issues and finally giving dump.
    basically the previous GUID is not getting refreshed. Please suggest

    Pls send the code that you have in the Badi. Did you actually compare the GUIDs manually ? Instead of CRM_ORDER_READ have you tried using CRM_ORDER_READ_OW ?

Maybe you are looking for

  • Issues while creating a new contact in iOS 8.1

    I'm currently using iOS 8.1 on my iPhone 5s. I am currently using SwiftKey as my default keyboard. When I create a new contact and tap the First Name field, the cursor to the Last Name field itself. I have to tap the First Name field again in order t

  • Need to find impact of Vertex O series upgrade on ECC and changes required?

    Hello experts, My client is upgrading Vertex series to O from Q. As part of Q series, additional fields such street will be used to identify correct tax jurisdiction code in system.  Also, zip code used will be 9 digits (zip+4) instead of 5 digits. W

  • Why is my mp620 printing blank pages?

    I installed a new Staples black cartridge and printer stopped printing.  I removed the Staples cartridge and replaced with a Canon cartridge but problem persists.

  • How to untagged or remove iPhoto on a previous apple id in the same macbook pro

    hi mac users, i previously used a dummy apple id when i purchased my macbook pro and install iphoto and imovie and garageband. now i want to reinstall this apps using a different apple id that i want to use permanently. but the app store would not al

  • Flash Movie export with Keynote

    Hi, I am using Keynote this time mainly to make a Flash movie for a website. However, when I export the movie to SWF format,the file is quite large (About 9mb) too large for use online. Does anyone know, is there a way to reduce this filesize? I look