Error saying "must declare body"

I was debugging a code and I got it to 1 error.
It was missing a main method, so I did static void Main(); in the beginning of the code.
The error says "ffbCS.Program.Main() must declare a body because it is not marked abstract, extern, or partial"
Does the main method always go in the beginning of the code or can it come after some code? Is there other types of main methods? I used static void
Main(); because this is the only one that I know of.
Below is my code
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Collections;
using System.ComponentModel;
using System.Device;
using Microsoft.DirectX;
using Microsoft.DirectX.DirectInput;
namespace ffbCS
class Program
static void Main();
public sealed class DirectInputWrapper
#region ForceType
<summary style="color:#111111;font-family:'Segoe UI', Arial, sans-serif;font-size:14px;line-height:normal;">
/// This enumeration simply provides a shorthand way to reference
/// the custom forces we create -- it's not a base part of DirectX,
/// though, so you can use a completely different method.
///</summary>
public enum ForceType
VeryBriefJolt,
BriefJolt,
LowRumble,
HardRumble
#endregion
//this class lets us send FF commands to up to two game pads,
//but your own class could support as many as you want
private static Device device1;
private static Device device2;
private static Dictionary<forcetype,> P1Forces;
private static Dictionary<forcetype,> P2Forces;
#region Initialize
///<summary style="color:#111111;font-family:'Segoe UI', Arial, sans-serif;font-size:14px;line-height:normal;">
/// Initialize DirectInput
///</summary>
public static void Initialize( System.Windows.Forms.Control Parent )
if ( device1 != null )
device1.Dispose();
device1 = null;
if ( device2 != null )
device2.Dispose();
device2 = null;
foreach ( DeviceInstance instance in Manager.GetDevices( DeviceClass.GameControl,
EnumDevicesFlags.AttachedOnly ) )
if ( device1 == null )
device1 = new Device( instance.InstanceGuid );
else if ( device2 == null )
device2 = new Device( instance.InstanceGuid );
DisposeForces();
P1Forces = new Dictionary<forcetype,>();
P2Forces = new Dictionary<forcetype,>();
InitializeDevice( Parent, device1 );
InitializeDevice( Parent, device2 );
#endregion
#region InitializeDevice
private static void InitializeDevice( System.Windows.Forms.Control Parent, Device Dev )
if ( Dev == null )
return;
Dev.SetDataFormat( DeviceDataFormat.Joystick );
Dev.SetCooperativeLevel( Parent, CooperativeLevelFlags.Background |
CooperativeLevelFlags.Exclusive );
Dev.Properties.AxisModeAbsolute = true;
Dev.Properties.AutoCenter = false;
Dev.Acquire();
int[] axis = null;
// Enumerate any axes
foreach ( DeviceObjectInstance doi in Dev.Objects )
if ( ( doi.ObjectId & (int)DeviceObjectTypeFlags.Axis ) != 0 )
// We found an axis, set the range to a max of 10,000
Dev.Properties.SetRange( ParameterHow.ById,
doi.ObjectId, new InputRange( -5000, 5000 ) );
int[] temp;
// Get info about first two FF axii on the device
if ( ( doi.Flags & (int)ObjectInstanceFlags.Actuator ) != 0 )
if ( axis != null )
temp = new int[axis.Length + 1];
axis.CopyTo( temp, 0 );
axis = temp;
else
axis = new int[1];
// Store the offset of each axis.
axis[axis.Length - 1] = doi.Offset;
if ( axis.Length == 2 )
break;
Dictionary<forcetype,> forces;
if ( Dev == device1 )
forces = P1Forces;
else
forces = P2Forces;
try
if ( axis != null )
forces.Add( ForceType.VeryBriefJolt,
InitializeForce( Dev, EffectType.ConstantForce, axis,
6000, EffectFlags.ObjectOffsets | EffectFlags.Spherical, 150000 ) );
forces.Add( ForceType.BriefJolt,
InitializeForce( Dev, EffectType.ConstantForce, axis,
10000, EffectFlags.ObjectOffsets | EffectFlags.Spherical, 250000 ) );
forces.Add( ForceType.LowRumble,
InitializeForce( Dev, EffectType.ConstantForce, axis,
2000, EffectFlags.ObjectOffsets | EffectFlags.Cartesian, 900000 ) );
forces.Add( ForceType.HardRumble,
InitializeForce( Dev, EffectType.ConstantForce, axis,
10000, EffectFlags.ObjectOffsets | EffectFlags.Spherical, 2000000 ) );
catch ( Exception e ) 
System.Windows.Forms.MessageBox.Show( "Could not initalize force feedback:\n\n" + e );
#endregion
#region DisposeForces
public static void DisposeForces()
if ( P1Forces != null )
foreach ( EffectObject o in P1Forces.Values )
o.Dispose();
P1Forces = null;
if ( P2Forces != null )
foreach ( EffectObject o in P2Forces.Values )
o.Dispose();
P2Forces = null;
#endregion
#region SendForce
public static void SendForce( ForceType Type, bool IsPlayer1 )
Dictionary<forcetype,> forces;
if ( IsPlayer1 )
forces = P1Forces;
else
forces = P2Forces;
if ( forces == null )
return;
if ( !forces.ContainsKey( Type ) )
return;
EffectObject force = forces[Type];
force.Start( 1 );
#endregion
#region InitializeForce
public static EffectObject InitializeForce( Device Dev, EffectType Type,
int[] Axis, int Magnitude, EffectFlags Flags, int Duration )
EffectObject eo = null;
Effect e;
foreach ( EffectInformation ei in Dev.GetEffects( EffectType.All ) )
if ( DInputHelper.GetTypeCode( ei.EffectType ) == (int)Type )
e = new Effect();
e.SetDirection( new int[Axis.Length] );
e.SetAxes( new int[1] ); 
//this is the offending line in the Microsoft examples
//setting axes to 2 causes the dreaded "Value does not fall within expected range" error
//this is evidently a bug in Managed DirectX, at least affecting some game pads,
//and this is the only workaround I've found.
//I have not been able to successfully load FFE files in Managed DirectX
//due to this same problem (presumably, in the inner initialization code
//when loading from FFE, it is trying to load two axes there, as well).
//This problem exists with all verys of Managed DirectX, as far as I can tell,
//at least up through March 2008 when this example was written.
e.EffectType = Type;
e.ConditionStruct = new Condition[Axis.Length];
e.Duration = Duration;
e.Gain = 10000;
e.Constant = new ConstantForce();
e.Constant.Magnitude = Magnitude;
e.SamplePeriod = 0;
e.TriggerButton = (int)Microsoft.DirectX.DirectInput.Button.NoTrigger;
e.TriggerRepeatInterval = (int)DI.Infinite;
e.Flags = Flags;
e.UsesEnvelope = false;
// Create the effect, using the passed in guid.
eo = new EffectObject( ei.EffectGuid, e, Dev );
return eo;
#endregion

