SSIS and timestamp comparison for selection

Hi all.
I have a situation I do not understand how to fix.
I have two tables - one to store settings and another one the store some data.
My SQL Server is of 2008 R2 version.
My Visual Studio is of 2008 version (I tried to work in VS 2013 with SSDT of the latest version installed - all the same).
The data table has a column of timestamp data type. 
I'm using the timestamp column as determinator and I put max value of the timestamp column in the settings table after my process completes.
Then I need to get that stored value and select from the data table only records which timestamp value is bigger than one stored in the settings table.
What do I do to reproduce the situation.
I created SSIS package.
I added new variable of string data type, called it "LastTS".
Then added new "Execute SQL Task", entered "SELECT CONVERT(VARCHAR(18), LastTimestamp) FROM Parameters", mapped result set to User::LastTS variable.
Then I added new "Data Flow Task".
In that task I added "OLE DB Source" and entered "SELECT c.ProtocolType, c.[Timestamp] AS StatusChangeTime FROM Command AS c WHERE c.[RowVersion] > cast(? as binary(8))" and mapped its resultset for next processing.
Everything is ok.
Now I start my package.
My LastTS variable gets its right value.
But my "OLE DB Source" fails with message as follows:
[OLE DB Source [1]] Error: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80040E21.
An OLE DB record is available.  Source: "Microsoft SQL Server Native Client 10.0"  Hresult: 0x80040E21  Description: "Invalid character value for cast specification".
What is the problem?
I found a lot of answers like "you can use string variable to work with timestamp data" but nothing helped.
What should I do to resolve my problem?

