How to avoid "unchecked cast" warnings

Hi all,
here is my code:
private Vector<String> vector1;
private Vector<String> vector2=new Vector<String>();
vector1=(Vector<String>)vector2.clone();
...How can i avoid "unchecked cast" warnings, while compiling with "-Xlint:unchecked" option.

I'd also add that you should think about the following idioms:
1. Ask yourself do I really need a synchronized structure? The answer might be that unsynchronized structure like ArrayList might be more appropriate. If you DO need a concurrent structure then you may find high-performance one in java.util.concurrent package.
2. Using interfaces will be more appropriate in the long run:
List<String> l = new ArrayList<String>(); because you can replace the implementation of the specific interface with more appropriate structure just on one place.
Best regards,
Andrej

Similar Messages

  • Is it possible to avoid unchecked cast warning here?

      interface MyRemote extends java.rmi.Remote {}
      public <T extends java.rmi.Remote> Class<T>[] getRemoteInterfaces() {
        return (Class<T>[]) new Class[] { MyRemote.class };  //  <-- unchecked cast
      }

    public Collection<Class<? extends Remote>>
    getRemoteInterfaces() {
    Collection<Class<? extends Remote>> c = new
    ArrayList<Class<? extends Remote>>(1);
    c.add(MyRemote.class);
    return c;
    }Just for comparison, without judgement over applicability:
    public Collection getRemoteInterfaces() {
        List list = new ArrayList(1);
        list.add(MyRemote.class);
        return list;
    }/k1

  • How to avoid the following deprecated warnings

    hi,
    I use JAXB 2.0 and I get the following warnings
    All the below API;s have been deprecated since JAXB 2.0, How can I avoid gettings these warnings.
    warning: [deprecation] javax.xml.bind.Validator in javax.xml.bind has been deprecated
    warning: [deprecation] com.sun.xml.bind.marshaller.SchemaLocationFilter in com.sun.xml.bind.marshaller has been deprecated
    warning: [deprecation] javax.xml.bind.Validator in javax.xml.bind has been deprecated
    warning: [deprecation] javax.xml.bind.Validator in javax.xml.bind has been deprecated
    warning: [deprecation] javax.xml.bind.Validator in javax.xml.bind has been deprecated
    warning: [deprecation] javax.xml.bind.Validator in javax.xml.bind has been deprecated
    warning: [deprecation] com.sun.xml.bind.marshaller.SchemaLocationFilter in com.sun.xml.bind.marshaller has been deprecated
    warning: [deprecation] javax.xml.bind.Validator in javax.xml.bind has been deprecated
    warning: [deprecation] javax.xml.bind.Validator in javax.xml.bind has been deprecated
    warning: javax.xml.bind.Validator in javax.xml.bind has been deprecated
    warning: [deprecation] javax.xml.bind.Validator in javax.xml.bind has been deprecated
    warning: com.sun.xml.bind.marshaller.SchemaLocationFilter in com.sun.xml.bind.marshaller has been deprecated
    warning: javax.xml.bind.Validator in javax.xml.bind has been deprecated
    warning: javax.xml.bind.Validator in javax.xml.bind has been deprecated
    warning: [deprecation] javax.xml.bind.Validator in javax.xml.bind has been deprecated
    warning: [deprecation] javax.xml.bind.Validator in javax.xml.bind has been deprecated
    warning: [deprecation] com.sun.xml.bind.marshaller.SchemaLocationFilter in com.sun.xml.bind.marshaller has been deprecated
    warning: [deprecation] javax.xml.bind.Validator in javax.xml.bind has been deprecated
    warning: [deprecation] javax.xml.bind.Validator in javax.xml.bind has been deprecated
    warning: [deprecation] createValidator() in javax.xml.bind.JAXBContext has been deprecated
    warning: [deprecation] createValidator() in javax.xml.bind.JAXBContext has been deprecated
    warning: [deprecation] createValidator() in javax.xml.bind.JAXBContext has been deprecated
    warning: [deprecation] com.sun.xml.bind.marshaller.SchemaLocationFilter in com.sun.xml.bind.marshaller has been deprecated
    warning: [deprecation] ERR_NOT_IDENTIFIABLE in com.sun.xml.bind.marshaller.Messages has been deprecated
    warning: [deprecation] ERR_DANGLING_IDREF in com.sun.xml.bind.marshaller.Messages has been deprecated
    warning: [deprecation] isValidating() in javax.xml.bind.Unmarshaller has been deprecated
    warning: [deprecation] setValidating(boolean) in javax.xml.bind.Unmarshaller has been deprecated
    warning: warning: [deprecation] parse(org.w3c.dom.Element,org.xml.sax.ContentHandler) in com.sun.xml.bind.unmarshaller.DOMScanner has been
    warning: warning: [deprecation] parse(org.w3c.dom.Element,org.xml.sax.ContentHandler) in com.sun.xml.bind.unmarshaller.DOMScanner has been
    warning: [deprecation] getProperty(java.lang.String) in javax.xml.bind.Validator has been deprecated
    warning: [deprecation] setProperty(java.lang.String,java.lang.Object) in javax.xml.bind.Validator has been deprecated
    warning: [deprecation] setEventHandler(javax.xml.bind.ValidationEventHandler) in javax.xml.bind.Validator has been deprecated

    TimThe.., I disagree about the result of a bad design
    comment. In simple cases it can be beneficial to
    only require an object's constructor, then that
    object's actions are self contained and its methods
    can then be called from its own constructor. In the
    right situations this can help to loosen coupling
    between classes and increase encapsulation.I disagree with that. If your code depends on behaviour that is carried out by a constructor, you have a dependency on a concrete class, which is a nice quick way to tightly couple classes. You'd achieve looser coupling if the desired behaviour was inside a method, which was in turn declared on an interface

  • How to get rid of this unchecked cast warning?

    Vector<Integer> v1 = new Vector<Integer>(); // ok
    Object obj = (Object) v1; // ok
    Vector<Integer> v2 = (Vector<Integer>) obj; //unchecked cast
    It works when I try to cast Vector<Integer> to Object. However, it prompts "unchecked cast warning" when I try to cast the object back to Vector<Integer>. How can I get rid of this warning? Is there something wrong?

    There is nothing wrong (it is just a warning).
    In the new type system, you would later do something like
    Integer n = v2.get(14);Now the compiler cannot check (compile time maybe, run time never) whether obj is of class Vector<Integer> (Only Vector), as at compile time as type parameters are stripped away in java1.5 at run time ("type erasure").
    So later the assignment to n could throw a class cast exception at run time.

  • Removing unchecked call warnings

    I have moved from 1.4.2 to 1.5.0 today, and now I'm trying to solve all the unchecked call warnings that I had in the code, but I have one that I don't know how to avoid it.
    I need a matrix of nxn dimensions where every element is an Integer. I was creating this matrix in a recursive way, with a recursion deep of n. For example, if n=3, I had finally a Vector<Vector<Vector<Vector<Integer> > > >. As n is configurable by the user, I can't determine the data types that i must declare in the recursive calls that I use to manage the matrix.
    There is a class to implement my "matrix" in a simplest way?
    If not, there is a way to remove the warnings in the recursive calls?
    If not, I suppose that I must keep the warnings...
    Jorge

    Well, my use of the matrix is not mathematical but to represent the "real world".
    I'm working in the project previous to the University graduation, and I'm implementing a communication protocol among different computers.
    Those computers are linked in n dimensions (I have let configurable the dimensions because I think that flexibility is important for things like this).
    If n=1, the computers are linked like this:
    A - B - C -D - E -F - G - H - J
    If I have n = 2 the computers are linked like this:
    A - B - C
    | \ | / |
    D - E - F
    | / | \ |
    G - H - J
    (Well, in the post preview this last configuration looks very bad because some spaces are trim: The "E" computer is linked to all the rest of computers)
    If I have n = 3 the computers are linked in a cube shape, if I have n = 4 in an hipercube, and so on.
    That's why I need a multidimensional matrix to represent my network.
    I have a class that encapsulates the access to all the linked neighbours of a computer, and internally it stores these neighbours as a Vector of Vector's. of Vector's...(n times)
    For example, to create all the neighbour objects, I must write code like this:
    private Vector neighbours; // I don't know what I must write inside <> next to Vector declaration
    neighbours = new Vector(LINKS_IN_DIMENSION); // Again, the warning complains the lack of <>, but I don't know what goes inside
    initializeDimensionVector(1, neighbours);
    // In the method declaration, I need again the <> specification but is not possible
    private void initializeDimensionVector(int dimension, Vector vecDimension)
         vecDimension.setSize(LINKS_IN_DIMENSION);
         if ( NET_DIMENSIONS == dimension )
              for ( int i = 0; i < LINKS_IN_DIMENSION; ++i )
              vecDimension.setElementAt(new NeighbourDirectlyConnected(), i);
              return;
         for ( int i = 0; i < LINKS_IN_DIMENSION; ++i )
              // And finally here, for the new recursive call, the unspecified Vector declaration appears again
              vecDimension.setElementAt(new Vector(LINKS_IN_DIMENSION), i);
              initializeDimensionVector(dimension + 1, (Vector)vecDimension.elementAt(i));
    }The number of dimensions n is represented by NET_DIMENSIONS.
    The other constant (LINKS_IN_DIMENSION) tells how many different indexes we have per dimension.
    Hope this sample code explains a little bit what I'm trying to do.
    I can close my eyes and forget the warnings, but I come from the C++ world and experience tells that warnings musn't be ignored.
    Regards and thanks for your help.
    Jorge.

  • How to avoid the dialogue when converting from context menu

    This is a follow-up to http://forums.adobe.com/message/2016146#443364 which was locked due to a bug.
    i would like to know how i can avoid the 'save as' dialogue when using the context menu to convert a word file to pdf using windows XP/acrobat 8/word 2007.
    so far, it always prompts me for the filename, which is annoying as it does not allow me to batch-convert several files and let the thing run its course.
    the solution provided by Steve in the other thread does not work - even if the plugin from word does not propt for a filename, it still does when triggered from explorer/context menu.
    so back to square one: how to avoid that dialogue when not opening word at all?
    cheers, thanks for any help. michael

    For a permanent change, START>PRINTERS>right click on Adobe PDF printer and select properties>General>Printing Preferences>Adobe PDF Settings. Under the settings tab, uncheck the box related to asking for a name. Pretty sure that is the location, but it may vary with version.

  • How to avoid sample printout in check printing

    hi
    in fico check printing i have copied the standard script F110_PRENUM_CHCK
    and devloped a z  to add the company logo
    the problem with the printout is that it displays an additional sample printout on first page
    followed by the required print on the next page
    how to avoid the sample printout .
    the check printing is done through f-58
    thanks
    regards
    darshan

    Hello Darshan,
    In F-58: "Output Control" block there is a checkbox for "Test Prinout".
    Plz uncheck the box & you will not get the sample print out.
    Hope this helps.
    BR,
    Suhas

  • How to avoid Flickaring  When Adding data in Addon User Matrix

    Experts,
    I am  Adding Query Result in User Matrix  one by one. but there is lots of Flicker.
    how to Avoid this Flickering.
    Bomiitems = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
                                    If Bomtyp = "U" And BomNo = "0" Then
                                        BOMItem = "SELECT Distinct T0.[Code], T1.[ItemName] , ( 1 / Isnull(T2.[Qauntity],0))* Isnull((T0.[Quantity]),0),('" & Quanti & "'/ Isnull(T2.[Qauntity],0))* Isnull((T0.[Quantity]),0) as "
                                        BOMItem = BOMItem + " 'Quanti',T1.[Excisable],'N' as U_Rec , T1.[InvntryUom],T0.[Warehouse] 'Warehouse',T0.[IssueMthd]'IssMthd' FROM ITT1 T0  INNER JOIN OITM T1 "
                                        BOMItem = BOMItem + " ON T0.Code = T1.ItemCode  INNER JOIN OITT T2 ON T0.Father = T2.Code "
                                        BOMItem = BOMItem + " WHERE T0.[Father] ='" & Icode & "'"
                                        Bomiitems.DoQuery(BOMItem)
                                    ElseIf Bomtyp = "U" And BomNo <> "0" Then
                                        'BOMItem = "SELECT T0.[Code], T1.[ItemName] , ((T0.[Quantity]/ T2.[Qauntity])*'" & Quanti & "') as 'Quanti',T1.[Excisable],'N' as U_Rec FROM ITT1 T0  INNER JOIN OITM T1 ON T0.Code = T1.ItemCode  INNER JOIN OITT T2 ON T0.Father = T2.Code WHERE T0.[Father] ='" & Icode & "'"
                                        BOMItem = "SELECT T1.[U_Icode], T1.[U_IName],(1 / Isnull(Cast( T0.[U_Bqty]  as Float) ,0)) * Isnull(Cast(T1.[U_Quanti]  As Float),0) ,('" & Quanti & "' / Isnull(Cast( T0.[U_Bqty]  as Float) ,0)) * Isnull(Cast(T1.[U_Quanti]  As Float),0)  as 'Quanti',T2.[Excisable], T0.[U_Rec],T2.[InvntryUom] ,T1.[U_Whs] 'Warehouse','B' AS 'IssMthd' "
                                        BOMItem = BOMItem + "FROM [dbo].[@OITTA]  T0 inner join  [dbo].[@ITTA1]  "
                                        BOMItem = BOMItem + "T1 on t0.cODE = t1.Code INNER JOIN OITM T2 ON  T1.[U_Icode] = T2.[ItemCode]"
                                        BOMItem = BOMItem + " WHERE T0.[U_Icode] = '" & Icode & "' AND   T0.[U_AltBom] ='" & BomNo & "' AND T0.U_Btyp = 'U'  "
                                        Bomiitems.DoQuery(BOMItem)
                                    ElseIf Bomtyp = "P" Then
                                        BOMItem = "SELECT T1.[U_Icode], T1.[U_IName],(1 / Isnull(Cast( T0.[U_Bqty]  as Float) ,0)) * Isnull(Cast(T1.[U_Quanti]  As Float),0),('" & Quanti & "' / Isnull(Cast( T0.[U_Bqty]  as Float) ,0)) * Isnull(Cast(T1.[U_Quanti]  As Float),0)  as 'Quanti',T2.[Excisable], T0.[U_Rec] ,T2.[InvntryUom],T1.[U_Whs] 'Warehouse','B' AS 'IssMthd' "
                                        BOMItem = BOMItem + "FROM [dbo].[@OITTA]  T0 inner join  [dbo].[@ITTA1]  "
                                        BOMItem = BOMItem + "T1 on t0.cODE = t1.Code INNER JOIN OITM T2 ON  T1.[U_Icode] = T2.[ItemCode]"
                                        BOMItem = BOMItem + " WHERE T0.[U_Icode] = '" & Icode & "' AND   T0.[U_AltBom] ='" & BomNo & "' AND T0.U_Btyp = 'P' "
                                        Bomiitems.DoQuery(BOMItem)
                                    End If
                                        Bomiitems.DoQuery(BOMItem)
                                    If Bomiitems.RecordCount > 0 Then
                                        'RecCount1 = RecSet1.RecordCount
                                        Bomiitems.MoveFirst()
                                        i = 0
                                        'osubForm   .Freeze(True)
                                        oMatrix = oForm.Items.Item("1000001").Specific
                                        oMatrix.FlushToDataSource()
                                        While Not (Bomiitems.EoF)
                                            If i = 0 Then
                                                oMatrix.AddRow()
                                                oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("LineId", 0, i + 1)
                                                oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_ItemCode", 0, Bomiitems.Fields.Item(0).Value)
                                                oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_ItemName", 0, Bomiitems.Fields.Item(1).Value)
                                                oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_BaseQty", 0, Bomiitems.Fields.Item(2).Value)
                                                oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_PlanQty", 0, Bomiitems.Fields.Item(3).Value)
                                                oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_IssueQty", 0, Bomiitems.Fields.Item(3).Value)
                                                oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_Whs", 0, Bomiitems.Fields.Item("Warehouse").Value)
                                                oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_IsueType", 0, Bomiitems.Fields.Item("IssMthd").Value)
                                                Dim orsWhsDetails As SAPbobsCOM.Recordset
                                                Dim strWhsDetails As String
                                                orsWhsDetails = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
                                                strWhsDetails = "SELECT T0.[OnHand], T0.[IsCommited], T0.[OnOrder],T1.[OnHand] FROM OITW T0 INNER JOIN OITM T1 ON T0.ItemCode = T1.ItemCode WHERE T0.[ItemCode] ='" & Bomiitems.Fields.Item(0).Value & "' AND   T0.[WhsCode] ='" & Bomiitems.Fields.Item("Warehouse").Value & "' "
                                                orsWhsDetails.DoQuery(strWhsDetails)
                                                oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_Whsestk", 0, orsWhsDetails.Fields.Item(0).Value)
                                                oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_AVILSTK", 0, (orsWhsDetails.Fields.Item(0).Value - Bomiitems.Fields.Item(3).Value))
                                                oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_PLANTSTK", 0, orsWhsDetails.Fields.Item(3).Value)
                                                oMatrix.LoadFromDataSource()
                                            Else
                                                oMatrix.FlushToDataSource()
                                                oForm.DataSources.DBDataSources.Item("@TPROD1").InsertRecord(i)
                                                oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("LineId", i, i + 1)
                                                oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_ItemCode", i, Bomiitems.Fields.Item(0).Value)
                                                oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_ItemName", i, Bomiitems.Fields.Item(1).Value)
                                                oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_BaseQty", i, Bomiitems.Fields.Item(2).Value)
                                                oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_PlanQty", i, Bomiitems.Fields.Item(3).Value)
                                                oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_IssueQty", i, Bomiitems.Fields.Item(3).Value)
                                                oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_Whs", i, Bomiitems.Fields.Item("Warehouse").Value)
                                                oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_IsueType", i, Bomiitems.Fields.Item("IssMthd").Value)
                                                Dim orsWhsDetails As SAPbobsCOM.Recordset
                                                Dim strWhsDetails As String
                                                orsWhsDetails = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
                                                strWhsDetails = "SELECT T0.[OnHand], T0.[IsCommited], T0.[OnOrder],T1.[OnHand] FROM OITW T0 INNER JOIN OITM T1 ON T0.ItemCode = T1.ItemCode WHERE T0.[ItemCode] ='" & Bomiitems.Fields.Item(0).Value & "' AND   T0.[WhsCode] ='" & Bomiitems.Fields.Item("Warehouse").Value & "' "
                                                orsWhsDetails.DoQuery(strWhsDetails)
                                                oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_Whsestk", i, orsWhsDetails.Fields.Item(0).Value)
                                                oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_AVILSTK", i, (orsWhsDetails.Fields.Item(0).Value - Bomiitems.Fields.Item(3).Value))
                                                oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_PLANTSTK", i, orsWhsDetails.Fields.Item(3).Value)
                                                oMatrix.LoadFromDataSource()
                                            End If
                                            i = i + 1
                                            Bomiitems.MoveNext()
                                            oMatrix.LoadFromDataSource()
                                        End While
                                        oMatrix.LoadFromDataSource()
                                    End If
    Regards,
    Pravin Baji

    follow steps
    1)     Execute query so we can get data set
    2)     Clear matrix and data source (omatrix.clear(), oDBS.Clear())
    3)     Open loop
    4)     Insert record to oDBS using oDBS.InsertRecords(oDBS.Offset)
    5)     Then set value using oDBS.Setvalue(u2026u2026
    6)     Move next record
    7)     Finally close the loop
    8)     Matrix load from record set using oMatrix.LoadfromData()
    it will be work

  • Warning: [unchecked] unchecked cast.

    Hello!
    I have a problem with this code.
    I get:
    warning: [unchecked] unchecked cast.
    How should i do the cast?
    Or is it something else that i have done wrong?
    Socket socket = new Socket("localhost", this.port); 
    LinkedList<String> times = new LinkedList<String>();
    ObjectInputStream ois = new ObjectInputStream(socket.getInputStream());
    try
        times = (LinkedList<String>)ois.readObject();
    catch(ClassNotFoundException cnfe)
    }

    That's because it is not 100% sure (at compile time) that the object is really of a type LinkedList<String>, that's why you received a warning (note that this is just a warning: not an exception or error). You cannot do anything about is. You could suppress the warning like this:
        @SuppressWarnings("unchecked")
        void yourMethod() {
            try {
                Socket socket = new Socket("localhost", 666); 
                LinkedList<String> times = new LinkedList<String>();
                ObjectInputStream ois = new ObjectInputStream(socket.getInputStream());
                times = (LinkedList<String>)ois.readObject();
            } catch(Exception cnfe) {
                cnfe.printStackTrace();
        }Good luck.

  • How to avoid lo-gin prompt while check in the document and saving doc while opening the document?

    Hello
    I might be missing something to configure or verify but many times I have faced below situation :
    When I click on document in document library either its just opens or first save to disc and open.
    When I check in a document , its asking for credentials but sometimes doesn't
    Can anyone please describe the reason behind above behaviors ? how to avoid saving doc while opening and lo-gin prompt while check in the document?
    Thanks and Regards,
    Dipti Chhatrapati

    It the sharepoint site accessed through firewall
    http://support.microsoft.com/kb/2756625
    You can try adding below registry
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\WebClient\Parameters\AuthForwardServerListAdd the site to Trusted Sites Zone instead of Intranet Go to Control Panel >> User Accounts >> Manage Your Credentials and remove any credentials storedMake sure your office and IE Is same build (64 or 32)http://www.techrepublic.com/blog/smb-technologist/prevent-unwanted-credentials-prompts-with-sharepoint-document-libraries/ checked that 'basic authentication' is unchecked under Central Administration -> Application Management -> Authentication
    ProviderOr tryhttp://social.technet.microsoft.com/Forums/office/en-US/45feb132-c304-4521-8b79-42236a829aab/login-prompt-appearing-when-opening-office-documents?forum=sharepointadminlegacy
    If this helped you resolve your issue, please mark it Answered

  • How to avoid the objects dependency in the packages by standard settings?

    Hi,
    How to avoid the objects dependency in the packages by standard settings?
    Example Scenario -> Our project uses two packages u2018ZZP1u2019 and u2018ZZP2u2019 for developments in the system u2018SN1u2019. We created a domain u2018ZZ_DO_TESTu2019 in the Package u2018ZZP1u2019. Now we have to make sure that the developer should not use or refer domain u2018ZZ_DO_TESTu2019 for the developments in the package u2018ZZP2u2019.
    u2026Naddy

    Evevn i felt that in the CTS at least a warning can be given if the included objects refer to any other object(s) which arre:
      1. Local Objects
      2. Locked under other requests,
      3. Lastly able to detect cyclic dependency as in we had a situation where we had a program locked in request A which calls an FM locked in request B. Now Request B refers to a message which is locked in request A.Since it was a message it gave only requrn code 4 in transport and transport ended with warnings. But if it is some other object then it is going to give compile error in at least one transport and neither can be moved without the other.
    Anyways, i will check the BAPI he has mentioned and see if any workaround can be done,
    Request: Please keep the post active until we arrive at a good solution,Thanks.

  • How to avoid warning messages in jump targets

    How to avoid the warning messages while using the jump targets from BW to R/3 ?
    example of warning message is as follows .
    Warning Selection for ABSTA cannot be uniquely assigned.
    RSBBS setting is done for the multiprovider & uses the info source 2LIS_11_VAITM .

    try doing the following:
    1.you can suppress "Settings > Suppress warnings from server" messages on ur BEx toolbar .
    2.Go to transaction RSRT, type in the query, click on the messages button, and suppress all messages
    3.In RSBBS, go to the sender query in change mode. There should be a tab in the middle column where you have to give your infosource name..
    For. eg If you want to jump from Cost centre report (BW) to Masterdata transaction in R/3, you ust assign this particular infosource in RSBBS settings.
    4.Apply note: 971614 or 975164 or OSS : 1013370 if applicable.
    Reagrds
    Dhanya.
    Assign points if this helps!!

  • How to avoid security note popup?

    Hi,
    I have two BSP Applications, which I start from SRM Enterprise Buyer via new window. I have created an internet service user, which I put in the ICF service of the application.
    Here goes the question.
    In one of my BSPs the new window appears like expected. In the otherone I get a popup message (I must translate this from German to English, but I hope you get the contents):
    The popup says:
    <i>Title: Security note
    You are about to turn to an insecure connection. data which has been sent to the prior site, will possibly be sent to the insecure site. Do you wish to continue?</i>
    Why is that? Both ICF entries use the same user and look the same - under security there is a radio at standard in both cases.
    The URL of the BSP without Popup looks like this:
    http://<host>:8028/sap/bc/bsp/sap/z_imp_all1/start.htm
    the one with popup like this:
    http://<host>:8028/sap(bD1kZSZjPTMwMQ==)/bc/bsp/sap/z_scan_pzn1/start.htm?sicht=pzn&username=MEYERM&HOOK_URL=https%3A%2F%2Fukmsapweb%2E<host>%2Ede%3A9211%2Fscripts%2Fwgate%2Fbbppu99354e5a01%2F%3F%7EOkCode%3DADDI%26%7Etarget%3D%5Ftop%26%7ECALLER%3DCTLG&OCI_VERSION=3%2E0&http_content_charset=iso%2D8859%2D1&returntarget=%5Ftop
    Any ideas, how to avoid the popup, welcome.
    regards, Matthias
    Message was edited by: Matthias Kasig

    Hi Renald and Rainer,
    to Renald: Yes, I have also checked Internet options -- advanced, and unchecked the warning, when switching from save to unsave mode. I also unchecked the warning, if formular data is being redirected. Still this takes no effect. And anyway, I can't see the point, because from the same https page I've got two links which link to http-BSPs. One brings about the unwanted popup - the otherone, with apparently same settings does the security popup. The link itself is launched via JavaScript, like this:
    <a href="JavaScript:launchCTLG('PZN_Scan');" class="catalog" alt="PZN" title="PZN">PZN</a>
    to Rainer: I checked the note you gave. It contained a chm file. It also refers to the situation, that you get the popup message, when leaving https and turning to http. It also provides a solution like this:
    <iframe id="myIframe" src="JavaScript:void(0);"></iframe>
    In fact I can't change/modify the call of the URL - and it is already being called via JavaScript. The EBP page is SRM generated.
    I shall try to copy the BSP application, that works fine without popup, and then put in the code of the popup-version... and see what happens next.
    Thanks so far. I shall give feedback, when I have finished.
    Matthias

  • How to avoid the duplicate values, I do not want the duplicate............

    i have one database table called "sms1" that table is updated every day or on daily basis it has the following fields in it:
    SQL> desc sms1;
    Name Null? Type
    MOBILE NUMBER
    RCSTCNATCNATCNATCNAWTHER VARCHAR2(39 CHAR)
    SNO NUMBER
    INDATE DATE
    From this table the is one column "RCSTCNATCNATCNATCNAWTHER VARCHAR2(39 CHAR)" . I am splitting it into different columns like :
    SQL> desc smssplit;
    Name Null? Type
    R VARCHAR2(2 CHAR)
    C VARCHAR2(2 CHAR)
    S VARCHAR2(1 CHAR)
    TC VARCHAR2(3 CHAR)
    NA VARCHAR2(3 CHAR)
    TC2 VARCHAR2(3 CHAR)
    NA2 VARCHAR2(3 CHAR)
    TC3 VARCHAR2(3 CHAR)
    NA3 VARCHAR2(3 CHAR)
    TC4 VARCHAR2(3 CHAR)
    NA4 VARCHAR2(3 CHAR)
    WTHER VARCHAR2(10 CHAR)
    SNO NUMBER
    INSERTDATA VARCHAR2(25 CHAR)
    Now I am written a procedure to insert the data from "Sms1" table to smssplit table...
    CREATE OR REPLACE PROCEDURE SPLITSMS
    AS
    BEGIN
    INSERT INTO scott.SMSSPLIT ( R,C,S,TC,NA,TC2,NA2,TC3,NA3,TC4,NA4,WTHER,SNO)
    SELECT SUBSTR(RCSTCNATCNATCNATCNAWTHER,1,2) R,
    SUBSTR(RCSTCNATCNATCNATCNAWTHER,3,2) C,
    SUBSTR(RCSTCNATCNATCNATCNAWTHER,5,1) S,
    SUBSTR(RCSTCNATCNATCNATCNAWTHER,6,3) TC,
    SUBSTR(RCSTCNATCNATCNATCNAWTHER,9,3) NA,
    SUBSTR(RCSTCNATCNATCNATCNAWTHER,12,3) TC2,
    SUBSTR(RCSTCNATCNATCNATCNAWTHER,15,3) NA2,
    SUBSTR(RCSTCNATCNATCNATCNAWTHER,18,3) TC3,
    SUBSTR(RCSTCNATCNATCNATCNAWTHER,21,3) NA3,
    SUBSTR(RCSTCNATCNATCNATCNAWTHER,24,3) TC4,
    SUBSTR(RCSTCNATCNATCNATCNAWTHER,27,3) NA4,
    SUBSTR(RCSTCNATCNATCNATCNAWTHER,30,10) WTHER, SNO
    FROM scott.SMS1 where SNO=(select MAX (sno) from SMS1);
    END;
    Now in order to update the second table with data from first table on regular basis I have written a job scheduler and I am using oracle 9.0. version...
    DECLARE
    X NUMBER;
    JobNumber NUMBER;
    BEGIN
    SYS.DBMS_JOB.SUBMIT
    job => X
    ,what => 'scott.SPLITSMS;'
    ,next_date => SYSDATE+1/1440
    ,interval => 'SYSDATE+1/1440 '
    ,no_parse => FALSE
    :JobNumber := to_char(X);
    END;
    Now this job scheduler is working properly and updating the data for every one minute but it is taking or updating the duplicate values also ..like example:
    R C S TC NA TC2 NA2 TC3 NA3 TC4 NA4 WTHER SNO
    INSERTDATA
    33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
    06-SEP-2012 03:49:16
    33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
    06-SEP-2012 03:49:16
    33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
    06-SEP-2012 03:50:17
    R C S TC NA TC2 NA2 TC3 NA3 TC4 NA4 WTHER SNO
    INSERTDATA
    33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
    06-SEP-2012 03:50:17
    33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
    06-SEP-2012 03:51:19
    33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
    06-SEP-2012 03:51:19
    R C S TC NA TC2 NA2 TC3 NA3 TC4 NA4 WTHER SNO
    INSERTDATA
    33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
    06-SEP-2012 03:52:20
    33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
    06-SEP-2012 03:52:20
    33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
    06-SEP-2012 03:53:22
    R C S TC NA TC2 NA2 TC3 NA3 TC4 NA4 WTHER SNO
    INSERTDATA
    33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
    06-SEP-2012 03:53:22
    33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
    06-SEP-2012 03:54:45
    33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
    06-SEP-2012 03:54:45
    Now I do not want the duplicate values to be updated ...and want them to ignore them.....
    please I need a help on this query........How to avoid the duplicate values............

    Look at the posts closely:might not be needed if formatted ;)
    create or replace procedure splitsms as
    begin
      insert into scott.smssplit (r,c,s,tc,na,tc2,na2,tc3,na3,tc4,na4,wther,sno)
      select substr(rcstcnatcnatcnatcnawther,1,2) r,
             substr(rcstcnatcnatcnatcnawther,3,2) c,
             substr(rcstcnatcnatcnatcnawther,5,1) s,
             substr(rcstcnatcnatcnatcnawther,6,3) tc,
             substr(rcstcnatcnatcnatcnawther,9,3) na,
             substr(rcstcnatcnatcnatcnawther,12,3) tc2,
             substr(rcstcnatcnatcnatcnawther,15,3) na2,
             substr(rcstcnatcnatcnatcnawther,18,3) tc3,
             substr(rcstcnatcnatcnatcnawther,21,3) na3,
             substr(rcstcnatcnatcnatcnawther,24,3) tc4,
             substr(rcstcnatcnatcnatcnawther,27,3) na4,
             substr(rcstcnatcnatcnatcnawther,30,10) wther,
             sno
        from scott.sms1 a
       where sno = (select max(sno)
                      from sms1
                     where sno != a.sno
                   ); ---------------> added where clause with table alias.
    end;Regards
    Etbin

  • How to avoid Line Items(fields) in BAPI mapping.

    Hi
    Does any body help me for mapping between header and line items in BAPI..
    my scenario is filerfcmail(wokflow)!
    File is CSV based :
    (ex: 001150,,1123,JERM,08122006,,,
         ,,,ANN,,01082006,
    If you look at example csv file , there is some fields mixed with header and line items. But in RFC header can be 1 to 1 and line item should be 0 to Unbound.
    Now my problem is if I sent above example csv file as source :
    The payload coming like this(sxmb_moni) :
    </HEADERDATA>
    - <GLACCOUNTDATA>
    - <item>
      <COSTCENTER />
      <PROFIT_CTR />
      </item>
    - <item>
      <GL_ACCOUNT>738100</GL_ACCOUNT>
      <ITEM_AMOUNT>60000</ITEM_AMOUNT>
      <COMP_CODE>001150</COMP_CODE>
      <ITEM_TEXT>*777-8030-861</ITEM_TEXT>
      <COSTCENTER>7320</COSTCENTER>
      <PROFIT_CTR>7320</PROFIT_CTR>
      <ALLOC_NMBR />
      </item>
    - <item>
      <GL_ACCOUNT>738100</GL_ACCOUNT>
      <ITEM_AMOUNT>40000</ITEM_AMOUNT>
      <COMP_CODE>001151</COMP_CODE>
      <ITEM_TEXT>*777-8030-861</ITEM_TEXT>
      <COSTCENTER>6010</COSTCENTER>
      <PROFIT_CTR>6010</PROFIT_CTR>
      <ALLOC_NMBR />
      </item>
      <item />
      </GLACCOUNTDATA>
    You can find there is one more item coming after headerdata with null values. It means map reading first line and one by one , if any field found in rows which belogs to GLAccount(Line item), then it writing one more item after headerdata with that fields only.
    Remainig GLAccount data coming as per map after the item .
    Can you tell me how to avoid extra line items.
    Thanks,
    Sankar

    Yes, It exist..
    I cross checked ..with out givig fileds and giving some fields...its writing another items in after headerdata tag.
    hope you understand , what my problem..
    See: GLACCOUNTDATA under subnode
          item is 0 to unbound in BAPI side, because of this its reading all rows , and if find any field which belongs to GLAccount , then it writing another item tag after headerr data.
    Thnaks,
    Sankar

Maybe you are looking for

  • How can I stop iTunes from launching and playing by itself?

    iTunes launches and plays by itself, which is very annoying, given that there is no discernable reason for it to do so. Nothing in preferences should allow this. No device is connected. The library is not being shared. Has anyone found a solution to

  • PC users can't save PDF form data from form created on Mac

    I'm trying to create a PDF form for a client that will be accessing the form on a PC. However, when the client opens the form, a message appears saying that any data filled in the form cannot be saved and the document must be printed. If the client t

  • In need of help syncing my VC3... and yes I know there are many post, BUT

    So, Here is the difference between what many of you might take as first instinct to reply by saying, "there are many questions regarding this topic already..." My phone has been syncing fine with iSync. It is not until today that it has decided to st

  • Process Workspace-11.1.1.6.0 template customization

    On our project, we want to access BPM workflows using WebCenter Process Spaces, since we want to use the collaboration capabilities of WebCenter. This is approximately (unfortunately, I cannot attach a screenshot to a thread) how a space created usin

  • Why is my genius button missing on my iPhone?

    Hi, The genius button has gone missing on my iPhone 4S. Any ideas how to get it back? Note that I have tapped the screen, and the other additional controls are visible.