Variable Type Plugin Example for WLI

Hi,
A customer of mine wishes to develop a Plug-in Variable of type Vector or array.
Firstly is this possible ? If so, do you by any chance have an example or sample
code that we can work from ?
Basically they need a Variable of some type of collection object.
Thanks!

Check out this code here:
http://forums.adobe.com/message/2017444#2017444

Similar Messages

  • Examples for Fixed and variable prices for activity type

    Hi,
    Can someone please provide a real life example for the fixed and variable prices of an activity type?
    Moderator: Search SDN and SAP help material

    Hi,
    Fixed Price are those expenditures which remains constant in total amount irrespective of change in Volume of production.Eg Rent will be constant even if your production volume changes.The activity price calculated for such expenditures will also be constant per activity rate even if there is a change in the volume of production.
    Varriable price on the other hand changes with the volume of production .e.g power cost will change if you produce more.the the activity rate say KWH/ton will also change and its price will also change if you produce more.
    Generally activities for service center fixed costs will yield fixed price.
    Once you are done with planning in KP26.these plan amounts are used for standard cost estimate.when you are doing standard cost estimate, cost will calculated from BOM(Materials cost) and Routing(here you have activitype plan cost/hr.no.of hrs to finish goods).
    once you are with standard cost estimate it will update material master.
    To calculate variances(target costs Vs Actual cost),we use target cost.target cost is nothing but your standard cost estimate cost for that particular materials(Finished or Semi -Finished).
    you can check this in OKV6 T.code.
    Thanks,
    Rau

  • Clear definition+examples- type variable, type parameter and type argument

    I am trying to fully understand the terms like type variable, type parameter and type argument as they apply to generics. Can anyone please give the exact definition and example of each of these terms. Also how these terms relate to the classes/interfaces in language model APIs of Java 6.

    http://java.sun.com/docs/books/jls/third_edition/html/j3TOC.html

  • Post data into Ajax function for Item type plugin

    Please advise how to post data into Ajax function for item type plugin
    Edited by: Casufi on Jan 16, 2013 7:44 AM

    Casufi wrote:
    Casufi wrote:
    Please advise how to post data into Ajax function for item type plugin
    Edited by: Casufi on Jan 16, 2013 7:44 AMI used the following code
    var get = new htmldb_Get(null, html_GetElement(''pFlowId'').value, ''NATIVE='||apex_plugin.get_ajax_identifier||''', $v(''pFlowStepId''));
    get.addParam(''x01'', node.data.key);
    gReturn = get.get();You should use this published true ajax API instaed. apex.server.process( pAjaxIdentifier, pData, pOptions )

  • Example/tutorial for WLI 8.1 Clustering

              Hi,
              I am new to clustering and was looking for any tutorial or an example for clustering
              a WLI application.
              There is a WLS Cluster example + tutorial [a sample J2ee Application which can
              be deployed on a WLS cluster]. I am looking for something similar for WLI. Where
              can I find it?
              I also did go thru the WLI deployment document which has some interesting info.
              My env:
              WLI 8.1 SP1
              Windows 2K/XP
              JDK 1.4x
              Any help would be useful!
              Thanks,
              DKV
              

              The "deploy.pdf" [Deploymnet doc] helped.
              Now I have a WLI cluster. However, I tried to install the "sampleApp" [integration
              sample] on the WLI Cluster and am having problems with The Adapters.
              The Admin console says the deployment was a sucess - however the WLIConsole
              says that the Adapter deploy failed. Any idea why this would happen and how do
              we solve this issue?
              The stack trace is:
              com.bea.wlai.client.DeploymentException: Deployment of app view 'sampleApp_FunctionDemo_CustomerMgmt'
              failed for the following reason: Could not create Resource Adapter instance 'sampleApp_FunctionDemo_CustomerMgmt__Default':
              com.bea.wlai.client.DeploymentException: Error loading persistent configuration
              for adapter instance 'sampleApp_FunctionDemo_CustomerMgmt__Default': java.lang.NullPointerException
              java.lang.NullPointerException at com.bea.wlai.management.internal.AdapterInstanceConfigurationHelper.getAdapterInstanceConfiguration(AdapterInstanceConfigurationHelper.java:494)
              at com.bea.wlai.management.internal.AdapterInstanceConfigurationHelper.loadAdapterInstance(AdapterInstanceConfigurationHelper.java:408)
              at com.bea.wlai.AdapterDeploymentCache.createAdapterDeploymentInfo(AdapterDeploymentCache.java:70)
              at com.bea.wlai.AdapterDeployer.deployAdapter(AdapterDeployer.java:230) at com.bea.wlai.ApplicationViewDeployer.deployAdapterInstance(ApplicationViewDeployer.java:722)
              at com.bea.wlai.ApplicationViewDeployer.deployAdapterInstances(ApplicationViewDeployer.java:614)
              at com.bea.wlai.ApplicationViewDeployer.internalDeploy(ApplicationViewDeployer.java:512)
              at com.bea.wlai.ApplicationViewDeployer.access$200(ApplicationViewDeployer.java:67)
              at com.bea.wlai.ApplicationViewDeployer$DeployTask.runTask(ApplicationViewDeployer.java:2500)
              at com.bea.wlai.Task.internalRunTask(Task.java:91) at com.bea.wlai.Task.access$000(Task.java:5)
              at com.bea.wlai.Task$1.run(Task.java:71) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
              at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118) at
              com.bea.wlai.Task.runAs(Task.java:65) at com.bea.wlai.TaskHandler.run(TaskHandler.java:79)
              java.lang.NullPointerException -------- Begin level 0 Exception Stack Trace --------
              com.bea.wlai.client.DeploymentException: Error loading persistent configuration
              for adapter instance 'sampleApp_FunctionDemo_CustomerMgmt__Default': java.lang.NullPointerException
              java.lang.NullPointerException at com.bea.wlai.management.internal.AdapterInstanceConfigurationHelper.getAdapterInstanceConfiguration(AdapterInstanceConfigurationHelper.java:494)
              at com.bea.wlai.management.internal.AdapterInstanceConfigurationHelper.loadAdapterInstance(AdapterInstanceConfigurationHelper.java:408)
              at com.bea.wlai.AdapterDeploymentCache.createAdapterDeploymentInfo(AdapterDeploymentCache.java:70)
              at com.bea.wlai.AdapterDeployer.deployAdapter(AdapterDeployer.java:230) at com.bea.wlai.ApplicationViewDeployer.deployAdapterInstance(ApplicationViewDeployer.java:722)
              at com.bea.wlai.ApplicationViewDeployer.deployAdapterInstances(ApplicationViewDeployer.java:614)
              at com.bea.wlai.ApplicationViewDeployer.internalDeploy(ApplicationViewDeployer.java:512)
              at com.bea.wlai.ApplicationViewDeployer.access$200(ApplicationViewDeployer.java:67)
              at com.bea.wlai.ApplicationViewDeployer$DeployTask.runTask(ApplicationViewDeployer.java:2500)
              at com.bea.wlai.Task.internalRunTask(Task.java:91) at com.bea.wlai.Task.access$000(Task.java:5)
              at com.bea.wlai.Task$1.run(Task.java:71) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
              at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118) at
              com.bea.wlai.Task.runAs(Task.java:65) at com.bea.wlai.TaskHandler.run(TaskHandler.java:79)
              java.lang.NullPointerException at com.bea.wlai.AdapterDeploymentCache.createAdapterDeploymentInfo(AdapterDeploymentCache.java:76)
              at com.bea.wlai.AdapterDeployer.deployAdapter(AdapterDeployer.java:230) at com.bea.wlai.ApplicationViewDeployer.deployAdapterInstance(ApplicationViewDeployer.java:722)
              at com.bea.wlai.ApplicationViewDeployer.deployAdapterInstances(ApplicationViewDeployer.java:614)
              at com.bea.wlai.ApplicationViewDeployer.internalDeploy(ApplicationViewDeployer.java:512)
              at com.bea.wlai.ApplicationViewDeployer.access$200(ApplicationViewDeployer.java:67)
              at com.bea.wlai.ApplicationViewDeployer$DeployTask.runTask(ApplicationViewDeployer.java:2500)
              at com.bea.wlai.Task.internalRunTask(Task.java:91) at com.bea.wlai.Task.access$000(Task.java:5)
              at com.bea.wlai.Task$1.run(Task.java:71) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
              at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118) at
              com.bea.wlai.Task.runAs(Task.java:65) at com.bea.wlai.TaskHandler.run(TaskHandler.java:79)
              -------- End level 0 Exception Stack Trace -------- -------- Begin level 1 Exception
              Stack Trace -------- java.lang.NullPointerException at com.bea.wlai.management.internal.AdapterInstanceConfigurationHelper.getAdapterInstanceConfiguration(AdapterInstanceConfigurationHelper.java:494)
              at com.bea.wlai.management.internal.AdapterInstanceConfigurationHelper.loadAdapterInstance(AdapterInstanceConfigurationHelper.java:408)
              at com.bea.wlai.AdapterDeploymentCache.createAdapterDeploymentInfo(AdapterDeploymentCache.java:70)
              at com.bea.wlai.AdapterDeployer.deployAdapter(AdapterDeployer.java:230) at com.bea.wlai.ApplicationViewDeployer.deployAdapterInstance(ApplicationViewDeployer.java:722)
              at com.bea.wlai.ApplicationViewDeployer.deployAdapterInstances(ApplicationViewDeployer.java:614)
              at com.bea.wlai.ApplicationViewDeployer.internalDeploy(ApplicationViewDeployer.java:512)
              at com.bea.wlai.ApplicationViewDeployer.access$200(ApplicationViewDeployer.java:67)
              at com.bea.wlai.ApplicationViewDeployer$DeployTask.runTask(ApplicationViewDeployer.java:2500)
              at com.bea.wlai.Task.internalRunTask(Task.java:91) at com.bea.wlai.Task.access$000(Task.java:5)
              at com.bea.wlai.Task$1.run(Task.java:71) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
              at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118) at
              com.bea.wlai.Task.runAs(Task.java:65) at com.bea.wlai.TaskHandler.run(TaskHandler.java:79)
              -------- End level 1 Exception Stack Trace -------- com.bea.wlai.client.DeploymentException:
              Could not create Resource Adapter instance 'sampleApp_FunctionDemo_CustomerMgmt__Default':
              com.bea.wlai.client.DeploymentException: Error loading persistent configuration
              for adapter instance 'sampleApp_FunctionDemo_CustomerMgmt__Default': java.lang.NullPointerException
              java.lang.NullPointerException at com.bea.wlai.management.internal.AdapterInstanceConfigurationHelper.getAdapterInstanceConfiguration(AdapterInstanceConfigurationHelper.java:494)
              at com.bea.wlai.management.internal.AdapterInstanceConfigurationHelper.loadAdapterInstance(AdapterInstanceConfigurationHelper.java:408)
              at com.bea.wlai.AdapterDeploymentCache.createAdapterDeploymentInfo(AdapterDeploymentCache.java:70)
              at com.bea.wlai.AdapterDeployer.deployAdapter(AdapterDeployer.java:230) at com.bea.wlai.ApplicationViewDeployer.deployAdapterInstance(ApplicationViewDeployer.java:722)
              at com.bea.wlai.ApplicationViewDeployer.deployAdapterInstances(ApplicationViewDeployer.java:614)
              at com.bea.wlai.ApplicationViewDeployer.internalDeploy(ApplicationViewDeployer.java:512)
              at com.bea.wlai.ApplicationViewDeployer.access$200(ApplicationViewDeployer.java:67)
              at com.bea.wlai.ApplicationViewDeployer$DeployTask.runTask(ApplicationViewDeployer.java:2500)
              at com.bea.wlai.Task.internalRunTask(Task.java:91) at com.bea.wlai.Task.access$000(Task.java:5)
              at com.bea.wlai.Task$1.run(Task.java:71) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
              at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118) at
              com.bea.wlai.Task.runAs(Task.java:65) at com.bea.wlai.TaskHandler.run(TaskHandler.java:79)
              java.lang.NullPointerException -------- Begin level 0 Exception Stack Trace --------
              com.bea.wlai.client.DeploymentException: Error loading persistent configuration
              for adapter instance 'sampleApp_FunctionDemo_CustomerMgmt__Default': java.lang.NullPointerException
              java.lang.NullPointerException at com.bea.wlai.management.internal.AdapterInstanceConfigurationHelper.getAdapterInstanceConfiguration(AdapterInstanceConfigurationHelper.java:494)
              at com.bea.wlai.management.internal.AdapterInstanceConfigurationHelper.loadAdapterInstance(AdapterInstanceConfigurationHelper.java:408)
              at com.bea.wlai.AdapterDeploymentCache.createAdapterDeploymentInfo(AdapterDeploymentCache.java:70)
              at com.bea.wlai.AdapterDeployer.deployAdapter(AdapterDeployer.java:230) at com.bea.wlai.ApplicationViewDeployer.deployAdapterInstance(ApplicationViewDeployer.java:722)
              at com.bea.wlai.ApplicationViewDeployer.deployAdapterInstances(ApplicationViewDeployer.java:614)
              at com.bea.wlai.ApplicationViewDeployer.internalDeploy(ApplicationViewDeployer.java:512)
              at com.bea.wlai.ApplicationViewDeployer.access$200(ApplicationViewDeployer.java:67)
              at com.bea.wlai.ApplicationViewDeployer$DeployTask.runTask(ApplicationViewDeployer.java:2500)
              at com.bea.wlai.Task.internalRunTask(Task.java:91) at com.bea.wlai.Task.access$000(Task.java:5)
              at com.bea.wlai.Task$1.run(Task.java:71) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
              at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118) at
              com.bea.wlai.Task.runAs(Task.java:65) at com.bea.wlai.TaskHandler.run(TaskHandler.java:79)
              java.lang.NullPointerException at com.bea.wlai.AdapterDeploymentCache.createAdapterDeploymentInfo(AdapterDeploymentCache.java:76)
              at com.bea.wlai.AdapterDeployer.deployAdapter(AdapterDeployer.java:230) at com.bea.wlai.ApplicationViewDeployer.deployAdapterInstance(ApplicationViewDeployer.java:722)
              at com.bea.wlai.ApplicationViewDeployer.deployAdapterInstances(ApplicationViewDeployer.java:614)
              at com.bea.wlai.ApplicationViewDeployer.internalDeploy(ApplicationViewDeployer.java:512)
              at com.bea.wlai.ApplicationViewDeployer.access$200(ApplicationViewDeployer.java:67)
              at com.bea.wlai.ApplicationViewDeployer$DeployTask.runTask(ApplicationViewDeployer.java:2500)
              at com.bea.wlai.Task.internalRunTask(Task.java:91) at com.bea.wlai.Task.access$000(Task.java:5)
              at com.bea.wlai.Task$1.run(Task.java:71) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
              at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118) at
              com.bea.wlai.Task.runAs(Task.java:65) at com.bea.wlai.TaskHandler.run(TaskHandler.java:79)
              -------- End level 0 Exception Stack Trace -------- -------- Begin level 1 Exception
              Stack Trace -------- java.lang.NullPointerException at com.bea.wlai.management.internal.AdapterInstanceConfigurationHelper.getAdapterInstanceConfiguration(AdapterInstanceConfigurationHelper.java:494)
              at com.bea.wlai.management.internal.AdapterInstanceConfigurationHelper.loadAdapterInstance(AdapterInstanceConfigurationHelper.java:408)
              at com.bea.wlai.AdapterDeploymentCache.createAdapterDeploymentInfo(AdapterDeploymentCache.java:70)
              at com.bea.wlai.AdapterDeployer.deployAdapter(AdapterDeployer.java:230) at com.bea.wlai.ApplicationViewDeployer.deployAdapterInstance(ApplicationViewDeployer.java:722)
              at com.bea.wlai.ApplicationViewDeployer.deployAdapterInstances(ApplicationViewDeployer.java:614)
              at com.bea.wlai.ApplicationViewDeployer.internalDeploy(ApplicationViewDeployer.java:512)
              at com.bea.wlai.ApplicationViewDeployer.access$200(ApplicationViewDeployer.java:67)
              at com.bea.wlai.ApplicationViewDeployer$DeployTask.runTask(ApplicationViewDeployer.java:2500)
              at com.bea.wlai.Task.internalRunTask(Task.java:91) at com.bea.wlai.Task.access$000(Task.java:5)
              at com.bea.wlai.Task$1.run(Task.java:71) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
              at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118) at
              com.bea.wlai.Task.runAs(Task.java:65) at com.bea.wlai.TaskHandler.run(TaskHandler.java:79)
              -------- End level 1 Exception Stack Trace -------- com.bea.wlai.client.DeploymentException:
              Error loading persistent configuration for adapter instance 'sampleApp_FunctionDemo_CustomerMgmt__Default':
              java.lang.NullPointerException java.lang.NullPointerException at com.bea.wlai.management.internal.AdapterInstanceConfigurationHelper.getAdapterInstanceConfiguration(AdapterInstanceConfigurationHelper.java:494)
              at com.bea.wlai.management.internal.AdapterInstanceConfigurationHelper.loadAdapterInstance(AdapterInstanceConfigurationHelper.java:408)
              at com.bea.wlai.AdapterDeploymentCache.createAdapterDeploymentInfo(AdapterDeploymentCache.java:70)
              at com.bea.wlai.AdapterDeployer.deployAdapter(AdapterDeployer.java:230) at com.bea.wlai.ApplicationViewDeployer.deployAdapterInstance(ApplicationViewDeployer.java:722)
              at com.bea.wlai.ApplicationViewDeployer.deployAdapterInstances(ApplicationViewDeployer.java:614)
              at com.bea.wlai.ApplicationViewDeployer.internalDeploy(ApplicationViewDeployer.java:512)
              at com.bea.wlai.ApplicationViewDeployer.access$200(ApplicationViewDeployer.java:67)
              at com.bea.wlai.ApplicationViewDeployer$DeployTask.runTask(ApplicationViewDeployer.java:2500)
              at com.bea.wlai.Task.internalRunTask(Task.java:91) at com.bea.wlai.Task.access$000(Task.java:5)
              at com.bea.wlai.Task$1.run(Task.java:71) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
              at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118) at
              com.bea.wlai.Task.runAs(Task.java:65) at com.bea.wlai.TaskHandler.run(TaskHandler.java:79)
              java.lang.NullPointerException
              "DKV" <[email protected]> wrote:
              >
              > Hi,
              >
              >I am new to clustering and was looking for any tutorial or an example
              >for clustering
              >a WLI application.
              >
              >There is a WLS Cluster example + tutorial [a sample J2ee Application
              >which can
              >be deployed on a WLS cluster]. I am looking for something similar for
              >WLI. Where
              >can I find it?
              >
              >I also did go thru the WLI deployment document which has some interesting
              >info.
              >
              >My env:
              >
              >WLI 8.1 SP1
              >
              >Windows 2K/XP
              >
              >JDK 1.4x
              >
              >Any help would be useful!
              >
              >Thanks,
              >
              >DKV
              

  • I need example for VARIABLES with Customer Exit.

    hi every body i need example for Variable for Customer Exit.

    Hi,
    You can define 'Formula' variables in your customer exit..for example..
    you need to calculate no of machine running hours per month, in order to
    caculate the machine total utilization time..in this context.. you need to know
    how may hours are there in an month by month..
    you can define a variable and write the code in the customer exit for deriving the total no. of hours available for that month and get that value into a variable for further calution like deducting the down time and set up time so on..in your
    calculated KF..
    Hope this helps..
    Assign points if useful..
    Cheers,
    Pattan.

  • "opaque" for variable type in debugger

    I am debugging a database package body. I see some variables listed with a type of "opaque". What does that mean?
    Mike

    If a variable shows up as "opaque", it means that the package in which the variable type (not the variable itself) is defined is not compiled with debug information, or the debugging user does not have the debug privilege to that package (typically when the package belongs to a different database user).
    If that package is not compiled with debug information, just recompile it with debug information. If the debugging user does not have the debug privilege to the package, just have that package owner grant the debug privilege on that package to the debugging user via "grant debug on xxx to user_yyy" (or have the DBA do so).
    Thanks.

  • How to define the "tab" ,"enter" character in a variable(type c)

    I want to use the define the "tab" key and
    "enter" key in a variable(type c),
    But I don't know how to write it :
    for example:
    data: a1 type c(1).
    data: a2 type c(1).
    a1 = ?. " the tab key
    a2 = ?. " the enter key

    Hi, i think joseph fryda gave you the one solution.
    In the server which doesn't support CL_ABAP_CHAR_UTILITIES, here is another solution.
    data:
        C_X1                  TYPE X VALUE '0D',
        C_X2                  TYPE X VALUE '0A',
        C_X3                  TYPE X VALUE '09',
        LC_ENTER(2)           TYPE C,
        LC_TAB                TYPE C.
    enter key
    CONCATENATE C_X1 C_X2 INTO LC_ENTER.
    TAB key
    LC_TAB = C_X3.

  • Apache plugin support for WLS  6.1 is not working for me.

    Following are the additional configurations I used in httpd.conf after doing LoadModule
    & AddModule
    Alias /weblogic "/opt/BEA/wlserver6.1/config/petstore/applications"
    <Location /weblogic>
    SetHandler weblogic-handler
    </Location>
    <IfModule mod_weblogic.c>
    WebLogicHost localhost
    WebLogicPort 7003
    </IfModule>
    I get Permission denied & not even 403/forbidden for Petstore example jsps. I
    am trying
    to proxy it by URL basis not on mime type. I tried doing same thing for one of
    my own domains
    & server. The results were same. Now, If I try to comment out the Alias line from
    my httpd.conf
    file, it gives me 404 error. Can anyone help me out in this regard? I doubt my
    configurations
    in my weblogic's config.xml file.
    Thanks,
    Naveen

    Hi.
    I'm not clear on what you are trying to accomplish with the alias pointing to the absolute
    path of your WLS applications directory. This is not how the plugin works. As you have it
    set up now the plugin looks for URLs with /weblogic in them and proxies those requests to a
    running instance of WLS.
    For example, the plugin will accept the following URL and forward it to WLS:
    http://host:port/weblogic/index.html
    WLS will respond IF you have a webapp named weblogic. From your example it looks like you
    are trying to proxy to the petstore example. The URL to access the petstore example that
    ships with wls is something like: http://localhost:7003/estore/control/main so if you want
    to proxy by path you may want to proxy when the path contains /estore instead of /weblogic.
    Hope this helps.
    Michael
    Naveen wrote:
    Following are the additional configurations I used in httpd.conf after doing LoadModule
    & AddModule
    Alias /weblogic "/opt/BEA/wlserver6.1/config/petstore/applications"
    <Location /weblogic>
    SetHandler weblogic-handler
    </Location>
    <IfModule mod_weblogic.c>
    WebLogicHost localhost
    WebLogicPort 7003
    </IfModule>
    I get Permission denied & not even 403/forbidden for Petstore example jsps. I
    am trying
    to proxy it by URL basis not on mime type. I tried doing same thing for one of
    my own domains
    & server. The results were same. Now, If I try to comment out the Alias line from
    my httpd.conf
    file, it gives me 404 error. Can anyone help me out in this regard? I doubt my
    configurations
    in my weblogic's config.xml file.
    Thanks,
    Naveen--
    Michael Young
    Developer Relations Engineer
    BEA Support
    [att1.html]

  • Use of variable types and rounding...

    I'm kinda confused on what variable types to use. I want it so that when I divide two numbers, it'll either round up or down, and give me a rounded number w/o a decimal.
    Examples...
    184/2683=7
    164/2683=6
    I have been fiddling with it for a while now, and I keep getting rounded down numbers, even if the decinal is more than .5. Thanks in advance!

    184 / 2683 = 0.068579947819604919865821841222512 -> 0.07
    164 / 2683 = 0.061125605665300037271710771524413 -> 0.06
    Use Math.rint (please read the javadocs...) and some scaling (multiply by 100.00, divide by 100.0 etc).
    Beware - when printing your result could be:
    0.070000000000001
    or
    0.069999999999998
    instead of the expected value 0.07
    for instance, due to the properties of floating-point arithmetic. If you want to round the number only for displaying it, use java.text.DecimalFormat or java.text.MessageFormat.

  • Displaying variable no. of fields for different records

    Hi,
    I have the requirement of displaying variable no of fields for different type of record in the business object.How can this be done in VC. For example i have to show an extra field for country "IN"
    Thanks in advance,
    Regards,
    Anupam

    Hi Anupam,
    Please explain ur requirement more clearly.
    If understanding is right ,you are creating a Table/Form with the information of a particular company ,and u r interested to add another column to this table and this column should not be visible when to select another company. Am I right?
    What is the data source is it a BAPI or Query or Query View?
    1)Drag and drop a table from the Query(if suppose).Or form if u want to include in the form.
    2)And if u want another field(if it is to be calculated) in ur table u can have include an expression box by clicking a "+" sign in the table and specify the formula for it in the Expression field uder the Data source field in the General Tab.
    3)And if u want to hide this field when u select another country then u can set a visibility condition.
    4)Go to control properties window of the new field.U can get this by selecting the new added field and by clicking on configure or by left clicking the new field and then selecting the properties.
    5)Inside the General Tab, u have UI Control,below that u have Hidden which is a check box, just check it.And click on condition. Then type the condition for it to be hidden.Then it is hidden.
    Please try doing the above.
    Reward me with points if its helpful.
    Thanks,Regards,
    Sripriya Srinivasan.

  • 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

  • Using a 2-D array Single Process Shared Variable w/ RT FIFO for comm between a Deterministic and non-deterministic loop on an RT Target

    Our problem is that we currently use a 2D array to store CAN data on a Real-time Target. The array is 20 elements of 3 byte elements as so:
                    0              1              2
    0              [byte]   [byte]   [byte]
    19           [byte]   [byte]   [byte]
    These values are passed between a Deterministic Timed (DT) loop where they are set and a Non-Deterministic Timed (NDT) loop where they are read and passed into a Network Published Shared Variable (NPSV) for communication across the network to a Host PC. I have insrted an image for illustration, pardon the size.
    Currently to pass the data between the DT and NDT loop we are using a Global Variable (GV). To improve the system we have attempted to replace these GVs with Single Process Shared Variables (SPSV) with an RT FIFO enabled.
    To create the shared variable I simply right clicked the GV of interest and selected create Shared Variable Node form the drop downs. At this point LabVIEW presented me with a 2D NPSV within a new Library hosted on the RT Target. I then selected this new NPSV from the Project, changed it to a SPSV, and enabled a single element FIFO. This variable was initialized with a default value for the size described above and then used in our code for the DT to NDT communication, and conversion to a corresponding NPSV for sending to the Host.
    When I went to run the code I noticed that the variable was in fact 2D, however its size was only 2 elements of three bytes each, in other words only two of the row indices were populated and the other appeared as uninitialized. in addition, this data had no resemblance to the set initilazation value. This was also how the variable was presented on the host side of the network after tranfer into a NPSV.
    The peculiar part is that If I change this SPSV to a NPSV and then try to change it back, I receive an error saying the type is not supported for SPSV with an RT FIFO enabled. I have to disable the FIFO (which defeats the entire purpose) in order to successfully compile! I am unclear as to what is the bug in this case. Should I not be allowed to create the original 2D SPSV with a single element RT FIFO enabled without receiving an error? Or if this is okay how do I fix the problems associated with the variable after being allowed to create it?
    I have found the following discussion in which a user states “The only limitations for custom controls is the ability to use it with RT FIFO enabled on a network-published shared variable”. Is this also true for SPSV? I have not found any documentation explicitely stating this for SPSV, though it is stated for the NPSVs.

    Martin,
    RT FIFOs don't support Multi-Dimensional Arrays, which would corroborate the issues you're seeing.  You can break up the 2D array into 1D arrays by reshaping the array, then you'll be able to use the RT FIFO enabled variable, just set the array size to the total number of elements (20*3 = 60).
    You can also pass the 2D array via pre-allocated queue, or using a Functional Global.  We have a reference example for a circular buffer using Functional Globals here.

  • Outputting multiple variable types from single output vi

    Hello,
    I am trying to make a vi that takes some inputs (they are not too relevant to my problem) and has a single output.
    My problem is that I'd like the output variable type to be left unknown until runtime.
    For example, the vi will decide appropriately when to output an integer, string or double variable type.
    Furthermore, inside the vi, I need a way to select the appropriate variable type to send, hence I need a way to check the type of a variable (I don't really know how to do that either).
    Can someone give me some advice?
    Thanks
    David

    Data types are determined at compile time.  You cannot have a run-time decision for a data type.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Actual type of variable type in parameterized type

    Hi all,
    Is there way to find out what is actual type of the Variable type in Parameterized type, for example:
    class A<T> {
         //actual type of variable type T
         Class<T> tClass;
         public void setTClass() {
              // I don't know what should I do here
         public Class<T> getTClass() {
              return tClass;
         public static void main(String[] args) {
              assert((new A<Integer>().getTClass()).toString().equals("class java.lang.Integer"));
    Message was edited by:
    MjLaali
    Message was edited by:
    MjLaali
    Message was edited by:
    MjLaali

    yes ofcource I can't chenge the actual type of variable type T in run time, but I would like to get actual class of T in run time like this example :
    package test;
    import java.lang.reflect.ParameterizedType;
    abstract class B<T>{
         private Class<T> variableClass;
         public B() {
              this.variableClass = (Class<T>) ((ParameterizedType) getClass()
                        .getGenericSuperclass()).getActualTypeArguments()[0];
         public Class<T> getTClass(){
              return variableClass;
    class A extends B<Integer> {
         public static void main(String[] args) {
              assert(new A().getTClass() == Integer.class);
    but I don't want class A and I would like to move main method to class B.

Maybe you are looking for

  • Workaround to archive email in Outlook 2010 as PDF portfolio?

    Hello All, We use Acrobat Pro 9.4.6. Our office will not update to Acrobat X until CS6 becomes available for purchase. We run Office 2010 Pro 32-bit on Windows 7 64-bit. We need to archive email in a way that can be sorted in a PDF Portfolio by date

  • Wireless latency/slow ping problems in Snow Leopard

    After upgrading to Snow Leopard (SR MBP), I've experienced unusually high and unpredictable latency from the airport connection. The Ethernet connection works fine (consistent and short ping times to the wireless router), but the airport connection's

  • PO doc date non modifiable as per PO doc type

    Hi Please help me out. The document date of PO is modifiable, it can be given back date and also forward date during creation of PO. Is it possible to freeze the doc date during PO create(me21n)  for a particular PO doc type wise so that doc date wil

  • Is There A Way To Crop/Stretch Either Horizontally Or Vertically?

    So I figured out how to do the whole letterboxing thing but at end of my video I have promo shots of people that was filmed against a white background but because it was small I had it in wide figuring I would stretch image to take out the wall at wh

  • How to create instance in linux

    Hi guys how to create instance in linux? I know that in order to create a instance in window, we can use oradim cmd. But what about linux?