Any way to assign value for  variable of type Class List String ?

I'm puzzled why I can declare a variable:
Class<List<String>> clazz;but I cannot assign a value to it as
clazz = List<String>.class;The compiler also complains about
Class<List<?>> clazz0 = List<?>.class;yet it has the nerve to warn about raw types when I give up and use
Class<List> clazz0 = List.class;Even using a dummy instance does not work.
        List<String> dummy = new ArrayList<String>();
        Class<List<String>> clazz1 = dummy.getClass();I only care because I've declared a method like
public String useless( Class<List<String>> unSetable){
  return  unSetable.getName();
}And now there seems to be no way to call it.

Hello chymes,
there is no way to get an instance of Class<List<String>> without at least one unchecked warning. Otherwise you could get away with the following:
List<Integer> ints = new ArrayList<Integer>();
Class<List<String>> clazz = List<String>.class;
List<String> strings = clazz.cast(ints);
strings.add("No Good");
int i = ints.get(0); // CCETherefore the only way to get it is via unchecked cast:
Class<List<String>> clazz = (Class<List<String>>) (Object) List.class;With kind regards
Ben

Similar Messages

  • Assigning value to variable of type time

    Hi,
    I want to assign value '8:00:00' to a time variable (w_time like sy-uzeit).
    How do i do this? Do i need to do any casting?
    w_time = '8:00:00' didnt work.
    I am trying to use this in a customer exit.
    Thanks,
    Arun KK

    Gotcha!
    Thanks!!

  • Is there any way to pass value from one SWF to another ?

    I am doing project using flash, now I cant pass a value from one SWF to another, is there any way to pass value from one SWF to another.
    thanks

    Hi,
    Just to confirm here do you simply want to communicate between two SWFs without involving Flash Media Server. If this is the case one good way of doing it is to use a local connection. It can be used for direct communication between two separate instances of the flash player. However if you want to involve multiple clients sharing a common variable then you may have to use Shared Object for this. Please let me know what is the actual use case, is it multiple clients sharing a common variable or different player instances communicating between themselves.
    Thanks,
    Abhishek

  • Error that "specify a value for variable posting period (single value entry

    hi
    My query is running testing fine in RSECADMIN under some username..but when i try and open it using analyzer (under same username) it gives me error that "specify a value for variable posting period (single value entry, mandatry)" it does'nt even asks to enter variable values and gives this error message.
    However the same query appears to be working fine under different username.
    plz advise.

    Hi Abhinav,
    Just do one thing compare the Roles of two different users for which Query is getting executed and not.
    Check the Object S_RFC.
    Compare the Objects detail for Both the Users.
    Please Assign points if useful.
    Regards,
    Rajdeep.

  • Error-Specify a value for variable

    Dear All,
    We upgraded our BW system to BI 7 SP 15. We are getting following error when executing queries in Bex.
    Specify a value for variable Company Code
        Message no. BRAIN629
    Diagnosis
        The variable cannot be empty. You must make an entry in the variable
        maintenance for variable Company Code.
    System Response
    Procedure
        Enter a value. Use the search help (F4) if necessary.
    Procedure for System Administration
    Interesting thing is that this error is faced by only 2 users in all upgarded systems.
    We created test user with same roles and we are getting error for these test users as well. All other users can run these queries without any problem. When we gave them sap_allprofile, it worked but I dont think this an authorization issue as these user can execute reports in web without any error.
    Second interesting thing is that, I applied note 1085822. This solved the problem. But on next day while closing this issue formally we found it is not working again and giving the same error.
    I checked other notes but these are not suitable for SP15.
    Any pointer/help will be well appreciated.
    Regards,
    Niraj

    Hi All,
    Resolved this issue by giving authorization obj S_BDS_D value display.
    Regards,
    Niraj

  • Missing substitution value for variable [dispatcher.host]

    Hello,
    I'm getting the error message "com.sap.engine.deploy.manager.MissingSubstitutionException: Missing substitution value for variable [dispatcher.host]." if I'm trying to deploy an SCA file via SDM (remotegui.bat).
    It seems that the problem is a missing variable setting. But I couldn't find any hints at the available SAP web sources which values needs to be set.
    It would be really great if somebody could give me a hint which steps I need to do to solve this issue.
    Many thanks in advance,
    Steffen Zimmermann
    Here is the whole GUI log :
    ==========================================================================
    08/11/26 21:31:15 -  ***********************************************************
    08/11/26 21:31:35 -  Start updating EAR file...
    08/11/26 21:31:35 -  start-up mode is lazy
    08/11/26 21:32:45 -  com.sap.engine.deploy.manager.MissingSubstitutionException: Missing substitution value for variable [dispatcher.host].
                              at com.sap.engine.deploy.manager.DeployManagerImpl.makeTempEar(DeployManagerImpl.java:3747)
                              at com.sap.engine.deploy.manager.DeployManagerImpl.makeNewEar1(DeployManagerImpl.java:3715)
                              at com.sap.engine.deploy.manager.DeployManagerImpl.deployUpdateAction(DeployManagerImpl.java:529)
                              at com.sap.engine.deploy.manager.DeployManagerImpl.deploy(DeployManagerImpl.java:513)
                              at com.sap.sdm.serverext.servertype.inqmy.extern.EngineApplOnlineDeployerImpl.performDeployment(EngineApplOnlineDeployerImpl.java:186)
                              at com.sap.sdm.serverext.servertype.inqmy.extern.EngineDeployerImpl.deploy(EngineDeployerImpl.java:96)
                              at com.sap.sdm.serverext.servertype.inqmy.EngineProcessor.executeAction(EngineProcessor.java:224)
                              at com.sap.sdm.app.proc.deployment.impl.PhysicalDeploymentActionExecutor.execute(PhysicalDeploymentActionExecutor.java:60)
                              at com.sap.sdm.app.proc.deployment.impl.DeploymentActionImpl.execute(DeploymentActionImpl.java:186)
                              at com.sap.sdm.app.proc.deployment.controllers.internal.impl.DeploymentExecutorImpl.execute(DeploymentExecutorImpl.java:48)
                              at com.sap.sdm.app.proc.deployment.states.eventhandler.ExecuteDeploymentHandler.executeAction(ExecuteDeploymentHandler.java:83)
                              at com.sap.sdm.app.proc.deployment.states.eventhandler.ExecuteDeploymentHandler.handleEvent(ExecuteDeploymentHandler.java:60)
                              at com.sap.sdm.app.proc.deployment.states.StateBeforeNextDeployment.processEvent(StateBeforeNextDeployment.java:127)
                              at com.sap.sdm.app.proc.deployment.states.InstContext.processEventServerSide(InstContext.java:73)
                              at com.sap.sdm.app.proc.deployment.states.InstContext.processEvent(InstContext.java:59)
                              at com.sap.sdm.app.view.controllers.DeployEventProcessor.processEvent(DeployEventProcessor.java:11)
                              at com.sap.sdm.client_server.deployserver.DeployCmdProcessor.processEvent(DeployCmdProcessor.java:264)
                              at com.sap.sdm.client_server.deployserver.DeployCmdProcessor.process(DeployCmdProcessor.java:108)
                              at com.sap.sdm.gui.server.GuiAdminRoleCmdProcessor.process(GuiAdminRoleCmdProcessor.java:72)
                              at com.sap.sdm.is.cs.session.server.SessionCmdProcessor.process(SessionCmdProcessor.java:67)
                              at com.sap.sdm.is.cs.cmd.server.CmdServer.execCommand(CmdServer.java:76)
                              at com.sap.sdm.client_server.launch.ServerLauncher$ConnectionHandlerImpl.handle(ServerLauncher.java:286)
                              at com.sap.sdm.is.cs.ncserver.NetCommServer.serve(NetCommServer.java:43)
                              at com.sap.sdm.is.cs.ncwrapper.impl.ServiceWrapper.serve(ServiceWrapper.java:39)
                              at com.sap.bc.cts.tp.net.Worker.run(Worker.java:50)
                              at java.lang.Thread.run(Thread.java:534)
    08/11/26 21:32:45 -  ***********************************************************
    Nov 26, 2008 9:32:45 PM  Info: End of log messages of the target system.
    Nov 26, 2008 9:32:45 PM  Info: ***** End of SAP J2EE Engine Deployment (J2EE Application) *****
    Nov 26, 2008 9:32:45 PM  Error: Aborted: development component 'Cognos8BI'/'cognos.com'/'Cog8BIFactory'/'1'/'1', grouped by software component 'Cognos8BI'/'cognos.com'/'Cog8BIFactory'/'1000.8.4.1.0.20081125093532''/'0':
    Caught exception during application deployment from SAP J2EE Engine's deploy API:
    com.sap.engine.deploy.manager.MissingSubstitutionException: Missing substitution value for variable [dispatcher.host].
    (message ID: com.sap.sdm.serverext.servertype.inqmy.extern.EngineApplOnlineDeployerImpl.performAction(DeploymentActionTypes).DMEXC)
    Nov 26, 2008 9:32:45 PM  Info: Starting to save the repository
    Nov 26, 2008 9:32:49 PM  Info: Finished saving the repository
    Nov 26, 2008 9:32:51 PM  Info: Starting: Initial deployment: Selected software component 'Cognos8BI'/'cognos.com'/'Cog8BIFactory'/'1000.8.4.1.0.20081125093532''/'0' will be deployed.
    Nov 26, 2008 9:32:51 PM  Error: Aborted: software component 'Cognos8BI'/'cognos.com'/'Cog8BIFactory'/'1000.8.4.1.0.20081125093532''/'0':
    Failed deployment of SDAs:
    development component 'Cognos8BI'/'cognos.com'/'Cog8BIFactory'/'1'/'1' : aborted
    Please, look at error logs above for more information!
    Nov 26, 2008 9:32:51 PM  Info: Starting to save the repository
    Nov 26, 2008 9:32:52 PM  Info: Finished saving the repository
    Nov 26, 2008 9:32:53 PM  Info: J2EE Engine is in same state (online/offline) as it has been before this deployment process.

    Thank you.
    Yes, it was a really not a default variable.
    Replacement of the variables directly at the archive with the correct value did solve the issue.

  • How to assign values for more than one field

    Hi,
    I have written following code
    constants: fieldname(30) value '(SAPMF02D)KNA1-AUFSD'.
    constants: fieldname1(30) value '(SAPMF02D)KNA1-LISFD'.
    constants: fieldname2(30) value '(SAPMF02D)KNA1-FAKSD'.
    field-symbols: <L_FIELD>  TYPE ANY.
    field-symbols: <L_FIELD1> TYPE ANY.
    field-symbols: <L_FIELD2> TYPE ANY.
          Assign (fieldname) to <l_field>.
          <L_FIELD> = 'ZB'. " value according to your requirement
          Assign (fieldname1) to <l_field1>.
          <L_FIELD1> = 'ZB'.
    while debugging <l_field1> is not assinging (fieldname1).
    Im able to assing for (fieldname).
    how to assign value for (fieldname1).
    plz suggest me to assign values for more than one field.
    Regards,
    Brahmaji

    Hello,
    Because there is no field name called LISFD in KNA1. Actually you misspelled the field name.
    It is KNA1-LIFSD

  • Value  for variable *** hierarchy Version is invalid

    hi ALL
    for one Of the user, when he tries to run the report he is freequently facing this situation. he is getting the error like : "Value  for variable *** hierarchy Version is invalid" . but the same report is working for other users.
    The starange part is . those variables are not mandatory selections, they are userentry optional values.
    we tried with authorization team also . that is not the probelm.
    how can i solve this...
    any ideas?
    Praveen.
    Message was edited

    Praveen,
    Please check if there is any "Personalization of variable" setting for that variable.
    Raju

  • SAP BEX Analyzer Set values for variables

    Please help us out in sorting out this problem,
    We are automating BEx Analyzer for a Testing Project with Quick Test Professional (QTP) a functional automation tool uses VB script.
    Problem:
    There are 5 steps in automation
    Invoke BEx Application
    Log in to BEx server
    Run Query
    Set values for Variables for Query
    Display Report
    We are able to do 1,2,3 steps using BEx API functions and running BEx macros but we struck up with 4th step,
    1. Invoke BEx Application
    ‘Launch Excel
    Dim app
    Set app = createobject("Excel.Application")
    ‘Make it visible
    app.Visible = true
    ‘Attach add-in to Excel file
    app.Run ("'C:\Program Files\SAP\Business Explorer\BI\BExAnalyzer.xla'!SetStart")
    2. Log in to BEx server
    Login to Bex server
    Function logonToBW(app)
    Dim myConnection
    Dim logonToBW2
    On Error Resume Next
    logonToBW2 = True
    ' Create logon to system with following user and system details
    Set myConnection = app.Run ("'C:\Program Files\SAP\Business Explorer\BI\BExAnalyzer.xla'! SAPBEXgetConnection")
    With myConnection
    .client = "600"
    .User = "USERNAME"
    .Password = "Welcom123"
    .Language = "en"
    .systemnumber = "00"
    .System = "BWDCLNT600"
    .systemid = "BWD"
    .ApplicationServer = "156.158.7.161"
    .SAProuter = ""
    .Logon 0, true
         If .IsConnected = 0 Then
               .Logon 0, False
    If .IsConnected <> 1 Then
    MsgBox "Automatic logon failed. Please enter your username and password in the next screen ..."
    Exit Function
    End If
    End If
    End With
    ' Run connection query to see if connected
    app.Run ("'C:\Program Files\SAP\Business Explorer\BI\BExAnalyzer.xla'!SAPBEXinitConnection")
    logonToBW2 = True
    End Function
    3. Run a Query
    app.Run "'C:\Program Files\SAP\Business Explorer\BI\BExAnalyzer.xla'! runQuery", "ZZCCA3_M01_Q0003"
    Till here the script is running fine then the “Select values for Variables” window is displayed.
    This is where exactly we struck up; in this window we need to select values.
    Name of the Fields
         Field Name     Technical name of characteristic     Variable Name     Value
    1     Company Code                     0COMP_CODE     ZM_COMPCODE     1000
    2     Cost Center Hierarchy          0COSTCENTER     ZS_CCTRN     1000MDON
    3     Cost Center Node     0COSTCENTER     ZS_CCTRN     1000COP
    4     Cost Element          0COSTELEMENT     ZS_COELN     1000GDON_6999
    5     Fiscal Year     0FISCYEAR     0P_FYEAR     2007
    To select values for variables, we are trying below code but its giving an error,
    app.Run  "'C:\Program Files\SAP\Business Explorer\BI\BExAnalyzer.xla'!SAPBEXSetFilterValue", “1000”, "0COMP_CODE"
    app.Run  "'C:\Program Files\SAP\Business Explorer\BI\BExAnalyzer.xla'!SAPBEXSetFilterValue", “1000MDON”, " 0COSTCENTER "
    app.Run  "'C:\Program Files\SAP\Business Explorer\BI\BExAnalyzer.xla'!SAPBEXSetFilterValue", “1000COP”,  "0COSTCENTER"
    app.Run  "'C:\Program Files\SAP\Business Explorer\BI\BExAnalyzer.xla'!SAPBEXSetFilterValue", “1000GDON_6999”,  "0COSTELEMENT "
    app.Run  "'C:\Program Files\SAP\Business Explorer\BI\BExAnalyzer.xla'!SAPBEXSetFilterValue", “2007”,  " 0FISCYEAR"
    Any help highly appreciated, thanks in advance.

    Hi Reinhard,
    Pleas look at this:
    Passing a range to SAPBEX.XLA!SAPBEXSetFilterValue
    Best regards,
    Eugene

  • Is there any way to get windows environment variables like %USERNAME% with javascript?

    is there any way to get windows environment variables like %USERNAME% with javascript using Adobe 10 pro?

    There is a fair amount of Acrobat JavaScript and Acrobat knowledge need to sort all of this out.
    The identity object holds a lot of sedative information. First, upon installation of Acrobat, only the login name is available in the identity object and the end user of the application needs to complete the "Name", "email" and "Organization Name" in the application's preferences. These are the only fields that are available to Acrobat JavaScript identity object as corporation, email, loginName, and name.
    Using the instructions in The Acrobat JavaScript Console (Your best friend for developing Acrobat JavaScript) you can run the following script in the JS console to see the items of the identity object:
    for(i in identity) {
    console.println(i +": " + identity[i]);
    and the following will appear in the console:
    loginName: georgeK
    name: George Kaiser
    corporation: Example
    email: [email protected]
    true
    The documentation states you need to use a trusted function to access this data, but you can access it at startup of Acrobat/Reader and add the properties of the identity object to an array:
    // application variable to hold the properties of the identity object
    var MyIdentity = new Array();
    // loop through the properties of the identity object
    for (i in identity) {
    // place each property of the identity object into an element of the same name in the Identity array
    MyIdentity[i] = identity[i];
    console.println(i +": " + MyIdentity[i])
    You access the items with:
    var loginUser = MyIdentity[loginName];  // get the loginName property
    In the user application level JavaScript file. See Acrobat Help / User JavaScript Changes for 10.1.1 (Acrobat | Reader) for the location of the application level folder you need to use.
    I would change the name of the array used in this post so an untrusted user cannot get to your data. Some of this data can be used in hacking into a user's system.

  • Elements 13 : 1. Is there a way to stop the automatic proposal for exemption? 2. Is there any way or an update for the manipulation of the color curves like in Gimp or Paintshop?

    Elements 13 : 1. Is there a way to stop the automatic proposal for exemption?
                           2. Is there any way or an update for the manipulation of the color
                               curves like in Gimp or Paintshop?
                                                        Dankeschön für jede Antwort die weiter hilft!!

    Hey Rich,
    It is true that you cannot add more than 250 plots to a 2d-axis graph in the REPORT.  One work around is to have the graphs stacked on top of each other and plot 250 to one graph and 250 more to another graph.  I am including a TDR (you have to unzip it) file that has 12 2d-axis stacked on top of each other.  Most of the properties have been made invisible through the graph properties.  You can still see the legends however.  One caveat to this is that you will have issues accessing the different graphs.  You have to do it from a VBScript.  The following line of code worked for me:
    Call GraphObjOpen("2DAxis" + Str(NewAxis))
    Where NewAxis is a variable that defines which graph I want to look at.  You would of course have to loop through the graphs as you add data. 
    Cheers,
    jigg
    CTA, CLA
    teststandhelp.com
    ~Will work for kudos and/or BBQ~
    Attachments:
    12PlotStack.zip ‏12 KB

  • Is there any way to assign colored labels to events?

    Is there any way to assign colored labels to events without having to create numerous calendars?

    You can use numactl to lock any process to a NUMA node, but that only helps if your machine really is NUMA (AMD Opteron servers are, Itanium systems often are).
    You should be able to enumerate nodes using:
    numactl -H
    And lock the process to a node using for instance:
    numactl cpubind=$node_num membind=$node_num java MyClass
    It is hardware dependent how many CPUs and how much memory you have per node. A common number of CPUs is 1-4 sockets.
    Regards -- Henrik

  • Abort Could not determine a value for variable 0DAT from the authorizations

    Hi All,
    I encountered an error '/ Abort Could not determine a value for variable 0DAT from the authorizations\' when executing my query on a multiprovider in BW 3.5.
    Can anyone help me in finding a solutionn to this issue.
    Thanks,
    Kartik.

    Hi Kartik,
    I am sorry as that note is for NW2004s. Please check if 0DAT variable installed from a business content? if not then I think thats the cause of the problem.
    Hope this helps,
    Bye...

  • Error Specify a value for variable-Abort System error in program SAPLRRK0 a

    Dear Experts,
    Could anyone help me to fix this issue?
    I have an Customer exit variable in my query to calulate the first week of the prior year value as per the system calendar. when i execute the query, I am receiving the following error messaged and i am throwing out from the BW server.
    The error message is
    Error Specify a value for variable ZR00**
    Abort System error in program SAPLRRK0 and form APPEND_KHANDLE_1-01-
    Many thanks in advance.
    Regards.
    Krishna.

    Hi Kishor,
    try runnig the same query in RSRT, with execute and debug option.
    Also check in query designer for its correctness.
    Hope this helps...
    Regards,
    umesh

  • Could not determine value for variable 0P_FVAEX (or 0P_CTPCA)

    I get the below error while accessing a query on the planning Info Cube. I used the SAP Exit variable Most Current Data (Transactional InfoCube) (0S_RQTRA) in the query for the Characteristic - Request ID (0REQUID) to extract the data from the yellow request too.
    I do not use the below variables as in the below eror in my query at all. Please assist.
    Diagnosis
    This error diagnosis is specific only to the variables 0P_FVAEX or 0P_CTPCA !
    Termination message BRAIN 632 appears:
    Could not determine value for variable 0P_FVAEX (or 0P_CTPCA).
    System Response
    1.     Operation method of SAP-Exit-Variables 0P_FVAEX or 0P_CTPCA
    With queries from the CO application, both SAP-Exit-Variables look for an entry for 'controlling area'. With this controlling area from the selection screen, the SAP-Exit-Variables program reads the attributes for InfoObject 0CO_AREA (controlling area).
    With queries from the FI application, the SAP Exit Variable 0P_FVAEX looks for an entry for 'company code'. With this company code from the selection screen, the SAP Exit Variables program reads the attributes for InfoObject 0COMP_CODE (Company Code).
    0P_FVAEX determines the fiscal year variant (attribute 0FISCVARNT) from the attributes for 0CO_AREA (CO queries) or 0COMP_CODE (FI queries). 0P_CTPCA determines the currency type of the profit center local currency (attribute 0CURTP_PCA) from the attributes for 0CO_AREA.

    Hello,
    you need to take a closer look at your query. Somewhere you used one of the 0P_* exit variables, which work only for controlling related InfoCubes. Use your own variables.
    Regards,
    Marc
    SAP NetWeaver RIG

Maybe you are looking for