Implement the exit IPRM0005 to schedule preventive plant

Hi,
I've implemented and activated the user exit IPRM0005 to schedule the preventive maintenance plant .
Which tx do I have to execute to pass across the code to modify the performance of the maintenance plant?
Thanks in advance
Kind regards¡¡

Hi,
Look for the Program running behind Txn Code IP10 using Txn Code SE93, or use the Path on the TXn First Screen .....Menu Bar : System->Status look for the Program name, and double click on that.....Use String Search for your User Exit "IPRM0005"........and look for the code of the User Exit....

Similar Messages

  • How to implement the exit EXIT_SAPLMCS1_001?

    Hi Gurus,
    I have already implemented an exit EXIT_SAPLRSAP_001 to extract additional information which was not being extracted by standard extractor. But the problem is that, whenever the fields (which were appended) are being changed in the base table the record is not getting picked up in the LBWQ.
    Unless this record gets picked up in the queue, the exit which was developed earlier would not work. I learned very recently that the exit EXIT_SAPLMCS1_001 could be used to push the changes made to the data in the base table to the queue. If so plz let me know how to do that. Plz provide me a sample code for that if possible?
    Points will be awarded accordingly.
    Regards,
    Kiran

    Hi,
    Some one has already  using the same Enahncement and created the projewct nameYCUST  thats why you are getting that error .So you can add your own code to the existing project.
    Reward if useful.
    Thanks,
    Nageswar.

  • Implementation of exit APOCDPS1in the Production Planning Run

    Hi Folks,
    I am trying to implement the exit APOCDPS1 in the Production Planning Run transaction /n/sapapo/cdpsb0.
    Can anyone throw some light on the implementation methodology ?
    Further Inorder to use the exit in the production planning run , i need to select an option " Planning Object = 5 Copy objects from Customer Exit APOCDPS1". And then I need to select "Selection ID". Where can I configure this selection ID ? Should I need to build this in the exit?
    Thanks for your support.
    Best Regards
    Yoge

    Hi Yogeswaran,
    Kindly contact your ABAP consultant for implementing the said user exit. This user exit is called when production planning run is executed.
    The selection ID needs to be mentioned in the code. And here for particular selection ID you can write specific selection criteria. For example, we wanted to select orders of particular date which is not possible in standard selection.
    Best regards,
    Vaibhav

  • How to get the name of the exit in FM "EXIT_SAPLBSVA_001'

    Hello all,
    i need to get the name of the enhancment  for the function module 'EXIT_SAPLBSVA_001' as i need to use this userexit and in CMOD i need to write the enhancement  having this exit.
    please help soon.
    Regards
    geeta gupta

    Hello,
    Identify the program name of the Tcode for which u r trying to implemente the Exit and check the enhancements for the same wth SMOD tcode or CMOD
    Regards

  • Dump after implementing the Note 741385 Goods receipts up to current date for scheduling agreements

    Hi,
    I implemented the sap note 741385, but while performing GR getting dump
    I unable to figure out why the EXIT_SAPLEINR_003 has been called, please find the following run time error .
    Runtime Errors    
    CALL_FUNCTION_PARM_UNKNOWN
    Except.           
    CX_SY_DYN_CALL_PARAM_NOT_FOUND
    Date and Time     
    10.04.2014 11:39:15
    Short text
    Function parameter "ISU_ENHANCEMENT" is unknown.
    What happened?
    Function module "EXIT_SAPLEINR_003" was called
    with the parameter "ISU_ENHANCEMENT".
    This parameter is not defined.
    Error analysis
    An exception occurred that is explained in detail below.
    The exception, which is assigned to class 'CX_SY_DYN_CALL_PARAM_NOT_FOUND', was
    not caught in
    procedure "WE_BEWERTEN" "(FORM)", nor was it propagated by a RAISING clause.
    Since the caller of the procedure could not have anticipated that the
    exception would occur, the current program is terminated.
    The reason for the exception is:
    Function module "EXIT_SAPLEINR_003" was called
    with the parameter "ISU_ENHANCEMENT".
    This parameter is not defined.
    Missing RAISING Clause in Interface
    Program                            
    SAPLEINR
    Include                            
    LEINRF25
    Row                                
    8
    Module type                        
    (FORM)
    Module Name                        
    WE_BEWERTEN
    Trigger Location of Exception
    Program                            
    SAPLEINR
    Include                            
    LEINRF25
    Row                                
    151
    Module type                        
    (FORM)
    Module Name                        
    WE_BEWERTEN
    Source Code Extract
      122  
    IMPORTING
      123    
    e_vkwrt          
    = pot-vkwrt
      124    
    e_vkwra          
    = pot-vkwra
      125  
    TABLES
      126    
    i_tkomv          
    = tkomv
      127  
    EXCEPTIONS
      128    
    OTHERS           
    = 01.
      129
    IF sy-subrc EQ 0.
      130  
    MODIFY pot.
      131
    ENDIF.
      132
    EXIT.
      133   ENDIF.
      134
      135   MOVE-CORRESPONDING pot TO ekpo.
      136
      137   DATA: p_menge LIKE ekpo-menge,                       
    "1.2 KR
      138    
    p_datum LIKE sy-datum.                         
    "1.2 KR
      139                                                        
    "1.2 KR
      140 * pot-erfmg wird in pot_aufbauen schon entsprechend vorbelegt
      141   p_datum = budat.                                     
    "1.2 KR
      142   p_menge = pot-erfmg.                                 
    "1.2 KR
      143
      144 *- Userexit um Preisfindungsdatum und -menge zu ändern ----------------*
      145 * --> kann auch bei Bestellungen genutzt werden, um das Datum zu ändern
      146 *  nicht aber die Menge (macht keinen Sinn und ist nicht programmiert)
      147   MOVE ett[] TO cett[].
      148
      149 ENHANCEMENT-POINT WE_BEWERTEN_05 SPOTS ES_SAPLEINR.
      150
    >>>>   CALL CUSTOMER-FUNCTION '003'
    152 
    EXPORTING i_ekko  = ekko
    153           
    i_ekpo  = ekpo
    154           
    i_budat = budat
    155           
    i_bldat = i_bldat
    156           
    isu_enhancement = ls_enhancement        
    "IS2ERP
    157 
    TABLES
    xeket   = cett
    158 
    CHANGING  c_datum = p_datum
    159           
    c_menge = p_menge.
    160   REFRESH cett.                                        
    "99794
    161   IF ekko-bstyp EQ bstyp-best.
    162
    p_menge = pot-erfmg.
    "damit wird die Bestellmenge verwendet
    163   ELSE.
    164
    pot-erfmg = p_menge.
    165   ENDIF.
    166
    167 *  MOVE-CORRESPONDING pot TO potkey.
    "Preisfindungsmenge merken
    168 *  READ TABLE ekp WITH KEY potkey.     
    "MWE-HPR-HW-205016
    169   READ TABLE ekp WITH KEY ebeln = pot-ebeln
    170                      
    ebelp = pot-ebelp

    Hi,
    please implement SAP note 916474 - A dump occurs when you call user exit EXIT_SAPLEINR_003
    SAP enhancement MEVME001 contains both
    EXIT_SAPLEINR_001
    EXIT_SAPLEINR_003
    Regards,
    Klaus

  • How to implement the search help exit to MM01 for Material by product hiera

    Hi,
    How to implement the search help exit to MM01 T-code for Material by product hierarchy,
    but system default it gives the data from MVKE table, my client wants from MARA table,
    i created the one Function Module, write this code in that FM.
    IF CALLCONTROL-STEP EQ 'DISP'.
    REFRESH RECORD_TAB.
    SELECT * FROM MARA INTO TABLE RECORD_TAB
    WHERE PRDHA = 
    ENDIF.
    I Face the problem what variable i have to pass in WHERE CONDITION, FROM THE MM01 T-code.
    is't require to IMPORT variable from MM01 program, what is that import variable, please give me the solution.
    thanks to all.

    Hi there..
    check my web blog on search help exit...
    [Search help exit code|https://wiki.sdn.sap.com/wiki/x/du0]

  • Implementing the Scheduler on Solaris

    We are implementing the OBIEE scheduler on Solaris 9. We followed the steps in the bookshelf and run the run-sch.sh file. The scheduler log is created as a zero byte file and the process does not come up. Has anyone implemented the scheduler on Solaris and what steps did they need to take?

    For interest, what was the incorrect setting?

  • How can we find the exit being implemented in a project.

    Hello,
    Very Good morning!
    How to find the impelementd exit for a given transaction
    How can we find the exit being implemented in a project and to find it's source code?
    Any Suggestions would be appreciated...
    Regards,
    Kittu

    Hi,
    Ways to find the exit triggering in the source code:
    1)first way
    1) If you hav that FM exit that was listed r used.
    2) go to se37 and type that FM
    3) In the source code of that FM double click the type of Message or
    exit result which has the Z<include>.
    4)IN order to disable the exit->
    utilities->system->sattus->program->attributes->package
    find this package
    5) in SMOD->Prject->F4help->giuve package name-give the found ones
    But here we cant see the implementation.
    2) second way
    1)goto SE37
    2)Give FM name
    3)/h(Debugging on)
    4) Display
    5) Break points->statements->(messages if used in exit)->execute
    Click on f5 until that Exit is triggered
    6) go and find out for each type of exit message shown ie til that exit functionality is
    actually triggered
    7)once u find that exit ur looking for->
    8)GOTO->SOURCECODE->give the include name that is found in debugging when exit is encountered
    9)copy this include name(ZX..)->keep a comment forthat exit in this include(ZX..) inorder not to process.
    10) se38->Zincludename(ZX..) and comment the code.
    11)save check n activate
    ->SE37->
    FM->name
    we can now view FM.
    3) third way
    1)FM->Name
    2)/H
    3)Break point at CALL CUSTOMER-FUNCTION statement
    4) It will stop at this exit.
    Reward if helpful.
    Best Wishes,
    Chandralekha

  • Can I implement the BADI_SD_SALES for VA01

    Can I implement the BADI_SD_SALES for VA01  I tried that, but it won't me allow for display in Classic BAdi.

    Hi,
    This badi is used for Internal purpose of SAP.So try to do your validation with some other badi's or exit.
      some of User Exits For VA01
    V45E0001 : Update the purchase order from the sales order
    V45E0002 : Data transfer in procurement elements (PRreq., assembly)
    V45A0002 : Predefine sold-to party in sales document
    V45A0003 : Collector for customer function modulpool MV45A
    V45L0001 : SD component supplier processing (customer enhancements)
    V45P0001 : SD customer function for cross-company code sales
    SDTRM001 : Reschedule schedule lines without a new ATP check
    V45A0001 : Determine alternative materials for product selection
    V45A0004 : Copy packing proposal
    V46H0001 : SD Customer functions for resource-related billing
    V60F0001 : SD Billing plan (customer enhancement) diff. to billing plan
    V45S0001 : Update sales document from configuration
    V45S0003 : MRP-relevance for incomplete configuration
    V45S0004 : Effectivity type in sales order
    V45W0001 : SD Service Management: Forward Contract Data to Item
    Thanks,
    AMS

  • Implementing user exits !!!!

    hi can any body please send me the detailed steps to implement user exits in (ecc 5.0) step by step ....process ....how can we use them  in ABAP .....these enhancements...i.e how can i  configure function exit ,menu exit , field exit ..&...screen exit as well as .....
                      thanks in advance ..........

    Hi,
    From PP point of view, the following exit is used.
    For MRP run transaction md01 is used. This is for all the material in the plant.Suppose if we need to run mrp for a particular material type(Eg:PD/VB) then we need to create a key. This key is entered in the user exit key filed in the md01 transaction screen.
    With the help of ABAP we need to write a program for this key with the corresponding enhancement.Then mrp run can be carried out for the particular mrp type.
    From SD point of view, While creating sale order using transaction va01. If you want the sold-to-party to be a default value everytime you create a sale order, then you can use the corresponding enhancement & in cmod transaction can write a program telling sold-to-party as "ABC".
    Whenever you create a sale order ABC will appear in the sold-to-party field.
    Regarding menu exit if you want to add an option or hide an option in the menu then if the enhancement is available you can do it.
    Regards,
    Senthilkumar

  • Implementing the Enterprise Support in Solution Manager

    Hi Experts,
    Can anybody tell me what are the pre requisites to implement Enterprise support in solution manager?
    Also let me know what are steps involved in implementing the enterprise support.
    Thanks in Advance
    Hari

    Hello Hari,
    In order to implement Enterprise Support your organization should registered as a Value Added Reseller(VAR) with SAP. You can get all the required documentation under https://websmp104.sap-ag.de/solutionmanager --> Information for VARs, ASPs and AHPs which is in the left hand side of the page. However, you need to have a S-user ID of the VAR.
    The following are the steps need to perform in implementing the Enterprise Support firmly known as Service Desk for VARs.
    1. SAP Solution Manager basic settings (IMG)
      a) Initial Configuration Part I
      b) Maintain Profile Parameters
      c) Maintain Logical Systems
      d) Maintain SAP Customer Numbers
      e) Initial Configuration Part II
         1) Activate BC Set
             a) Activate Service Desk BC Set
             b) Activate Issue Monitoring BC set
             c) Set-up Maintainance optimizer
             d) Change online Documentation Settings
             e) Activate Solution Manager Services
             f) Activate integration with change request Managemnt
             g) Define service desk connection in Solution Manager
       2)Get components for SAP Service Market place
            a) Get SAP Components
       3) Get Service Desk Screen Profile
           a)generate Business Partener Screen
       4)Copy By price list
           a)activate Service Desk BC Set
           b)Activate Issue Monitoring BC set
           c)Set-up Maintainance optimizer
          f) Business Add-In for RFC Connections with several SAP customers
          g) Business Add-In for RFC Connection of Several SAP Cust. no.
          h) Set-Up SAP Support Connection for Customers
          i) Assign S-user for SAP Support Portal functionality
          j) Schedule Background Jobs
          k) Set-Up System Landscape
          l) Create Key Users
          m) Create Message Processor
    2. Multiple SAP Customer Numbers
          a) Business Add-In for RFC Connections with several SAP customer numbers
          b) Set-Up SAP Support Connection for Customers
    3. Data transfer from SAP
          a) Data Transfer from SAP
    4. Create u201COrganizationu201D Business Partner
    5. Service Provider function (IMG)
          a) Business Add-In for RFC Connections with several SAP customer numbers
          b) Business Add-In for Text Authorization Check
          c) Activate BC Set for Service Provider
          d) Activate Text Types
          e) Adjust Service Desk Roles for Service Provider Menu
    6. Service Provider: Value-Added Reseller (VAR)
          a) Business Add-In to Process Actions (Post-Processing Framework)
         b) Activate BC Sets for Configuration
         c) Create Hierarchy and Product Category
         d) Set-Up Subcategories
         e) Create Business Partner as Person Automatically
         f) Set-Up Automatic Confirmation of Messages
        g) Maintain Business Partner Call Times
        h) Set-Up Incident Management Work Center
    7. Work Center (Web UI)
        a) Activate Solution Manager Services
        b) Assign Work Center Roles to Users
    Hope it helps.
    Regards,
    Satish.

  • How to do implement the FrameAccess.java code in my project

    Iam doing an project in java for inserting the videos into oracle9i and searching the inserted videos using the frames of the videos inserted.I have done the project to insert and search the videos.But i have been asked to put an EXTRACT button to extract all the frames of the video being inserted.Please help me to implement the FrameAccess.java coding in my existing coding.I have pasted my coding(VideoInsert.java) and FrameAccess.java(used to extract frames) coding.
    The VideoInsert.java when executed will contain browse button to choose the video file(only .mpg files) to be inserted into the database.After selecting the file and when we press open button in the Open dialog box,the video will be played in jmf player in a separate window and the filepath of the video will be included in the textbox.Now what i need is,an extract button should be placed and when it is clicked,the frames of the corresponding selected video has to be extracted in the location where the project files are stored i.e.,the FrameAccess.java coding has to be executed.
    Please help me if anyone knows how to implement the above concept.
    VideoInsert.java
    import javax.swing.*;
    import java.util.*;
    import java.io.*;
    import oracle.sql.*;
    import java.sql.*;
    import oracle.jdbc.driver.*;
    import oracle.sql.BLOB ;
    import symantec.itools.multimedia.ImageViewer;
    public class VideoInsert extends javax.swing.JFrame {
        private Connection con;
        private Statement st=null;
        private OracleResultSet rs=null;
        int count=0;
        int count1=0;
        ImageViewer displaywindow = new ImageViewer();
        /** Creates new form VideoInsert */
        public VideoInsert() {
            initComponents();
            imgpane.add(displaywindow);
            try {
                DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
                con = DriverManager.getConnection("jdbc:oracle:oci:@","scott","tiger");
                  //con = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:FIRST","scott","tiger");
                con.setAutoCommit(false);
                st =con.createStatement();
                rs=(OracleResultSet)st.executeQuery("select max(vid) from browsevideo");
                while (rs.next()) {
                    count = (rs.getInt(1) + 1);
                rs.close();
                st =con.createStatement();
                rs=(OracleResultSet)st.executeQuery("select max(imageno) from browseimage");
                while (rs.next()) {
                    count1 = (rs.getInt(1) + 1);
                rs.close();
            } catch (SQLException e) {
                e.printStackTrace();
            txtvid.setText(String.valueOf(count));
             VideoTypeComboBox.addItem("All");
            VideoTypeComboBox.addItem("Entertainment");
            VideoTypeComboBox.addItem("Sports");
            VideoTypeComboBox.addItem("Animation");
            VideoTypeComboBox.addItem("News");
             VideoTypeComboBox.addItem("Others");
        /** This method is called from within the constructor to
         * initialize the form.
         * WARNING: Do NOT modify this code. The content of this method is
         * always regenerated by the Form Editor.
        private void initComponents() {//GEN-BEGIN:initComponents
            jLabel1 = new javax.swing.JLabel();
            txtvid = new javax.swing.JTextField();
            jLabel2 = new javax.swing.JLabel();
            txtvidfile = new javax.swing.JTextField();
            jLabel3 = new javax.swing.JLabel();
            txtvidinfo = new javax.swing.JTextField();
            jLabel4 = new javax.swing.JLabel();
            txtimgfile = new javax.swing.JTextField();
            vidbrowse = new javax.swing.JButton();
            imgbrowse = new javax.swing.JButton();
            jLabel5 = new javax.swing.JLabel();
            txtimgcont = new javax.swing.JTextField();
            insert = new javax.swing.JButton();
            imgpane = new javax.swing.JPanel();
            jLabel6 = new javax.swing.JLabel();
            VideoTypeComboBox = new javax.swing.JComboBox();
            getContentPane().setLayout(null);
            setTitle("VideoInsert");
            addWindowListener(new java.awt.event.WindowAdapter() {
                public void windowClosing(java.awt.event.WindowEvent evt) {
                    exitForm(evt);
            jLabel1.setText("Video ID");
            getContentPane().add(jLabel1);
            jLabel1.setBounds(30, 80, 90, 16);
            txtvid.setEditable(false);
            getContentPane().add(txtvid);
            txtvid.setBounds(130, 80, 130, 20);
            jLabel2.setText("VideoFile");
            getContentPane().add(jLabel2);
            jLabel2.setBounds(30, 130, 70, 16);
            getContentPane().add(txtvidfile);
            txtvidfile.setBounds(130, 130, 130, 20);
            jLabel3.setText("VideoInfo");
            getContentPane().add(jLabel3);
            jLabel3.setBounds(30, 180, 80, 16);
            getContentPane().add(txtvidinfo);
            txtvidinfo.setBounds(130, 180, 130, 20);
            jLabel4.setText("TopImage");
            getContentPane().add(jLabel4);
            jLabel4.setBounds(30, 230, 70, 16);
            getContentPane().add(txtimgfile);
            txtimgfile.setBounds(130, 230, 130, 20);
            vidbrowse.setText("Browse");
            vidbrowse.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    vidbrowseActionPerformed(evt);
            getContentPane().add(vidbrowse);
            vidbrowse.setBounds(280, 130, 78, 26);
            imgbrowse.setText("Browse");
            imgbrowse.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    imgbrowseActionPerformed(evt);
            getContentPane().add(imgbrowse);
            imgbrowse.setBounds(280, 230, 78, 26);
            jLabel5.setText("ImageContent");
            getContentPane().add(jLabel5);
            jLabel5.setBounds(30, 280, 80, 16);
            getContentPane().add(txtimgcont);
            txtimgcont.setBounds(130, 280, 130, 20);
            insert.setText("Insert");
            insert.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    insertActionPerformed(evt);
            getContentPane().add(insert);
            insert.setBounds(150, 400, 81, 26);
            imgpane.setLayout(new java.awt.BorderLayout());
            getContentPane().add(imgpane);
            imgpane.setBounds(410, 120, 350, 260);
            jLabel6.setText("Video Type");
            getContentPane().add(jLabel6);
            jLabel6.setBounds(30, 340, 80, 16);
            getContentPane().add(VideoTypeComboBox);
            VideoTypeComboBox.setBounds(130, 340, 130, 25);
            pack();
            java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
            setSize(new java.awt.Dimension(800, 600));
            setLocation((screenSize.width-800)/2,(screenSize.height-600)/2);
        }//GEN-END:initComponents
        private void insertActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_insertActionPerformed
            BLOB blb= null;
            PreparedStatement stmt = null;
            OutputStream fout=null;
            File f=null;
            FileInputStream fin=null;
            int bufferSize;
            byte[] buffer=null;
            int bytesRead = -1;
            String sfile1 = txtvidfile.getText();
            String sfile2 = txtimgfile.getText();
            String format=null;
            String format1=null;
            String videoinfo=txtvidinfo.getText();
            String imgcontent=txtimgcont.getText();
            String videoType=(String)VideoTypeComboBox.getSelectedItem();
            if(sfile1.endsWith("avi")) {
                format="avi";
            }else if(sfile1.endsWith("mpg")) {
                format="mpg";
            }else {
                format="mpg";
            if(sfile2.endsWith("jpg")) {
                format1="jpg";
            }else if(sfile2.endsWith("gif")) {
                format1="gif";
            }else {
                format1="jpg";
            if((sfile1.length()>0) && (sfile2.length()>0)) {
                try {
                    stmt=con.prepareStatement(" insert into browsevideo values (?,EMPTY_BLOB(),?,?,?)");
                    stmt.setInt(1,count);
                    stmt.setString(2,format);
                    stmt.setString(3,videoinfo);
                     stmt.setString(4,videoType);
                    stmt.executeUpdate();
                    stmt.close();
                    con.commit();
                }catch(Exception e) {
                    e.printStackTrace();
                try {
                    stmt = con.prepareStatement("Select video FROM browsevideo WHERE vid = ? for update of video");
                    stmt.setInt(1,count);
                    rs = (OracleResultSet)stmt.executeQuery();
                    rs.next();
                    blb = rs.getBLOB("video");
                    fout = blb.getBinaryOutputStream();
                    f = new File(sfile1);
                    fin = new FileInputStream(f);
                    bufferSize = blb.getBufferSize();
                    buffer = new byte[bufferSize];
                    while((bytesRead = fin.read(buffer)) != -1) {
                        fout.write(buffer, 0, bytesRead);
                    fout.flush();
                    fout.close();
                    con.commit();
                    rs.close();
                    stmt.close();
                }catch(Exception e) {
                    e.printStackTrace();
                try {
                    stmt=con.prepareStatement(" insert into browseimage values (?,?,?,EMPTY_BLOB(),?,?,?)");
                    stmt.setInt(1,count);
                    stmt.setInt(2,count1);
                    stmt.setInt(3,count1);
                    stmt.setString(4,imgcontent);
                    stmt.setString(5,format1);
                    stmt.setString(6,videoType);
                    stmt.executeUpdate();
                    stmt.close();
                    con.commit();
                }catch(Exception e) {
                    e.printStackTrace();
                try {
                    stmt = con.prepareStatement("Select image FROM browseimage WHERE imageno = ? for update of image");
                    stmt.setInt(1,count1);
                    rs = (OracleResultSet)stmt.executeQuery();
                    if(rs.next()) {
                        blb = rs.getBLOB("image");
                        fout = blb.getBinaryOutputStream();
                        f = new File(sfile2);
                        fin = new FileInputStream(f);
                        bufferSize = blb.getBufferSize();
                        buffer = new byte[bufferSize];
                        while((bytesRead = fin.read(buffer)) != -1) {
                            fout.write(buffer, 0, bytesRead);
                        fout.flush();
                        fout.close();
                        con.commit();
                        rs.close();
                    stmt.close();
                    count++;
                    count1++;
                    txtimgfile.setText("");
                    txtvidfile.setText("");
                    txtimgcont.setText("");
                    txtvidinfo.setText("");
                    txtvid.setText(String.valueOf(count));
                    JOptionPane.showMessageDialog(this,"Successfuly Completed");
                }catch(Exception e) {
                    e.printStackTrace();
        }//GEN-LAST:event_insertActionPerformed
        private void imgbrowseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_imgbrowseActionPerformed
            ExampleFileFilter filter1 = new ExampleFileFilter();
            JFileChooser chooser = new JFileChooser();
            filter1.addExtension("jpg");
            filter1.addExtension("gif");
            filter1.setDescription("JPG,GIF Images");
            chooser.setFileFilter(filter1);
            int returnVal = chooser.showOpenDialog(this);
            if(returnVal == JFileChooser.APPROVE_OPTION) {
                txtimgfile.setText(chooser.getSelectedFile().getAbsolutePath());
                try{
                        displaywindow.setImageURL(new java.net.URL("file:"+txtimgfile.getText()));
                        displaywindow.setStyle(ImageViewer.IMAGE_SCALED_TO_FIT);
                    }catch(Exception e){
                        e.printStackTrace();
        }//GEN-LAST:event_imgbrowseActionPerformed
        private void vidbrowseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_vidbrowseActionPerformed
           ExampleFileFilter filter2 = new ExampleFileFilter();
           JFileChooser chooser = new JFileChooser();
           filter2.addExtension("avi");
            filter2.addExtension("mpg");
            filter2.setDescription("AVI & MPG Video");
            chooser.setFileFilter(filter2);
            int returnVal = chooser.showOpenDialog(this);
            if(returnVal == JFileChooser.APPROVE_OPTION) {
                txtvidfile.setText(chooser.getSelectedFile().getAbsolutePath());
                VideoAudioPlayer vap=new VideoAudioPlayer(txtvidfile.getText());
        }//GEN-LAST:event_vidbrowseActionPerformed
        /** Exit the Application */
        private void exitForm(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_exitForm
            setVisible(false);
            dispose();
        }//GEN-LAST:event_exitForm
         * @param args the command line arguments
        /*public static void main(String args[]) {
            new VideoInsert().show();
        // Variables declaration - do not modify//GEN-BEGIN:variables
        private javax.swing.JButton imgbrowse;
        private javax.swing.JLabel jLabel4;
        private javax.swing.JTextField txtvid;
        private javax.swing.JLabel jLabel1;
        private javax.swing.JTextField txtimgcont;
        private javax.swing.JLabel jLabel3;
        private javax.swing.JLabel jLabel2;
        private javax.swing.JPanel imgpane;
        private javax.swing.JButton insert;
        private javax.swing.JComboBox VideoTypeComboBox;
        private javax.swing.JButton vidbrowse;
        private javax.swing.JTextField txtvidfile;
        private javax.swing.JLabel jLabel6;
        private javax.swing.JLabel jLabel5;
        private javax.swing.JTextField txtimgfile;
        private javax.swing.JTextField txtvidinfo;
        // End of variables declaration//GEN-END:variables
    FrameAccess.java
    import java.awt.*;
    import javax.media.*;
    import javax.media.control.TrackControl;
    import javax.media.Format;
    import javax.media.format.*;
    import java.io.*;
    import javax.imageio.*;
    import javax.imageio.stream.*;
    import java.awt.image.*;
    import java.util.*;
    import javax.media.util.*;
    * Sample program to access individual video frames by using a
    * "pass-thru" codec. The codec is inserted into the data flow
    * path. As data pass through this codec, a callback is invoked
    * for each frame of video data.
    public class FrameAccess implements ControllerListener {
         Processor p;
         Object waitSync = new Object();
         boolean stateTransitionOK = true;
         public boolean alreadyPrnt = false;
         * Given a media locator, create a processor and use that processor
         * as a player to playback the media.
         * During the processor's Configured state, two "pass-thru" codecs,
         * PreAccessCodec and PostAccessCodec, are set on the video track.
         * These codecs are used to get access to individual video frames
         * of the media.
         * Much of the code is just standard code to present media in JMF.
         public boolean open(MediaLocator ml) {
              try {
                   p = Manager.createProcessor(ml);
                                } catch (Exception e) {
                   System.err.println(
                        "Failed to create a processor from the given url: " + e);
                   return false;
              p.addControllerListener(this);
              // Put the Processor into configured state.
              p.configure();
              if (!waitForState(Processor.Configured)) {
                   System.err.println("Failed to configure the processor.");
                   return false;
              // So I can use it as a player.
              p.setContentDescriptor(null);
              // Obtain the track controls.
              TrackControl tc[] = p.getTrackControls();
              if (tc == null) {
                   System.err.println(
                        "Failed to obtain track controls from the processor.");
                   return false;
              // Search for the track control for the video track.
              TrackControl videoTrack = null;
              for (int i = 0; i < tc.length; i++) {
                   if (tc.getFormat() instanceof VideoFormat) videoTrack = tc[i];
                   else     tc[i].setEnabled(false);
              if (videoTrack == null) {
                   System.err.println("The input media does not contain a video track.");
                   return false;
              String videoFormat = videoTrack.getFormat().toString();
              Dimension videoSize = parseVideoSize(videoFormat);
              System.err.println("Video format: " + videoFormat);
              // Instantiate and set the frame access codec to the data flow path.
              try {
                   Codec codec[] = { new PostAccessCodec(videoSize)};
                   videoTrack.setCodecChain(codec);
              } catch (UnsupportedPlugInException e) {
                   System.err.println("The process does not support effects.");
              // Realize the processor.
              p.prefetch();
              if (!waitForState(Processor.Prefetched)) {
                   System.err.println("Failed to realise the processor.");
                   return false;
              p.start();
              return true;
         /**parse the size of the video from the string videoformat*/
         public Dimension parseVideoSize(String videoSize){
              int x=300, y=200;
              StringTokenizer strtok = new StringTokenizer(videoSize, ", ");
              strtok.nextToken();
              String size = strtok.nextToken();
              StringTokenizer sizeStrtok = new StringTokenizer(size, "x");
              try{
                   x = Integer.parseInt(sizeStrtok.nextToken());
                   y = Integer.parseInt(sizeStrtok.nextToken());
              } catch (NumberFormatException e){
                   System.out.println("unable to find video size, assuming default of 300x200");
              System.out.println("Image width = " + String.valueOf(x) +"\nImage height = "+ String.valueOf(y));
              return new Dimension(x, y);
         * Block until the processor has transitioned to the given state.
         * Return false if the transition failed.
         boolean waitForState(int state) {
              synchronized (waitSync) {
                   try {
                        while (p.getState() != state && stateTransitionOK)
                             waitSync.wait();
                   } catch (Exception e) {
              return stateTransitionOK;
         * Controller Listener.
         public void controllerUpdate(ControllerEvent evt) {
              if (evt instanceof ConfigureCompleteEvent
                   || evt instanceof RealizeCompleteEvent
                   || evt instanceof PrefetchCompleteEvent) {
                   synchronized (waitSync) {
                        stateTransitionOK = true;
                        waitSync.notifyAll();
              } else if (evt instanceof ResourceUnavailableEvent) {
                   synchronized (waitSync) {
                        stateTransitionOK = false;
                        waitSync.notifyAll();
              } else if (evt instanceof EndOfMediaEvent) {
                   p.close();
                   System.exit(0);
         * Main program
         public static void main(String[] args) {
    //          if (args.length == 0) {
    //               prUsage();
    //               System.exit(0);
    // System.out.print("masoud");
    String url = new String("file:F:\\AVSEQ01.mpg");
              if (url.indexOf(":") < 0) {
                   prUsage();
                   System.exit(0);
              MediaLocator ml;
              if ((ml = new MediaLocator(url)) == null) {
                   System.err.println("Cannot build media locator from: " + url);
                   System.exit(0);
              FrameAccess fa = new FrameAccess();
              if (!fa.open(ml))
                   System.exit(0);
         static void prUsage() {
              System.err.println("Usage: java FrameAccess <url>");
         * Inner class.
         * A pass-through codec to access to individual frames.
         public class PreAccessCodec implements Codec {
              * Callback to access individual video frames.
              void accessFrame(Buffer frame) {
                   // For demo, we'll just print out the frame #, time &
                   // data length.
                   long t = (long) (frame.getTimeStamp() / 10000000f);
                   System.err.println(
                        "Pre: frame #: "
                             + frame.getSequenceNumber()
                             + ", time: "
                             + ((float) t) / 100f
                             + ", len: "
                             + frame.getLength());
              * The code for a pass through codec.
              // We'll advertize as supporting all video formats.
              protected Format supportedIns[] = new Format[] { new VideoFormat(null)};
              // We'll advertize as supporting all video formats.
              protected Format supportedOuts[] = new Format[] { new VideoFormat(null)};
              Format input = null, output = null;
              public String getName() {
                   return "Pre-Access Codec";
              //these dont do anything
              public void open() {}
              public void close() {}
              public void reset() {}
              public Format[] getSupportedInputFormats() {
                   return supportedIns;
              public Format[] getSupportedOutputFormats(Format in) {
                   if (in == null)
                        return supportedOuts;
                   else {
                        // If an input format is given, we use that input format
                        // as the output since we are not modifying the bit stream
                        // at all.
                        Format outs[] = new Format[1];
                        outs[0] = in;
                        return outs;
              public Format setInputFormat(Format format) {
                   input = format;
                   return input;
              public Format setOutputFormat(Format format) {
                   output = format;
                   return output;
              public int process(Buffer in, Buffer out) {
                   // This is the "Callback" to access individual frames.
                   accessFrame(in);
                   // Swap the data between the input & output.
                   Object data = in.getData();
                   in.setData(out.getData());
                   out.setData(data);
                   // Copy the input attributes to the output
                   out.setFlags(Buffer.FLAG_NO_SYNC);
                   out.setFormat(in.getFormat());
                   out.setLength(in.getLength());
                   out.setOffset(in.getOffset());
                   return BUFFER_PROCESSED_OK;
              public Object[] getControls() {
                   return new Object[0];
              public Object getControl(String type) {
                   return null;
         public class PostAccessCodec extends PreAccessCodec {
              // We'll advertize as supporting all video formats.
              public PostAccessCodec(Dimension size) {
                   supportedIns = new Format[] { new RGBFormat()};
                   this.size = size;
              * Callback to access individual video frames.
              void accessFrame(Buffer frame) {
                   // For demo, we'll just print out the frame #, time &
                   // data length.
                   if (!alreadyPrnt) {
                        BufferToImage stopBuffer = new BufferToImage((VideoFormat) frame.getFormat());
                        Image stopImage = stopBuffer.createImage(frame);
                        try {
                             BufferedImage outImage = new BufferedImage(size.width, size.height, BufferedImage.TYPE_INT_RGB);
                             Graphics og = outImage.getGraphics();
                             og.drawImage(stopImage, 0, 0, size.width, size.height, null);
                             //prepareImage(outImage,rheight,rheight, null);
                             Iterator writers = ImageIO.getImageWritersByFormatName("jpg");
                             ImageWriter writer = (ImageWriter) writers.next();
                             //Once an ImageWriter has been obtained, its destination must be set to an ImageOutputStream:
                             File f = new File(frame.getSequenceNumber() + ".jpg");
                             ImageOutputStream ios = ImageIO.createImageOutputStream(f);
                             writer.setOutput(ios);
                             //Finally, the image may be written to the output stream:
                             //BufferedImage bi;
                             //writer.write(imagebi);
                             writer.write(outImage);
                             ios.close();
                        } catch (IOException e) {
                             System.out.println("Error :" + e);
                   //alreadyPrnt = true;
                   long t = (long) (frame.getTimeStamp() / 10000000f);
                   System.err.println(
                        "Post: frame #: "
                             + frame.getSequenceNumber()
                             + ", time: "
                             + ((float) t) / 100f
                             + ", len: "
                             + frame.getLength());
              public String getName() {
                   return "Post-Access Codec";
              private Dimension size;

    check out the java.lang.Runtime and java.lang.Process classes

  • BizTalk Tracking Profile Editor not tracking the data and how to implement the Orchestration as wcf service over SSL

    Hi Ashwinprabhu,
    thank you very much for your answer.
    i have one more query, I have orchestration published as wcf service in IIS and internally orchestration calling one more service , it means orchestration sending a request and getting response back from the service.
    actually we are implementing the copy of that called service through biztalk orchestration for system automatic and tracking failed messages and n/w failures.
    But tracking profiler not tracking the Data.
    And we need to develop the http service as https(Over SSL), we implemented in iis using self 
    signed certificate, it is working just browser for wsdl(in browser), we are not able to test the service in wcf test client, it is giving wsdl error, in wsdl schema reference showing with HTTP only,
    please help me how to resolve the issue.
    Teegala

    First things first, I think it's best to publish only schemas as WCF service for dependency management reasons. That said - WSDL availability is covered in the WCF adapter under the behaviors. If you're using HTTPBasic this may be hard to modify, but using
    WCFCustom allows you to add the WSDL behavior and specify that it should be available via HTTPS.
    As to the BAM, are you using TPE within the orchestration or at the port level?  I'd imagine your TPE tracks the start and end events of your orchestration using the Orchestration Schedule.  If you're fairly confident that the TPE is correct and
    yet don't see BAM data 1) make sure your SQL Agent is running healthy and all jobs look OK and 2) check the TDDS tables in both the message box and the BAMPrimaryImport databases.  These will show you if there has been some sort of sync issue. There's
    even a TDDS errors tables - so check that out.
    Kind Regards,
    -Dan
    If this answers your question, please Mark as Answer

  • Display active/implemented user exits in R/3 system

    Hi Guys,
    Here is a small report that I wrote to display all active and implemented user exits in R/3 system. It gives a snapshot of all the user exits being used and also takes to the follow-on screen on double click.
    Regards,
    Madhur
    *& Report ZMS_ACTIVE_EXITS
    *& This report displays all the active customer enhancements in the
    *& system and also displays whether they are active or implemented
    REPORT ZMS_ACTIVE_EXITS.
    * Data decleration
    types: begin of s_function,
    fname like MOD0-FUNCNAME,
    ftext like tftit-stext,
    impl,
    active,
    example,
    end of s_function.
    TYPEs : BEGIN OF display_str,
    project type modact-name,
    enhancement type modact-member,
    fm type modsap-member,
    status type char20,
    END OF display_str.
    data : lt_member type table of modact-member,
    ls_member like LINE OF lt_member,
    lt_fm type table of modsap-member,
    ls_fm like LINE OF lt_fm,
    lt_modname type table of modact-name,
    ls_modname like line of lt_modname,
    lt_display type TABLE OF display_str,
    ls_display like LINE OF lt_display,
    ls_function type s_function,
    field1(30).
    START-OF-SELECTION.
    * Select active customer enhancement.
    select name from modattr into ls_modname
    where status = 'A'.
    append ls_modname to lt_modname.
    CLEAR ls_modname.
    ENDSELECT.
    if lt_modname is INITIAL.
    WRITE / 'no active enhancements'.
    endif.
    * Determine the details about the customer enhancement.
    LOOP AT lt_modname INTO ls_modname.
    CLEAR : ls_display.
    SELECT member from modact into ls_member where name = ls_modname.
    select member from modsap into ls_fm where name = ls_member and typ = 'E'.
    ls_display-project = ls_modname.
    ls_display-enhancement = ls_member.
    ls_display-fm = ls_fm.
    clear : ls_function.
    ls_function-fname = ls_fm.
    perform get_impl_status USING ls_function.
    if ls_function-impl = 'X'.
    ls_display-status = 'Implemented'.
    ELSE.
    ls_display-status = 'Active'.
    endif.
    APPEND ls_display to lt_display.
    endselect.
    ENDSELECT.
    ENDLOOP.
    * Displaying results
    format color = 1.
    write : 'Please double-click on the object for follow-on action'.
    new-LINE. uline.
    write : 'Customer Project', at 30 'SAP Enhancement', at 60 'Exit Function Modul
    e', at 100 'Active/Implemented'.
    ULINE.
    format color = 0.
    loop at lt_display into ls_display.
    new-LINE.
    write : ls_display-project, at 30 ls_display-enhancement, at 60 ls_displayfm,
    at 100 ls_display-status.
    ENDLOOP.
    * For calling transaction CMOD / SMOD / SE37.
    at line-selection.
    get cursor field field1.
    CASE field1.
    WHEN 'LS_DISPLAY-PROJECT'.
    set parameter id 'MON_KUN' field sy-lisel(10).
    call transaction 'CMOD' and skip first screen.
    WHEN 'LS_DISPLAY-ENHANCEMENT'.
    set parameter id 'MON' field sy-lisel+29(10).
    call transaction 'SMOD' and skip first screen.
    WHEN 'LS_DISPLAY-FM'.
    set parameter id 'LIB' field sy-lisel+59(30).
    call transaction 'SE37' and skip first screen.
    WHEN OTHERS.
    message 'Click on the right place.' TYPE 'I'.
    ENDCASE.
    *& Form get_impl_status
    * This FORM checks whether an EXIT FM is implemented or not
    form get_impl_status using p_function type s_function.
    data : l_mand LIKE tfdir-mand,
    l_incl_names TYPE smod_names OCCURS 1 WITH HEADER LINE.
    l_incl_names-itype = 'C'.
    APPEND l_incl_names.
    CLEAR l_mand.
    SELECT SINGLE mand FROM tfdir INTO l_mand WHERE funcname = p_function-fname.
    IF sy-subrc = 0 AND l_mand(1) = 'C'.
    p_function-active = 'X'.
    * l_status-active = c_true.
    ELSE.
    p_function-active = ' '.
    * l_status-inactive = c_true.
    ENDIF.
    CALL FUNCTION 'MOD_FUNCTION_INCLUDE'
    EXPORTING
    funcname = p_function-fname
    TABLES
    incl_names = l_incl_names
    EXCEPTIONS
    OTHERS = 4.
    IF sy-subrc = 0.
    LOOP AT l_incl_names.
    SELECT SINGLE name FROM trdir INTO l_incl_names-iname
    WHERE name = l_incl_names-iname.
    IF sy-subrc = 0.
    p_function-impl = 'X'.
    ELSE.
    p_function-impl = ' '.
    ENDIF.
    ENDLOOP.
    ENDIF.
    endform. "get_impl_status

    Hi Sergio,
    Have you checked that the basis guys have actually plugged in the SAP system. The guys I've been working with have sworn that the portal can connect to SAP but actually they have no connectivity at all. It has meant that my collegue has spent the last 2 days pulling his hair out trying to work out why his code doesn't work and in fact it will never work as the portal cant even see SAP.
    Cheers
    Richard

  • WPF How can I implement the INotifyPropertyChanged in a Three-tier architecture?

    I am a student and I am confused on using the INotifyPropertyChanged in a three-tier style of coding. Can you guys help me a bit with these?
    I have a solution named MetroAppProject. It is composed of four projects (I omitted the using clauses and references, just imagine they are there and are working fine):
    1. MetroApp.BluePrints - a class library composed of the classes in my sql db
    An example of my class
    namespace MetroApp.BluePrints
        public partial class Patient
            public long Id { get; set; }
            public string PatientNumber { get; set; }
            public string LastName { get; set; }
            public string FirstName { get; set; }
            public string MiddleName { get; set; }        
            public string AddressLine1 { get; set; }
            public Nullable<short> CityId { get; set; }
    public string CityName { get; set; }
            public Nullable<short> ProvinceId { get; set; }
    public string ProvinceName { get; set; }        
    Then the second project:
    2. MetroApp.DataAccess = a class library composed of methods that calls my sql procedures. I used the SqlHelper class which contains the connection strings and other stuffs.
    example class
    namespace MetroApp.DataAccess
        public class PatientDb
    public Patient Retrieve(PatientParams parameters)
                SqlCommand command = new SqlCommand();
                Patient singItem = new Patient();
                command.CommandText = "RetrievePatients";
                command.CommandType = CommandType.StoredProcedure;
                command.Parameters.AddWithValue("@Id", parameters.Id).Direction = ParameterDirection.Input;
                DataTable dt = SqlHelper.GetData(command);
                if (dt.Rows.Count > 0)
                    DataRow row = dt.Rows[0];
                    singItem.Id = TDefaultValue.GetInt(row["Id"].ToString());
                    singItem.PatientNumber = TDefaultValue.GetString(row["PatientNumber"].ToString());
                    singItem.LastName = TDefaultValue.GetString(row["LastName"].ToString());
                    singItem.FirstName = TDefaultValue.GetString(row["FirstName"].ToString());
                    singItem.MiddleName = TDefaultValue.GetString(row["MiddleName"].ToString());
                    singItem.AddressLine1 = TDefaultValue.GetString(row["AddressLine1"].ToString());
                    singItem.CityId = TDefaultValue.GetShort(row["CityId"].ToString());
                    singItem.CityName = TDefaultValue.GetString(row["CityName"].ToString());
                    singItem.ProvinceId = TDefaultValue.GetShort(row["ProvinceId"].ToString());
                    singItem.ProvinceName = TDefaultValue.GetString(row["ProvinceName"].ToString());
                return singItem;
            public List<Patient> RetrieveMany(PatientParams parameters)
                var items = new List<Patient>();
                var command = new SqlCommand();
                command.CommandText = "RetrievePatients";
                command.CommandType = CommandType.StoredProcedure;
                command.Parameters.AddWithValue("@Id", parameters.Id).Direction = ParameterDirection.Input;
                command.Parameters.AddWithValue("@PatientNumber", parameters.PatientNumber).Direction = ParameterDirection.Input;
                command.Parameters.AddWithValue("@LastName", parameters.LastName).Direction = ParameterDirection.Input;
                command.Parameters.AddWithValue("@FirstName", parameters.FirstName).Direction = ParameterDirection.Input;
                command.Parameters.AddWithValue("@MiddleName", parameters.MiddleName).Direction = ParameterDirection.Input;            
                command.Parameters.AddWithValue("@CityId", parameters.CityId).Direction = ParameterDirection.Input;
                command.Parameters.AddWithValue("@ProvinceId", parameters.ProvinceId).Direction = ParameterDirection.Input;
                DataTable dt = SqlHelper.GetData(command);
                foreach (DataRow row in dt.Rows)
                    var item = new Patient();
                    item.Id = TDefaultValue.GetLong(row["Id"].ToString());
                    item.PatientNumber = (row["PatientNumber"].ToString());
                    item.LastName = (row["LastName"].ToString());
                    item.FirstName = (row["FirstName"].ToString());
                    item.MiddleName = (row["MiddleName"].ToString());                
                    item.AddressLine1 = (row["AddressLine1"].ToString());
                    item.CityId = (short)row["CityId"].ToString();
                    item.CityName = (row["CityName"].ToString());
                    item.ProvinceId = (short)row["ProvinceId"].ToString();
                    item.ProvinceName = (row["ProvinceName"].ToString());
                    items.Add(item);
                return items;
            public bool Insert(Patient entity, int userId, ref bool doesExist)
                var command = new SqlCommand();
                try
                    command.CommandText = "AddPatient";
                    command.CommandType = CommandType.StoredProcedure;
                    command.Parameters.AddWithValue("@PatientNumber", entity.PatientNumber).Direction = ParameterDirection.Input;
                    command.Parameters.AddWithValue("@LastName", entity.LastName).Direction = ParameterDirection.Input;
                    command.Parameters.AddWithValue("@FirstName", entity.FirstName).Direction = ParameterDirection.Input;
                    command.Parameters.AddWithValue("@MiddleName", entity.MiddleName).Direction = ParameterDirection.Input;
                    command.Parameters.AddWithValue("@AddressLine1", entity.AddressLine1).Direction = ParameterDirection.Input;
                    command.Parameters.AddWithValue("@CityId", entity.CityId).Direction = ParameterDirection.Input;
                    command.Parameters.AddWithValue("@ProvinceId", entity.ProvinceId).Direction = ParameterDirection.Input;
    command.Parameters.AddWithValue("@Id", entity.Id).Direction = ParameterDirection.Input;
                    command.Parameters.Add("@DoesExist", SqlDbType.Bit).Direction = ParameterDirection.Output;
                    int result = SqlHelper.ExecuteNonQuery(command);
                    doesExist = (bool)(command.Parameters["@DoesExist"].Value);
                    entity.Id = (int)(command.Parameters["@Id"].Value);
                    if (result == 0 || doesExist)
                        return false;
                    return true;
                catch (Exception)
                    return false;
            public bool Update(Patient entity, int userId, ref bool doesExist)
                var command = new SqlCommand();
                try
                    command.CommandText = "EditPatient";
                    command.CommandType = CommandType.StoredProcedure;
                    command.Parameters.AddWithValue("@PatientNumber", entity.PatientNumber).Direction = ParameterDirection.Input;
                    command.Parameters.AddWithValue("@LastName", entity.LastName).Direction = ParameterDirection.Input;
                    command.Parameters.AddWithValue("@FirstName", entity.FirstName).Direction = ParameterDirection.Input;
                    command.Parameters.AddWithValue("@MiddleName", entity.MiddleName).Direction = ParameterDirection.Input;
                    command.Parameters.AddWithValue("@AddressLine1", entity.AddressLine1).Direction = ParameterDirection.Input;
                    command.Parameters.AddWithValue("@CityId", entity.CityId).Direction = ParameterDirection.Input;
                    command.Parameters.AddWithValue("@ProvinceId", entity.ProvinceId).Direction = ParameterDirection.Input;
    command.Parameters.AddWithValue("@Id", SqlDbType.Int).Direction = ParameterDirection.Output;
                    command.Parameters.Add("@DoesExist", SqlDbType.Bit).Direction = ParameterDirection.Output;
    doesExist = (bool)(command.Parameters["@DoesExist"].Value);
                    int result = SqlHelper.ExecuteNonQuery(command);
                    if (result == 0 || doesExist)
                        return false;
                    return true;
                catch (Exception)
                    return false;
    Then a business logic
    3. MetroApp.BusinessLogic = class libray for calling the methods from DataAccess
    namespace MetroApp.BusinessLogic
        public class PatientMgr
            #region Fields
            private readonly PatientDb _db;
            #endregion
            #region Properties
            public Patient Entity { get; set; }
            public List<Patient> EntityList { get; set; }
            public PatientParams Parameters { get; set; }
            #endregion
            #region Constructors
            public PatientMgr()
                _db = new PatientDb();
                Entity = new Patient();
                EntityList = new List<Patient>();
                Parameters = new PatientParams();
            #endregion
            #region Methods
    public Patient Retrieve(PatientParams parameters)
                return _db.Retrieve(parameters);
            public List<Patient> RetrieveMany(PatientParams parameters)
                return _db.RetrieveMany(parameters);
            public bool Insert(Patient entity, int userId, ref bool doesExist)
                return _db.Insert(entity, userId, ref doesExist);
            public bool Update(Patient entity, int userId, ref bool doesExist)
                return _db.Update(entity, userId, ref doesExist);
            #endregion
    Then the last one, the WPF GUI
    <UserControl x:Class="MetroDentProject.Pages.PatientDetailsPage"
                 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
                 xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
                 xmlns:dims="clr-namespace:MetroAppProject.UserCons"
                 mc:Ignorable="d" 
                 d:DesignHeight="720" d:DesignWidth="1280">
        <Grid x:Name="MainGrid" >
            <Grid.RowDefinitions>
                <RowDefinition  Height="40"/>
                <RowDefinition  />
                <RowDefinition  />
                <RowDefinition  />
                <RowDefinition  />
                <RowDefinition  />
                <RowDefinition  />
                <RowDefinition  />
                <RowDefinition  />
                <RowDefinition  />
                <RowDefinition  />
                <RowDefinition  />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition />
                <ColumnDefinition />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
            <GroupBox Grid.Column="0" Grid.Row="1" Grid.RowSpan="7" x:Name="DetailsGroupBox" Header="Patient Details" >
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition/>
                        <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                    </Grid.RowDefinitions>
                    <TextBlock Text="Id: " Grid.Column="1" Grid.Row="0" Visibility="Collapsed"/>
                    <TextBox x:Name="IdTextBox" Grid.Column="1" Grid.Row="1" Visibility="Collapsed"/>
                    <TextBlock x:Name="PatientNumberTextBlock" Text="Patient Number: " Grid.Column="0" Grid.Row="0" />
                    <TextBox x:Name="PatientNumberTextBox" Grid.Column="1" Grid.Row="0" IsReadOnly="True" IsReadOnlyCaretVisible="True"/>
                    <TextBlock Text="Last Name: " Grid.Column="0" Grid.Row="1" />
                    <TextBox x:Name="LastNameTextBox" Grid.Column="1" Grid.Row="1" />
                    <TextBlock Text="First Name: " Grid.Column="0" Grid.Row="2" />
                    <TextBox x:Name="FirstNameTextBox" Grid.Column="1" Grid.Row="2" />
                    <TextBlock Text="Middle Name: " Grid.Column="0" Grid.Row="3" />
                    <TextBox x:Name="MiddleNameTextBox" Grid.Column="1" Grid.Row="3" />
                </Grid>
            </GroupBox>
            <GroupBox x:Name="ContactDetailsGroupBox" Header="Contact Details" Grid.Column="1" Grid.Row="1" Grid.RowSpan="7">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition/>
                        <ColumnDefinition />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                    </Grid.RowDefinitions>
                    <TextBlock Text="Address: " Grid.Column="0" Grid.Row="0" Grid.RowSpan="2" />
                    <TextBlock Text="City: " Grid.Column="0" Grid.Row="2" />
                    <TextBlock Text="Province: " Grid.Column="0" Grid.Row="3"/>
                    <TextBox x:Name="AddressTextBox" Grid.Column="1" Grid.Row="0" Grid.RowSpan="2"
                             TextWrapping="Wrap"
                             AcceptsReturn="True"
                             VerticalScrollBarVisibility="Auto"
                             />
                    <ComboBox x:Name="CitiesComboBox"  Grid.Column="1" Grid.Row="2"  />
                    <ComboBox x:Name="ProvincesComboBox"  Grid.Column="1" Grid.Row="3" />
                </Grid>
            </GroupBox>
            <dims:FunctionButtonsControl x:Name="FunctionButtonsCon" Grid.Row="9" Grid.Column="0" Grid.ColumnSpan="2"
                                         ExecuteClick="FunctionButtonsCon_OnExecuteClick"
                                         UndoClick="FunctionButtonsCon_OnUndoClick"
                                         BackClick="FunctionButtonsCon_OnBackClick"
                                         DeleteClick="FunctionButtonsCon_OnDeleteClick"
                                         />
        </Grid>
    </UserControl>
    I apologize for the long post. As you can see, I don't use binding. Binding requires me to use INotifyPropertyChanged interface which I am not familiar. Can you at least make my project to implement the INotifypropertyChanged?
    Here is my sample code for the WPF page:
    public partial class PatientDetailsPage 
            readonly PatientMgr itemMgr = new PatientMgr();       
            public PatientParams CurrentPar = new PatientParams(); // for undoActionType _action = ActionType.Insert; // this is an enum from another project, ActionType.Insert, ActionType.Update
            public ActionType Action
                get { return _action; }
                set { _action = value; }
            public PatientDetailsPage()
                InitializeComponent();
                BindComboBoxes();
            #region Methods
            public void OnFragmentNavigation(FragmentNavigationEventArgs e)
            public void OnNavigatedFrom(NavigationEventArgs e)
            public void OnNavigatedTo(NavigationEventArgs e)
            {            Setup();
            public void OnNavigatingFrom(NavigatingCancelEventArgs e)
            public Patient GetPageEntity()
                Patient setEntity = new Patient();
                setEntity.Id = (long)IdTextBox.Text;
                setEntity.PatientNumber = PatientNumberTextBox.Text;
                setEntity.LastName = LastNameTextBox.Text;
                setEntity.FirstName = FirstNameTextBox.Text;
                setEntity.MiddleName = MiddleNameTextBox.Text;
                setEntity.AddressLine1 = AddressTextBox.Text;
                setEntity.CityId = (short)CitiesComboBox.SelectedValue);
                setEntity.ProvinceId = (short)ProvincesComboBox.SelectedValue;
                setEntity.StatusId = true;
                return setEntity;
            public void Setup()
                switch (Action)
                    case ActionType.Insert:
                        Clearer(); //clears all textboxes and set all comboboxes to default
                        this.PatientNumberTextBlock.Visibility = Visibility.Collapsed;
                        this.PatientNumberTextBox.Visibility = Visibility.Collapsed;
                        FunctionButtonsCon.ExecuteButton.Content = "Add";
                        FunctionButtonsCon.DeleteButton.IsEnabled = false;
                        FunctionButtonsCon.DeleteButton.Visibility = Visibility.Hidden;
                        break;
                    //**Setup Update
                    case ActionType.Update:CurrentPar.Id = (long)IdTextBox.Text;
                        LoadSingle(CurrentPar);
                        this.PatientNumberTextBlock.Visibility = Visibility.Visible;
                        this.PatientNumberTextBox.Visibility = Visibility.Visible;
                        FunctionButtonsCon.ExecuteButton.Content = "Save";
                        FunctionButtonsCon.DeleteButton.IsEnabled = true;
                        FunctionButtonsCon.DeleteButton.Visibility = Visibility.Visible;
                        break;                
                LastNameTextBox.CaretIndex = LastNameTextBox.Text.Length;
                IsVisibleChanged += AutoFocus;
            public void LoadSingle(PatientParams parameters)
                var entity = itemMgr.Retrieve(parameters); //calls the BusinessLogic
                IdTextBox.Text = (entity.Id);
                PatientNumberTextBox.Text = (entity.PatientNumber);
                LastNameTextBox.Text = (entity.LastName);
                FirstNameTextBox.Text = (entity.FirstName);
                MiddleNameTextBox.Text = (entity.MiddleName);
                AddressTextBox.Text = (entity.AddressLine1);
                CitiesComboBox.SelectedValue = (short)entity.CityId;
                ProvincesComboBox.SelectedValue = (short)entity.ProvinceId;
            public void Save(ActionType action, int userId)
                itemMgr.Entity = GetPageEntity();
                bool doesExist = false;
                switch (action)
                    case ActionType.Insert:
                        if (itemMgr.Insert((itemMgr.Entity), userId, ref doesExist))
                            System.Windows.Forms.MessageBox.Show("Successfully added a Patient!", "Patient Insertion");                  
                        else if (doesExist)
                            System.Windows.Forms.MessageBox.Show("Item already exists.", "Patient Insertion");
                        else
                            System.Windows.Forms.MessageBox.Show("Not all fields were filled in.", "Patient Insertion");
                        break;
                    case ActionType.Update:
                        if (itemMgr.Update(itemMgr.Entity, userId, ref doesExist))
                            System.Windows.Forms.MessageBox.Show("Successfully updated a Patient!", "Patient Modification");
                            itemMgr.Parameters.Id = itemMgr.Entity.Id;
                            Action = ActionType.Update;
                            Setup();
                        else if (doesExist)
                            System.Windows.Forms.MessageBox.Show("Item already exists.", "Patient Modification");
                        else
                            System.Windows.Forms.MessageBox.Show("Not all fields were filled in.", "Patient Modification");
                        break;                
            public void Clearer()
                IdTextBox.Clear();
                PatientNumberTextBox.Clear();
                LastNameTextBox.Clear();
                FirstNameTextBox.Clear();
                MiddleNameTextBox.Clear();
                CitiesComboBox.SelectedIndex = 0;
                ProvincesComboBox.SelectedIndex = 0;
                AddressTextBox.Clear();            
            public void BindComboBoxes()
                CitiesComboBox.ItemsSource = new BindingSource(CommonMgr.GetCitiesDropDown(), null);// the CommonMgr is a static class from another project. It works just fine
                CitiesComboBox.DisplayMemberPath = "Value";
                CitiesComboBox.SelectedValuePath = "Key";           
                ProvincesComboBox.ItemsSource = new BindingSource(CommonMgr.GetProvincesDropDown(), null);
                ProvincesComboBox.DisplayMemberPath = "Value";
                ProvincesComboBox.SelectedValuePath = "Key";
                CitiesComboBox.SelectedIndex = 0;
                ProvincesComboBox.SelectedIndex = 0;
            #endregion
            #region Events
            private void FunctionButtonsCon_OnExecuteClick(object sender, RoutedEventArgs e)
                Save(Action, SessionHelper.MyUser.Id); //SessionHelper.MyUser.Id
            private void FunctionButtonsCon_OnUndoClick(object sender, RoutedEventArgs e)
                if (Action == ActionType.Insert)
                    Clearer();
                    return;
            private void FunctionButtonsCon_OnBackClick(object sender, RoutedEventArgs e)
                Exiter();
            private void FunctionButtonsCon_OnDeleteClick(object sender, RoutedEventArgs e)
                var ans = System.Windows.Forms.MessageBox.Show("Are you sure you want to delete this entry?", "Patient Deletion", MessageBoxButtons.YesNo);
                if (!Equals(ans, System.Windows.Forms.DialogResult.Yes)) return;
                Action = ActionType.Delete;
                Save(Action, SessionHelper.MyUser.Id);
                Exiter();
            #endregion

    Hello Kokombads,
    I thought you are using MVVM from your title but it seems your project is just a simple WPF project. In that way, please check the following msdn article to know how to Implement Property Change Notification
    https://msdn.microsoft.com/en-us/library/ms743695(v=vs.110).aspx
    using System.ComponentModel;
    namespace SDKSample
    // This class implements INotifyPropertyChanged
    // to support one-way and two-way bindings
    // (such that the UI element updates when the source
    // has been changed dynamically)
    public class Person : INotifyPropertyChanged
    private string name;
    // Declare the event
    public event PropertyChangedEventHandler PropertyChanged;
    public Person()
    public Person(string value)
    this.name = value;
    public string PersonName
    get { return name; }
    set
    name = value;
    // Call OnPropertyChanged whenever the property is updated
    OnPropertyChanged("PersonName");
    // Create the OnPropertyChanged method to raise the event
    protected void OnPropertyChanged(string name)
    PropertyChangedEventHandler handler = PropertyChanged;
    if (handler != null)
    handler(this, new PropertyChangedEventArgs(name));
    It is not so complex, you only need to refer to the interface from here:
    https://msdn.microsoft.com/en-us/library/system.componentmodel.inotifypropertychanged(v=vs.110).aspx
    And understand that you have to do the following:
    For change notification to occur in a binding between a bound client and a data source, your bound type should either:
    Implement the INotifyPropertyChanged interface (preferred).
    Provide a change event for each property of the bound type
    Best regards,
    Barry
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

Maybe you are looking for

  • How do I install flash player from the home screen?

    I am operating Mac OSX.  I have flash player version 16.0.0.  I can't play any videos because my flash player is out of date.  I download the latest flash player and when I go to install it, it takes me here www.adobe.com.  There is no "Install flash

  • Socket connection problems

    I'm starting a server with the following code Semaphore semaphore = new Semaphore(maxConcurrentConnections); final ServerSocket serverSocket = new ServerSocket(Constants.NET_APPLET_PORT); while (true) { semaphore.acquire(); final Socket socket = serv

  • Hd to dvd

    I have a 720p 60 avchd movie . I want to make a sd dvd. How do I do this... is there a tutorial somewhere? Thanks

  • Clip problems in themes

    Here is a weird one. When I drop a clip into the "Roadtrip" open sequence the clip somehow gets flipped. Meaning it is a mirror image of itself. Why does it do this? Also - is there anyway you can have the theme just spill over the remaining footage

  • "Edit with" does not open all selected photos in PS3

    If I select several photos and then click on "Edit with" Photoshop, often only one or a few of the selected photos will actually open up in Photoshop. Does anyone have any idea how to fix this? Thanks, Peter