Method "weekday" or "dayname"!!

Hello at all,
i have an problem with Object programming.
I want to use the Method weekday() or the Method dayname(), but if i use this Methods than become I an error message.
What´s the matter with this Method?
Or must I declare the Object for this Methods`?
And how can I declare this Object for this Methods`?
Can any one help me and gives me an example?
Many thanks in advance.
Kind regards
Ersin Tosun

Hi Eto,
Try the below code.
data: i_day type i.
start-of-selection.
i_day = weekofyear( '12/12/2008').
write: i_day.
Refer the below link also.
[http://help.sap.com/saphelp_nw04/helpdata/en/d1/cc7498bb4111d2a97100a0c9449261/content.htm|http://help.sap.com/saphelp_nw04/helpdata/en/d1/cc7498bb4111d2a97100a0c9449261/content.htm]

Similar Messages

  • Weekday & Weekday Name Calculated Field giving error

    Hi all,
    I'm trying to learn how SSRS works, but I've reached an issue or error I just cannot find the solution for.
    What I'm trying to do is create a calculated field that shows me the number of the day of the week and the name of the weekday. The problem: instead of calculating for example 14/06/2002 as the 5th day of the week Friday, it calculated it as the 6th day, Saturday.
    Below is the example of my problem:
    Can somebody please explain to me, how can I overcome this issue?

    Hi Ellie55,
    According to your description that the you want to get the number of the weekday and also the name of it, but when you are using the expression in the calculated fields, the result always show the value one more days ahead of the exact day, right?
    I have tested in my local environment and can reproduce your problem, the problem related to the method WEEKDAY(date) you use in the expression which Week begins on Sunday (1) and ends on Saturday (7),This article will give details information:
    WEEKDAY Function
    WeekdayName Function
    So you will get the day one more ahead. You can take below expression for reference to do a little modification to your expression:
    Get the weekday number, we can make the “WEEKDAY(Date)-1 “ and make the Sunday to be the number of 7,then the number will be Monday(1)and ends on Sunday(7) :
    =IIF(WEEKDAY(Fields!YourDate.Value)="1",7,WEEKDAY(Fields!YourDate.Value)-1)
    Get the weekday name(This method base on the exact date, it is not based on the number of the week, so will not have the problem you have faced ):
    =WeekdayName(weekday(Fields!YourDate.Value),true)
    If you still have any question, please feel free to ask.
    Regards
    Vicky Liu

  • How do I create a list of only weekdays in Numbers?

    I would like to create a list of weekdays in one column. Using the highlight & drag method doesn't work, as Numbers repeats the highlighted list, instead of extending it. Here is what I am looking for:
    1/3/2011
    1/4/2011
    1/5/2011
    1/6/2011
    1/7/2011
    1/10/2011
    1/11/2011
    1/12/2011
    1/13/2011
    1/14/2011
    1/17/2011
    12/31/2011
    Any ideas on how to accomplish this easily?
    Thanks!

    All i did was type in the first weeks worth (say Jan 2 through 6). You can type the first and fill down for the other 4. Then in the next cell down (B6) just enter =B1+7
    This will add seven days to the first "monday" located in B1. Fill it down and it will continually add seven days to the date 5 rows above it.
    NOTE: this does not account for holidays. If you need holidays excluded, we need another method
    Jason

  • Update query (or other method) to a typed dataset

    Hi
    i have created a typed DataSet in code that is created at runtime. It gets populated then it needs to be updated based on 2 paramaters
    EmployeeID & AssignmentID
    How can i run an update query on the runtime created Dataset? Hee is how i create my Dataset-
    Private sGridDataSet As New DataSet("GridDataset")
    Private tblGridTable As DataTable
    sGridDataSet.CaseSensitive = False
    tblGridTable = sGridDataSet.Tables.Add("tblGrid")
    With tblGridTable
    .Columns.Add("AssignmentID", GetType(System.String))
    .Columns.Add("ProjectName", GetType(System.String))
    .Columns.Add("Day1", GetType(System.String))
    .Columns.Add("Day2", GetType(System.String))
    .Columns.Add("Day3", GetType(System.String))
    .Columns.Add("Day4", GetType(System.String))
    .Columns.Add("Day5", GetType(System.String))
    .Columns.Add("Day6", GetType(System.String))
    .Columns.Add("Day7", GetType(System.String))
    End With
    'get data from qryAssignments
    sAssignID = Me.AssignmentData.qryAssignments.Rows(j)(1)
    sProjName = Me.AssignmentData.qryAssignments.Rows(j)(0)
    newValues = {sAssignID, sProjName, Day1, Day2, Day3, Day4, Day5, Day6, Day7}
    tblGridTable.Rows.Add(newValues)
    Me.QryAssignmentsTableAdapter.ClearBeforeFill = True
    Dim sDate As Date = Me.txtDate.Text
    Dim EndDate As Date = sDate.AddDays(6)
    Me.QryAssignmentTimesTableAdapter.Fill(Me.AssignmentData.qryAssignmentTimes, Me.txtEmployeeID.Text, Me.txtDate.Text, CStr(CType(CStr(EndDate), DateTime)))
    Dim p As Integer = 0
    For p = 0 To Me.AssignmentData.qryAssignmentTimes.Rows.Count - 1
    vDayNo = Weekday(Me.AssignmentData.qryAssignmentTimes.Rows(p)(0), FirstDayOfWeek.Monday)
    Dim m As String = Me.AssignmentData.qryAssignmentTimes.Rows(p)(0)
    'NEED TO UPDATE DATASET TABLE HERE BASED ON EMPLOYEEID AND ASSIGNMENTID
    Next
    Me.GridControl1.DataSource = tblGridTable
    Hopefully, someone can give me a few pointers :)
    Thanks
    Nigel
    Nacho is the derivative of Nigel "True fact!"

    Hello,
    If I have more than one table to work with, a DataSet would be the container while if one table then no DataSet, just a DataTable. I would use code similar to the following which is for MS-Access yet by changing to SqlClient data provider instead of OelDb
    data provider the same methods work.
    Taken from
    this project.
    Module DatabaseOperations
    Private Builder As New OleDb.OleDbConnectionStringBuilder With
    .Provider = "Microsoft.ACE.OLEDB.12.0",
    .DataSource = IO.Path.Combine(Application.StartupPath, "Database1.accdb")
    ''' <summary>
    ''' Read USA customers from database into a DataTable
    ''' </summary>
    ''' <returns></returns>
    ''' <remarks>
    ''' Database is assumed to be in the Bin\Debug folder.
    ''' </remarks>
    Public Function LoadCustomers() As DataTable
    Using cn As New OleDb.OleDbConnection With {.ConnectionString = Builder.ConnectionString}
    Using cmd As New OleDb.OleDbCommand With {.Connection = cn}
    cmd.CommandText =
    <SQL>
    SELECT
    Identifier,
    CompanyName,
    ContactName,
    ContactTitle,
    Address,
    City,
    PostalCode,
    Country
    FROM Customer;
    </SQL>.Value
    Dim dt As New DataTable With {.TableName = "Customer"}
    Try
    cn.Open()
    dt.Load(cmd.ExecuteReader)
    dt.Columns("Identifier").ColumnMapping = MappingType.Hidden
    dt.Columns("Country").ColumnMapping = MappingType.Hidden
    Catch ex As Exception
    MessageBox.Show("Failed to load customer data. See error message below" & Environment.NewLine & ex.Message)
    End Try
    dt.AcceptChanges()
    Return dt
    End Using
    End Using
    End Function
    Public Function RemoveCurrentCustomer(ByVal Identfier As Integer) As Boolean
    Try
    Using cn As New OleDb.OleDbConnection With {.ConnectionString = Builder.ConnectionString}
    Using cmd As New OleDb.OleDbCommand With {.Connection = cn}
    cmd.CommandText = "DELETE FROM Customer WHERE Identifier = ?"
    Dim IdentifierParameter As New OleDb.OleDbParameter With
    .DbType = DbType.Int32,
    .ParameterName = "P1",
    .Value = Identfier
    cmd.Parameters.Add(IdentifierParameter)
    Try
    cn.Open()
    Dim Affected = cmd.ExecuteNonQuery
    Return Affected = 1
    Catch ex As Exception
    Return False
    End Try
    End Using
    End Using
    Catch ex As Exception
    ' Handle or not handle exceptions for failed save operation
    Return False
    End Try
    End Function
    Public Function AddNewRow(ByVal Name As String, ByVal Contact As String, ByRef Identfier As Integer) As Boolean
    Dim Success As Boolean = True
    Try
    Using cn As New OleDb.OleDbConnection With {.ConnectionString = Builder.ConnectionString}
    Using cmd As New OleDb.OleDbCommand With {.Connection = cn}
    cmd.CommandText =
    <SQL>
    INSERT INTO Customer
    CompanyName,
    ContactName
    Values
    @CompanyName,
    @ContactName
    </SQL>.Value
    cmd.Parameters.AddWithValue("@CompanyName", Name)
    cmd.Parameters.AddWithValue("@ContactName", Contact)
    cn.Open()
    cmd.ExecuteNonQuery()
    cmd.CommandText = "Select @@Identity"
    Identfier = CInt(cmd.ExecuteScalar)
    End Using
    End Using
    Catch ex As Exception
    Success = False
    End Try
    Return Success
    End Function
    Public Function SaveChanges(ByVal sender As DataRow) As Boolean
    Try
    Using cn As New OleDb.OleDbConnection With {.ConnectionString = Builder.ConnectionString}
    Using cmd As New OleDb.OleDbCommand With {.Connection = cn}
    cmd.CommandText =
    <SQL>
    UPDATE
    Customer
    SET
    CompanyName=?,
    ContactName=?
    WHERE Identifier = ?
    </SQL>.Value
    Dim CompanyNameParameter As New OleDb.OleDbParameter With
    .DbType = DbType.String,
    .ParameterName = "P1",
    .Value = sender.Field(Of String)("CompanyName")
    cmd.Parameters.Add(CompanyNameParameter)
    Dim ContactNameParameter As New OleDb.OleDbParameter With
    .DbType = DbType.String,
    .ParameterName = "P2",
    .Value = sender.Field(Of String)("ContactName")
    cmd.Parameters.Add(ContactNameParameter)
    Dim IdentifierParameter As New OleDb.OleDbParameter With
    .DbType = DbType.Int32,
    .ParameterName = "P3",
    .Value = sender.Field(Of Int32)("Identifier")
    cmd.Parameters.Add(IdentifierParameter)
    Try
    cn.Open()
    Dim Affected = cmd.ExecuteNonQuery
    Return Affected = 1
    Catch ex As Exception
    Return False
    End Try
    End Using
    End Using
    Catch ex As Exception
    ' Handle or not handle exceptions for failed save operation
    Return False
    End Try
    End Function
    End Module
    Here is an example of retrieving a row of data via a where condition
    Public Sub LoadSingle(ByVal Identifier As Integer)
    Using cn As New OleDb.OleDbConnection With
    .ConnectionString = Builder.ConnectionString
    Using cmd As New OleDb.OleDbCommand With {.Connection = cn}
    cmd.CommandText =
    <SQL>
    SELECT
    Identifier,
    CompanyName,
    ContactName
    FROM
    Customers
    WHERE Identifier=@Identifier
    </SQL>.Value
    cmd.Parameters.Add(New OleDb.OleDbParameter With
    .DbType = DbType.Int32,
    .ParameterName = "@Identifier",
    .Value = Identifier
    cn.Open()
    Dim Reader As OleDb.OleDbDataReader = cmd.ExecuteReader
    If Reader.HasRows Then
    Reader.Read()
    Console.WriteLine("Name: {0} Contact name: {1}",
    Reader.GetString(1), Reader.GetString(2))
    End If
    End Using
    End Using
    End Sub
    Here you can see (using a random example) that SQL-Server code uses the same logic and methods
    Using cn As New SqlConnection With {.ConnectionString = MyConnectionString}
    Dim CompanySearch As String = "An"
    Using cmd As New SqlCommand With {.Connection = cn}
    cmd.CommandText =
    <SQL>
    SELECT CompanyName
    FROM
    Customers
    WHERE
    CompanyName LIKE @CompanyName
    </SQL>.Value
    cmd.Parameters.Add(
    New SqlParameter With
    .DbType = DbType.String,
    .Value = CompanySearch & "%",
    .ParameterName = "@CompanyName"
    cn.Open()
    Dim Reader = cmd.ExecuteReader
    If Reader.HasRows Then
    While Reader.Read
    Console.WriteLine(Reader.GetString(0))
    End While
    Else
    Console.WriteLine("No matches")
    End If
    End Using
    End Using
    So all the above is "hand coding" and there is still the option to use Adapters but for simple stuff they are over kill. The only benefit for them with simple stuff is if you are a visual person, thats it.
    See also:
    This article on creating SQL statement as per how I did it in the examples above. In the next release of Visual Studio this method will be easier similar to C#
    Currently in C# we can do this
    string selectStatement = @"
    SELECT CompanyName
    FROM
    Customers
    WHERE
    CompanyName LIKE @CompanyName";
    On creating a DataTable, check out this simple utility
    https://code.msdn.microsoft.com/DataTable-creator-95b655b3
    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem.

  • Wednesday Worthless Weekday Workout™: Homework Helper

    In the spirit of TurnPest's Friday Code Challenge&#153;, I'd like to offer my own mid-week challenge, the Wednesday Worthless Weekday Workout&#153;, worth a whole 10 Duke's point for the best code. This weeks prize will go to the best code that can be given to a lazy newbie who doesn't want help with an assignment but justs wants the answer, thank you very much. For an example of what I mean, please Navy_Coder's homework program which I adapted for a homework-challenged poster in this thread:
    http://forum.java.sun.com/thread.jspa?threadID=5226503&tstart=0
    The rules include:
    1) It can't physically damages another's machine or data -- no erasing the hard-drive please!
    Other than that, all is fair game. Good luck!
    Pete

    I added in commenting to cater to the people that often post on this forum.
    After all, we all have to do what we can to help out the "general public" of people who seem
    to post here!
    public class Solution {
         public static boolean moreCases;
          * This is a universal problem solver that I have made to help out student with
          * extremely urgent programs to be handed in, and need help.  Don't worry about
          * adding in your own inputs, as this program makes extensive use of Java libraries
          * to do that work for you.
          * @param args          The default arguments passed to the program.  None are necessary in any case!
         public static void main(String[] args) {
              moreCases = true;
              System.out.println("test");
              System.out.println(Hello_World(1) + " " + Hello_World(42));
              System.out.println(Hello_World(42));
              for(int i = 0; moreCases; i++)
                   System.out.print(More_Outputs(i+1) + " ");               //gotta make sure that you have the right index for the switch's case statement
              if(moreCases == false)                                              //it's important to check for this
                   Core_Statements(3);                                             //this won't work if 3 isn't the input to this method.
          * Prints out hello world!  really!
          * @param sel     the best selection in the world
          * @return     returns hello, world based on selection
         public static String Hello_World (int sel) {
              if(sel == 1)
                   return "Hello";
              else
                   return "world";
          * more vital outputs to any program that you would need to make.
          * These are so vital, you should use these in every program you write!
          * @param sel     another selector, necessary for important data selection.
          * @return     Returns a string, which is necessary for vital data outputs.
         public static String More_Outputs (int sel) {
              //in the case of this solution, a switch is vital to your program's functionality
              //(only for your case though, I wrote this specifically for you, don't forget to delete this comment!)
              switch (sel) {
              case 1:     return "\u0049";
              case 2:     return "\u0061\u006D";
              case 3: return "\u0073\u0075\u0063\u0068";
              case 4: return "\u0061";
              case 5: return "\u0062\u0061\u0064";
              case 6: return "\u0063\u0068\u0065\u0061\u0074\u0065\u0072";
              case 7: return "\u0074\u0068\u0061\u0074";
              case 8: return "\u0049";
              case 9: return "\u0063\u0061\u006E\u0060\u0074";
              case 10: return "\u0062\u0065";
              case 11: return "\u0062\u006F\u0074\u0068\u0065\u0072\u0065\u0064";
              case 12: return "\u0074\u006F";
              case 13: return "\u0072\u0065\u0061\u0064";
              case 14: return "\u006F\u0075\u0074\u0070\u0075\u0074\u0073";
              default: moreCases = false; return "\u0021\n";
          * This is the core statement of the program, and will be exactly what your
          * professor is looking for.  Make sure they see this part, and the elegant
          * solution this code provides!
          * @param sel     another selector, necessary for important data selection.
          * @return
         public static void Core_Statements(int sel) {
              String[][] listing =
              {{"A","B","C","D","E"},
              {"F","G","H","I","J"},
              {"K","L","M","N","O"},
              {"P","R","S","T","U"},               //"Q" and "Z" omitted because it isn't commonly used, this is standard practice.
              {"V","W","X","Y"," "}};               //make sure to show your professor for bonus pts!
              //this is the complicated part of this core code, I'd just accept it as it is
              //(don't forget to delete these comments, so it looks like you wrote it!
              System.out.println(listing[3][0]+listing[2][1]+listing[0][4]+listing[0][0]+
                        listing[3][2]+listing[0][4]+listing[4][4]+listing[0][4]+listing[4][2]+
                        listing[3][0]+listing[0][4]+listing[2][1]+listing[4][4]+listing[2][2]+
                        listing[0][4]);
    }

  • Error while calling a method on Bean (EJB 3.0)

    I am getting an error while calling a method on EJB. I am using EJB3.0 and my bean is getting properly deployed(i am sure b'cos i can see the successfullly deployed message). Can any body help me
    Error is -->
    Error while destroying resource :An I/O error has occured while flushing the output - Exception: java.io.IOException: An established connection was aborted by the software in your host machine
    Stack Trace:
    java.io.IOException: An established connection was aborted by the software in your host machine
    at sun.nio.ch.SocketDispatcher.write0(Native Method)
    at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:33)
    at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:104)
    at sun.nio.ch.IOUtil.write(IOUtil.java:75)
    at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:302)
    at com.sun.enterprise.server.ss.provider.ASOutputStream.write(ASOutputStream.java:138)
    at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
    at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
    at org.postgresql.PG_Stream.flush(PG_Stream.java:352)
    at org.postgresql.core.QueryExecutor.sendQuery(QueryExecutor.java:159)
    at org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:70)
    at org.postgresql.jdbc1.AbstractJdbc1Connection.ExecSQL(AbstractJdbc1Connection.java:482)
    at org.postgresql.jdbc1.AbstractJdbc1Connection.ExecSQL(AbstractJdbc1Connection.java:461)
    at org.postgresql.jdbc1.AbstractJdbc1Connection.rollback(AbstractJdbc1Connection.java:1031)
    at org.postgresql.jdbc2.optional.PooledConnectionImpl$ConnectionHandler.invoke(PooledConnectionImpl.java:223)
    at $Proxy34.close(Unknown Source)
    at com.sun.gjc.spi.ManagedConnection.destroy(ManagedConnection.java:274)
    at com.sun.enterprise.resource.LocalTxConnectorAllocator.destroyResource(LocalTxConnectorAllocator.java:103)
    at com.sun.enterprise.resource.AbstractResourcePool.destroyResource(AbstractResourcePool.java:603)
    at com.sun.enterprise.resource.AbstractResourcePool.resourceErrorOccurred(AbstractResourcePool.java:713)
    at com.sun.enterprise.resource.PoolManagerImpl.putbackResourceToPool(PoolManagerImpl.java:424)
    at com.sun.enterprise.resource.PoolManagerImpl.resourceClosed(PoolManagerImpl.java:393)
    at com.sun.enterprise.resource.LocalTxConnectionEventListener.connectionClosed(LocalTxConnectionEventListener.java:69)
    at com.sun.gjc.spi.ManagedConnection.connectionClosed(ManagedConnection.java:618)
    at com.sun.gjc.spi.ConnectionHolder.close(ConnectionHolder.java:163)
    at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.closeDatasourceConnection(DatabaseAccessor.java:379)
    at oracle.toplink.essentials.internal.databaseaccess.DatasourceAccessor.closeConnection(DatasourceAccessor.java:367)
    at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.closeConnection(DatabaseAccessor.java:402)
    at oracle.toplink.essentials.internal.databaseaccess.DatasourceAccessor.afterJTSTransaction(DatasourceAccessor.java:100)
    at oracle.toplink.essentials.threetier.ClientSession.afterTransaction(ClientSession.java:104)
    at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.afterTransaction(UnitOfWorkImpl.java:1816)
    at oracle.toplink.essentials.transaction.AbstractSynchronizationListener.afterCompletion(AbstractSynchronizationListener.java:161)
    at oracle.toplink.essentials.transaction.JTASynchronizationListener.afterCompletion(JTASynchronizationListener.java:87)
    at com.sun.ejb.containers.ContainerSynchronization.afterCompletion(ContainerSynchronization.java:174)
    at com.sun.enterprise.distributedtx.J2EETransaction.commit(J2EETransaction.java:467)
    at com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.commit(J2EETransactionManagerOpt.java:357)
    at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:3653)
    at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:3431)
    at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1247)
    at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:197)
    at com.sun.ejb.containers.EJBObjectInvocationHandlerDelegate.invoke(EJBObjectInvocationHandlerDelegate.java:110)
    at $Proxy84.addDepartment(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:121)
    at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:650)
    at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:193)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1705)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1565)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:947)
    at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:178)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:717)
    at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:473)
    at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.doWork(SocketOrChannelConnectionImpl.java:1270)
    at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:479)
    End of Stack Trace
    |#]
    RAR5035:Unexpected exception while destroying resource. To get exception stack, please change log level to FINE.
    EJB5018: An exception was thrown during an ejb invocation on [DepartmentSessionBean]
    javax.ejb.EJBException: Unable to complete container-managed transaction.; nested exception is: javax.transaction.SystemException
    javax.transaction.SystemException
    at com.sun.enterprise.distributedtx.J2EETransaction.commit(J2EETransaction.java:452)
    at com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.commit(J2EETransactionManagerOpt.java:357)
    at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:3653)
    at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:3431)
    at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1247)
    at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:197)
    at com.sun.ejb.containers.EJBObjectInvocationHandlerDelegate.invoke(EJBObjectInvocationHandlerDelegate.java:110)
    at $Proxy84.addDepartment(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    Means theres an error in XML/ABAP conversion probably due a syntax error...
    Regards
    Juan

  • Issue with SharePoint foundation 2010 to use Claims Based Auth with Certificate authentication method with ADFS 2.0

    I would love some help with this issue.  I have configured my SharePoint foundation 2010 site to use Claims Based Auth with Certificate authentication method with ADFS 2.0  I have a test account set up with lab.acme.com to use the ACS.
    When I log into my site using Windows Auth, everything is great.  However when I log in and select my ACS token issuer, I get sent, to the logon page of the ADFS, after selected the ADFS method. My browser prompt me which Certificate identity I want
    to use to log in   and after 3-5 second
     and return me the logon page with error message “Authentication failed” 
    I base my setup on the technet article
    http://blogs.technet.com/b/speschka/archive/2010/07/30/configuring-sharepoint-2010-and-adfs-v2-end-to-end.aspx
    I validated than all my certificate are valid and able to retrieve the crl
    I got in eventlog id 300
    The Federation Service failed to issue a token as a result of an error during processing of the WS-Trust request.
    Request type: http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Issue
    Additional Data
    Exception details:
    Microsoft.IdentityModel.SecurityTokenService.FailedAuthenticationException: MSIS3019: Authentication failed. ---> System.IdentityModel.Tokens.SecurityTokenValidationException:
    ID4070: The X.509 certificate 'CN=Me, OU=People, O=Acme., C=COM' chain building failed. The certificate that was used has a trust chain that cannot be verified. Replace the certificate or change the certificateValidationMode. 'A certification chain processed
    correctly, but one of the CA certificates is not trusted by the policy provider.
    at Microsoft.IdentityModel.X509CertificateChain.Build(X509Certificate2 certificate)
    at Microsoft.IdentityModel.Tokens.X509NTAuthChainTrustValidator.Validate(X509Certificate2 certificate)
    at Microsoft.IdentityModel.Tokens.X509SecurityTokenHandler.ValidateToken(SecurityToken token)
    at Microsoft.IdentityModel.Tokens.SecurityTokenElement.GetSubject()
    at Microsoft.IdentityServer.Service.SecurityTokenService.MSISSecurityTokenService.GetOnBehalfOfPrincipal(RequestSecurityToken request, IClaimsPrincipal callerPrincipal)
    --- End of inner exception stack trace ---
    at Microsoft.IdentityServer.Service.SecurityTokenService.MSISSecurityTokenService.GetOnBehalfOfPrincipal(RequestSecurityToken request, IClaimsPrincipal callerPrincipal)
    at Microsoft.IdentityServer.Service.SecurityTokenService.MSISSecurityTokenService.BeginGetScope(IClaimsPrincipal principal, RequestSecurityToken request, AsyncCallback callback, Object state)
    at Microsoft.IdentityModel.SecurityTokenService.SecurityTokenService.BeginIssue(IClaimsPrincipal principal, RequestSecurityToken request, AsyncCallback callback, Object state)
    at Microsoft.IdentityModel.Protocols.WSTrust.WSTrustServiceContract.DispatchRequestAsyncResult..ctor(DispatchContext dispatchContext, AsyncCallback asyncCallback, Object asyncState)
    at Microsoft.IdentityModel.Protocols.WSTrust.WSTrustServiceContract.BeginDispatchRequest(DispatchContext dispatchContext, AsyncCallback asyncCallback, Object asyncState)
    at Microsoft.IdentityModel.Protocols.WSTrust.WSTrustServiceContract.ProcessCoreAsyncResult..ctor(WSTrustServiceContract contract, DispatchContext dispatchContext, MessageVersion messageVersion, WSTrustResponseSerializer responseSerializer, WSTrustSerializationContext
    serializationContext, AsyncCallback asyncCallback, Object asyncState)
    at Microsoft.IdentityModel.Protocols.WSTrust.WSTrustServiceContract.BeginProcessCore(Message requestMessage, WSTrustRequestSerializer requestSerializer, WSTrustResponseSerializer responseSerializer, String requestAction, String responseAction, String
    trustNamespace, AsyncCallback callback, Object state)
    System.IdentityModel.Tokens.SecurityTokenValidationException: ID4070: The X.509 certificate 'CN=Me, OU=People, O=acme., C=com' chain building
    failed. The certificate that was used has a trust chain that cannot be verified. Replace the certificate or change the certificateValidationMode. 'A certification chain processed correctly, but one of the CA certificates is not trusted by the policy provider.
    at Microsoft.IdentityModel.X509CertificateChain.Build(X509Certificate2 certificate)
    at Microsoft.IdentityModel.Tokens.X509NTAuthChainTrustValidator.Validate(X509Certificate2 certificate)
    at Microsoft.IdentityModel.Tokens.X509SecurityTokenHandler.ValidateToken(SecurityToken token)
    at Microsoft.IdentityModel.Tokens.SecurityTokenElement.GetSubject()
    at Microsoft.IdentityServer.Service.SecurityTokenService.MSISSecurityTokenService.GetOnBehalfOfPrincipal(RequestSecurityToken request, IClaimsPrincipal callerPrincipal)
    thx
    Stef71

    This is perfectly correct on my case I was not adding the root properly you must add the CA and the ADFS as well, which is twice you can see below my results.
    on my case was :
    PS C:\Users\administrator.domain> $root = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2("C:\
    cer\SP2K10\ad0001.cer")
    PS C:\Users\administrator.domain> New-SPTrustedRootAuthority -Name "domain.ad0001" -Certificate $root
    Certificate                 : [Subject]
                                    CN=domain.AD0001CA, DC=domain, DC=com
                                  [Issuer]
                                    CN=domain.AD0001CA, DC=portal, DC=com
                                  [Serial Number]
                                    blablabla
                                  [Not Before]
                                    22/07/2014 11:32:05
                                  [Not After]
                                    22/07/2024 11:42:00
                                  [Thumbprint]
                                    blablabla
    Name                        : domain.ad0001
    TypeName                    : Microsoft.SharePoint.Administration.SPTrustedRootAuthority
    DisplayName                 : domain.ad0001
    Id                          : blablabla
    Status                      : Online
    Parent                      : SPTrustedRootAuthorityManager
    Version                     : 17164
    Properties                  : {}
    Farm                        : SPFarm Name=SharePoint_Config
    UpgradedPersistedProperties : {}
    PS C:\Users\administrator.domain> $cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2("C:\
    cer\SP2K10\ADFS_Signing.cer")
    PS C:\Users\administrator.domain> New-SPTrustedRootAuthority -Name "Token Signing Cert" -Certificate $cert
    Certificate                 : [Subject]
                                    CN=ADFS Signing - adfs.domain
                                  [Issuer]
                                    CN=ADFS Signing - adfs.domain
                                  [Serial Number]
                                    blablabla
                                  [Not Before]
                                    23/07/2014 07:14:03
                                  [Not After]
                                    23/07/2015 07:14:03
                                  [Thumbprint]
                                    blablabla
    Name                        : Token Signing Cert
    TypeName                    : Microsoft.SharePoint.Administration.SPTrustedRootAuthority
    DisplayName                 : Token Signing Cert
    Id                          : blablabla
    Status                      : Online
    Parent                      : SPTrustedRootAuthorityManager
    Version                     : 17184
    Properties                  : {}
    Farm                        : SPFarm Name=SharePoint_Config
    UpgradedPersistedProperties : {}
    PS C:\Users\administrator.PORTAL>

  • Using G_SET_GET_ALL_VALUES Method

    Hi,
    I need to use the following method. G_SET_GET_ALL_VALUES. But I'm not sure of the data type that it returns.
    CALL FUNCTION 'G_SET_GET_ALL_VALUES'
      EXPORTING
      CLIENT                      = ' '
      FORMULA_RETRIEVAL           = ' '
      LEVEL                       = 0
        setnr                       = wa_itab_progrp-setname
      VARIABLES_REPLACEMENT       = ' '
      TABLE                       = ' '
      CLASS                       = ' '
      NO_DESCRIPTIONS             = 'X'
      NO_RW_INFO                  = 'X'
      DATE_FROM                   =
      DATE_TO                     =
      FIELDNAME                   = ' '
      tables
        set_values                  = ????????
    EXCEPTIONS
      SET_NOT_FOUND               = 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.
    Can anyone please let me know what I should do at the SET_VALUES section.
    Thanks
    Lilan

    Hi,
    See the FM Documentation,
    This function module determines all the values of a set or its subordinate sets. The required call parameter is the set ID (SETNR). The other parameters are optional:
    FORMULA_RETRIEVAL: 'X' => The formulas in the set are also returned (default ' ' requires fewer database accesses)
    LEVEL: The default value is 0 and means "expand all levels". Values other than 0 determine the level to which they are to be expanded
    VARIABLES_REPLACEMENT: 'X' => The value variables in the set hierarchy are replaced by their default values (this means additional database accesses for each variable)
    NO_DESCRIPTIONS: 'X' => The short descriptions of the sets and set lines are not read from the database. For performance reasons you should only set this parameter to ' ' if you need the texts
    The values determined are returned to the internal table SET_VALUES.
    Thanks.

  • Clearing values from request in decode method

    I am using a custom table paginator. In its ‘decode’ method I have the next code to control whether ‘next’ link is clicked:
    String pLink = (String)requestMap.get("pLink" + clientId);
    if ((pLink != null) && (!pLink.equals(""))) {
         if (pLink.equals("next")) {     
         } else if (pLink.equals("previous")) {
    }But the next sequence produces some problems:
    1.     Initial page load.
    2.     Click on ‘next’ link.
    3.     Table navigates ok to next page.
    4.     Reload page (push F5).
    5.     The previous click still remains in the request, so decode method think ‘next’ link is pressed again.
    6.     Application abnormal behaviour arises.
    So, I am trying to clear the ‘next_link’ key from the request, but next code throws an UnsupportedOperationException:
    String pLink = (String)requestMap.get("pLink" + clientId);
    if ((pLink != null) && (!pLink.equals(""))) {
         if (pLink.equals("next")) {     
         } else if (pLink.equals("previous")) {
         requestMap.put("pLink" + clientId, "");
    }Do any of you have some ideas?

    Hey, where are you RaymondDeCampo, rLubke, BalusC ... the masters of JSF Universe?
    ;-)

  • Method all values from row

    Hi,
    Is there a method that get the all the values of a row? I've gone through the java api but didn't found one, but wanted to be sure.
    If not I'll have to do getValueAt for every column?
    Grtz

    Here is one possible implementation using RowTableModel (a self made class).
    To access a row, we can use this: Product product = (Product) model.getRow(rowIndex);
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.table.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.util.*;
    import java.util.List;
    public class Tabel extends JPanel {
        private JTable table;
        private JTextField filterText;
        private TableRowSorter<MyTableModel> sorter;
        private String output;
        private final MyTableModel model;
        public Tabel() {
            //Create a table with a sorter.
            model = new MyTableModel();
            sorter = new TableRowSorter<MyTableModel>(model);
            table = new JTable(model);
            table.setRowSorter(sorter);
            table.setPreferredScrollableViewportSize(new Dimension(500, 200));
            table.setFillsViewportHeight(true);
            //Single selection
            table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
            //Making sure columns can't be dragged and dropped
            table.getTableHeader().setReorderingAllowed(false);
            //Double click event
            table.addMouseListener(new MouseAdapter() {
                @Override
                public void mouseClicked(MouseEvent mouseEvent) {
                    if (mouseEvent.getClickCount() == 2) {
                        System.out.print(output);
            //Create the scroll pane and add the table to it.
            JScrollPane scrollPane = new JScrollPane(table);
            //Add the scroll pane to this panel.
            add(scrollPane);
            JPanel form = new JPanel();
            JLabel l1 = new JLabel("Filter Text:");
            form.add(l1);
            filterText = new JTextField(15);
            //Whenever filterText changes, invoke newFilter.
            filterText.getDocument().addDocumentListener(
                    new DocumentListener() {
                        public void changedUpdate(DocumentEvent e) {
                            newFilter();
                        public void insertUpdate(DocumentEvent e) {
                            newFilter();
                        public void removeUpdate(DocumentEvent e) {
                            newFilter();
            l1.setLabelFor(filterText);
            form.add(filterText);
            add(form);
         * Update the row filter regular expression from the expression in
         * the text box.
        private void newFilter() {
            RowFilter<MyTableModel, Object> rf = null;
            //If current expression doesn't parse, don't update.
            try {
                rf = RowFilter.regexFilter("(?i)" + filterText.getText(), 0); //"(?i)" => Zoeken gebeurd case-insensitive
            } catch (java.util.regex.PatternSyntaxException e) {
                return;
            sorter.setRowFilter(rf);
        class MyTableModel extends RowTableModel {
            private final List<Product> mData;
            private final List<String> cNames;
            public MyTableModel() {
                super(Product.class);
                mData = new ArrayList<Product>();
                mData.add(new Product("Frontline Small", 5, 1));
                mData.add(new Product("Frontline Medium", 10, 2));
                mData.add(new Product("Frontline Large", 15, 1));
                mData.add(new Product("Frontline Extra Large", 20, 2));
                mData.add(new Product("Frontline spuitbus", 7.5, 3));
                cNames = new ArrayList<String>();
                cNames.add("Product");
                cNames.add("Prijs");
                cNames.add("Aantal stuks beschikbaar");
                setDataAndColumnNames(mData, cNames);
                setColumnClass(0, String.class);
                setColumnClass(1, Double.class);
                setColumnClass(2, Integer.class);
            public Object getValueAt(final int rowIndex, final int columnIndex) {
                switch (columnIndex) {
                    case 0:
                        return mData.get(rowIndex).getDescriction();
                    case 1:
                        return mData.get(rowIndex).getPrice();
                    case 2:
                        return mData.get(rowIndex).getNumber();
                return null;
            @Override
            public Class getColumnClass(int column) {
                return super.getColumnClass(column);
        private static void createAndShowGUI() {
            //Create and set up the window.
            JFrame frame = new JFrame();
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            //Create and set up the content pane.
            Tabel newContentPane = new Tabel();
            newContentPane.setOpaque(true); //content panes must be opaque
            frame.setContentPane(newContentPane);
            //Display the window.
            frame.pack();
            frame.setVisible(true);
        public static void main(final String[] args) {
            //Schedule a job for the event-dispatching thread:
            //creating and showing this application's GUI.
            SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    createAndShowGUI();
    class Product {
        private String descriction;
        private double price;
        private int number;
        Product(final String descriction, final double price, final int number) {
            this.descriction = descriction;
            this.price = price;
            this.number = number;
        public String getDescriction() {
            return descriction;
        public void setDescriction(final String descriction) {
            this.descriction = descriction;
        public int getNumber() {
            return number;
        public void setNumber(final int number) {
            this.number = number;
        public double getPrice() {
            return price;
        public void setPrice(final int price) {
            this.price = price;
        @Override
        public String toString() {
            return descriction + ", " + price + ", " + number;
    }

  • How can I move an ArrayList from one method to another?

    As the subject reveals, I want to know how I move an ArrayList. In one method, I fill my ArrayList with objects, and in the next I want to pick an arbitrary object out of the ArrayList.
    How do I make this work??

    You pass the same array list to both the method. Both method are getting the same thing.
    void main(){
    //create array list here
    ArrayList aList = new ArrayList();
    //pass it to a method to fill items
    fillArrayList(aList);
    //pass the same arraylist to another method
    printArrayList(aList);
    void fillArrayList(ArrayList list){
      list.add("A");
    void printArrayList(ArrayList list){
    //The array list will contain A added by the previos method
    System.out.println(list);
    FeedFeeds : http://www.feedfeeds.com                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • HT1918 Can I have multiple payment methods on one account

    Currently, both of my teenage sons and I are sharing an Apple account with one payment method. I would like to have a payment method for each of us.

    If they are teenagers, it is not too soon to set up individual accounts per person. 
    This will address the separate payments issue, and will make it much easier in a few years when they start heading off to university or moving to their own living arrangements.

  • A method to convert an existing iCloud account to a Child iCloud Account for Family Sharing

    I do not see any method by which to convert an existing iCloud account (we have three set up for our kids, all their birthdays are set later than their actual birthdays so we could grab their actual names before they were all gone years ago) to a new Child iCloud Account for use with Family Sharing (namely to be able to take advantage of the new features: Family Calendar, Photostream, 'Ask to Buy' on the Stores, etc. on their own iPad minis.
    If this is just not possible under the current scheme, please oh please Apple make this an option - there are probably thousands of others in this same boat, and I refuse to give up my kids' iCloud accounts!

    I've read every string and workaround solution on these forums (to date). There's really no good options here.
    USER STORY: My kid (age 7) has an iPad 2.  I created an email address for him (which he doesn't know about). I created an apple ID for him (which he also doesn't know or care about) and I set up his Apple ID with my credit card.  In addition I've set up parental controls on the iPad to lock it down and make it more age appropriate.   Over the past year or so it's worked out fine, he sees something he might like, brings the iPad to me and if I approve, I enter the Apple ID Password  and approve the purchase.   After a year of doing this, he has a nice little collection of apps, kid songs, a few movies, etc.   I would like to move my kid over to a legitimate kid account now that Apple has released features that support this.  Currently the ability to convert an account does not exist. Seems like it should be easy to change a birthday, etc.
    Almost seems like Apple is penalizing us for getting our kid an iPad last year. 
    Apple  - Please consider my user story for your upcoming feature enhancements.

  • How can i execute ejb method in a servlet?

    hi
    I am using a IBM HTTP Server and Weblogic Server.
    I could execute below source in a main method of application but i could not that in a init method of servlet because of ClassCastException.
    (a classpath of weblogic contains client's classpath)
    // source code
    Hashtable props = new Hashtable();
    props.pu(Context.INITIAL_CONTEXT_FACTORY,
    "weblogic.jndi.WLInitialContextFactory");
    props.put(Context.PROVIDER_URL,
    "t3://192.168.1.5:7001");
    Context ctx = new InitialContext(props);
    Object obj = ctx.lookup("session.LigerSessionHome");
    LigerSessionHome home = (LigerSessionHome) PortableRemoteObject.narrow (obj, LigerSessionHome.class);
    // error code
    Exception : session.LigerSessionBeanHomeImpl_ServiceStub
    java.lang.ClassCastException: session.LigerSessionBeanHomeImpl_ServiceStub
    at com.ibm.rmi.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:253)
    at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:136)
    at credit.getCreditResearch(credit.java:41)
    at creditResearchClient.doGet(creditResearchClient.java:122)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
    thanks

    Have your stubs somehow got out of sync? So that your Servlet engine is pointing to a different jar than that of your jvm on which you were running your client application
    hi
    I am using a IBM HTTP Server and Weblogic Server.
    I could execute below source in a main method of
    application but i could not that in a init method of
    servlet because of ClassCastException.
    (a classpath of weblogic contains client's classpath)
    // source code
    Hashtable props = new Hashtable();
    props.pu(Context.INITIAL_CONTEXT_FACTORY,
    "weblogic.jndi.WLInitialContextFactory");
    props.put(Context.PROVIDER_URL,
    "t3://192.168.1.5:7001");
    Context ctx = new InitialContext(props);
    Object obj = ctx.lookup("session.LigerSessionHome");
    LigerSessionHome home = (LigerSessionHome)
    PortableRemoteObject.narrow (obj,
    LigerSessionHome.class);
    // error code
    Exception :
    session.LigerSessionBeanHomeImpl_ServiceStub
    java.lang.ClassCastException:
    session.LigerSessionBeanHomeImpl_ServiceStub
    at
    com.ibm.rmi.javax.rmi.PortableRemoteObject.narrow(Porta
    leRemoteObject.java:253)
    at
    javax.rmi.PortableRemoteObject.narrow(PortableRemoteObj
    ct.java:136)
    at credit.getCreditResearch(credit.java:41)
    at
    creditResearchClient.doGet(creditResearchClient.java:12
    at
    javax.servlet.http.HttpServlet.service(HttpServlet.java
    740)
    at
    javax.servlet.http.HttpServlet.service(HttpServlet.java
    865)
    thanks

  • Can I use classes and methods for a maintenance view events?

    Hello experts,
    Instead of perform/form, can I instead use classes and methods, etc for a given maintenance view event, lets say for example I want to use event '01' which is before saving records in the database. Help would be greatly appreciated. Thanks a lot guys!

    Hi viraylab,
    1. The architecture provided by maintenance view
       for using EVENTS and our own code inside it -
       It is provided using FORM/PERFORM
       concept only.
    2. At this stage,we cannot use classes.
    3. However, inside the FORM routine,
       we can write what ever we want.
       We can aswell use any abap code, including
       classes and methods.
      (But this classes and methods won't have any
       effect on the EVENT provided by maintenance view)
    regards,
    amit m.

Maybe you are looking for

  • Creating a Pivot Table in a XML publishe

    When creating a Pivot Table in a XML publisher in Word, is there a way for a Pivot table to respect the fact that it's inside of a group function? I'm looping over site , and within each site I want to create a Pivot Table that has Months going acros

  • 2011 Q3 Ruleset update by SAP

    The 2011 ruleset update has now been incorporated into 5.3 Support Pack 17 and 10.0 Support Pack 5 which are both in released status.  Please see sap note "1604722 Risk Analysis and Remediation Rule Update Q3 2011" for a full summary of the changes m

  • Display latest Record First

    Hi, Could someone tell me where in forms builder you can configure the form so the latest record is displayed first in the application. As an example i query someones name in the application and i'd like to view the latest record saved to that person

  • Drop down choice to let us know what the email is about?

    If you go to  http://ellenmemorialhcc.businesscatalyst.com/contact-us.html  you will see a email us portion. What we are looking for is basically a heading that titles "I am interested in recieving information on:" and then we would like tohave a dro

  • Adobe Audition 1.0

    I have Adobe Audition 1.0 and recently upgraded to Windows 7 from Windows XP.  Adobe Audition 1.0 will not run on Windows 7. Is there an upgrade option available to me from Audition 1.0? Thanks, KRM