Need Simple Example of Notifier and Occurance

hi friends
i need to know the exact funtion of notifiers and occurances. So can you send me the simple example for both..
Thanks in advance... 

Open your example finder (help..find examples...") and search for these two terms.
I recommend looking at "General Notifier example.vi" and "Generate Occurrences.vi".
Is there anything in the online help that is not clear? What are you trying to do?
Message Edited by altenbach on 09-26-2008 11:22 PM
LabVIEW Champion . Do more with less code and in less time .

Similar Messages

  • I need simple example for alv grid

    hi
    i need code for simple example for alv grid.
    thanks.

    hi bharat,
                  this is report with most of the functionality.
    report zus_alv_demo_grid .
    tables:     ekko.
    type-pools: slis.
    types: begin of t_ekko,
    ebeln type ekpo-ebeln,
    ebelp type ekpo-ebelp,
    statu type ekpo-statu,
    aedat type ekpo-aedat,
    matnr type ekpo-matnr,
    menge type ekpo-menge,
    meins type ekpo-meins,
    netpr type ekpo-netpr,
    peinh type ekpo-peinh,
    line_color(4) type c, "Used to store row color
    end of t_ekko.
    data: it_ekko type standard table of t_ekko initial size 0,
           wa_ekko type t_ekko.
    *ALV data declarations
    data: fieldcatalog type slis_t_fieldcat_alv with header line,
          gd_tab_group type slis_t_sp_group_alv,
          gd_layout    type slis_layout_alv,
          gd_repid     like sy-repid.
    Data declaration for EVENT and PRINT PARAMETER.
    data: gt_events type slis_t_event,
           gd_prntparams type slis_print_alv.
    data declaration for sorting.
    data : it_sortcat   type slis_sortinfo_alv occurs 1,
           wa_sort like line of it_sortcat.
    data :  i_list_comments type slis_t_listheader.
    start-of-selection.
      perform data_retrieval.
    perform user_command.
      perform build_fieldcatalog.
      perform build_layout.
      perform build_events.
      perform build_print_params.
      perform build_sortcat.
      perform display_alv_report.
    end-of-selection.
    *TOP-OF-PAGE.
    PERFORM top-of-page.
    end-of-page.
    *&      Form  build_fieldcatalog
          text
    -->  p1        text
    <--  p2        text
    form build_fieldcatalog.
      fieldcatalog-fieldname   = 'EBELN'.
      fieldcatalog-seltext_m   = 'Purchase Order'.
      fieldcatalog-col_pos     = 0.
      fieldcatalog-outputlen   = 10.
      fieldcatalog-emphasize   = 'X'.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'EBELP'.
      fieldcatalog-seltext_m   = 'PO Item'.
      fieldcatalog-col_pos     = 1.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'STATU'.
      fieldcatalog-seltext_m   = 'Status'.
      fieldcatalog-col_pos     = 2.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'AEDAT'.
      fieldcatalog-seltext_m   = 'Item change date'.
      fieldcatalog-col_pos     = 3.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MATNR'.
      fieldcatalog-seltext_m   = 'Material Number'.
      fieldcatalog-col_pos     = 4.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MENGE'.
      fieldcatalog-seltext_m   = 'PO quantity'.
      fieldcatalog-col_pos     = 5.
      fieldcatalog-do_sum = 'X'.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MEINS'.
      fieldcatalog-seltext_m   = 'Order Unit'.
      fieldcatalog-col_pos     = 6.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'NETPR'.
      fieldcatalog-seltext_m   = 'Net Price'.
      fieldcatalog-col_pos     = 7.
      fieldcatalog-outputlen   = 15.
      fieldcatalog-datatype     = 'CURR'.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'PEINH'.
      fieldcatalog-seltext_m   = 'Price Unit'.
      fieldcatalog-col_pos     = 8.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
    endform.                    " build_fieldcatalog
    *&      Form  build_layout
          text
    -->  p1        text
    <--  p2        text
    form build_layout.
      gd_layout-no_input          = 'X'.
      gd_layout-colwidth_optimize = 'X'.
      gd_layout-totals_text       = 'Totals'(201).
    Set layout field for row attributes(i.e. color)
      gd_layout-info_fieldname =      'LINE_COLOR'.
    gd_layout-totals_only        = 'X'.
    gd_layout-f2code            = 'DISP'.  "Sets fcode for
    *when double
                                            "click(press f2)*
    gd_layout-group_change_edit = 'X'.
    gd_layout-header_text       = 'helllllo'.
    endform.                    " build_layout
    *&      Form  data_retrieval
          text
    -->  p1        text
    <--  p2        text
    form data_retrieval.
      data: ld_color(1) type c.
      select ebeln ebelp statu aedat matnr menge meins netpr
    peinh from ekpo  into table it_ekko.
    *Populate field with color attributes
      loop at it_ekko into wa_ekko.
    Populate color variable with colour properties
    Char 1 = C (This is a color property)
    Char 2 = 3 (Color codes: 1 - 7)
    Char 3 = Intensified on/off ( 1 or 0 )
    Char 4 = Inverse display on/off ( 1 or 0 )
              i.e. wa_ekko-line_color = 'C410'
        ld_color = ld_color + 1.
    Only 7 colours so need to reset color value
        if ld_color = 8.
          ld_color = 1.
        endif.
        concatenate 'C' ld_color '10' into wa_ekko-line_color.
    wa_ekko-line_color = 'C410'.
        modify it_ekko from wa_ekko.
      endloop.
    endform.                    " data_retrieval
    *&      Form  display_alv_report
          text
    -->  p1        text
    <--  p2        text
    form display_alv_report.
      gd_repid = sy-repid.
      call function 'REUSE_ALV_GRID_DISPLAY'
           exporting
                i_callback_program       = gd_repid
                is_layout                = gd_layout
                i_callback_top_of_page   = 'TOP-OF-PAGE'
                i_callback_user_command  = 'USER_COMMAND'
                i_callback_pf_status_set = 'SET_PF_STATUS'
                it_event                 = gt_events
                is_print                 = gd_prntparams
                it_fieldcat              = fieldcatalog[]
                it_sort                 = it_sortcat
                i_save                   = 'X'
           tables
                t_outtab                 = it_ekko
           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.              " DISPLAY_ALV_REPORT
    *&      Form  user_command
          text
    -->  p1        text
    <--  p2        text
    *&      Form  top-of-page
          text
    -->  p1        text
    <--  p2        text
    form top-of-page.
    *ALV Header declarations
      data: t_header type slis_t_listheader,
            wa_header type slis_listheader,
            t_line like wa_header-info,
            ld_lines type i,
            ld_linesc(10) type c.
    Title
      wa_header-typ  = 'H'.
      wa_header-info = 'EKKO Table Report'.
      append wa_header to t_header.
      clear wa_header.
    Date
      wa_header-typ  = 'S'.
      wa_header-key = 'Date: '.
      concatenate  sy-datum+6(2) '.'
                   sy-datum+4(2) '.'
       sy-datum(4) into wa_header-info."todays date
      append wa_header to t_header.
      clear: wa_header.
    Total No. of Records Selected
      describe table it_ekko lines ld_lines.
      ld_linesc = ld_lines.
      concatenate 'Total No. of Records Selected: ' ld_linesc
         into t_line separated by space.
      wa_header-typ  = 'A'.
      wa_header-info = t_line.
      append wa_header to t_header.
      clear: wa_header, t_line.
      call function 'REUSE_ALV_COMMENTARY_WRITE'
           exporting
           it_list_commentary = t_header
           i_logo             = 'GANESH_LOGO'.
    endform.                    " top-of-page
          FORM user_command                                             *
    -->  R_UCOMM                                                       *
    -->  RS_SELFIELD                                                   *
    form user_command using r_ucomm like sy-ucomm
    rs_selfield type slis_selfield.
      case r_ucomm.
        when '&IC1'.
          if rs_selfield-fieldname = 'EBELN'.
            read table it_ekko into wa_ekko index rs_selfield-tabindex.
            set parameter id 'BES' field wa_ekko-ebeln.
            call transaction 'ME23N' and skip first screen.
          endif.
        when 'ULHAS'.
          if rs_selfield-fieldname = 'EBELN'.
            read table it_ekko into wa_ekko index rs_selfield-tabindex.
            set parameter id 'BES' field wa_ekko-ebeln.
            call transaction 'ME23N' and skip first screen.
          endif.
      endcase.
    endform.
          FORM set_pf_status                                            *
    -->  RT_EXTAB                                                      *
    form set_pf_status using rt_extab type slis_t_extab.
      set pf-status 'ZNEWSTATUS'.
    endform.
    *&      Form  build_events
          text
    -->  p1        text
    <--  p2        text
    form build_events.
      data: ls_event type slis_alv_event.
      call function 'REUSE_ALV_EVENTS_GET'
       exporting
         i_list_type           = 0
       importing
         et_events             = gt_events[]
    EXCEPTIONS
      LIST_TYPE_WRONG       = 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.
      read table gt_events with key name =  slis_ev_end_of_page
                  into ls_event.
      if sy-subrc = 0.
        move 'END_OF_PAGE' to ls_event-form.
        append ls_event to gt_events.
      endif.
      read table gt_events with key name =  slis_ev_end_of_list
                  into ls_event.
      if sy-subrc = 0.
        move 'END_OF_LIST' to ls_event-form.
        append ls_event to gt_events.
      endif.
    endform.                    " build_events
    *&      Form  build_print_params
          text
    -->  p1        text
    <--  p2        text
    form build_print_params.
      gd_prntparams-reserve_lines = '3'.   "Lines reserved for footer
      gd_prntparams-no_coverpage = 'X'.
    endform.                    " build_print_params
          FORM END_OF_PAGE                                              *
    form end_of_page.
      data: listwidth type i,
      ld_pagepos(10) type c,
      ld_page(10)    type c.
      write: sy-uline(50).
      skip.  write:/40 'Page:', sy-pagno .
    endform.
          FORM END_OF_LIST                                              *
    form end_of_list.
      data: listwidth type i,
      ld_pagepos(10) type c,
      ld_page(10)    type c.
      skip.  write:/40 'Page:', sy-pagno .
    endform.
    *&      Form  build_sortcat
          text
    -->  p1        text
    <--  p2        text
    form build_sortcat.
    wa_sort-spos      = 1.
    wa_sort-fieldname = 'EBELN'.
    append wa_sort to it_sortcat.
    wa_sort-spos      = 2.
    wa_sort-fieldname = 'EBELP'.
    append wa_sort to it_sortcat.
    endform.                    " build_sortcat
    Rewards if helpfull
    regards
    vijay dwivedi

  • Need simple example of flex2 to webservice

    Hello,
    I understand that so long as you don't use remote objects,
    you don't have to buy the FDS! So how do I bypass using FDS and
    just use HTTPS or webservices?
    Can someone point me in the right direction with a
    good/simple example of using flex 2.0 with https and/or
    webservices?
    Thanks,
    K.

    OK - I finally get this.  I guess that SAP Business One is the entry level, least expensive license.  If my company buys SAP Business One, will that provide the R/3 system and BAPIs to build some demos?  And can I hook up SAP Business One to the Sneak Preview SAP NewWeaver 6.40 in order to invoke the BAPIs using Java?
    And I guess that if we buy SAP Busienss One, then I don't need 6.40 ABAP stack to invoke the BAPIS - or do I?
    Thanks for your help.

  • Need some examples for smartforms and scripts

    hi
    now i am working in scripts and smartforms. so i need some examples and some information for scripts and smartforms. where i can find that information.

    hi jyothsna,
    i have given below a simple example
    this is the report program,
    *& Report  ZSCRIPT1                                                    *
    REPORT  ZSCRIPT1                                .
    TABLES : EKKO,
             EKPO,
             KNA1,
             USR01,
             MARA,
             MAKT.
    DATA : BEGIN OF ZOPTION.
            INCLUDE STRUCTURE ITCPO.
    DATA : END OF ZOPTION.
    PARAMETERS: P_EBELN LIKE EKKO-EBELN,
                P_EBELP LIKE EKPO-EBELP.
    CLEAR EKPO.
    SELECT SINGLE * FROM EKPO
           WHERE EBELN = P_EBELN AND
                 EBELP = P_EBELP.
    CLEAR KNA1.
    SELECT SINGLE NAME1 FROM KNA1
                  INTO KNA1-NAME1
                  WHERE KUNNR = EKPO-KUNNR.
    CLEAR MAKT.
    SELECT SINGLE MAKTX FROM MAKT
                  INTO MAKT-MAKTX
                  WHERE MATNR = EKPO-MATNR AND
                        SPRAS = SY-LANGU.
    CLEAR USR01.
    SELECT SINGLE * FROM USR01 WHERE BNAME = SY-UNAME.
    ZOPTION-TDDEST    = USR01-SPLD.        "Output device (printer)
    ZOPTION-TDIMMED   = 'X'.               "Print immediately
    ZOPTION-TDDELETE  = 'X'.               "Delete after printing
    ZOPTION-TDPROGRAM = 'ZPQRPRNT'.        "Program Name
    CALL FUNCTION 'OPEN_FORM'
         EXPORTING
             APPLICATION        = 'TX'
            ARCHIVE_INDEX      = ' '
            ARCHIVE_PARAMS     = ' '
             DEVICE             = 'PRINTER'
             DIALOG             = ' '
             FORM               = 'ZFORM1'
             LANGUAGE           = SY-LANGU
             OPTIONS            = ZOPTION
         IMPORTING
              LANGUAGE           = SY-LANGU
           EXCEPTIONS
             OTHERS     = 1.
    CALL FUNCTION 'WRITE_FORM'
         EXPORTING
             ELEMENT       = 'HEADER'
            FUNCTION      = 'SET'
            TYPE          = 'BODY'
             WINDOW        = 'HEADER'
         EXCEPTIONS
              ELEMENT       = 1.
    CALL FUNCTION 'WRITE_FORM'
         EXPORTING
             ELEMENT       = 'MAIN'
            FUNCTION      = 'SET'
            TYPE          = 'BODY'
             WINDOW        = 'MAIN'
         EXCEPTIONS
              ELEMENT       = 1.
    CALL FUNCTION 'WRITE_FORM'
         EXPORTING
             ELEMENT       = 'FOOTER'
            FUNCTION      = 'SET'
            TYPE          = 'BODY'
             WINDOW        = 'FOOTER'
         EXCEPTIONS
              ELEMENT       = 1.
    CALL FUNCTION 'CLOSE_FORM'
         EXCEPTIONS
              UNOPENED = 1
              OTHERS   = 2.
    This is the layout Set
    Layout set           Z_TESTSCRIPT
    Description          Test SAP script
    Standard attributes
      First page          FIRST
      Default paragraph   P1
      Tab-stop            1.00 CH
      Page format         DINA4
      Orientation         Landscape
      Lines/inch            6.00
      Characters/inch      10.00
    Font attributes
      Font family         COURIER
      Font size           12.0 Point
      Bold                No
      Italic              No
      Underlined          No
    Characters    Attributes
      B           Character String Bold
                  Standard attributes
                  Marker            No
                  Font attributes
                  Bold              Yes
    Paragraphs    Attributes
      P1          Default Paragraph
                  Standard attributes
                  Line spacing      1.00 LN
                  Left margin       1.00 CM
                  Alignment         Left-aligned
                  Font attributes
                  Font family       TIMES
                  Font size         12.0 Point
      P2          Header Paragraph
                  Standard attributes
                  Line spacing      1.00 LN
                  Left margin       4.50 CM
                  Alignment         Left-aligned
                  Font attributes
                  Font family       TIMES
                  Font size         18.0 Point
                  Bold              Yes
      P3          Undelined paragraph
                  Standard attributes
                  Line spacing      1.00 LN
                  Alignment         Left-aligned
                  Font attributes
                  Font family       TIMES
                  Font size         12.0 Point
                  Underlined        Yes
    Windows       Attributes
      MAIN        Main window
                  Window type       MAIN
      HEADER      Main window
                  Window type       CONSTANT
      FOOTER      Main window
                  Window type       CONSTANT
    Pages         Attributes
      FIRST       First Page
                  Standard attributes
                  Next page         FIRST
                  Page counter
                  Mode              START
                  Numbering type    Arabic numerals
                  Page window
                  HEADER               Left margin          00.00 CM
                                       Upper margin         00.00 CM
                                       Window width         20.00 CM
                                       Window height        04.00 CM
                  MAIN                 Left margin          00.00 CM
                                       Upper margin         05.00 CM
                                       Window width         20.00 CM
                                       Window height        20.00 CM
                  FOOTER               Left margin          00.00 CM
                                       Upper margin         25.00 CM
                                       Window width         20.00 CM
                                       Window height        04.00 CM
    Text elements for following windows:
    HEADER
    Element HEADER
    /: POSITION XORIGIN 2 CM YORIGIN '-0.5 CM'
    /: BOX XPOS 1 CM YPOS 1 CM WIDTH 18 CM HEIGHT 1 CM FRAME 10 TW INTENSITY 10
    P2     ,,<B>TEST PURCHASE ORDER</>
    MAIN
    Element MAIN
    P1  <B>Customer/Supplier:</>,,&KNA1-NAME1&
    P1  <B>PO No:</>,,&EKPO-EBELN&
    P1  <B>Part No:</>,,&MAKT-MATNR&
    P1  <B>Description:</>,,&MAKT-MAKTX&
    P1  <B>Quantity:,,</>&EKPO-MENGE&
    P1  <B>Sign:</>&uline(81)&
    P1  <B>Date:</>&EKKO-AEDAT&
    FOOTER
    Element FOOTER
    /: POSITION XORIGIN 2 CM YORIGIN '-0.5 CM'
    /: BOX XPOS 1 CM YPOS 1 CM WIDTH 18 CM HEIGHT 1 CM FRAME 10 TW INTENSITY 10
    P2     ,,<B>PLEASE SIGN THE PO BEFORE DISPATCH</>
    <b>reward if useful :)</b>

  • New developer with spacial - need simple example

    Dear All
    i developing an application that need to store coordinates which represented with 3 floats. i need simple demo which illustrates me how can i insert such coordinate using Oracle Spatial and the how to select it. i also need little explanation of the structure of the select and insert queries
    Thanks alot

    Well, Ron, I think you will need to read a minimum in order to use oracle spatial. I admit that the Oracle docset can seem daunting, but I don't think you can use it without at least reading some of the Oracle Spatial Users Guide, available here (file://localhost/D:/Doc/Oracle/1020/B19306_01/appdev.102/b14255/toc.htm) in HTML and PDF.
    I suggest reading at least chapters 1 (concepts) and 2 (data types) in this manual.
    Albert

  • Need simple example on parsley framework using FLex,Please its urgent

    Hi,
         I tried samples on parsley framework using samples like contactmanagement.But i didnt get any output and not able to debug.
    Can u pls post any sample on this.

    This is an example I put together. It relies soley on the messaging functionality and is designed to be simple. Parsley has many tag (too many) and alternative approaches that you will find variations. However I had a hard time finding some beginner examples clearly explained.
    Parsley MVC, RemoteObject, Zend AMF and MySQL Basic Flex Example

  • Need simple example on Soap With attachment webservice

    Hi
    I want to explore following points:-
    1. How to create a webservice that accept attachment.
    2. java Client to send the attachment to webservice
    3. using OSB to send attachment to webservice?
    Does any have any example tht will help to understand this, Please post the link will be great help?
    Thanks

    There is one sample in jeffdavies.org site. Download the code samples and check if it helps you.

  • SQL08 Need example of creating AND using a Fact (degenerate) dimension

    Can someone post a link to some examples of setting up and using a Fact (degenerate) dimension.  Ive got the SSAS 2008R2 Adventureworks DW project setup and I see a few Fact dimensions in there, but id like some descriptions to go along with this or
    something similar.
    My scenario:
    Orders - attributes include :  Order#, OrderStartDate, SalesPerson, BusinessType, MarketType
    OrderTransactions - attributes include:  OrderKey , TransactionAmount, TransactionType, TransactionDate, AccountKey
    Description:
    Its more or less the typical Order > Order Detail type scenario, with the addition of Orders have some additional attributes.
    So I want to be able to measure on for example:
    Order counts - broken down by BusinessType and MarketType , and then within a date range
    Revenue - which will be totals of transaction amounts, again grouped by BusinessType and MarketType, but also be able to drill down to see the related Order#

    Hi Shiftbit,
    According to your description, you need some examples about create and use degenerate dimensions, right?
    Degenerate dimensions, also called fact dimensions, are standard dimensions that are constructed from attribute columns in fact tables instead of from attribute columns in dimension tables. Here is document that describes how to create and use degenerate
    dimensions step by step, please refer to the links below.
    https://msdn.microsoft.com/en-us/library/ms167409(v=sql.100).aspx
    http://www.jamesserra.com/archive/2011/11/degenerate-dimensions/
    Regards,
    Charlie Liao
    TechNet Community Support

  • Simple Examples on ABAP Objects without using include or function modules

    Hi,
    I am new to ABAP. I need simple example codes on ABAP Objects. It should not have Includes or Function Modules. Just simple codes, using local & global classes, interfaces etc. I searched the forum and even <<the site that shall not be mentioned>>, but did not find a solution. Kindly help please.
    Regards,
    Smruthi.
    Edited by: Matt on Mar 1, 2009 1:20 PM - forbidden site reference removed

    Hello Smruthi
    If you go to the Forum Search and choose the forum ABAP Objects then serach for ZUS_SDN and you will find many of my simple sample reports.
    These reports usually do not contain any includes but they may call function modules which makes perfectly sense. For example, if you are still doing a direct table SELECT instead of using an available BAPI (or class) to get a business object then this is a clear sign of poor (=non-ABAP-OO) programming.
    Regards
      Uwe

  • I need for a simple example of  reading a xml file using jdom

    Hello
    I have been looking for a simple example that uses Jdom to read am xml file and use the information for anything( ), and I just can't find one.since I'm just beggining to understand how things work, I need a good example.thanks
    here is just a simple cod for example:
    <xmlMy>
         <table>
              <item name="first" value="123" createdDate="1/1/90"/>
              <item name="second" value="456" createdDate="1/4/96"/>
         </table>
         <server>
              <property name="port" value="12345"/>
              <property name="maxClients" value="3"/>
         </server>
    </xmlMy>Dave

    Hi,
            FileInputStream fileInputStream = null;
            try {
                fileInputStream = new FileInputStream("my_xml_file.xml");
            } catch (FileNotFoundException e) {
                e.printStackTrace();
            } finally{
                if (fileInputStream == null) return;
            SAXBuilder saxBuilder = new SAXBuilder();
            saxBuilder.setEntityResolver(new EntityResolver() {
                public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException {
                    return new InputSource(new StringReader(""));
            Document document = null;
            try {
                document = saxBuilder.build(fileInputStream);
            } catch (JDOMException e) {
                e.printStackTrace();
            } catch (IOException e) {
                e.printStackTrace();
            } finally {
                if (document == null) return;
            Element element = document.getRootElement();
            System.out.println(element.getName());
            System.out.println(element.getChild("table").getName());

  • I need some simple examples to start with for Oracle ESB

    Hi All,
    Please share some simple examples to startwith for Oracle ESB.
    I need to understand, what are the files are created, once created an ESB project.
    What is the use of the files how to edit them with out using JDeveloper.
    Iam trying to create a simple example.
    I would like to create a file which has only "HELLO" in that file, simple text file inside a folder "INPUT" in my c:\ drive.
    I wanted to create a ESB service which picks up the file and add a string to it like "HELLO" + "ESB" and drop this file into "OUTPUT" folder in c:\ drive.
    How do i do that. I tried to do it when i deploy the integration server connection is gettting hit badly. I dont see that connection any more and i dont see that connection in my JDeveloper.
    I dont want to start with existing code.
    Please help
    Regards,
    Vijay.B
    Message was edited by:
    Vijay.B
    Message was edited by:
    Vijay.B

    Hi,
    If you want to do it from scratch you can basically do the following:
    Make sure you have created an application server and integration server connection in JDeveloper.
    1) Create a new JDeveloper project of type ESB project.
    2) Possibly add a ESB System/Group (open the esb file and click "Create System/Group") to group ESB projects.
    3) Create an XML schema describing your input XML file. Probably one element of type xsd:string.
    4) Create an example XML file which is well-formed and valid according to the XSD from step 3.
    5) Create a new File adapter (inbound/read). A routing service is automatically created.
    6) Create a new File adapter (outbound/write).
    7) Create a routing rule in the routing service in which you invoke the write method of the outbound file adapter. Possibly add a transformation using the XSL mapper.
    8) Deploy the ESB project to the server.
    9) Drop your XML file (from step 4) in the directory in which the inbound file adapter is polling.
    10) If it is ok, the file should be picked up, transformed and dropped in the outbound directory. A new ESB instance should be visible in the ESB console.
    See what files are generated on the filesystem in each of the above steps.
    Regards, Ronald

  • Need help with a very simple example.  Trying to reference a value

    Im very new to Sql Load and have created this very simple example of what I need to do.
    I just want to reference the ID column from one table to be inserted into another table as DEV_ID.
    Below are my: 1) Control File, 2) Datafile, 3) Table Description, 4) Table Description
    1) CONTROL FILE:
    LOAD DATA
    INFILE 'test.dat'
    APPEND
    INTO TABLE p_ports
    FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
    DEV_id REF(CONSTANT 'P_DEVICES',NAME),
    NAME FILLER ,
    PORT_NO
    2) DATAFILE:
    COMM881-0326ES09,6
    3) TABLE DESCRIPTION:
    SQL> describe p_ports
    Name Null? Type
    ID NOT NULL NUMBER(10)
    DEV_ID NOT NULL NUMBER(10)
    PORT_NO     NUMBER(3)

    hi,
    i managed to do this for my app. (think i referred to viewTransitions sample code and modified quite a bit)
    i can't remember this well cos i did this quite a while back, but i will try to help as much as possible
    1) from the appdelegate i initialize a root controller (view controller class)
    2) this root controller actually contains two other view controllers, let's call it viewAController and viewBController, for the screens which u are going to toggle in between. and there's also a function, let's call it toggleMenu, which will set the menus to and fro. i copied this whole chunk from the sample code. it actually defines the code on what to do, i.e. if current view is A switch to B and vice versa.
    3) inside the controller files, you need to implement the toggleMenu function too, which basically calls the rootController's toggleMenu
    4) we also need viewA and viewB files(view class)
    5) need to add the .xib files for the respective views and link them up to the controller class. i did not use the .xib files for ui layout though, because of my app's needs. however, it will not work properly without the .xib files.
    5) inside the view class of both views, i.e. viewA.m and viewB.m, you need to create a button, that will call the toggleMenu function inside the respective controller class.
    it will look something like this:
    [Button addTarget:ViewAController action:@selector(toggleMenu:) forControlEvents:UIControlEventTouchUpInside];
    so the flow is really button (in view)-> toggleMenu(viewController) -> toggleMenu(rootController)
    i'm sorry it sounds pretty hazy, i did this part weeks before and can't really remember. i hope it helps.

  • Simple Example of PDK Servlet and PreferenceStore

    I'm currently using Portal 10g, Release 2. Unfortunately, there are no newly updated PDK samples available for this version, but I've referenced the previous Portal examples and haven't been able to find a simple example that walks through the entire process of establishing/registering a store, storing preference data, and reading preference data from a PDK Servlet.
    If anyone has examples that illustrate the following, it would be greatly appreciated:
    1. How to create a File-based PreferenceStore for an PDK HttpServlet
    2. How to associate a preference store with the Portlet (when using the PortletRequestRender.getProviderInstance().getPreferenceStore(), I get null)
    3. How to store a preference value in the store
    4. How to read a preference value in the store
    Note: I have been able (with far too much code given a "development kit") to use the PDK to create a File-base PreferenceStore and store values. Unfortunately the read operations look for the .dat file in a path that consists of the path that I established in the store and appends it with a value of /df/. As a result, the preferences can't be read.
    Thanks for any opinions/advice on this.
    John

    Hi John,
    You could try looking up at any sample portlets on the Portal Integration website: http://www.oracle.com/technology/products/ias/portal/point.html
    All the JPDK based portlets use file preference stores.
    1. How to create a File-based PreferenceStore for an
    PDK HttpServlet
    2. How to associate a preference store with the
    Portlet (when using the
    PortletRequestRender.getProviderInstance().getPreferen
    eStore(), I get null)You need to use the following code:
    // Get access to the PortletRenderRequest
    PortletRenderRequest pReq = (PortletRenderRequest)
    request.getAttribute(HttpCommonConstants.PORTLET_RENDER_REQUEST);
    // Get access to the user's preference store for this portlet
    NameValuePersonalizationObject data = (NameValuePersonalizationObject)
    PortletRendererUtil.getEditData(pReq);
    // Get access to the Edit Defaults data which would be applciable to all users (who have not yet customized that attribute)
    NameValuePersonalizationObject editData = (NameValuePersonalizationObject)
    PortletRendererUtil.getEditDefaultData(pReq);
    3. How to store a preference value in the store
    4. How to read a preference value in the storeLook at the APIs for NameValuePersonalizationObject at http://www.oracle.com/technology/products/ias/portal/html/javadoc/apidoc/index.html
    >
    Note: I have been able (with far too much code given
    a "development kit") to use the PDK to create a
    File-base PreferenceStore and store values.
    Unfortunately the read operations look for the .dat
    file in a path that consists of the path that I
    established in the store and appends it with a value
    of /df/. As a result, the preferences can't be
    read.
    Thanks for any opinions/advice on this.
    JohnI hope this helps ..
    thanks,
    Harsha

  • Simple Example, I Need Help!

    I'm working on a very simple application using Eclipse and MySQL here it is:
    http://img.photobucket.com/albums/v335/shlumph/table.jpg
    It's pretty self-explanitory. You enter a person's first and last name, press submit, and their name flops onto the table. I made this naively, and do not know how to make use of reflection and beans, if that's even what I need.
    I tried googling on how to make use of reflection and beans when dealing with database connectivity, but there's just so much different kinds of information, it's like trying to find a needle in a haystack.
    If someone could help point me in a direction to go, post some in depth tutorials, or even point out a good book that I can get on amazon, that would be excellent!
    Just incase if you care what I have done naively, here is the database structure and code:
    I have a database named addressbook with a table called names. Inside of names there are the following columns:
    first_name varchar(20)
    last_name varchar(20)
    public class example extends Composite {
         private Label firstNameLbl = null;
         private Text firstNameTxt = null;
         private Label lastNameLbl = null;
         private Text lastNameTxt = null;
         private Composite tableComposite = null;
         private Button submitButton = null;
         private Table nameTable = null;
         private Connection con = null;
         public example(Composite parent, int style) {
              super(parent, style);
              initialize();
         }//example()
         private void initialize() {
              GridData gridData1 = new GridData();
              gridData1.widthHint = 75;
              GridLayout gridLayout = new GridLayout();
              gridLayout.numColumns = 2;
              firstNameLbl = new Label(this, SWT.NONE);
              firstNameLbl.setText("First Name");
              firstNameTxt = new Text(this, SWT.BORDER);
              lastNameLbl = new Label(this, SWT.NONE);
              lastNameLbl.setText("Last Name");
              lastNameTxt = new Text(this, SWT.BORDER);
              this.setLayout(gridLayout);
              Label filler1 = new Label(this, SWT.NONE);
              submitButton = new Button(this, SWT.NONE);
              submitButton.setText("Submit");
              submitButton.setLayoutData(gridData1);
              submitButton
                        .addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {
                             public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
                                  getConnection();
                                  try {
                                       String firstName = firstNameTxt.getText();
                                       String lastName = lastNameTxt.getText();
                                       String sql = "INSERT names VALUES ('" + firstName + "', '" + lastName + "')";
                                       Statement stmt = con.createStatement();
                                       stmt.executeUpdate(sql);
                                       //Update the table
                                       nameTable.removeAll();
                                       addItems();
                                       //Close connections
                                       con.close();
                                       stmt.close();
                                  } catch (SQLException e2) {
                                       e2.printStackTrace();
                             }//widgetSelected()
              createTableComposite();
              this.setSize(new Point(241, 220));
         }//initialize()
          * This method initializes tableComposite     
         private void createTableComposite() {
              GridData gridData2 = new GridData();
              gridData2.widthHint = 200;
              gridData2.heightHint = 100;
              GridData gridData = new GridData();
              gridData.horizontalSpan = 2;
              tableComposite = new Composite(this, SWT.NONE);
              tableComposite.setLayout(new GridLayout());
              tableComposite.setLayoutData(gridData);
              nameTable = new Table(tableComposite, SWT.BORDER);
              nameTable.setHeaderVisible(true);
              nameTable.setLayoutData(gridData2);
              nameTable.setLinesVisible(true);
              TableColumn firstNameCol = new TableColumn(nameTable, SWT.LEFT);
              firstNameCol.setText("First Name");
              firstNameCol.setWidth(100);
              TableColumn lastNameCol = new TableColumn(nameTable, SWT.LEFT);
              lastNameCol.setText("Last Name");
              lastNameCol.setWidth(100);
              getConnection();
              addItems();
         }//createTableComposite()
          * This gets the MySQL Connection
         public void getConnection() {
              try {
               Class.forName("com.mysql.jdbc.Driver").newInstance();
               con = DriverManager.getConnection("jdbc:mysql:///addressbook", "root", "password");
             } catch(Exception e) {
               System.err.println("Exception: " + e.getMessage());
         }//getConnection()
          * This adds items to the address table
         private void addItems() {
              try {
                   String sql = "SELECT first_name, last_name FROM names";
                   Statement stmt = con.createStatement();
                   ResultSet rs = stmt.executeQuery(sql);
                   while(rs.next()) {
                        String first_name = rs.getString(1);
                        String last_name = rs.getString(2);
                        String[] row = new String[]{first_name, last_name};
                        TableItem item1 = new TableItem(nameTable, 0);
                        item1.setText(row);
              } catch (SQLException e) {
                   e.printStackTrace();
         }//addItems()
    } Message was edited by:
    shlumph

    Yes, the id column is auto-increment and not null. I
    kind of went on a rampage without reading your latter
    post and added some more stuff.So tell me why I bothered?
    I added in other columns: street, city, state, phone
    and email to my database. As well as
    fields/setters/getters to my Person class.What does adding more columns do when you can't even insert what you had? Seems foolish. Do the easy thing first, then expand.
    I think I went on a different, but similar route then
    what you mentioned with the database utility. Mine's the right way. 8)
    I
    tried making a MySQL generator
    interface/implementation along with a PersonDao
    interface/implementation, like you mentioned.
    Can you give me some more suggestions, I'm sure this
    is done noobly/poorly.I like that find idiom for method names. Why did you copy the interface I gave you and add "search"? The idea would be to add find methods that have different parameters. In your case, I'd have a find that takes two String arguments.
    It's not just being picky. Consistency matters. If you published this, a user would be likely to think "Why two find methods and a search? Did two people write this?" Pick one and stick to it.
    It's great, except for that search method. After all, it's what I gave you.
    >
    To give you an example, here is my implementation for
    methods delete, and find:
         public void delete(Person p) {
              mysql.delete("names", "id", p.getID().toString());
         public Person find(Long id) {
              Person p = new Person();
    ResultSet rs = mysql.find("names", "id",
    ", id.toString());
              try {
                   while (rs.next()) {
                        String firstName = rs.getString(1);
                        String lastName = rs.getString(2);
                        String street = rs.getString(4);
                        String city = rs.getString(5);
                        String state = rs.getString(6);
                        String zipCode = rs.getString(7);
                        String phone = rs.getString(8);
                        String email = rs.getString(9);
                        p.setID(id);
                        p.setFirstName(firstName);
                        p.setLastName(lastName);
                        p.setStreet(street);
                        p.setCity(city);
                        p.setState(state);
                        p.setZipCode(zipCode);
                        p.setPhone(phone);
                        p.setEmail(email);;
              } catch (SQLException e) {
                   e.printStackTrace();
              mysql.closeConnection();
              return p;
         }// find()Here is my MySqlGenerator interface:
    public interface MySqlGenerator {
         public ResultSet selectAll(String table);
    public ResultSet find(String table, String pkColumn,
    , String pkValue);
    public ResultSet search(String table, String column,
    , String search);
    public List<Object> select(String table, String
    g column);
    public void update(String table, String column,
    , String pkColumn, String pkValue, String newValue);
    public void save(String table, String column, String
    g values);
    public void delete(String table, String pkColumn,
    , String pkValue);
         public void closeConnection();
    }And to give you an example, here is the
    implementation for delete and find:
    public void delete(String table, String pkColumn,
    , String pkValue) {
              getConnection();
              try {
                   Statement stmt = con.createStatement();
    String sql = "DELETE FROM " +table+ " WHERE "
    E " +pkColumn+ "=" + pkValue;
                   stmt.executeUpdate(sql);
              } catch (SQLException e) {
                   e.printStackTrace();
              } finally {
                   closeConnection();
    public ResultSet find(String table, String pkColumn,
    , String pkValue) {
              getConnection();
              ResultSet rs = null;
              try {
                   Statement stmt = con.createStatement();
    String sql = "SELECT * FROM" +table+ " WHERE "
    E " +pkColumn+ "=" + pkValue;
                   rs = stmt.executeQuery(sql);
              } catch (SQLException e) {
                   e.printStackTrace();
              return rs;
         }So theoretically, if this was done well (which I'm
    sure it's not), I could put PersonDao, PersonDaoImpl,
    MySqlGenerator, MySqlGeneratorImpl, all into a
    package named persistence?I don't see what that MySqlGenerator is all about.
    No, I wouldn't recommend doing it this way. Put it all the in the PersonDaoImpl. Better yet, create a subpackage "jdbc" under persistence and put the PersonDaoImpl in there. JDBC is one way to implement this interface. There are lots of others. But this is what you should do to start.
    NEVER return a ResultSet from a method that way. Load the contents into an object or data structure and close it inside the method that created it. You're leaking a database cursor that way, AND you're exposing SQL stuff to clients. Keep all the persistence artifacts inside the persistence package. Don't let them leak out that way.
    Nope, sorry, I don't think this is it.
    %

  • Trying to create a simple example. Need Help!

    I'm trying to create a very simlpe examlpe using Swing components to illustrate a MVC architecture.
    I have a JFrame containing a JTree and a JButton.
    What I'd like to happen is when I click the JButton the JTree model is changed in some fashion and the the view is refreshed due to the models change.
    If anyone out there has a simple example of any MVC architecture involving Swing components I'd love to see it.
    Thx

    Sure, look at any of the Sun tutorials. For example, look in your API documentation for JTree; it has a link to a tutorial about how to use JTree.

Maybe you are looking for