A Listener solution based on Generics and Dynamic Proxies

Listeners are common in the java world, espacially in swing. It is easy to implement a listener, and it is easy to call an existing method that notifies all registered listeners, but it's laborious to implement this notification code itself.
I present a small, typesafe solution called GenericListeners based on Dynamic Proxies and Generics that reduces the notification code to just a single line of code:
IGenericListeners<FooListener> fooListeners = GenericListeners.create(FooListener.class);If FooListener looks like
public interface FooListener {
  public onEnter(int id);
  public onExit();
}then you can register and call Listeners with
fooListeners.addListener(foo);
fooListeners.call().onEnter(1);If you are interested, please have a look at
http://www.sebastian-baltes.de/SebWiki/Wiki.jsp?page=GenericListeners
What do you think about this?
Message was edited by:
Sebastian_Baltes

Interesting point, and so I've done some tests:
0:00:01.391 - plainest implementation
0:00:02.469 - GenericListeners
0:00:03.422 - javax.swing.event.EventListenerListI used a test that registers a listener and calls it 10,000,000 times in a for loop on Java 6, AMD Athlon 3000.
I would say that GenericListeners performs well, especially compared to the EventListenerList that is used in all swing components. The problem with EventListenerList is that it stores different classes of listeners at once and has to find the right ones every time you raise an event. For my tests, I only stored one single listener into the list.
You can imagine how bad the performance of the swing implementation would be if you have a real life example with a lot of different listener classes.