IT worked fine for me.  Here's a complete package:
<?xml version="1.0"?>
<DTS:Executable xmlns:DTS="www.microsoft.com/SqlServer/Dts"
DTS:refId="Package"
DTS:CreationDate="6/26/2014 8:50:47 AM"
DTS:CreationName="SSIS.Package.3"
DTS:CreatorComputerName="DBROWNE0"
DTS:CreatorName="NORTHAMERICA\dbrowne"
DTS:DTSID="{15A9F4FA-ACAD-499C-B899-D11762E85A0C}"
DTS:ExecutableType="SSIS.Package.3"
DTS:LastModifiedProductVersion="11.0.3369.0"
DTS:LocaleID="1033"
DTS:ObjectName="Package"
DTS:PackageType="5"
DTS:VersionBuild="2"
DTS:VersionGUID="{0E4D9F45-5FAD-4706-89C0-0FF7260402E5}">
<DTS:Property
DTS:Name="PackageFormatVersion">6</DTS:Property>
<DTS:ConnectionManagers>
<DTS:ConnectionManager
DTS:refId="Package.ConnectionManagers[LocalHost.tempdb]"
DTS:CreationName="OLEDB"
DTS:DTSID="{8B7A6B78-D657-43A7-9265-2DD88902E4EF}"
DTS:ObjectName="LocalHost.tempdb">
<DTS:ObjectData>
<DTS:ConnectionManager
DTS:ConnectionString="Data Source=.;Initial Catalog=tempdb;Provider=SQLNCLI11.1;Integrated Security=SSPI;Auto Translate=False;" />
</DTS:ObjectData>
</DTS:ConnectionManager>
</DTS:ConnectionManagers>
<DTS:Variables>
<DTS:Variable
DTS:CreationName=""
DTS:DTSID="{6DDBC988-CB18-4A8B-94EA-7A30FC3D7FFB}"
DTS:IncludeInDebugDump="6789"
DTS:Namespace="User"
DTS:ObjectName="data">
<DTS:VariableValue
DTS:DataSubType="ManagedSerializable"
DTS:DataType="13">
<SOAP-ENV:Envelope xmlns:clr="http://schemas.microsoft.com/soap/encoding/clr/1.0" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<xsd:anyType
id="ref-1"></xsd:anyType>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
</DTS:VariableValue>
</DTS:Variable>
<DTS:Variable
DTS:CreationName=""
DTS:DTSID="{89546C68-259E-4263-8CAB-56A56DDBB3CB}"
DTS:IncludeInDebugDump="2345"
DTS:Namespace="User"
DTS:ObjectName="LastTS">
<DTS:VariableValue
DTS:DataType="8">0x0000000000004FAA</DTS:VariableValue>
</DTS:Variable>
</DTS:Variables>
<DTS:Executables>
<DTS:Executable
DTS:refId="Package\Data Flow Task"
DTS:CreationName="{5918251B-2970-45A4-AB5F-01C3C588FE5A}"
DTS:Description="Data Flow Task"
DTS:DTSID="{6FCEFECD-F9CD-4383-A05B-D3AA5F6A1EBF}"
DTS:ExecutableType="{5918251B-2970-45A4-AB5F-01C3C588FE5A}"
DTS:LocaleID="-1"
DTS:ObjectName="Data Flow Task">
<DTS:Variables />
<DTS:ObjectData>
<pipeline
version="1">
<components>
<component
refId="Package\Data Flow Task\OLE DB Source"
componentClassID="{165A526D-D5DE-47FF-96A6-F8274C19826B}"
contactInfo="OLE DB Source;Microsoft Corporation; Microsoft SQL Server; (C) Microsoft Corporation; All Rights Reserved; http://www.microsoft.com/sql/support;7"
description="OLE DB Source"
name="OLE DB Source"
usesDispositions="true"
version="7">
<properties>
<property
dataType="System.Int32"
description="The number of seconds before a command times out. A value of 0 indicates an infinite time-out."
name="CommandTimeout">0</property>
<property
dataType="System.String"
description="Specifies the name of the database object used to open a rowset."
name="OpenRowset"></property>
<property
dataType="System.String"
description="Specifies the variable that contains the name of the database object used to open a rowset."
name="OpenRowsetVariable"></property>
<property
dataType="System.String"
description="The SQL command to be executed."
name="SqlCommand"
UITypeEditor="Microsoft.DataTransformationServices.Controls.ModalMultilineStringEditor, Microsoft.DataTransformationServices.Controls, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91">SELECT c.ProtocolType, c.[Timestamp] AS StatusChangeTime
FROM dbo.Command c
WHERE c.[RowVersion] &gt; convert( binary(8), cast(? as varchar(18)), 1 )</property>
<property
dataType="System.String"
description="The variable that contains the SQL command to be executed."
name="SqlCommandVariable"></property>
<property
dataType="System.Int32"
description="Specifies the column code page to use when code page information is unavailable from the data source."
name="DefaultCodePage">1252</property>
<property
dataType="System.Boolean"
description="Forces the use of the DefaultCodePage property value when describing character data."
name="AlwaysUseDefaultCodePage">false</property>
<property
dataType="System.Int32"
description="Specifies the mode used to access the database."
name="AccessMode"
typeConverter="AccessMode">2</property>
<property
dataType="System.String"
description="The mappings between the parameters in the SQL command and variables."
name="ParameterMapping">"Parameter0:Input",{89546C68-259E-4263-8CAB-56A56DDBB3CB};</property>
</properties>
<connections>
<connection
refId="Package\Data Flow Task\OLE DB Source.Connections[OleDbConnection]"
connectionManagerID="Package.ConnectionManagers[LocalHost.tempdb]"
connectionManagerRefId="Package.ConnectionManagers[LocalHost.tempdb]"
description="The OLE DB runtime connection used to access the database."
name="OleDbConnection" />
</connections>
<outputs>
<output
refId="Package\Data Flow Task\OLE DB Source.Outputs[OLE DB Source Output]"
name="OLE DB Source Output">
<outputColumns>
<outputColumn
refId="Package\Data Flow Task\OLE DB Source.Outputs[OLE DB Source Output].Columns[ProtocolType]"
codePage="1252"
dataType="str"
errorOrTruncationOperation="Conversion"
errorRowDisposition="FailComponent"
externalMetadataColumnId="Package\Data Flow Task\OLE DB Source.Outputs[OLE DB Source Output].ExternalColumns[ProtocolType]"
length="20"
lineageId="Package\Data Flow Task\OLE DB Source.Outputs[OLE DB Source Output].Columns[ProtocolType]"
name="ProtocolType"
truncationRowDisposition="FailComponent" />
<outputColumn
refId="Package\Data Flow Task\OLE DB Source.Outputs[OLE DB Source Output].Columns[StatusChangeTime]"
dataType="dbTimeStamp2"
errorOrTruncationOperation="Conversion"
errorRowDisposition="FailComponent"
externalMetadataColumnId="Package\Data Flow Task\OLE DB Source.Outputs[OLE DB Source Output].ExternalColumns[StatusChangeTime]"
lineageId="Package\Data Flow Task\OLE DB Source.Outputs[OLE DB Source Output].Columns[StatusChangeTime]"
name="StatusChangeTime"
scale="7"
truncationRowDisposition="FailComponent" />
</outputColumns>
<externalMetadataColumns
isUsed="True">
<externalMetadataColumn
refId="Package\Data Flow Task\OLE DB Source.Outputs[OLE DB Source Output].ExternalColumns[ProtocolType]"
codePage="1252"
dataType="str"
length="20"
name="ProtocolType" />
<externalMetadataColumn
refId="Package\Data Flow Task\OLE DB Source.Outputs[OLE DB Source Output].ExternalColumns[StatusChangeTime]"
dataType="dbTimeStamp2"
name="StatusChangeTime"
scale="7" />
</externalMetadataColumns>
</output>
<output
refId="Package\Data Flow Task\OLE DB Source.Outputs[OLE DB Source Error Output]"
isErrorOut="true"
name="OLE DB Source Error Output">
<outputColumns>
<outputColumn
refId="Package\Data Flow Task\OLE DB Source.Outputs[OLE DB Source Error Output].Columns[ProtocolType]"
codePage="1252"
dataType="str"
length="20"
lineageId="Package\Data Flow Task\OLE DB Source.Outputs[OLE DB Source Error Output].Columns[ProtocolType]"
name="ProtocolType" />
<outputColumn
refId="Package\Data Flow Task\OLE DB Source.Outputs[OLE DB Source Error Output].Columns[StatusChangeTime]"
dataType="dbTimeStamp2"
lineageId="Package\Data Flow Task\OLE DB Source.Outputs[OLE DB Source Error Output].Columns[StatusChangeTime]"
name="StatusChangeTime"
scale="7" />
<outputColumn
refId="Package\Data Flow Task\OLE DB Source.Outputs[OLE DB Source Error Output].Columns[ErrorCode]"
dataType="i4"
lineageId="Package\Data Flow Task\OLE DB Source.Outputs[OLE DB Source Error Output].Columns[ErrorCode]"
name="ErrorCode"
specialFlags="1" />
<outputColumn
refId="Package\Data Flow Task\OLE DB Source.Outputs[OLE DB Source Error Output].Columns[ErrorColumn]"
dataType="i4"
lineageId="Package\Data Flow Task\OLE DB Source.Outputs[OLE DB Source Error Output].Columns[ErrorColumn]"
name="ErrorColumn"
specialFlags="2" />
</outputColumns>
<externalMetadataColumns />
</output>
</outputs>
</component>
<component
refId="Package\Data Flow Task\Recordset Destination"
componentClassID="{C457FD7E-CE98-4C4B-AEFE-F3AE0044F181}"
contactInfo="Recordset Destination;Microsoft Corporation; Microsoft SQL Server; (C) Microsoft Corporation; All Rights Reserved; http://www.microsoft.com/sql/support;0"
description="Creates and populates an in-memory ADO recordset that is available outside of the data flow. Scripts and other package elements can use the recordset. For example, use a recordset to store the names of files that will be loaded into the data warehouse."
name="Recordset Destination">
<properties>
<property
dataType="System.String"
description="Specifies the variable that contains the recordset."
name="VariableName">User::data</property>
</properties>
<inputs>
<input
refId="Package\Data Flow Task\Recordset Destination.Inputs[Recordset Destination Input]"
hasSideEffects="true"
name="Recordset Destination Input">
<inputColumns>
<inputColumn
refId="Package\Data Flow Task\Recordset Destination.Inputs[Recordset Destination Input].Columns[ProtocolType]"
cachedCodepage="1252"
cachedDataType="str"
cachedLength="20"
cachedName="ProtocolType"
lineageId="Package\Data Flow Task\OLE DB Source.Outputs[OLE DB Source Output].Columns[ProtocolType]" />
</inputColumns>
<externalMetadataColumns />
</input>
</inputs>
</component>
</components>
<paths>
<path
refId="Package\Data Flow Task.Paths[OLE DB Source Output]"
endId="Package\Data Flow Task\Recordset Destination.Inputs[Recordset Destination Input]"
name="OLE DB Source Output"
startId="Package\Data Flow Task\OLE DB Source.Outputs[OLE DB Source Output]" />
</paths>
</pipeline>
</DTS:ObjectData>
</DTS:Executable>
<DTS:Executable
DTS:refId="Package\Execute SQL Task"
DTS:CreationName="Microsoft.SqlServer.Dts.Tasks.ExecuteSQLTask.ExecuteSQLTask, Microsoft.SqlServer.SQLTask, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"
DTS:Description="Execute SQL Task"
DTS:DTSID="{3F075D2C-CCCE-429E-A412-DF0777563EF7}"
DTS:ExecutableType="Microsoft.SqlServer.Dts.Tasks.ExecuteSQLTask.ExecuteSQLTask, Microsoft.SqlServer.SQLTask, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"
DTS:LocaleID="-1"
DTS:ObjectName="Execute SQL Task"
DTS:TaskContact="Execute SQL Task; Microsoft Corporation; SQL Server 2012; © 2007 Microsoft Corporation; All Rights Reserved;http://www.microsoft.com/sql/support/default.asp;1"
DTS:ThreadHint="0">
<DTS:Variables />
<DTS:ObjectData>
<SQLTask:SqlTaskData
SQLTask:Connection="{8B7A6B78-D657-43A7-9265-2DD88902E4EF}"
SQLTask:SqlStatementSource="if object_id('Command') is not null&#xA;begin&#xA; exec ('drop table Command')&#xA;end;&#xA;&#xA;create table Command(id int primary key , ProtocolType varchar(20), TimeStamp datetime2, RowVersion timestamp)&#xA;&#xA;insert into Command(id,ProtocolType,TimeStamp)&#xA;values (1,'a',GetDate());" xmlns:SQLTask="www.microsoft.com/sqlserver/dts/tasks/sqltask" />
</DTS:ObjectData>
</DTS:Executable>
</DTS:Executables>
<DTS:PrecedenceConstraints>
<DTS:PrecedenceConstraint
DTS:refId="Package.PrecedenceConstraints[Constraint]"
DTS:CreationName=""
DTS:DTSID="{F6FC0677-010B-411A-9E75-40A48490570D}"
DTS:From="Package\Execute SQL Task"
DTS:LogicalAnd="True"
DTS:ObjectName="Constraint"
DTS:To="Package\Data Flow Task" />
</DTS:PrecedenceConstraints>
<DTS:DesignTimeProperties><![CDATA[<?xml version="1.0"?>
<!--This CDATA section contains the layout information of the package. The section includes information such as (x,y) coordinates, width, and height.-->
<!--If you manually edit this section and make a mistake, you can delete it. -->
<!--The package will still be able to load normally but the previous layout information will be lost and the designer will automatically re-arrange the elements on the design surface.-->
<Objects
Version="sql11">
<!--Each node below will contain properties that do not affect runtime behavior.-->
<Package
design-time-name="Package">
<LayoutInfo>
<GraphLayout
Capacity="4" xmlns="clr-namespace:Microsoft.SqlServer.IntegrationServices.Designer.Model.Serialization;assembly=Microsoft.SqlServer.IntegrationServices.Graph" xmlns:mssgle="clr-namespace:Microsoft.SqlServer.Graph.LayoutEngine;assembly=Microsoft.SqlServer.Graph" xmlns:assembly="http://schemas.microsoft.com/winfx/2006/xaml">
<NodeLayout
Size="150.4,41.6"
Id="Package\Data Flow Task"
TopLeft="67.514286169374,110.529398667551" />
<NodeLayout
Size="163.2,41.6"
Id="Package\Execute SQL Task"
TopLeft="96.5714302160302,21.4117650061743" />
<EdgeLayout
Id="Package.PrecedenceConstraints[Constraint]"
TopLeft="178.17143021603,63.0117650061743">
<EdgeLayout.Curve>
<mssgle:Curve
StartConnector="{assembly:Null}"
EndConnector="-35.4571440466562,47.5176336613764"
Start="0,0"
End="-35.4571440466562,40.0176336613764">
<mssgle:Curve.Segments>
<mssgle:SegmentCollection
Capacity="5">
<mssgle:LineSegment
End="0,19.7588168306882" />
<mssgle:CubicBezierSegment
Point1="0,19.7588168306882"
Point2="0,23.7588168306882"
Point3="-4,23.7588168306882" />
<mssgle:LineSegment
End="-31.4571440466562,23.7588168306882" />
<mssgle:CubicBezierSegment
Point1="-31.4571440466562,23.7588168306882"
Point2="-35.4571440466562,23.7588168306882"
Point3="-35.4571440466562,27.7588168306882" />
<mssgle:LineSegment
End="-35.4571440466562,40.0176336613764" />
</mssgle:SegmentCollection>
</mssgle:Curve.Segments>
</mssgle:Curve>
</EdgeLayout.Curve>
<EdgeLayout.Labels>
<EdgeLabelCollection />
</EdgeLayout.Labels>
</EdgeLayout>
</GraphLayout>
</LayoutInfo>
</Package>
<TaskHost
design-time-name="Package\Data Flow Task">
<LayoutInfo>
<GraphLayout
Capacity="4" xmlns="clr-namespace:Microsoft.SqlServer.IntegrationServices.Designer.Model.Serialization;assembly=Microsoft.SqlServer.IntegrationServices.Graph" xmlns:mssgle="clr-namespace:Microsoft.SqlServer.Graph.LayoutEngine;assembly=Microsoft.SqlServer.Graph" xmlns:assembly="http://schemas.microsoft.com/winfx/2006/xaml">
<NodeLayout
Size="150.4,41.6"
Id="Package\Data Flow Task\OLE DB Source"
TopLeft="6.26582146462022,8.71822610737986" />
<NodeLayout
Size="182.4,41.6"
Id="Package\Data Flow Task\Recordset Destination"
TopLeft="60.8,144.8" />
<EdgeLayout
Id="Package\Data Flow Task.Paths[OLE DB Source Output]"
TopLeft="81.4658214646202,50.3182261073799">
<EdgeLayout.Curve>
<mssgle:Curve
StartConnector="{assembly:Null}"
EndConnector="70.5341785353798,94.4817738926202"
Start="0,0"
End="70.5341785353798,86.9817738926202">
<mssgle:Curve.Segments>
<mssgle:SegmentCollection
Capacity="5">
<mssgle:LineSegment
End="0,43.2408869463101" />
<mssgle:CubicBezierSegment
Point1="0,43.2408869463101"
Point2="0,47.2408869463101"
Point3="4,47.2408869463101" />
<mssgle:LineSegment
End="66.5341785353798,47.2408869463101" />
<mssgle:CubicBezierSegment
Point1="66.5341785353798,47.2408869463101"
Point2="70.5341785353798,47.2408869463101"
Point3="70.5341785353798,51.2408869463101" />
<mssgle:LineSegment
End="70.5341785353798,86.9817738926202" />
</mssgle:SegmentCollection>
</mssgle:Curve.Segments>
</mssgle:Curve>
</EdgeLayout.Curve>
<EdgeLayout.Labels>
<EdgeLabelCollection />
</EdgeLayout.Labels>
</EdgeLayout>
</GraphLayout>
</LayoutInfo>
</TaskHost>
<PipelineComponentMetadata
design-time-name="Package\Data Flow Task\OLE DB Source">
<Properties>
<Property>
<Name>DataSourceViewID</Name>
</Property>
</Properties>
</PipelineComponentMetadata>
</Objects>]]></DTS:DesignTimeProperties>
</DTS:Executable>
David
David http://blogs.msdn.com/b/dbrowne/