I was debugging a code and I got it to 1 error.
It was missing a main method, so I did static void Main(); in the beginning of the code.
The error says "ffbCS.Program.Main() must declare a body because it is not marked abstract, extern, or partial"
Does the main method always go in the beginning of the code or can it come after some code? Is there other types of main methods? I used static void
Main(); because this is the only one that I know of.
Below is my code
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Collections;
using System.ComponentModel;
using System.Device;
using Microsoft.DirectX;
using Microsoft.DirectX.DirectInput;
namespace ffbCS
class Program
static void Main();
public sealed class DirectInputWrapper
#region ForceType
///<summary style="color:#111111;font-family:'Segoe UI', Arial, sans-serif;font-size:14px;line-height:normal;">
/// This enumeration simply provides a shorthand way to reference
/// the custom forces we create -- it's not a base part of DirectX,
/// though, so you can use a completely different method.
///</summary>
public enum ForceType
VeryBriefJolt,
BriefJolt,
LowRumble,
HardRumble
#endregion
//this class lets us send FF commands to up to two game pads,
//but your own class could support as many as you want
private static Device device1;
private static Device device2;
private static Dictionary<forcetype,> P1Forces;
private static Dictionary<forcetype,> P2Forces;
#region Initialize
///<summary style="color:#111111;font-family:'Segoe UI', Arial, sans-serif;font-size:14px;line-height:normal;">
/// Initialize DirectInput
///</summary>
public static void Initialize( System.Windows.Forms.Control Parent )
if ( device1 != null )
device1.Dispose();
device1 = null;
if ( device2 != null )
device2.Dispose();
device2 = null;
foreach ( DeviceInstance instance in Manager.GetDevices( DeviceClass.GameControl,
EnumDevicesFlags.AttachedOnly ) )
if ( device1 == null )
device1 = new Device( instance.InstanceGuid );
else if ( device2 == null )
device2 = new Device( instance.InstanceGuid );
DisposeForces();
P1Forces = new Dictionary<forcetype,>();
P2Forces = new Dictionary<forcetype,>();
InitializeDevice( Parent, device1 );
InitializeDevice( Parent, device2 );
#endregion
#region InitializeDevice
private static void InitializeDevice( System.Windows.Forms.Control Parent, Device Dev )
if ( Dev == null )
return;
Dev.SetDataFormat( DeviceDataFormat.Joystick );
Dev.SetCooperativeLevel( Parent, CooperativeLevelFlags.Background |
CooperativeLevelFlags.Exclusive );
Dev.Properties.AxisModeAbsolute = true;
Dev.Properties.AutoCenter = false;
Dev.Acquire();
int[] axis = null;
// Enumerate any axes
foreach ( DeviceObjectInstance doi in Dev.Objects )
if ( ( doi.ObjectId & (int)DeviceObjectTypeFlags.Axis ) != 0 )
// We found an axis, set the range to a max of 10,000
Dev.Properties.SetRange( ParameterHow.ById,
doi.ObjectId, new InputRange( -5000, 5000 ) );
int[] temp;
// Get info about first two FF axii on the device
if ( ( doi.Flags & (int)ObjectInstanceFlags.Actuator ) != 0 )
if ( axis != null )
temp = new int[axis.Length + 1];
axis.CopyTo( temp, 0 );
axis = temp;
else
axis = new int[1];
// Store the offset of each axis.
axis[axis.Length - 1] = doi.Offset;
if ( axis.Length == 2 )
break;
Dictionary<forcetype,> forces;
if ( Dev == device1 )
forces = P1Forces;
else
forces = P2Forces;
try
if ( axis != null )
forces.Add( ForceType.VeryBriefJolt,
InitializeForce( Dev, EffectType.ConstantForce, axis,
6000, EffectFlags.ObjectOffsets | EffectFlags.Spherical, 150000 ) );
forces.Add( ForceType.BriefJolt,
InitializeForce( Dev, EffectType.ConstantForce, axis,
10000, EffectFlags.ObjectOffsets | EffectFlags.Spherical, 250000 ) );
forces.Add( ForceType.LowRumble,
InitializeForce( Dev, EffectType.ConstantForce, axis,
2000, EffectFlags.ObjectOffsets | EffectFlags.Cartesian, 900000 ) );
forces.Add( ForceType.HardRumble,
InitializeForce( Dev, EffectType.ConstantForce, axis,
10000, EffectFlags.ObjectOffsets | EffectFlags.Spherical, 2000000 ) );
catch ( Exception e ) 
System.Windows.Forms.MessageBox.Show( "Could not initalize force feedback:\n\n" + e );
#endregion
#region DisposeForces
public static void DisposeForces()
if ( P1Forces != null )
foreach ( EffectObject o in P1Forces.Values )
o.Dispose();
P1Forces = null;
if ( P2Forces != null )
foreach ( EffectObject o in P2Forces.Values )
o.Dispose();
P2Forces = null;
#endregion
#region SendForce
public static void SendForce( ForceType Type, bool IsPlayer1 )
Dictionary<forcetype,> forces;
if ( IsPlayer1 )
forces = P1Forces;
else
forces = P2Forces;
if ( forces == null )
return;
if ( !forces.ContainsKey( Type ) )
return;
EffectObject force = forces[Type];
force.Start( 1 );
#endregion
#region InitializeForce
public static EffectObject InitializeForce( Device Dev, EffectType Type,
int[] Axis, int Magnitude, EffectFlags Flags, int Duration )
EffectObject eo = null;
Effect e;
foreach ( EffectInformation ei in Dev.GetEffects( EffectType.All ) )
if ( DInputHelper.GetTypeCode( ei.EffectType ) == (int)Type )
e = new Effect();
e.SetDirection( new int[Axis.Length] );
e.SetAxes( new int[1] ); 
//this is the offending line in the Microsoft examples
//setting axes to 2 causes the dreaded "Value does not fall within expected range" error
//this is evidently a bug in Managed DirectX, at least affecting some game pads,
//and this is the only workaround I've found.
//I have not been able to successfully load FFE files in Managed DirectX
//due to this same problem (presumably, in the inner initialization code
//when loading from FFE, it is trying to load two axes there, as well).
//This problem exists with all verys of Managed DirectX, as far as I can tell,
//at least up through March 2008 when this example was written.
e.EffectType = Type;
e.ConditionStruct = new Condition[Axis.Length];
e.Duration = Duration;
e.Gain = 10000;
e.Constant = new ConstantForce();
e.Constant.Magnitude = Magnitude;
e.SamplePeriod = 0;
e.TriggerButton = (int)Microsoft.DirectX.DirectInput.Button.NoTrigger;
e.TriggerRepeatInterval = (int)DI.Infinite;
e.Flags = Flags;
e.UsesEnvelope = false;
// Create the effect, using the passed in guid.
eo = new EffectObject( ei.EffectGuid, e, Dev );
return eo;
#endregion