Similar Messages

  • JWSDP 1.2 and dynamic proxies

    I am running the jaxrpc/HelloWorld example in the
    JWSDP 1.2 and I generated the client with static stubs
    and the web service works fine.
    Then I wanted to create a client that uses the same
    web service but in this time with a dynamic proxy that
    utilizes the WSDL-file. In order to do so, I had to
    modify the deployed war-file a little so that I have a URL reference
    http://127.0.0.1:80/jaxrpc-HelloWorld/HelloWorldService.wsdl
    to the HelloWorldService.wsdl file.
    My dynamic proxy client looks like that:
    package hello;
    import java.net.URL;
    import javax.xml.rpc.Service;
    import javax.xml.rpc.JAXRPCException;
    import javax.xml.namespace.QName;
    import javax.xml.rpc.ServiceFactory;
    public class HelloClient {
    public static void main(String[] args) {
    try {
    String wsdlString ="http://127.0.0.1:8080/jaxrpc-HelloWorld/HelloWorldService.wsdl";
    String nameSpaceUri = "http://hello.org/wsdl";
    String serviceName = "HelloWorld";
    String portName = "HelloIFPort";
    URL helloWsdlUrl = new URL(wsdlString);
    ServiceFactory serviceFactory = ServiceFactory.newInstance();
    QName qName = new QName(nameSpaceUri, serviceName);
    Service helloService = serviceFactory.createService(helloWsdlUrl, qName);
    HelloIF myProxy = (HelloIF) helloService.getPort(
    new QName(nameSpaceUri, portName),
    HelloIF.class);
    System.out.println(myProxy.sayHelloBack("Buzz"));
    } catch (Exception ex) {
    ex.printStackTrace();
    And I included the server side HelloIF.class file with this HelloClient file.
    The compilation was successful (ant compile-client)
    but when I try to run this (ant run-client)
    I get this following error log:
    run-client:
    [java] could not find service: {http://hello.org/wsdl}HelloWorld
    in the specified WSDL file. The service names found were: {http://hello.org/wsdl}HelloWorldService
    [java] at com.sun.xml.rpc.client.dii.ServiceInfoBuilder.buildServiceInfo(ServiceInfoBuilder.java:110)
    [java] at com.sun.xml.rpc.client.dii.ConfiguredService.<init>(ConfiguredService.java:58)
    [java] at com.sun.xml.rpc.client.dii.ConfiguredService.<init>(ConfiguredService.java:47)
    [java] at com.sun.xml.rpc.client.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:38)
    [java] at hello.HelloClient.main(HelloClient.java:18)
    BUILD SUCCESSFUL
    Total time: 7 seconds
    What am I doing wrong? Is it the WSDL URL http://hello.org/wsdl
    that does not exist? If yes, what is the correct name space URI?
    Thanks in advance.
    [email protected]

    namespaceuri should be the same as the urn in the wsdl file.

  • "Site-Based" Boot Media Works / "Dynamic" Boot Media Gives "MP Location Returned an Empty Site Code"

    Good Morning Guys -
    This morning we had some issues testing OSD builds.  We used a USB drive we made into boot media a few days ago to boot up an "Unknown Computer."  After clicking the initial "Next," we got the error
    0x80004005 instead of no task sequences being listed. 
    I tried re-creating the media (Dynamic), but still got the same error.  After research, I re-created the media once more with the same settings - except - used "Site-Based" instead of "Dynamic" and it worked as I am now
    displayed a list of task sequences to run.
    Why would "Site-Based" media work and "Dynamic" media not?  
    Below are some environment details as well as other things I examined...
    Primary server is remote to location, but do have a local secondary
    Boot Image Config I used on all 3 times I tried above: 
              - Boot Image: Selected Image
              - Distribution Point - Selected Local Secondary
              - Management Point - Selected Primary Server (only option)
    IP was retrieved on machine via DHCP.  After opening a command prompt, I could ping both primary and secondary servers
    Verified machine's IP (via DHCP) was in a boundary (It's Subnet was entered).  Boundary was assigned to the proper local secondary
    In the log file, there was only a couple of lines which noted errors (besides PXE which we don't use)
    Here is the smsts.log file just in case - names were changed for security...
    Any ideas?  Thank Guys!
    Ben K.

    We are running into the same frustrating issue.  We inject our PKI ConfigMgr Client Certificate to Boot-able media as instructed on TechNet because we use HTTPS to connect to site servers.  I'm only presented with the primary site server when creating
    either a Dynamic or Site based Boot CD.  When we boot the CD in remote location, we get the same errors in smsts.log
    I would assume that when the system boots to WinPE, it queries the main Primary Site, which then redirects the system to the appropriate secondary site or DP.
    Should i have the option to select one of the secondary management points when creating the boot-able media?
    -BM

  • Replace dynamic proxies and reflection with invokedynamic

    I have an application that extensively uses reflection and dynamic proxies. It was built on Java 6. Now, I rebuilt it on Java 7, and I am thinking of replacing all reflection and proxies with new invokedynamic.
    Can anybody tell me if it's worth the trouble? I mean, will I get any significant performance boost, and will it complicate or simplify my source code?
    Also, can you recommend some good tutorials or articles to get me started? I found some, but they confuse me more then they help :-). I think I have an idea how to replace reflection calls, but can't really figure out how to replace dynamic proxies (is there a replacement for InvocationHandler, or something like that?).
    Thanks for any help.

    the MethodHandle javadocs have pretty straightforward examples on usage http://docs.oracle.com/javase/7/docs/api/java/lang/invoke/MethodHandle.html . It looks like you can use Lookup.unreflect to convert a Method to a MethodHandle (this seems like the most straightforward conversion for existing code): http://docs.oracle.com/javase/7/docs/api/java/lang/invoke/MethodHandles.Lookup.html#unreflect(java.lang.reflect.Method) .

  • Certificate Based Authentication - Questions and Authentication Modules

    Hi Everyone
    I'm trying to achieve a specific configuration using AM . I've installed the AM Server 7.1 on a AS9.1EE container and have another AS91EE container on another machine that has the agent configured.
    The AM server is using a DS rep for configurations and dynamic profiles and using a AD rep for authentication.
    What I now need to achieve is authentication base on one of these two way :
    - user and password authentication (which is working)
    - Certificate based authentication ( working on it )
    To configure the Cert. Auth I've started reconfiguring the containers and agent to work in SSL, as said in the manuals. The manuals also say that the containers must have "Client Authentication Enabled", they don't say which ( either the server or agent container or both ) . Also I assume that "Client Authentication Enabled" is refering to the Http Listener configuration of that container.
    When I enable it ( the Client Authentication ) on the http listener for either containers the https connection to that container stops working. In Firefox it simply prompts an error saying that the connection was "interrupted while the page was loading." . On IE, it prompts for a Certificate to be sent to the container and when I provide none, then it gives me the same error as Firefox. In both cases no page was presented.
    Basically what I need is for both authentication methods described before to work! So, asking the certificate ( specially if it wasn't the AM asking for it ) without giving the user a chance to use a user/password combination isn't what is wanted.
    From what I gathered the "Client Authentication" makes this http listener need a certificate to be presented always .
    So, my first question is : is the documentation correct? Does this "Client Authentication" thingy need to be enabled at the listener level?
    2- I'll probably need to code a costum module for this scenario I'm working in because of client requisits, but if possible I would like to use the provided module. Still, in case I need to make on, has anyone made a cert. auth module that they can provide me with so I have a working base to start with?
    3- Is there a tested how-to anywhere on how to configure Cert. Based Authentication?
    All for now,
    Thank you all for your help
    Rp

    Hi Rp,
    We are using AM 7.1 with Certificate Authentication and LDAP Authentication. To answer your question, yes it is possible to use both method at the same time i.e. Use certificate first and then fallback to LDAP.
    First you need to configure AM's webcontainer to accept the certificate. From your message it is clear that you have done that. The only mistake that you did is "made the Client Authentication required". I have done this in Sun WebServer 7.0 and Sun Application Server 7.0 (yeah that is old!!). You need to make the Client Authentication as optional. It means that Certificate will be transferred only when it is available otherwise Web Container will not ask for the Certificate. You will have to search Glassfish website or ASEE 9.1 manual to learn how to make the Client-Authentication Optional. You definitely need this authentication optional as Web Agent will be connecting to this AM and as far as I know they do not have any mechanism to do the Client Authentication.
    Secondly, In AM 7.1, you will have to Set up the Authentication chaining. Where you can make Certificate Module as Sufficient and LDAP module as REQUIRED.
    Thirdly, if you are using an non ocsp based certificate then change the ocsp checking in AMConfig.properties to false.
    Fourth, You may have to write a small custom code to get the profile from your external sources. (if you need to then I can tell you how).
    HTH,
    Vivek

  • Selecting both static and dynamic values in a report.

    Hello,
    I am using the following LOV for a select list in a form based on another post (Re: Static and Dynamic LOV ordering
    It is presenting five static values along with a dynamic LOV.
    select d, r
    from (select n, d, r
    from (select 1 as n, 'NAME_A' d, 1 r
    from dual
    union all
    select 1 as n, 'NAME_B' d, 2 r
    from dual
    union all
    select 1 as n, 'NAME_C' d, 3 r
    from dual
    union all
    select 1 as n, 'NAME_D' d, 4 r
    from dual
    union all
    select 1 as n, 'NAME_E' d, 5 r
    from dual
    union all
    select 2 as n,
    (LNAME || ', ' || FNAME || ' (' ||
    to_char(DOB, 'MM/DD/YYYY') || ')') display_value,
    ID return_value
    from my_name_table)
    ORDER BY n, r asc)
    The static display and return values do not exist in my_name_table, but the static return values are recorded in my_main_table when the user submits the form.
    The tables look like this:
    my_main_table:
    record_id
    name_id
    my_name_table:
    name_id
    fname
    lname
    How can I present the display values associated with the static return values recorded in my_main_table along with the dynamic display values in a report? I am currently presenting the dynamic portion in a report using the following select statment:
    select
    (my_name_table.LNAME||', '||my_name_talbe.FNAME) AS Name
    from my_name_table
    WHERE my_main_table.NAME_ID = my_name_table.NAME_ID
    I have the additional problem that the static return values are not in my_name_table so the join in the last statement will not find the static values in my_name_table.
    Edited by: mterlesky on Feb 24, 2009 9:51 AM

    1. You will need to add an outer join to return all the values in the Main table.
    2. Then decode the values for the static LOV.
    Something like (this is not tested, but should give you the idea)
    select
    decode(my_main_table.NAME_ID,1,'NAME_A',2,'NAME_B',3,'NAME_C',4,'NAME_D',5,'NAME_B',(my_name_table.LNAME||', '||my_name_talbe.FNAME)) AS Name
    from my_name_table
    WHERE my_main_table.NAME_ID = my_name_table.NAME_ID(+)
    This will all break if any of your static LOV ID values clash with your dynamic LOV ID values.
    I am now going to give you a long lecture about hard coding values ..... ;)
    Related info: http://simonhunt.blogspot.com/2009/02/how-to-cope-with-list-of-values-lovs.html
    I hope that helps
    Shunt

  • Create Fieldcatalog based on internal table (dynamic)

    Hi ,
    Is there a way to create Create Fieldcatalog based on internal table (dynamic).
    while creating fieldcat we usually many give the fields "fieldname" and "tabname".
    is there a way to get the fieldname from the main table ?
    Eg ..
    I have i_tab as the output table. It has 3 fields "a", "b" and "c"
    Now when i created fieldcat manually ( in case i cannot use fieldcat_merge FM) , i have to append 3 throws in fieldcat table.
    These rows would have "a", "b" and "c".
    Now i want to know if there is a way in which i can find "a" "b" and "c" fieldnames from the createdd internal tables.
    i can then append the same to fieldcat.

    Hi Anuj,
    I created a FORM routine for this 4 or 5 years ago and made a couple of refinements. Meanwhile it has prooved as very useful.
    The disadvantag is that it creates the oldfashioned field catalog for the function calls. But I already used it for OO fieldcatalog of LVC type - there is a function module for this but I do not have the name here.
    You need the two forms (second called in first) to build the field catalog from any internal table that can be used for ALV display.
    *&      Form  ALV_FIELDCAT_FOR_ITAB
    *       Feldkatalog from (arbitrary) internal Table (c) Clemens Li
    *       * build field catalog from        type description
    form alv_fieldcat_for_itab                                  "#EC *
      tables   pt_outtab                      type table        "#EC *
      changing pt_alv_fieldcat                type slis_t_fieldcat_alv."#EC *
      data:
        lv_desc                               type sydes_desc,
        ls_alv_fieldcat                       type slis_fieldcat_alv,
        lv_longfield                          type text80."CRM<=R/3 fname.
      field-symbols:
        <typeinfo>                            type sydes_typeinfo,
        <nameinfo>                            type sydes_nameinfo.
      describe field pt_outtab into lv_desc.                    "#EC *
      loop at lv_desc-types
          assigning <typeinfo>
          where not idx_name is initial
            and table_kind is initial "no entries for deep table like color
            and back                          = 1. "top-level-entries only.
        read table lv_desc-names index <typeinfo>-idx_name
          assigning <nameinfo>.
        check <nameinfo>-name                 <> 'INCLUDE'.
        ls_alv_fieldcat-fieldname             = <nameinfo>-name.
        while not <nameinfo>-continue is initial.
          add 1 to <typeinfo>-idx_name.
          read table lv_desc-names index <typeinfo>-idx_name
            assigning <nameinfo>.
          concatenate
            ls_alv_fieldcat-fieldname
            <nameinfo>-name
            into ls_alv_fieldcat-fieldname.
        endwhile." not <nameinfo>-continue IS INITIAL.
        read table lv_desc-names index <typeinfo>-idx_help_id
          assigning <nameinfo>.
        if sy-subrc                           = 0.
    * Caution: Help-ID may be Tablename-Fieldname and thus longer
    * than 30 Chars; ls_alv_fieldcat-rollname is 30 Chars only
          ls_alv_fieldcat-rollname            = <nameinfo>-name.
          lv_longfield                        = <nameinfo>-name.
          while not <nameinfo>-continue is initial.
            add 1 to <typeinfo>-idx_help_id.
            read table lv_desc-names index <typeinfo>-idx_help_id
              assigning <nameinfo>.
            concatenate
              lv_longfield
              <nameinfo>-name
              into lv_longfield.
          endwhile." not lv_desc-continue is initial.
    * help id may be data element or <table>-<field>
          if lv_longfield ca '-'.
    * get data                                type for table field
            perform get_rollname_4_tabfield
              using lv_longfield changing ls_alv_fieldcat.
          endif." lv_longfield ca '-'.
        else.
    * No Help-ID: Use Fieldname as text
          ls_alv_fieldcat-seltext_s           =
          ls_alv_fieldcat-seltext_m           =
          ls_alv_fieldcat-seltext_l           =
          ls_alv_fieldcat-reptext_ddic        =
          <nameinfo>-name.
        endif." sy-subrc                      = 0.
    * Starting 4.7: get edit mask
        if not <typeinfo>-idx_edit_mask is initial.
          read table lv_desc-names index <typeinfo>-idx_edit_mask
            assigning <nameinfo>.
          ls_alv_fieldcat-edit_mask           = <nameinfo>-name.
          if not <nameinfo>-continue is initial.
            add 1 to <typeinfo>-idx_edit_mask.
            read table lv_desc-names index <typeinfo>-idx_edit_mask
              assigning <nameinfo>.
            concatenate
              ls_alv_fieldcat-edit_mask
              <nameinfo>-name
              into ls_alv_fieldcat-edit_mask.
          endif." not <nameinfo>-continue IS INITIAL.
        endif." not <typeinfo>-IDX_EDIT_MASK is initial.
    * assign length, output length and decimals
        ls_alv_fieldcat-intlen                = <typeinfo>-length.
        ls_alv_fieldcat-outputlen             = <typeinfo>-output_length.
        ls_alv_fieldcat-decimals_out          = <typeinfo>-decimals.
        ls_alv_fieldcat-inttype               = <typeinfo>-type.
        append ls_alv_fieldcat to pt_alv_fieldcat.
        clear:  "prevent anything 2 B  taken for subsequent fields
          ls_alv_fieldcat.
      endloop." at lv_desc-types where not IDX_NAME is in initial.
    endform.                    " ALV_FIELDCAT_FOR_ITAB
    *&      Form  get_rollname_4_tabfield
    *       Get Data                          type for Table field
    form get_rollname_4_tabfield
      using    p_fname                        type text80 ""CRM<=R/3 fname
      changing p_alv_fieldcat                 type slis_fieldcat_alv.
      field-symbols:
        <dfies>                               type dfies.
      data:
        lv_tabname                            type tabname,
         lt_dfies                             type table of dfies,
        lv_fieldname                          type fieldname.
      split p_fname at '-'
        into lv_tabname lv_fieldname.
      clear p_alv_fieldcat-rollname.
      call function 'DDIF_FIELDINFO_GET'
        exporting
          tabname                             = lv_tabname
          fieldname                           = lv_fieldname
    *   LANGU                                 = SY-LANGU
    *   LFIELDNAME                            = ' '
    *   ALL_TYPES                             = ' '
    * IMPORTING
    *   X030L_WA                              =
    *   DDOBJTYPE                             =
    *   DFIES_WA                              =
    *   LINES_DESCR                           =
       tables
         dfies_tab                            =  lt_dfies
    *   FIXED_VALUES                          =
       exceptions
         not_found                            = 1
         internal_error                       = 2
         others                               = 3
      if sy-subrc                             <> 0.
        message id sy-msgid                   type sy-msgty number sy-msgno
                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      else.
        read table   lt_dfies assigning <dfies> index 1.
        p_alv_fieldcat-rollname               = <dfies>-rollname.
    * Und wenn keinerlei Twexte gepflegt sind?
        if <dfies>-reptext is initial and
           <dfies>-scrtext_s is initial and
           <dfies>-scrtext_m is initial and
           <dfies>-scrtext_l is initial.
    * No Text: Use Fieldname as text
          p_alv_fieldcat-seltext_s            =
          p_alv_fieldcat-seltext_m            =
          p_alv_fieldcat-seltext_l            =
          p_alv_fieldcat-reptext_ddic         =
          p_alv_fieldcat-fieldname.
        endif." <dfies>-reptext IS INITIAL AND
      endif.
    endform.                    " get_rollname_4_tabfield
    Regards,
    Clemens

  • ATP based on material and capacity availability

    Hi Experts,
    Is there a way to implement ATP with finite capacity availability and material availability in a Make to stock (MTS) environment in R/3? In other words, when a sales order is created for a material, the confirmation date that is recd. should be based on Capacity and Material availability. What planning strategy would you use?
    I understand that this can be implemented in assembled to order environment (planning strategy 82 or 83), but my question is more related to MTS environment.
    Regards,
    Praveen

    Hi Praveen,
    SAP recommends APO as a solution for your scenario.  Check out their documentation on Capable to Promise (CTP) under
    http://help.sap.com/saphelp_scm2007/helpdata/en/64/7294375960a42be10000009b38f8cf/frameset.htm
    This is not a trivial implementation.  You need to be sure that this is what your business wants before you embark on the change.
      Regards,
      Bruce

  • I need a solution for node-webkit and libudev.so.0

    Hello there!
    I'm developing the package of node-webkit in the aur. Since the first time I had trouble with libudev.so.0. The first quick fix was to generate a symbolic link to libudev.so.1, but this is not the best way and can destabilize the system.
    The symbolic link is the recommended workaround for this problem at the moment. I don't think there will be a fixed version in the near future. By reading the issues on the bugtracker of node-webkit I found a solution by using a start-script and rewrite the LD_LIBRARY_PATH. This variable is missing in Arch, so I thought, I can add a file into /etc/ld.so.conf.d/. It's not what I wanted, because the library is then globally accessible, but it works on my machine.
    I think there must be a better solution. Best choice would be a shell startscript in my opinion, but I don't know how.
    My own package of libudev.so.0 were be deleted with the comment: "it is not needed, you can just provide a symlink to libudev.so.1". One say this, another say whatever -.-0 It's annoying. I really want a solution!
    Here is the PKGBUILD:
    pkgname=node-webkit
    pkgver=0.6.0
    pkgrel=2
    pkgdesc="node-webkit is an app runtime based on Chromium and node.js."
    arch=("i686" "x86_64")
    url="https://github.com/rogerwang/node-webkit"
    license=("MIT")
    depends=("alsa-lib" "gconf" "gtk2" "nss")
    optdepends=("nodejs: npm package support"
    "nw-gyp: native add-on build tool for node-webkit")
    if [ "$CARCH" = "i686" ]; then
    _arch="ia32"
    sha256sums=(
    "4b3f45cbb023d043955620a1f84b239249ac00a2649834c0c675d1574462f307"
    "c77f5c8bcbce1c8f12d574538845ff5b467fd1acc9e5998f459abcf6b4b7fec3"
    fi
    if [ "$CARCH" = "x86_64" ]; then
    _arch="x64"
    sha256sums=(
    "a8fb4c045cc5de78d1ac784c50c1eda986d6ccbe82778f6285c5da1bfceda64e"
    "fe517d0cf7f374477fcbd654b57f1bc8660069c522625bb06f4d5fc565fdede3"
    fi
    source=(
    "https://s3.amazonaws.com/${pkgname}/v${pkgver}/${pkgname}-v${pkgver}-linux-${_arch}.tar.gz"
    "http://arm.konnichi.com/core/os/${CARCH}/udev-182-4-${CARCH}.pkg.tar.xz"
    package() {
    msg2 "create path and copy files"
    mkdir -p $pkgdir/{etc/ld.so.conf.d,usr/{lib/${pkgname}/lib,bin}}
    cp -R $srcdir/${pkgname}-v$pkgver-linux-$_arch/* $pkgdir/usr/lib/node-webkit/
    msg2 "copy libudev.so.0.13.1 -> /usr/lib/node-webkit/lib/libudev.so.0"
    cp $srcdir/usr/lib/libudev.so.0.13.1 $pkgdir/usr/lib/node-webkit/lib/libudev.so.0
    echo "/usr/lib/${pkgname}/lib" > "$pkgdir/etc/ld.so.conf.d/${pkgname}.conf"
    msg2 "symlink /usr/bin/nw -> /usr/lib/${pkgname}/nw"
    ln -s "/usr/lib/${pkgname}/nw" "$pkgdir/usr/bin/nw"
    msg2 "symlink /usr/bin/nwsnapshot -> /usr/lib/${pkgname}/nwsnapshot"
    ln -s "/usr/lib/${pkgname}/nwsnapshot" "$pkgdir/usr/bin/nwsnapshot"
    Last edited by blackcat (2013-06-21 22:10:55)

    Do not use prebuilt binaries, but compile the package from source with the current libudev.
    sha256sums=(SKIP)
    source=("$pkgname::git+https://github.com/rogerwang/node-webkit.git#tag=nw-v$pkgver")
    to build it in the PKGBUILD, use nw-gyp i guess.
    Last edited by progandy (2013-06-21 22:54:36)

  • Are field symbols and Dynamic internal tables consistant?

    Hi,
    Are field symbols and Dynamic internal tables
    always consistent?
    In my program I m creating a dynamic itab and assignig values to it using <FS>, sometimes the program fails to execute assign <Fs> statement...
    this happens once in 3 to 4 runs
    any solution...
    I have proper clear and refresh statements in program.
    Thanks,
    Hardik

    Anurag,
    Thanks for a quick reply. Here I am sending a small piece of my code.
    MOVE-CORRESPONDING OUTTAB TO DYNTAB.
          CLEAR IT_UDATE.
          CLEAR : T_KBETR .
          READ TABLE IT_UDATE WITH KEY UDATE = OUTTAB-UDATE.
          CONCATENATE 'DYNTAB-KBETR' IT_UDATE-CO_POS INTO T_KBETR.
          ASSIGN (T_KBETR) TO <FS> .
          SUBRC5 = SY-SUBRC .
          IF SUBRC5 = 0 .
              <FS> =  OUTTAB-KBETR .
          ENDIF .
    read statement will always return CO_POS .
    while debuging this code a few times
    <b>ASSIGN (T_KBETR) TO <FS> .</b>
    returns sy-subrc = 4
    and that was leading the program to short dump earlier.
    now, as I have a check DYNTAB-KBETR holds no value on display.
    this happens very few times. (most of the times report is displaying desired output)
    Thanks,
    Hardik

  • Difference bw the data staging of generic and appli specefic data sources

    Hi,
       Can anyone tell the difference between data staging of generic and appl specific data sources. Like we know that LO data stage in queued delta, update queue and BW delta queue, i want to know actually where the generic data stages before it is loaded into BW.
    Thanks.

    Generic data sources are based on either a DB table/view, a function module or an ABAP query. So normally the data stages in the corresponding DB tables or you calculate it at extraction time. There is no update queue like in LO.
    Best regards
       Dirk

  • HREAP and Dynamic VLAN assignment (MS NPS)

    Hi All
    Just a quick rundown of what I am trying to achieve.
    We have a Cisco 5508 WLC (running AIR-CT5500-K9-7-0-116-0.aes). At the moment the WLC is controlling only 1 AP (Cisco 1142N LWAP). I want this AP to be placed at a remote site, and users that authenticate via the RADIUS (MS Windows 2008 NPS) server must be assigned their respective VLANs based on the Active Directory groups they belong to (staff, student, or guest).
    The AP and dynamic VLAN assignment works 100% if the AP is in local mode. Authentication works, and dynamic VLAN assignment works. As soon as you change the AP to HREAP mode, dynamic VLAN assignment stops working, and the client gets assigned an IP of whatever VLAN is assigned to the SSID under the HREAP tab. Allow AAA Override is enabled on the main SSID that I am broadcasting.
    I have read in some of the discussions that HREAP does not support dynamic VLAN assignment, but I haven't seen why this is not supported. Is this true with the latest version of WLC software as well? I cannot see why local traffic destined for a local resource must be sent via a WAN link to the controller, and then back over the WAN link again. This seems very inefficient.
    Is there anybody that can confirm if this is in fact an HREAP limitation, and why (if so) it is a limitation, please? Any info would be much appreciated.
    Regards
    Connie

    Do you perhaps know if there are plans for this limitation being addressed in the near future?
    We are looking to deploy wireless from end-to-end in all 6 of our sites, and you biggest competitor was penalized because they do not support this feature. It seems we're going to have to apply the same penalty in this respect to Cisco as well.
    Thanks for the feedback, though!
    Regards
    Connie

  • Futureproof and dynamically created button

    I have been looking solution how to make buttons dynamically so that I can fetch dynamically values for buttons:
    - value,onclick,class,type,request
    This excellent page has very closely what I am looking: http://www.laureston.ca/2012/04/20/simple-workflow-implementation-in-apex/
    but I have challenges getting the escaped special characters to work especially for the apex.submit - part.
    Maybe that is just because 'copy-pasting' the plsql-region code from www-page didn't work out of the box
    Application Express 4.2.3.00.08
    Because dealing with the escape chars make the page easily break and there are now the new dynamic actions, I need to check what would be futureproof way of dynamically creating the buttons.
    If this is anyway the most practical way to proceed, then where I should look for further information about htp.p(....) button creation examples with rich escapes?
    Made small test page, where you can see one of my trials trying to get the escapes right.
    user test
    pass test
    http://apex.oracle.com/pls/apex/f?p=1403:2
    rgrds paavo
    --below the code for dynamic plsql region -- very likely the escape chars are not copypasted and shown correctly:
    DECLARE
    --PL/SQL Dynamic Region
    --thisworks too??
      v_showme varchar2(3000);
    BEGIN
      for c in (select sysdate||'asdasd;asdasas'  as button_label
                , 'PIMREQUEST'  as button_request
                , 'button-gray' as button_class
                , 'button'      as button_type
                , 'P38_XPIMPOM' as button_setme
                , 'JUUSTOA'     as button_setme_value
                from dual) loop
    htp.p('<button value='''||c.button_label||''' onclick=\"apex.submit('''||c.button_request||''');'' class='''||c.button_class||''' type='''||c.button_type||'''>
    <span>'||c.button_label||'</span>
    </button>');
      end loop;
    END;

    Hi Paavo,
    Your right about the button_id. It's value comes from an input parameter. The button won't show up in the "When button pressed"-list_of_values. This is not only because you write the id yourself, but more because the entire button is created on the fly. The button isn't stored internal in an apex table, that's why it won't show up in a list of values.
    If you want to trigger a dynamic action with the button, you can use a jQuery selector as triggering element. Here you can refer to the button_id using the '#' as jQuery marker for ID, e.g. '#myButton'.
    What the button that you render does, depends on what you put in the p_link parameter. A normal save button would submit the page with condition 'SAVE', you can do that by setting p_link to 'apex.submit("SAVE")'. If the button should do a page redirect, you set p_link to 'http://www.page2go.com', or whatever url you wish to redirect to.
    The text you put in the button attributes is added as HTML element definition, so if you set p_attrs to 'alt="alternate text"', that will be added to the html of your button.
    An example for a conditional button call could be:
          if p_order_id is null
          then
            create_button
              ( p_id        => 'newOrder'
              , p_link    => 'javascript:apex.submit("CREATE"');'
              , p_label     => 'New Order'
              , p_css       => 'customButton'
          else
            create_button
              ( p_id        => 'updateOrder'
              , p_link    => 'javascript:apex.submit("SAVE"');'
              , p_label     => 'Update Order'
              , p_css       => 'customButton'
          end if;     
    This would create a 'CREATE' button for a new order (p_order_id is null), or a 'SAVE' button for an existing order.
    Regarding your ps: if you mean can you conditionaly create a button using dynamic actions? Then the answer would be yes. Yes you can use the create_button procedure in a dynamic action, however by writing it as stored procedure in the database, or in a database package, you can easily reuse your code and still have only one version of your procedure that you need to maintain.
    Regards,
    Vincent
    http://vincentdeelen.blogspot.com

  • Generic and Flat file extraction

    Hi experts
    can any body send the Real time scenario for Generic and flat file extraction with examples.
    Thanks and regrds,
    satya

    Hi,
    Generic extraction is an extraction where you create a Generic DS and based upon this you would be extracting the data from R/3, which means you would have an source system to extract the generic data from the generic data source.
    Flact file extraction is an extraction where you need not have to connect to source
    system, in this case you source system would be PC, here you would be designing an infosource based up on the fields/columns of your flat file and mapping the corresponding the infoojects to it.. and update rules..
    and you would be loading/extracting the data from the file as a source..
    These two things are different in nature and usage..
    Hope this helps..
    assign points if useful..
    cheers,
    Pattan.

  • Sales order should be blocked based on amount and days

    Hello Gurus,
    We have a requirement -The sales order should be blocked based on credit amount and number of days  maintained for particular customer
    But where do we maintain validity period for that amount for a particular customer
    EX  : Credit limit  amount is: 10000
           Valid time period : 2 months
    This amount  should be valid for 2 monthsonly   now my doubt is where can we maintain validity period for that particular and customer , if he does't use it  , then amount get lapsed and new  amount will be maintained again
    Thanks and regards
    Venkat

    Hii Venkat,
    Credit check: Static check
    Indicates whether the system carries out a static credit check.
    Use u2013
    The customer's credit exposure may not exceed the established credit limit. The credit exposure is the total combined value of the following:
    Open sales documents, Open delivery documents, Open billing documents, Open items (accounts receivable).
    You can specify in the adjacent fields whether the system takes into account all open orders and all open deliveries.
    Note u2013
    The open order value is the value of the order items which have not yet been delivered.
    The open delivery value is the value of the delivery items which have yet been invoiced.
    The open invoice value is the value of the billing document items which have not yet been forwarded to accounting.
    The open items represent documents that have been forwarded to accounting but are not yet settled by the customer.
    Credit check: dynamic check
    Indicates that the system carries out a dynamic credit limit check within a specified credit horizon.
    Use u2013
    The customer's credit exposure is split into a static part - open items, open billing, and delivery values - and a dynamic part, the open order value. The open order value includes all not yet or only partially delivered orders. The value is calculated based on the shipping date and the credit horizon you specify in the adjacent field. For the purposes of evaluating credit, you want the system to ignore all open orders that are due for delivery after the horizon date. The sum of the static and dynamic parts of the check may not exceed the credit limit.
    Thanks and Regards,
    Santanu

Maybe you are looking for

  • Enquiry about checkbox

    Hi, My requirement is I have one editable field in my alv report. After editing that particular field , next screen has to be called. In the Next screen, I need to have one checkbox for one  sales order with different items. But the checkbox is repea

  • OCFS2 problem with Redhat Linux Update 1

    Hi all, I get the following error when I tried to mount the ocfs2 partition: =============== [root@linux1 log]# mount -t ocfs2 -o datavolume /dev/sda1 /u02/oradata/orcl mount.ocfs2: No such device while mounting /dev/sda1 on /u02/oradata/orcl =======

  • Converting purchased Lost movie from my APPLE to my PC.

    Can anyone help? I use a Apple computer and a windows computer. I purchase the first and second seasons of LOST on my Apple computer. I would like to play them on my PC. IS THIS POSSIBLE WITHOUT PURCHASING FROM MY PC? Seems like I should be able to c

  • Netuix:page in .portion file

    Hi, According to the xsd, it would seem I can have a page element in a portion directly under the root element, however, I seem to have a problem with getting the page picked up. It seems to be ok if the element is a portlet or a book, but not a page

  • Facebook crashing on ipad

    Is anyone having prob with Facebook on the ipad crashing