Similar Messages

  • Only 'EQ' and 'I' allowed for selection parameters

    Hi!
    We are generating the list of POs with open GR thru ME2M with selection parameters of WE101 and WE107, however, we encountered an error which states "Only 'EQ' and 'I' allowed for selection parameters."
    What shall we do?

    Hi,
    This error will have nothing to do with the selection parameter setting but the variant you are defining for your ME2M transaction.  Can you therefore provide detailed info on how you set it up in your system?
    Cheers,
    HT

  • How to have more months and years appear for selection in the archives for blog posts?

    Hello,
    How to have more months and years appear for selection in the archives for blog posts?  It just shows past 3 months in the year 2014, but we have many blog posts in years 2013, 2012 and 2011 and further back.  I am using the OOB SharePoint blog
    feature.
    Paul

    Hi,
    Thanks for the reply; it doesn't add anything as RSA6 was one of the options I listed and this was my fall back option if there was no other special treatment for the COPA datasources.
    I have found out why this, and other fields, are not available in KEB0.  The program uses a Function called KERA_COPA_METADATA_INTERFACE within which there is a section that selects the COPA fields:
    ***** 1. RULES (choice/class)
    * set rules for fixed fields
      PERFORM COPA_SET_RULES_FIXED_FIELDS USING I_ACCTCOST
                                          CHANGING E_T_RULES[].
    When you look at this code section there is a hard coded list of fields to exclude:
      MRULE 'MANDT     ' NEVER FORGET_IT NEVER FORGET_IT.
      MRULE 'PAOBJNR   ' NEVER FORGET_IT NEVER FORGET_IT.
      MRULE 'PASUBNR   ' NEVER FORGET_IT NEVER FORGET_IT.
      MRULE 'PAPAOBJNR ' NEVER FORGET_IT NEVER FORGET_IT.
      MRULE 'PAPASUBNR ' NEVER FORGET_IT NEVER FORGET_IT.
      MRULE 'HRKFT     ' NEVER FORGET_IT NEVER FORGET_IT.
      MRULE 'HZDAT     ' NEVER FORGET_IT NEVER FORGET_IT.
      MRULE 'USNAM     ' NEVER FORGET_IT NEVER FORGET_IT.
      MRULE 'RKESTATU  ' NEVER FORGET_IT NEVER FORGET_IT.
      MRULE 'TIMESTMP  ' NEVER FORGET_IT NEVER FORGET_IT.
      MRULE 'PERDE     ' NEVER FORGET_IT NEVER FORGET_IT.
      MRULE 'PERIO     ' OBLIGATORY CHAR_CE3 OBLIGATORY CHAR_CE3.
      MRULE 'COPA_AWTYP' NEVER FORGET_IT NEVER FORGET_IT.
      MRULE 'COPA_AWORG' NEVER FORGET_IT NEVER FORGET_IT.
    As this is a standard delivered SAP function I do not recommend that you change this code as you will invalid your SAP support and upgrade paths.
    Thanks
    Neil

  • How to incorporate File name and timestamp automatically into select and save file dialog box?

    Hello,
    i am trying to incorporate the file name which is inputed by the user along with the timestamp into the selected and save file dialog box. Can you help?
    Thanks
    Solved!
    Go to Solution.

    You can pass a default file name to the 'File Dialog' Express VI.
    Use the 'selected path' output to open the file.
    Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
    If you don't hate time zones, you're not a real programmer.
    "You are what you don't automate"
    Inplaceness is synonymous with insidiousness
    Attachments:
    FileDialog.vi ‏21 KB

  • Can I have a LOV for display and a LOV for select values in a form ?

    My LOV are in table :
    lov_return, lov_display, lov_available
    To avoid a loss in translating lov_return in lov_display values, I manage a flag, lov_available, Y/N to filter out obsoleted values.
    By example, at the beginning of using the application, I have :
    LOV_RETURN
    LOV_DISPLAY
    LOV_AVAILABLE
    1
    TOP
    Y
    2
    CENTER
    Y
    3
    BOTTOM
    Y
    And I have records with 1, 2 or 3 in the field corresponding with the LOV.
    So far, so good.
    Then I want to have a slightly different set of values in my LOV, for new records :
    LOV_RETURN
    LOV_DISPLAY
    LOV_AVAILABLE
    1
    TOP
    Y
    2
    CENTER
    N
    3
    BOTTOM
    Y
    4
    CENTER-TOP
    Y
    5
    CENTER-BOTTOM
    Y
    So, when I edit an old record in my form, I want the 2 to be well deciphered into CENTER, and in the SELECT list, I want TOP,BOTTON,CENTER-TOP,CENTER-BOTTOM.
    When I assign the dynamic LOV : select lov_display d,lov_return r from lov_table where lov_available = 'Y', to the corresponding field in my FORM, even allowing extra values will not help and will display '2' instead of 'CENTER'.
    Is there a way I can manage to show the translated 'CENTER' in the field, and offer a list of values taking in account the 'availability' of the value, other than including the PX_FIELD test in my SQL for the dynamic LOV ?

    A common logical problem I encountered back the days of Oracle Forms.
    A solution I often see is displaying invalid options with an asterisk, and applying validation to ensure users don't change to invalid selection.
    No doubt there are some clever ways to tart this up with jQuery, also.
    Scott

  • How to pass the low value and high  values for select options.

    Hi,
           In selection screen I want to display the first date, last date of this month as a default value in low and high fields.  Please exaplain me how.
    Thanks and Regards,
    Surya

    hI,
         Very thanks ,
            I  did it what u said now. but those contents does not displaying on the screen.
    In this order I write the code. Please explain me
    SELECT-OPTIONS s_date FOR likp-wadat_ist.
    DATA  BEGIN TYPE wadat_ist.
    DATA LAST TYPE wadat_ist.
    initialization.
    s_date-low = BEGIN.
    s_date-high = LAST.
    at selection-screen output.
    CALL FUNCTION 'HRWPC_BL_DATES_MONTH_INTERVAL'
      EXPORTING
        datum                =  SY-DATUM
        month_pst            =  '0'
        month_ftr            =   '0'
    IMPORTING
       BEGDA                =  BEGIN
       ENDDA                =   LAST
    EXCEPTIONS
      INVALID_VALUES       = 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.

  • Quick and easy question for selection structures

    i'm new to java since I started an online course at school, and I was wondering if there was an 'and' conjuctive? i want to have a selection condition where two criteria must be met as opposed to using || where either one triggers a statement.
    the assigment is about using client programs. i want a dog to interect a certain way when it is aggressive AND hungry
    ex:
    if (dog1.getAgression () > 5 'AND' dog1.getHunger () > 5)
    // dog is hungry and territorial
    System.out.pritnln (dog1.getName + ": ");
    dog1.barkAngry
    }

    .... Points me += -1.Points to you -= 1you.points--What's your point?one more than hisGood point!

  • Variable displaying incorrect data for selection in template

    Hello Friends,
    We have an InfoObject 0CALMONTH. On this InfoObject we have created a variable PERIOD (Z_INTER). This InfoObject and variable is used in two queries (A & B). In BEx the variable is working fine for both the queries, that means the variable shows the correct period (04/2005 to 01/2007). This data exists in our dataprovider.
    Now in a web template, I pull a chart and associate query A as the dataprovider and the variable works fine. It also does so if I associate query B as the dataprovider. The problem starts when I pull two charts, simultaneously in the template, and associate one with query A and other with query B. This time the variable acts funny and shows and incorrect period for selection (03/1995 to 03/2005). We do not have any data for the year 1995 to 2004 in the dataprovider.
    So you see individually the queries  (and variable) run fine but as soon as I ask them to co-exist in the same template, I get aberrations. We are not sure from where this previous years data is being pulled.
    Please assist. Thanks!
    Regards,
    Prem.

    Hi,
    I feel 1995 year data should be available in any one of the cube. Check the complete data in the cube directly with 'manage' tab or 'listcube' transaction code.
    And one more idea in my mind is, remove the variables from the queries and use 'filter' option in WAD for filtering the caleder month.
    Try this also: Use only one variable for both reports. I mean to say, remove variable in one report. Check whether both reports also running fine.
    Once you try this, let me know the status. According that we will try more things.
    Regards,
    Vivek V

  • I am having problems with the Preview application.  When I try to use it to open a pdf document it gets hung-up and I have to select force quit to close it.   Any ideas on how to resolve this problem?  Thanks for any help

    I am having problems with the Preview application.  When I try to use it to open a pdf document it gets hung-up and I have to select force quit to close it.   Any ideas on how to resolve this problem?  Thanks for any help

    Can you open the Preview program without loading a file, like by itself?
    If it doesn't load then I suspect a corrupt Preview preference file.
    Deleting the System Preference or other .plist file
    Can you open other files with Preview, like jpg's and images?
    How about other PDFs? or is it just that one you have downloaded?
    Run through this list of fixes
    Step by Step to fix your Mac

  • Keeps asking for Select a certificate or enter a name and password for network

    everytime i start my mac it asks for "Select a certificate or enter a name and password for network" and when i'll close it and reopen it, it still asks.
    can somebody help with what am i suppose to do?

    If you are currently showing WiFi status in the menu bar, you would see this icon:
    If you see that near the top right corner, click it and choose "Join other network" from the drop down list.
    If you do not see that icon, then go to System Preferences (under the Apple logo in the menu bar), ciick "Network", then choose "WiFi" and choose something (probably "Assist me" at the bottom) there.

  • C# compiling error: 'System.Array' does not contain a definition for 'Select' and no extension method 'Select' accepting a first argument of type 'System.Array' could be found (are you missing a using directive or an assembly reference?)

    Hello experts,
    I'm totally new to C#. I'm trying to modify existing code to automatically rename a file if exists. I found a solution online as follows:
    string[] allFiles = Directory.GetFiles(folderPath).Select(filename => Path.GetFileNameWithoutExtension(filename)).ToArray();
            string tempFileName = fileName;
            int count = 1;
            while (allFiles.Contains(tempFileName ))
                tempFileName = String.Format("{0} ({1})", fileName, count++); 
            output = Path.Combine(folderPath, tempFileName );
            string fullPath=output + ".xml";
    However, it gives the following compilation errors
    for the Select and Contain methods respectively.:
    'System.Array' does not contain a definition for 'Select' and no extension method 'Select' accepting a first argument of type 'System.Array' could be found
    (are you missing a using directive or an assembly reference?)
    'System.Array' does not contain a definition for 'Contains' and no extension method 'Contains' accepting a first argument of type 'System.Array' could be
    found (are you missing a using directive or an assembly reference?)
    I googled on these errors, and people suggested to add using System.Linq;
    I did, but the errors persist. 
    Any help and information is greatly appreciated.
    P. S. Here are the using clauses I have:
    using System;
    using System.Data;
    using System.Windows.Forms;
    using System.IO;
    using System.Collections.Generic;
    using System.Text;
    using System.Linq;

    Besides your issue with System.Core, you also have a problem with the logic of our code, particularly your variables. It is confusing what your variables represent. You have an infinite loop, so the last section of code is never reached. Take a look 
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.IO;
    namespace consAppFileManipulation
    class Program
    static void Main(string[] args)
    string fullPath = @"c:\temp\trace.log";
    string folderPath = @"c:\temp\";
    string fileName = "trace.log";
    string output = "";
    string fileNameOnly = Path.GetFileNameWithoutExtension(fullPath);
    string extension = Path.GetExtension(fullPath);
    string path = Path.GetDirectoryName(fullPath);
    string newFullPath = fullPath;
    string[] allFiles = Directory.GetFiles(folderPath).Select(filename => Path.GetFileNameWithoutExtension(filename)).ToArray();
    string tempFileName = fileName;
    int count = 1;
    //THIS IS AN INFINITE LOOP
    while (allFiles.Contains(fileNameOnly))
    tempFileName = String.Format("{0} ({1})", fileName, count++);
    //THIS CODE IS NEVER REACHED
    output = Path.Combine(folderPath, tempFileName);
    fullPath = output + ".xml";
    //string fullPath = output + ".xml";
    UML, then code

  • How to use the selection profile and status profile for production order?

    Hi expert,
       I want to know how to use the selection profile and status profile for production order. what's the usage for these two selection profile and status profile ?
      Please help me.
      thanks in advance.
      george.shi

    Hi George,
    There are are two types of statuses.One is system status and second one is user status.These statuses will tell us current situation of an order.
    We can't change system statuses.But we can create our own statuses through status profile.With this profile we can control user statuses.
    In this status profile,
    1.We define the sequence in which user statuses can be activated,
    2.We define initial statuses
    3. Allow or prohibit certain business transactions.
    Selection profiles are used to select the objects (say production orders) with different status combinations.We assign status profiles to selection profiles in BS42 T-Code.
    Regards,
    Raja.
    Edited by: Rajarao on Oct 30, 2008 6:21 AM
    Edited by: Rajarao on Oct 30, 2008 6:22 AM

  • I have just upgraded to Mountain Lion and my signatures for my Mail is not showing up. I have the signatures inthe preference panes and selected for the email address, but when I make a new message, the signature shows as none and doesn't give me a choice

    I have just upgraded to Mountain Lion and my signatures for my Mail are not showing up. I have the signatures inthe preference panes and selected for the email address, but when I make a new message, the signature shows as none and doesn't give me a choice. Yesterday, the signatures were stacking instead of switching to the one I wanted to choose.

    I had this and fixed it.
    I had upgraded to Mountain Lion and my signatures in Mail were fine. But then about a week later, I got a new computer and used Migration Assistant to copy my stuff to the new machine. Upon opening Mail, I had all the correct Signature information in the Preferences>Signatures window, but nothing worked.
    After lots of hunting, I found the Signature Folder. It's in:
    Yourusername>Library>Mail>V2>MailData>Signatures
    Looking at my previous setup (which works) I saw in that folder two types of files: .webarchive and .siganture
    Looking in my new machine's Signature folder, I saw only the .webarchive folders, not the .signature folders
    Since this was literally a clone of my previous setup to a new machine, here's what I did:
    1. Quit Mail
    2. In Problem machine, go to
    Yourusername>Library>Mail>V2>MailData>Signatures
    3. Move the Signatures folder someplace safe, but out of the MailData folder
    4. Get the Signatures Folder from the working install (like a backup) and copy it to the MailData folder on the problematic machine
    5. Start Mail on the problem machine
    This worked for me. I don't know why Migration Assistant didn't copy the full signature folder, but this fixed it. It worked perfectly partly because I had just backed up with Carbon Copy Cloner and the very next day set up the new machine. I don't know where Lion or earlier versions of mail stored signatures, but the absence of the .signature filetype seems to be the problem.
    Hope this helps

  • Item availability for selected items and directly create the delivery

    Hi All,
    For a very big sales order ..lets say having 700 line items ...is there any convenient way to create the delivery for selected items ..e.g. 30-40 line items rather going and selecting the line items then doing the item availability.
    do you have any LSMW format by which we can do the item availability for selected items and directly create the delivery.
    kindly Guide me..
    With Regards
    Azeez.Mohd

    Hi ,
    There is no stand way of doing it . You need to take help of abaper to do this :
    1. Create a t code where if you give sale order number , it displays a report with all the items with a check box near to it as we see in SE16 .
    2. This report could be best in ALV form where users can do "ctr+f" and search only the required materials then select those lines and press a button on the top of report .
    3. Once the button is pressed , program will run vL01n ( create delv in backgrnd) in a BDC form . At time of delev creating , the bdc program in backgrnd uses only those items which were selected by user and not the other items .
    4. Program will create a delv using a BDC in background and return the delv number for user to view tht.
    U can also try using FM : RV_DELIVERY_CREATE to create delv in backgrnd after user selection if BDC is getting tricky.
    Hopefully ,this shuld work and will be a easy process for the customers.
    Let us know the outcome .. .
    B O L ..
    Hope this Helps !!!

  • Functionality for Select and Save layout in a report output

    Hi,
    I had developed a report program containing several fields in the output and requires the Functionality for Select layout and Save layout in a report output.
    Please suggest.
    Thanks,
    Shariq.

    While calling the FM for List Display ( "REUSE_ALV_LIST_DISPLAY" or "REUSE_ALV_GRID_DISPLAY" ) set the Parameter I_SAVE for Setting the Layout and Selecting a different Layouts.
    The possible values for I_SAVE are "A", "U", "X" or others. Depending on the requiement you can set different values for the Parameter I_SAVE.
    ' ' = display variants cannot be saved
    Defined display variants (e.g. delivered display variants) can be selected for presentation independently of this flag.
    Changes can not be saved.
    'X' = standard save
    Display variants can be saved as standard display variants.
    User-specific saving is not possible.
    'U' = only user-specific saving
    The user can only save display variants user-specifically
    'A' = standard and user-specific saving
    The user can save a display variant user-specifically and
    as standard display variant. The user chooses in the display variant
    save popup.
    Reward points if helpful.

Maybe you are looking for

  • Apple id is not an iCloud account

    I have just upgraded to osx lion on my macbook pro and imac. I downloaded the 'app' from the app store. Loaded fine on my macbook pro and everything works. On my imac, when I go to log into icloud to set it up, it tells me my apple id is valid but no

  • Export Internal table by calling static method

    Hi friends, Can u please tell me how to get internal table in export parameter by calling static method. OR  can u tell me how to declare internal table in method parameter. Thanks in advance

  • PDF Default program for Safari

    How do I set Preview to be the default program for opening PDF files while in Safari? Currently every time I open one, it defaults to Acrobat. I have looked at the internet plugin folder (as suggested in another post), but that file does not exist.

  • BOM DAta Access in SRM

    Hi, WE are implementing a PLM - SRM integration wherein products once finalised would need to be communicated over to the Vendors for finalising product design. we would be having SAP R/3 as the system which would be the bedrock so as to say. after p

  • How can i reset my restriction passcode for reset all settings

    I forget the passcode and i want to reset all settings.can some help me how to reset all phone.