Similar Messages

  • Stored Proc with SSRS multi value parameter gives " Must Declare scalar Varaiable @StateID

    Hi All,
    I have one stored proc with @fromDate , @Todate and multivalue input
    parameter@StateID of type integer.
    When I run below stored proc via SSRS by selecting multiple values thru multiValue parameter into @StateID...it gives error saying "Must Declare scalar variable @StateID"
    Not sure what is wrong with the input parameters.
    ID is Integer type in all the 3 tables - dbo.EastCities, dbo.WestCities  , dbo.Country
    I need help fixing this  "Must Declare scalar variable @StateID" error
    This is the UDF split() I am using..
    Function:
    CREATE FUNCTION dbo.SplitStateID
    (    @List VARCHAR(MAX))
    RETURNS TABLE
    AS   
    RETURN   
    (        SELECT DISTINCT [Value] = CONVERT(INT, LTRIM(RTRIM(CONVERT( VARCHAR(12),SUBSTRING(@List, Number, CHARINDEX(',', @List + ',', Number) - Number))))
     FROM  dbo.Numbers       
     WHERE Number <= CONVERT(INT, LEN(@List))AND SUBSTRING(',' + @List, Number, 1) = ','    );
     GO
     SELECT [Value] FROM dbo.SplitStateID('10,30,50');
    Also, I have created dbo.Numbers table which is used in udf..
    reference url -- > 
    http://sqlblog.com/blogs/aaron_bertrand/archive/2009/08/01/processing-a-list-of-integers-my-approach.aspx
    SET NOCOUNT ON;
    DECLARE @UpperLimit INT;
    SET @UpperLimit = 10000;
    WITH n AS(   
    SELECT        rn = ROW_NUMBER() OVER        (ORDER BY s1.[object_id])   
    FROM sys.objects AS s1   
    CROSS JOIN sys.objects AS s2   
    CROSS JOIN sys.objects AS s3)
    SELECT [Number] = rn - 1
    INTO dbo.Numbers FROM n
    WHERE rn <= @UpperLimit + 1;
    CREATE UNIQUE CLUSTERED INDEX n ON dbo.Numbers([Number]);
    Stored procedure:
    Create Procedure dbo.CountrySelection
    ( @FromDate Date, @ToDate Date, @StateID Int)
    AS
    BEGIN
    set nocount on;
    SELECT * INTO #EastCities
    FROM (
    SELECT ID,Description from dbo.EastCities
    Where ID IN (SELECT Value from dbo.SplitStateID(@StateID))
    ) AS A
    SELECT * INTO #WestCities
    FROM (
    SELECT ID,Description from dbo.WestCities
    Where ID IN (SELECT Value from dbo.SplitStateID(@StateID))
    ) AS B
    SELECT * INTO #Country
    FROM (
    SELECT ID , Description, State,Country From dbo.Country
    ) AS C
    SELECT EC.ID AS East, WC.ID AS West , EC.Description AS EastDesc, WC.Description AS WestDesc, CT.State, CT.Country
    FROM #Country CT
    LEFT JOIN #EastCities EC ON CT.ID=EC.ID
    LEFT JOIN #WestCities WC ON CT.ID=WC.ID
    DROP TABLE #EastCities
    DROP TABLE #WestCities
    DROP TABLE #Country
    END
    Above 3 temp tables are joined by #Country.ID key
    It works fine when single value is passed in @StateID
    Exec dbo.CountrySelection '01/01/2010','02/01/2010',10
    It fails when multi value passed into @StateID
    Exec dbo.CountrySelection '01/01/2010','02/01/2010','10,30,40'
    SSRS error log shows "Must declare scalar variable @StateID"
    Need help in fixing this issue.
    Thanks,
    RH
    sql

    Visakh,
    I changed @StateID date type to varchar(max) and still I get this error.  
    System.Data.SqlClient.SqlException: Must declare the scalar variable "@StateID".
       at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
       at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
    I am running this SO in SSRS quert Type =Text
    Actually sp created on db2 database and due to some limitations I am running(via SSRS) this from different db1 database data source within the same db server. When I run this sp from SSRS query designer(edit query designer button) and pass
    multivalue parameters to @StateID as 10 , 20 it works and gives expected resultset.
    Thanks,
    RH
    sql

  • Must declare the scalar variable

    I Am getting error as Must declare the scalar variable "@Imageid" for the following code,while executing,
    exec spGetPager  ' ' , ' ', ' 3 ', ' '
    In my coding I pass querystring value like 1,2,3 etc
    CREATE PROCEDURE spGetPager
          @PageNo int = 1,  
          @ItemsPerPage int = 1,  
     @Imageid int,
          @TotalRows int out  
    AS  
    BEGIN  
      SET NOCOUNT ON  
      DECLARE  
        @StartIdx int,  
        @SQL nvarchar(max),   
        @SQL_Conditions nvarchar(max),   
        @EndIdx int
          IF @PageNo < 1 SET @PageNo = 1  
          IF @ItemsPerPage < 1 SET @ItemsPerPage = 10  
          SET @StartIdx = (@PageNo -1) * @ItemsPerPage + 1  
          SET @EndIdx = (@StartIdx + @ItemsPerPage) - 1  
          SET @SQL = 'SELECT Imageid,Imagepath,imagename,username  
                    FROM (  
                    SELECT  ROW_NUMBER() OVER(ORDER BY Imageid) AS Row, *  
                          FROM  Imageupload ) AS tbl WHERE Imageid=@Imageid AND Row >= '  
                                        + CONVERT(varchar(9), @StartIdx) + ' AND  
                           Row <=  ' + CONVERT(varchar(9), @EndIdx)  
          EXEC sp_executesql @SQL  
          SET @SQL = 'SELECT @TotalRows=COUNT(*) FROM Imageupload'  
          EXEC sp_executesql  
            @query = @SQL,  
            @params = N'@TotalRows INT OUTPUT',  
            @TotalRows = @TotalRows OUTPUT  
    END
    Thanks in Advance

    you cant use variable directly in concatenation operator as its of type int. you need to cast it first as below
    CREATE PROCEDURE spGetPager
    @PageNo int = 1,
    @ItemsPerPage int = 1,
    @Imageid int,
    @TotalRows int out
    AS
    BEGIN
    SET NOCOUNT ON
    DECLARE
    @StartIdx int,
    @SQL nvarchar(max),
    @SQL_Conditions nvarchar(max),
    @EndIdx int
    IF @PageNo < 1 SET @PageNo = 1
    IF @ItemsPerPage < 1 SET @ItemsPerPage = 10
    SET @StartIdx = (@PageNo -1) * @ItemsPerPage + 1
    SET @EndIdx = (@StartIdx + @ItemsPerPage) - 1
    SET @SQL = 'SELECT Imageid,Imagepath,imagename,username
    FROM (
    SELECT ROW_NUMBER() OVER(ORDER BY Imageid) AS Row, *
    FROM Imageupload ) AS tbl WHERE Imageid=' + CAST(@Imageid AS varchar(50)) + ' AND Row >= '
    + CONVERT(varchar(9), @StartIdx) + ' AND
    Row <= ' + CONVERT(varchar(9), @EndIdx)
    EXEC sp_executesql @SQL
    SET @SQL = 'SELECT @TotalRows=COUNT(*) FROM Imageupload'
    EXEC sp_executesql
    @query = @SQL,
    @params = N'@TotalRows INT OUTPUT',
    @TotalRows = @TotalRows OUTPUT
    END
    That being I didnt understand why you need dynamic sql here. There's no dynamicity involved as i see
     you could simply use a sql like below
    CREATE PROCEDURE spGetPager
    @PageNo int = 1,
    @ItemsPerPage int = 1,
    @Imageid int,
    @TotalRows int out
    AS
    BEGIN
    SET NOCOUNT ON
    DECLARE
    @StartIdx int,
    @EndIdx int
    IF @PageNo < 1 SET @PageNo = 1
    IF @ItemsPerPage < 1 SET @ItemsPerPage = 10
    SET @StartIdx = (@PageNo -1) * @ItemsPerPage + 1
    SET @EndIdx = (@StartIdx + @ItemsPerPage) - 1
    SELECT Imageid,Imagepath,imagename,username
    FROM (
    SELECT ROW_NUMBER() OVER(ORDER BY Imageid) AS Row, *
    FROM Imageupload ) AS tbl WHERE Imageid=@Imageid
    AND Row >= @StartIdx
    AND Row <= @EndIdx
    SELECT @TotalRows=COUNT(*) FROM Imageupload
    END
    to achieve same requirement.
    Make sure you read
    http://www.sommarskog.se/dynamic_sql.html
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • When i login to MES operator resp..i get a error saying...You must setup an HR employee for this Oracle Application user...how to resolve this?

    when i login to MES operator resp..i get a error saying...You must setup an HR employee for this Oracle Application user...how to resolve this?

    Hey everyone in Apple world!
    I figured out how to fix the flashing yellow screen problem that I've been having on my MBP!  Yessssss!!!
    I found this super handy website with the golden answer: http://support.apple.com/kb/HT1379
    I followed the instructions on this page and here's what I did:
    Resetting NVRAM / PRAM
    Shut down your Mac.
    Locate the following keys on the keyboard: Command (⌘), Option, P, and R. You will need to hold these keys down simultaneously in step 4.
    Turn on the computer.
    Press and hold the Command-Option-P-R keys before the gray screen appears.
    Hold the keys down until the computer restarts and you hear the startup sound for the second time.
    Release the keys.
    I went through the 6 steps above twice, just to make sure I got rid of whatever stuff was holding up my bootup process.  Since I did that, my MBP boots up just like normal.  No flashing yellow screen anymore!!   
    (Note that I arrived at this solution when I first saw this page: http://support.apple.com/kb/TS2570?viewlocale=en_US)
    Let me know if this works for you!
    Elaine

  • Query in SQL 2008R2 error Msg 1087, Level 15, State 2, Line 31 Must declare the table variable

    Hello Experts, 
    Can You help me; I get the follwing error in my query
    Msg 1087, Level 15, State 2, Line 31
    Must declare the table variable "@ASE_SUBART_GROEP".
    the @ASE_SUBART_GROEP is a self-defined table in this SQL environment.
    Maybe you know the error or the missing part
    Thanks in advance, Jos Dielemans

    I'm not familiar with SAP Business One unfortunately, so can only be of limited help here. But I'm going to guess that @ASE_SUBART_GROEP is a table variable passed to a stored procedure and is defined and passed down by the application, so you won't
    be able to copy-paste this code directly into management studio and get it to work.
    You could remove the join to return *all* records. Although the dataset might be very big
    SELECT T0.CardCode AS 'Klantnr'
    ,T0.CardName AS 'Klantnaam'
    ,T4.GroupName AS 'Klantgroep'
    ,T9.Descr AS 'Merknaam'
    ,T5.SlpName AS 'Verkoper'
    ,T3.MailCity AS 'Leverplaats'
    ,T7.NAME AS 'Leverland'
    ,T3.City AS 'Factuurplaats'
    ,T7.NAME AS 'Factuurland'
    ,T0.DocNum AS 'Documentnr'
    ,T0.DocDate AS 'Datum'
    ,Cast((Datepart(Year, T0.DocDate)) AS VARCHAR) AS 'Jaar'
    ,RIGHT('00' + CAST(DATEPART(MONTH, T0.DocDate) AS VARCHAR(2)), 2) AS 'Maand'
    ,(Cast((Datepart(Year, T0.DocDate)) AS VARCHAR) + '-' + RIGHT('00' + CAST(DATEPART(MONTH, T0.DocDate) AS VARCHAR(2)), 2)) AS 'Periode'
    ,T1.ItemCode AS 'Artikelnr'
    ,T2.ItemName AS 'Artikelnaam'
    ,T1.Quantity AS 'Aantal VEH'
    ,T2.SVolume AS 'Aantal EH per VEH'
    ,(T1.Quantity * T2.SVolume) AS 'Aantal EH'
    ,T8.UnitName AS 'EH-Naam'
    ,T6.ItmsGrpNam AS 'Artikelgroep'
    ,T2.U_ItemGrp AS 'Hoofdgroep'
    ,T10.NAME AS 'Subgroep'
    ,T1.CogsAcct AS 'Kostpr.rek.'
    ,T1.AcctCode AS 'Opbrengstrek.'
    ,T1.LineTotal AS 'BrutoOmzet'
    ,T0.DiscPrcnt AS 'Korting'
    ,(+ T1.LineTotal * (100 - T0.DiscPrcnt) / 100) AS 'NettoOmzet'
    FROM dbo.OINV T0
    INNER JOIN dbo.INV1 T1 ON T0.DocEntry = T1.DocEntry
    INNER JOIN OITM T2 ON T1.ItemCode = T2.ItemCode
    INNER JOIN OCRD T3 ON T0.CardCode = T3.CardCode
    INNER JOIN OCRG T4 ON T3.GroupCode = T4.Groupcode
    INNER JOIN OSLP T5 ON T3.SlpCode = T5.SlpCode
    INNER JOIN OITB T6 ON T2.ItmsGrpCod = T6.ItmsGrpCod
    INNER JOIN OCRY T7 ON T3.Country = T7.Code
    LEFT OUTER JOIN OLGT T8 ON T2.SVolUnit = T8.UnitCode
    LEFT OUTER JOIN UFD1 T9 ON T3.U_ZPgroep = T9.FldValue
    AND TableID = 'OCRD'
    AND FieldID = 2
    --LEFT OUTER JOIN @ASE_SUBART_GROEP T10 ON T2.U_ASE_SUB_ARTGROEP = T10.Code
    WHERE T0.DocDate >= '20120101'
    AND T0.Canceled = 'N'
    UNION ALL
    SELECT T0.CardCode AS 'Klantnr'
    ,T0.CardName AS 'Klantnaam'
    ,T4.GroupName AS 'Klantgroep'
    ,T9.Descr AS 'Merknaam'
    ,T5.SlpName AS 'Verkoper'
    ,T3.MailCity AS 'Leverplaats'
    ,T7.NAME AS 'Leverland'
    ,T3.City AS 'Factuurplaats'
    ,T7.NAME AS 'Factuurland'
    ,T0.DocNum AS 'Documentnr'
    ,T0.DocDate AS 'Datum'
    ,Cast((Datepart(Year, T0.DocDate)) AS VARCHAR) AS 'Jaar'
    ,RIGHT('00' + CAST(DATEPART(MONTH, T0.DocDate) AS VARCHAR(2)), 2) AS 'Maand'
    ,(Cast((Datepart(Year, T0.DocDate)) AS VARCHAR) + '-' + RIGHT('00' + CAST(DATEPART(MONTH, T0.DocDate) AS VARCHAR(2)), 2)) AS 'Periode'
    ,T1.ItemCode AS 'Artikelnr'
    ,T2.ItemName AS 'Artikelnaam'
    ,- T1.Quantity AS 'Aantal VEH'
    ,T2.SVolume AS 'Aantal EH per VEH'
    ,(- T1.Quantity * T2.SVolume) AS 'aantal EH'
    ,T8.UnitName AS 'EH-Naam'
    ,T6.ItmsGrpNam AS 'Artikelgroep'
    ,T2.U_ItemGrp AS 'Hoofdgroep'
    ,T10.NAME AS 'Subgroep'
    ,T1.CogsAcct AS 'Kostpr.rek.'
    ,T1.AcctCode AS 'Opbrengstrek.'
    ,- T1.LineTotal AS 'BrutoOmzet'
    ,T0.DiscPrcnt AS 'Korting'
    ,(+ T1.LineTotal * (100 - T0.DiscPrcnt) / 100) AS 'NettoOmzet'
    FROM dbo.ORIN T0
    INNER JOIN dbo.RIN1 T1 ON T0.DocEntry = T1.DocEntry
    INNER JOIN OITM T2 ON T1.ItemCode = T2.ItemCode
    INNER JOIN OCRD T3 ON T0.CardCode = T3.CardCode
    INNER JOIN OCRG T4 ON T3.GroupCode = T4.Groupcode
    INNER JOIN OSLP T5 ON T3.SlpCode = T5.SlpCode
    INNER JOIN OITB T6 ON T2.ItmsGrpCod = T6.ItmsGrpCod
    INNER JOIN OCRY T7 ON T3.Country = T7.Code
    LEFT OUTER JOIN OLGT T8 ON T2.SVolUnit = T8.UnitCode
    LEFT OUTER JOIN UFD1 T9 ON T3.U_ZPgroep = T9.FldValue
    AND TableID = 'OCRD'
    AND FieldID = 2
    --LEFT OUTER JOIN @ASE_SUBART_GROEP T10 ON T2.U_ASE_SUB_ARTGROEP = T10.Code
    WHERE T0.DocDate >= '20120101'
    AND T0.Canceled = 'N'
    ORDER BY T0.CardCode
    The join to the table variable has been commented out above, so the code should run. After that you might want to update the WHERE clause to include only particular sub-groups

  • Getting "Must declare the scalar variable" Error

    Hello All,
    I have write following query to block invoice which has Prices not equal to PriceList as below.
    -- To Block Invoices which has Prices not equal to PriceList
    IF (@transaction_type='A' OR @transaction_type = 'U') AND CAST(@OBJECT_TYPE = '18')
    BEGIN
        SELECT T1.ItemCode,
                T1.Price AS PO_Price,
                T2.U_ListPrice AS Listed_Price
            FROM OPCH AS T0 
            INNER JOIN
            PCH1 AS T1 ON
            T0.DocEntry = T1.DocEntry
            LEFT OUTER JOIN    
            [dbo].[@PRICELISTS] AS T2 ON
            T1.ItemCode = T2.U_ItemNo
        WHERE
                    T1.DocEntry = @list_of_cols_val_tab_del) AND
            (T1.Price <> T2.U_ListPrice)   
    BEGIN
    SET @error = 123
    SET @error_message = 'Deviation in price'
    END
    END
    But after Execution got following Errors
    Msg 137, Level 15, State 2, Line 2
    Must declare the scalar variable "@transaction_type".
    Msg 137, Level 15, State 2, Line 19
    Must declare the scalar variable "@list_of_cols_val_tab_del".
    Msg 137, Level 15, State 1, Line 22
    Must declare the scalar variable "@error".
    Msg 137, Level 15, State 1, Line 23
    Must declare the scalar variable "@error_message".
    Please Help
    Regards
    Hitul

    Hi Hitul,
    Please check Snapshot.
    Please see Red Lines for SBO_SP_TransactionNotification Procedure.
    Paste your code below ADD YOUR CODE HERE.
    Hope this help
    Regards::::
    Atul Chakraborty

  • Error 136 Functions that can be compossed must declare a return type

    Hello,
    I have downloaded the EF Final Release driver and Im working with Oracle 11g express.
    I have the following Procedure:
    PROCEDURE ProductosPedido(
    Datos Out SYS_RefCursor) IS
    BEGIN
    OPEN Datos FOR
    SELECT Nombre,
    TO_NUMBER(Precio * (SELECT SUM(unidades)
    FROM DETALLES_PEDIDO
    WHERE PRODUCTO = PRODUCTO.ID)) Importe
    FROM PRODUCTO;
    END;
    And the following config section:
    <oracle.dataaccess.client>
    <settings>
    <add name="System.Productospedido.RefCursor.Datos" value="implicitRefCursor bindinfo='mode=Output'"/>
    <add name="System.Productospedido.RefCursorMetaData.Datos.Column.0" value="implicitRefCursor metadata='ColumnName=Nombre;BaseColumnName=Nombre;BaseSchemaName=System;BaseTableName=Producto;NativeDataType=nvarchar2;ProviderType=NVarchar2;DataType=System.String;ColumnSize=50;AllowDBNull=true;IsKey=false'" />
    <add name="System.Productospedido.RefCursorMetaData.Datos.Column.1" value="implicitRefCursor metadata='ColumnName=Importe;NativeDataType=number;ProviderType=Decimal;DataType=System.Decimal;AllowDBNull=false;IsKey=false;ColumnSize=8'" />
    </settings>
    </oracle.dataaccess.client>
    I have imported succesfully in my EF Model, but when I try to consume the Procedure it gives me Error 136 Functions that can be compossed must declare a return type
    Any solutions?
    Thanks and best regards!

    A stored procedure does not have a ReturnType, therefore IsComposable="false" and it cannot be used in LINQ queries.
    This limitation is imposed by EF and not by ODP.
    You may want to create a stored function which has a ReturnType ref cursor, and include this stored function into your model. Then, under the same namespace, you create a class with a "stub" method/function and use EdmFunction() to map this stub to the stored function. For example,
    class myFuncClass
    [EdmFunction("Model.Store", "MY_STORED_FUNC_1")]
    public static <your_complex_type_or_DbDataRecord> MyFunc_1(int? column1, ...)
    throw new NotSupportedException("Direct calls are not supported");
    You should be able to call myFuncClass.MyFunc_1(x) in your LINQ query. Your stored function MY_STORED_FUNC_1 will be called in the generated query.

  • Must declare the scalar variable error

    I am getting the error "Must declare the scalar variable "@Result""  when i execute the below query
    declare @sql nvarchar(max),
    @tablename varchar(200),
    @Id int,
    @Result int
    set @tablename='xyz'
    set @id=1
    SET @sql = '
    SELECT @Result=COUNT( Id ) FROM  ' + @TableName+ ' WHERE RunRegisterKey=' +convert(nvarchar(100),@ID)  
    EXEC sys.sp_executesql @sql

    In addition to Visakh's solution: the reason you got the error message is because the piece of dynamic SQL is not part of the stored procedure, but constiutes a scope of its own. Thus variables declared in the surrounding procedure are not visible.
    Also, you should the dynamic SQL this way:
    SET @sql = N'
    SELECT @Result=COUNT( Id ) FROM  ' + quotename(@TableName) +
    ' WHERE RunRegisterKey=@ID'
    SET @Params = N'@Result int OUTPUT, @ID int'
    EXEC sys.sp_executesql @sql,@Params,@Result = @Result OUT, @ID = @ID
    That is, use quotename for the table name, in case you have a table named
    sys.objects; SHUTDOWN WITH NOWAIT; --
    Furthermore, pass @ID as a parameter rather than concatenating it to the string. It is both easier and safer.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • How do I deactivate when error says I must run in admin mode?

    How do I deactivate when error says I must run in admin mode even though I am already in admin mode?

    CC desktop lists applications as "Up to Date" when they are not
    -http://helpx.adobe.com/creative-cloud/kb/aam-lists-removed-apps-date.html

  • Error ERR-9131 Error in PLSQL function body for item default code, item=P24

    Hi All,
    Am getting the below error in my page 24
    ORA-01403: no data found
    Error ERR-9131 Error in PLSQL function body for item default code, item=P24_REQ_BY_ID
    OK
    I dont know what to do?:(
    Suddenly am getting this error in the page.
    Can anyone help me to understand why this error is coming?
    Thanks & Regards,
    Ramya
    Edited by: 901942 on Jan 29, 2012 10:16 PM

    Data stored in these tables is different. If Oracle says that there's no record that satisfies the WHERE condition, why do you think that it lies? It is too stupid to do that.
    Therefore, you need to handle the exception. There are several ways to do it. Here are some of them.
    The first one is the most obvious - EXCEPTION handling section.
    DECLARE
      default_value VARCHAR2(100);
    BEGIN
      SELECT ISID INTO default_value
        FROM USER_TBL
        WHERE UPPER(ISID) = UPPER(:APP_USER);
      RETURN default_value;
    EXCEPTION
      WHEN NO_DATA_FOUND THEN
        RETURN (null);  -- or whatever you find appropriate
    END;Another one is to use aggregate function (MAX is a good choice) as it won't return NO-DATA-FOUND, but NULL:
    DECLARE
      default_value VARCHAR2(100);
    BEGIN
      SELECT MAX(ISID) INTO default_value
        FROM USER_TBL
        WHERE UPPER(ISID) = UPPER(:APP_USER);
      RETURN default_value;
    END;

  • Parsing error : Element already declared

    Hi
    I am facing problem while using namespace.
    In a prototype, while using xml and dtd I tried to use namespace in using parameter entity. Despite using namespace I am getting error element already declared.
    If I don't use parameter entity then the prototype works.
    In the following prototype, poNmSpace.xml makes use of poNmSpace.dtd which in turn makes use of xhtml.dtd
    I am trying to parse poNameSpace.xml using oracle parser and I am getting following error
    Am I doing something wrong ?
    ** Parsing error, line 19, uri file:/D:/Users/Anup/work/Event/xml/Oracle/sa
    x/paraEntyNmSpace/xml/poNmSpace.dtd
    Element 'title' already declared.
    file:/D:/Users/Anup/work/Event/xml/Oracle/sax/paraEntyNmSpace/xml/poNmSpace
    .dtd<Line 19, Column 16>: XML-0131: (Error) Element 'title' already declare
    d.
    at oracle.xml.parser.v2.XMLError.flushErrorHandler(XMLError.java, C
    ompiled Code)
    at oracle.xml.parser.v2.XMLError.flushErrors(XMLError.java:216)
    at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValida
    tingParser.java:247)
    at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:151)
    at Echo.main(Echo.java:58)
    poNmSpace.xml
    =============
    <?xml version='1.0' encoding='us-ascii'?>
    <!-- A SAMPLE purchase order -->
    <!DOCTYPE purchaseorder SYSTEM "poNmSpace.dtd" [
    <!ENTITY ponumber "1">
    <!ENTITY copyright SYSTEM "copyright.xml">
    ]>
    <!-- SUBSTITUTIONS WORK IN ATTRIBUTES, TOO -->
    <purchaseorder
    author="Anupam Vaval"
    >
    <!-- Makes use of the dynamic entity &ponumber; and &copyright; from other XML file
    copyright.xml -->
    <title nsprefix:a1 = "v1"> This is sample title</title>
    <ref refno="&ponumber;"></ref>
    <message>&copyright;</message>
    <message>purchase order &ponumber; generated</message>
    </purchaseorder>
    poNmSpace.dtd
    =============
    <?xml version='1.0' encoding='us-ascii'?>
    <!--
    DTD for a simple "purchase order".
    -->
    <!-- Defines the %inline; declaration -->
    <!ENTITY % xhtml SYSTEM "xhtml.dtd">
    %xhtml;
    <!ELEMENT purchaseorder (title, ref, message*)>
    <!ATTLIST purchaseorder
    author CDATA "unknown"
    >
    <!ELEMENT title (%inline)*>
    <!ATTLIST title nsprefix:a1 CDATA #IMPLIED>
    <!ELEMENT ref (#PCDATA)>
    <!ATTLIST ref
    refno CDATA #IMPLIED
    >
    <!ELEMENT message (#PCDATA)>
    xhtml.dtd
    =========
    <?xml version='1.0' encoding='us-ascii'?>
    <!--
    This DTD does some of what the W3C is getting ready to do with its
    "XHTML" work (nee "Voyager"). It differs from the current WG draft
    because it uses namespaces correctly (!), and it isn't as complete
    even for HTML 3.2 support (much less 4.0) or, probably, correct.
    Note that what XHTML needs to do is become modular enough that XHTML
    can be used as a mixin with other document types, including either
    "the whole megillah" or just selected modules (e.g. omitting tables).
    That must work both ways ... other things as mixins to XHTML, and
    XHTML as a mixin to other things.
    THIS WILL BE REPLACED WITH A BETTER DTD AT SOME POINT.
    -->
    <!ELEMENT html (head, body)>
    <!ATTLIST html
    xmlns CDATA #FIXED "http://www.example.com/xhtml"
    >
    <!ELEMENT head (title,style*)>
    <!ELEMENT title (#PCDATA)>
    <!ATTLIST title nsprefix:a2 CDATA #IMPLIED>
    <!ELEMENT style (#PCDATA)>
    <!ATTLIST style
    type CDATA #IMPLIED
    >
    <!ENTITY % content "p|h1|h2|h3|h4|h5|h6|ul|ol|table|center">
    <!ENTITY % inline "#PCDATA|em|b|a|img|br">
    <!ELEMENT em (#PCDATA|a|b|img|br)*>
    <!ELEMENT b (#PCDATA|a|em|img|br)*>
    <!ELEMENT a (#PCDATA|b|em|img|br)*>
    <!ATTLIST a
    href CDATA #IMPLIED
    name CDATA #IMPLIED
    >
    <!ELEMENT br EMPTY>
    <!ELEMENT img EMPTY>
    <!ATTLIST img
    alt CDATA #IMPLIED
    border CDATA #IMPLIED
    height CDATA #IMPLIED
    src CDATA #REQUIRED
    width CDATA #IMPLIED
    >
    <!ELEMENT body (%content;)+>
    <!ATTLIST b ody
    bgcolor CDATA #IMPLIED
    >
    <!ELEMENT p (%inline;)*>
    <!ELEMENT h1 (%inline;)*>
    <!ELEMENT h2 (%inline;)*>
    <!ELEMENT h3 (%inline;)*>
    <!ELEMENT h4 (%inline;)*>
    <!ELEMENT h5 (%inline;)*>
    <!ELEMENT h6 (%inline;)*>
    <!ELEMENT ul (li+)>
    <!ELEMENT ol (li+)>
    <!ELEMENT li (%inline;)*>
    <!ELEMENT table (tr+)>
    <!ATTLIST table
    height CDATA #IMPLIED
    width CDATA #IMPLIED
    align (left|center|right) #IMPLIED
    cellspacing CDATA #IMPLIED
    >
    <!ELEMENT tr (td+)>
    <!ATTLIST tr
    align (left|center|right) #IMPLIED
    valign (top|center|bottom|baseline) #IMPLIED
    >
    <!ELEMENT td (%inline;|%content;)*>
    <!ATTLIST td
    height CDATA #IMPLIED
    width CDATA #IMPLIED
    align (left|center|right) #IMPLIED
    valign (top|center|bottom|baseline) #IMPLIED
    rowspan CDATA #IMPLIED
    colspan CDATA #IMPLIED
    >
    <!ELEMENT center (%inline;|%content;)*>

    Rana,
    You'll probably get better answers for BPEL related questions if you post them on the BPEL forum here:
    BPEL

  • I cannot get my new Ipad to be recognised in ITunes  so I can Sync my library... I have re-loaded Itunes 64bit but it still comes up with an error saying that I need to load Itunes 64 bit before this Ipad will cbe recognised... any ideas?

    I cannot get my new Ipad to be recognised in ITunes  so I can Sync my library... I have re-loaded Itunes 64bit but it still comes up with an error saying that I need to load Itunes 64 bit before this Ipad will be recognised... any ideas?
    I just found that I can't Sync my Iphone either and it gave the same error code.... it must be a ITunes problem.
    Message was edited by: stephenfromwandi

    chicx wrote:
    This is the third time of writing this on your Apple Support Communities!
    Not with your current user id.
    Far too much uneccesary information in your post, which only confuses things, a vast amount!
    Let's start with iTunes.
    Have you updated iTunes to 11.1.5, because the previous version did appear to have an issue about seeing iPods?
    With iTunes 11.1.5 installed, look in Edit/Preferences/Devices, (or use the ALT key, followed by the E key and then the F key) and make sure that the box named Prevent iPods, iPhones and iPads from syncing automatically does not have a tick in the box.
    Once you have doen those two things, check to see if the iPod is seen by iTunes.
    chicx wrote:
    By the way, what does IOS mean? (I thought IO stood for operating system, but am flummoxed by the S on the end.
    Really?
    OS stands for Operating System. (In computer speak, IO means Input/Output.)
    iOS originally stood for iPhone Operating System, but it now refers to the iPod Touch and iPhone. The iPod Classic, which you have listed in your profile as your iPod, does not use iOS.
    I assume that you have been listening to the Podcast in your iTunes on the computer as you cannot transfer it to your iPod. It's what I'd do.

  • Error: Expression must not return a multiline value

    Hi all,
    I am doing a file to file scenario. My input file has more than one record. I have to validate for each of these records and send back the erroneous records in a file to the source folder.
    I am using BPM for this. In my BPM, i have some multiline container elements. When i try to activate my BPM, i am getting an error saying: <b>Expression must not return a multiline value.</b>
    Can anybody tell me why this error is coming? Also i want to know what type of mapping i have to do to split my source file.
    Regards,
    Divija.

    "Can anybody tell me why this error is coming? Also i want to know what type of mapping i have to do to split my source file."
    Go through the following blogs which give step-bystep approach for split mapping using BPM:-
    1. /people/sudharshan.aravamudan/blog/2005/12/01/illustration-of-multi-mapping-and-message-split-using-bpm-in-sap-exchange-infrastructure
    2. /people/narendra.jain/blog/2005/12/30/various-multi-mappings-and-optimizing-their-implementation-in-integration-processes-bpm-in-xi
    Also, you might want to look at this, where a BPM is not required..i think you can avoid a BPM altogether if you have very little validation..
    /people/jin.shin/blog/2006/02/07/multi-mapping-without-bpm--yes-it146s-possible
    Regards,
    Sushumna

  • Iturns encounters an error and must close during transfer to ipod

    Ok it's way late for me but I've been messing with this for the past 41/2 hours. I just want my music
    I had my motherboard replaced. Got the computer back and it removed my downloaded songs. Finally figured out how to get approval back after it requested that I upgrade. Now Itunes opens works fine until I try to update my ipod. Then a few moments after it starts the update it says 'Itunes had encountered an error and must close' click ok and the thing closes.
    I have done the following:
    Removed and reinstalled Itunes/Quicktime
    updated Ipod
    Turned off Norton / Asked it to accept itunes
    Used Windows cleanup
    Msconfig
    went to ewido.net/en/ and deleted all the malware
    Installed quick time stand alone
    Restarted computer after each thing i did.
    Any ideas on how to get this to work???

    Hi all,
    Thanks again for the help.
    I moved the usb to the back of the computer but that still did not fix the problem. So I went to use Windows clean up but it did not list itunes. I also went to the add/remove program and asked it to delete itunes but it didn't do much but remove the option and Itunes shortcut was still there and it was still listed in program files. So I went to the actual folder on my c drive and removed it. Emptied waste basket then restarted my computer. I reinstalled Itunes from my original disk figuring I could go back to the later version. Well it still found and installed the latest version. This time It wouldn't open itunes so I reinstalled Quicktime by itself then opened it and then itunes. with both programs opened I hooked up my ipod and it updated!!! I thought I was going to have to give it up.
    I'm so happy it is finally working again.
    Thanks again for all the ideas.
    theresa

  • In 6.0 get error "END_OF_RECORD" must be a character-type data object .....

    Hi All,
    following piece of code was working fine in 4.6 C   but in ECC 6.0 I get the following error:
    "   "END_OF_RECORD" must be a character-type data object (data type C, N,D, T or STRING) .  " 
    I tried type-casting with field symbols but still not able to remove the error.  Cannot convert end_of_record directly to type C as it may hamper the functionality. Plz advice how to remove the error without converting type x to type C
    In the following code :
    DATA:  DELIMITER   TYPE C VALUE   CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB,
            end_of_record             TYPE x.
    SPLIT data_file_i AT delimiter INTO it_ekko-rtype
                                              it_ekko-ebeln
                                              it_ekko-bsart
                                              it_ekko-lifnr
                                              it_ekko-bedat
                                              it_ekko-ekorg
                                              it_ekko-ekgrp
                                              it_ekko-bukrs
                                              it_ekko-zterm
                                              it_ekko-zbd1t
                                              it_ekko-zbd1p
                                              it_ekko-zbd2t
                                              it_ekko-zbd2p
                                              it_ekko-zbd3t
                                              it_ekko-inco1
                                              it_ekko-inco2
                                              it_ekko-waers
                                              it_ekko-wkurs
                                              it_ekko-kufix
                                              it_ekko-verkf
                                              it_ekko-telf1
                                              it_ekko-ihrez
                                              it_ekko-unsez
                                              it_ekko-angnr
                                              it_ekko-ihran
                                              it_ekko-submi
                                              it_ekko-loekz
                                              end_of_record.
    where all these fields except  " end_of_record " are of character type and  "data_file_i " is a character type structure as defined below:
    DATA :
      BEGIN OF data_file_i OCCURS 0,
        record(1000),
      END OF data_file_i,

    Type X is not allowed in Unicode. When a field is declared as Type X with Value u201809u2019 or any other value, it can be resolved by using classes.
    Before Unicode
                      CONSTANTS: c_hex TYPE x VALUE '09'.
    Resolution:
    Itu2019s work for any value of x.
    First a temporary field of Type c should declare. Following class will convert Type x variable into type c.
    Example:
    CONSTANTS: c_hex TYPE x VALUE '09'.
    DATA: LV_TEMP TYPE STRING.
    DATA: LV_TMP TYPE C.
    TRY.
    CALL METHOD CL_ABAP_CONV_IN_CE=>UCCP
    EXPORTING
    UCCP   = c_hex
    RECEIVING
    CHAR   = LV_TMP   .
    CATCH CX_SY_CONVERSION_CODEPAGE.
    CATCH CX_PARAMETER_INVALID_TYPE.
    CATCH CX_SY_CODEPAGE_CONVERTER_INIT.
    ENDTRY.
    CONCATENATE I_OUTPUT-BKTXT I_OUTPUT-BVORG            
    I_OUTPUT-BUDAT I_OUTPUT-MESSAGE INTO
    SEPARATED BY LV_TMP.                      
    I_BUFFER = LV_TEMP.
    CLEAR LV_TEMP.
    CLEAR LV_TMP.
    OR
    Note: It works only for type x value  09.
    CLASS cl_abap_char_utilities DEFINITION LOAD.
    CONSTANTS: c_hex TYPE c VALUE
                             abap_char_utilities=>HORIZONTAL_TAB.

Maybe you are looking for

  • Error:ID=2011;LEVEL=1] InhouseDocReader doSyntaxCheck() offset[239]

    Dear SAP experts, I am getting this error in my File Sender Communication Channel, Error: javax.resource.ResourceException: --- Conversion of synchronous request from module chain ended with errors ---[Error:ID=2011;LEVEL=1] InhouseDocReader doSyntax

  • Can't get USB drive to work in USB port on airport extreme

    I just recently purchased a MacBook Pro and a airport extreme 110/100/1000. My first apple computer. I wanted to use the airport to connect a WD My Book hard drive and my printer so that the Mac and my windows computers would be able to access them.

  • XSQL v0.9.8.6 and demo's

    I've downloaded v0.9.8.6 of the XSQL Servlet. When I attempt to access the demos, I keep getting the following error message: 500 Internal Server Error The servlet named XSQLServlet at the requested URL http://jclevela-lap/demo/helloworld.xsql report

  • InDesign can't load sample plug-in

    Hy, I posted the same question on StackOverflow, so this could seem a bit like cross posting, but I didn't know this forums existed, and I think I can't get a more qualified audiece to view my question here, so here I go: It's my first expirience wit

  • HELP - dead at start ...

    I keep getting the ambivilous error {vayu}/home/oracle/oracle/install/linux> ./runInstaller Initializing Java Virtual Machine from D/bin/jre. Please wait... Error in CreateOUIProcess(): -1 : No such file or directory {vayu}/home/oracle/oracle/install