Query on Data Conversion

Hello All,
We are trying to build a generic tool which could help the conversion process in data migration.
For eg, If the material name in legacy starts with AB (AB6790), the same has to be referred in SAP as SQ6790.
So its replacing initial few characters during the conversion process.
Like this, I am expected to collect possible scenarios and
develop a generic tool, which can cover some possible conversion conditions.
Can you please help me with such scenarios, which you may have come across in project needs.
Thank you.
Meenakshi

The easiest would be to create a mapping table which holds the legacy value and the SAP value
e.g. Legacy AB => SAP SQ
Then you write a function module which accepts the legacy string AB6790 (changing parameter) and based on the mapping table converts it into SQ6790.
You can extend your mapping table with field lengths (e.g. first 4 char or first 5 char) or other conditions which you would need to read and evaluate in your FM. You can get as complex as the requirements ask for.
You also need to think about error handling, what happens if no mapping value can be found, how would it be reported back to the user, etc.
In terms of performance you might want to think about buffering the mapping table .
Hope that helps,
Michael

Similar Messages

  • Most simple query on Event Hub stream (json) constantly gives Data Conversion Errors

    Hello all,
    Been playing with ASA in December and didn't have any issues, my queries kept working and outputted the data as needed.  However, since January, I created a new demo, where I now constantly get Data Conversion errors.  The scenario is described
    below, but I have the following questions:
    Where can I get detailed information on the data conversion errors?  I don't get any point now (not in the operation logs and not in the table storage of my diagnostic storage account)
    What could be wrong in my scenario and could be causing these issues
    The scenario I have implemented is the following:
    My local devices send EventData objects, serialized through Json.Net to an Event Hub with 32 partitions.
    I define my query input as Event Hub Stream and define the data as json/utf8.  I give it the name TelemetryReadings
    Then I write my query as SELECT * FROM TelemetryReadings
    In the output, I create an output on blob with CSV/UTF8 encoding
    After that, I start the job
    The result is an empty blob container (no output written) and tons of data conversion errors in the monitoring graph.  What should I do to get this solved?
    Thanks
    Sam Vanhoutte - CTO Codit - VTS-P BizTalk - Windows Azure Integration: www.integrationcloud.eu

    So, apparently the issue was related to the incoming objects, I had.  I was sending unsupported data types (boolean and Dictionary).  I changed my code to remove these from the json and that worked out well.  There was a change that got deployed
    that (instead of marking the unsupported fields as null, they were throwing an exception).  That's why things worked earlier.
    So, it had to do with the limitation that I mentioned in my earlier comment:
    https://github.com/Azure/azure-content/blob/master/articles/stream-analytics-limitations.md
    Unsupported type conversions result in NULL values
    Any event vales with type conversions not supported in the Data Types section of Azure Stream Analytics Query Language
    Reference will result in a NULL value. In this preview release no error logging is in place for these conversion exceptions.
    I am creating a blog post on this one
    Sam Vanhoutte - CTO Codit - VTS-P BizTalk - Windows Azure Integration: www.integrationcloud.eu

  • Data Conversion Errors for the last week

    We've been running a simple Stream Analytics job for little over a month now with a very light workload. Input is Event hub and output SQL Server. We noticed today that we haven't received anything into SQL Server since 2014-12-08 (we don't receive events
    every day so we only know that everything still worked on the 8th of December), so we checked the job's logs. It seems that job is failing to process all the messages: The value of "Data Conversion Errors" is high.
    I wonder what could have happened? We haven't touched the client since we started the job so it's still sending the messages in same format. And we haven't touched the job's query either.
    Has there been an update to either to Stream Analytics or to Events Hub which could cause the issue we're seeing?

    I've followed word for word the TollApp Instructions (except the thing with NamespaceType "Messaging" that has been added to New-AzureSBNamespace).
    I have 0 line in output, and this is the service log:
    Correlation ID:
    e94f5b9e-d755-4160-b49e-c8225ceced0c
    Error:
    Message:
    After deserialization, 0 rows have been found. Possible reasons could be a missing header or malformed CSV input.
    Message Time:
    2015-01-21 10:35:15Z
    Microsoft.Resources/EventNameV2:
    sharedNode92F920DE-290E-4B4C-861A-F85A4EC01D82.entrystream_0_c76f7247_25b7_4ca6_a3b6_c7bf192ba44a#0.output
    Microsoft.Resources/Operation:
    Information
    Microsoft.Resources/ResourceUri:
    /subscriptions/eb880f80-0028-49db-b956-464f8439270f/resourceGroups/StreamAnalytics-Default-West-Europe/providers/Microsoft.StreamAnalytics/streamingjobs/TollData
    Type:
    CsvParserError
    Then I stopped the job, and connected to the event hub with a console app and received that:
    Message received. Partition: '11', Data: 'TollId,EntryTime,LicensePlate,State,Make,Model,VehicleType,VehicleWeight,Toll,Tag
    85,21/01/2015 10:24:56,QBQ 1188,OR,Toyota,4x4,1,0,4,361203677
    Message received. Partition: '11', Data: 'TollId,EntryTime,LicensePlate,State,Make,Model,VehicleType,VehicleWeight,Toll,Tag
    33,21/01/2015 10:25:42,BSE 3166,PA,Toyota,Rav4,1,0,6,603558073
    Message received. Partition: '11', Data: 'TollId,EntryTime,LiMessage received. Partition: '10', Data: 'TollId,EntryTime,LicensePlate,State,Make,Model,VehicleType,VehicleWeight,Toll,Tag
    59,21/01/2015 10:23:59,AXD 1469,CA,Toyota,Camry,1,0,6,150568526
    Message received. Partition: '10', Data: 'TollId,EntryTime,LicensePlate,State,Make,Model,VehicleType,VehicleWeight,Toll,Tag
    25,21/01/2015 10:24:17,OLW 6671,NJ,Honda,Civic,1,0,5,729503344
    Message received. Partition: '10', Data: 'TollId,EntryTime,LicensePlate,State,Make,Model,VehicleType,VehicleWeight,Toll,Tag
    51,21/01/2015 10:24:23,LTV 6699,CA,Honda,CRV,1,0,5,169341662
    Note the bug on the 3rd message. In my opinion it's unrelated, it could be the writeline that can't keep up with the stream in the console application. And at worst it's in the stream, but then I should see at least some lines in output for the correctly
    formatted messages.

  • Data Conversion issue

    Hello I'm new to Oracle DB and still learn SQL.
    I have a problem with data conversion in a CASE expression.
    Example:
    select ... ,     
    CASE column WHEN 1 THEN
    select max(column)
    from table
    where ...
    ELSE 0 END AS value,
    from     ...
    where ...
    order by ...
    What I'm basically intend to do is to select a value from another table depending on the value of
    a special column.
    The problem now is that the
    select max(column)
    from table
    where ...
    statement in its original form selects the right value as float (e.g. 0.24)which I need.
    But the same statement embedded in the CASE expression returns (e.g. 0 ) which seems to be the same result converted to an integer or something.
    I tried to convert the result in the CASE expression but without success.
    Does anybody know what could cause this behavior and how to fix it ?
    Thanks for any help with this.

    Welcome to the forum!
    Whenever you have a problem, post a complete script that people can run to re-create the problem. Include CREATE TABLE and INSERT statements for a little sample data if necessary. (A lot of folks show the problem using commonly available tables, such as those in the scott or hr schemas, so they don't have to post any sample data.)
    if your problem involves an error message, post the complete error message you're getting, including line numbers.
    Always say which version of Oracle you're using, e.g. 10.2.0.1.0.
    Sorry, I can't re-create the problem.
    I did something as similar as I could to what you posted:
    SELECT       deptno
    ,       CASE deptno
              WHEN  10
              THEN  (
                   SELECT  MAX (sal)
                   FROM     scott.emp
                   WHERE     deptno     = d.deptno
              ELSE  0
           END          AS value
    ,       dname
    FROM       scott.dept     d
    WHERE       deptno     <= 30
    ORDER BY  deptno
    ;And it ran, producing this output:
    `   DEPTNO      VALUE DNAME
            10       5000 ACCOUNTING
            20          0 RESEARCH
            30          0 SALES
    886562 wrote:Hello I'm new to Oracle DB and still learn SQL.I've been using Oracle for 20 years, and still learn SQL.
    select ... ,     
    CASE column WHEN 1 THEN
    select max(column)
    from table
    where ...
    ELSE 0 END AS value,
    The problem now is that the
    select max(column)
    from table
    where ...
    statement in its original form selects the right value as float (e.g. 0.24)which I need.
    But the same statement embedded in the CASE expression returns (e.g. 0 ) which seems to be the same result converted to an integer or something.Are you sure that 0 is being returned by the sub-query in the THEN clause, and not by the ELSE clause?
    I tried to convert the result in the CASE expression but without success.What did you try? Post your code.
    What problem did you have? Post the error message.
    Edited by: Frank Kulash on Sep 21, 2011 6:15 AM

  • Execute SQL Task - UPDATE or Data Flow Data Conversion

    Good Morning folks,
    I want to know which is more fast to convert data type.
    I want to convert nvarchar(255) to datetime2,
    using t-sql (execute sql task)
    UPDATE TBL
    SET  FIELD1= CAST(FIELD1AS DATETIME2)
    GO
    or data conversion(data flow)
    Thank..

    Itz Shailesh, my t-sql have only UPDATE, not many UPDATES... so it's one batch, no 2,3,4... So.. it's Only one update.. ex: update table set field1 = cast(field1 as datetime2), field2 = cast(field2 as datetime2). not : update table set field = cast(field
    as datetime2) go    update table set field2 = cast(field2 as datetime2) go.... understand?
    Yeah, I understand that you have to update just 1 field. What I am saying, if you have to update millions of rows then you must update rows in batches ( lets say batch of 50k). This way you will only touch 50k rows at a time and not all rows from table.
    I see that your rows are less however I would still prefer the option of data conversion transformation over update statement.
    If this post answers your query, please click "Mark As Answer" or "Vote as Helpful".

  • How to do Data Conversion SSAS ?

    I have fact table and a dimension table where the fields which I want to connect are of different data types i.e integer and string, So I need a help on data conversion how it is done in ssas .

    Hello,
    In DSV you can change the linked table into a "named query" and then you can do the data type conversion there, like
    SELECT CONVERT(varchar(20), MyIntColumn) AS MyCharColumn
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • Syntax for querying between dates with ADO

    Hello,
    I am connecting to Oracle tables using ADO in Microsoft Access. I am not familiar with Oracle Sql. I am trying to execute the following query string but am not retrieving and records:
    strSql = "SELECT COUNT(*) " _
    & "FROM CCC2.CASE_EPRP WHERE CALL_DATE >= '1/1/2002' " _
    & "AND CALL_DATE <= '2/1/2002'"
    I can retrieve a record count if I only have the first date, but if I use the date range above the query returns zero records even though there are records for that date range. Could someone explain the correct way to write this query?
    Thanks,
    Rich

    You really don't want to rely on implicit string to date conversion ever. Oracle will use your NLS date settings to do the conversion, but different users (and different databases) may have this set differently, so one user might have '2/1/2002' convert to February 1, 2002 while another user might have it convert to January 2, 2002. A third user might not be able to convert the string at all.
    The proper way to do this is to use either Oracle syntax
    "where call_date >= to_date( '1/1/2002', 'MM/DD/YYYY' )
    and call_date <= to_date( '2/1/2002', 'MM/DD/YYYY' )"
    or to use the ODBC date escape sequence, {d }, to create the dates.
    If this isn't the problem, there may be issues because Oracle dates have a time component. If you don't specify a time, Oracle will default to midnight, so any call_date records after 12:00am on 2/1/2002 won't be found.
    Justin

  • Data Conversion or Sql Command

    We are importing mdb data to SQL Server and require data type casting. Which is better to use and gives better performance?
    - Data Conversion
    - SQL Command (with casting)
    Thanks,
    Darren

    Using the sql cast will give you a performance benefit over using the data conversion transformation.  We should probably shelve the transformation unless if we are in a situation where we can’t return the data with the type we would like for the destination
    (ex. flat files or stored procedures).
    Check this short and sweet article :
    here
    If this post answers your query, please click "Mark As Answer" or "Vote as Helpful".

  • Ssis - data conversion

    i am getting error in data flow task as below, how to fix it.
     Error: Column "A12" cannot convert between unicode and non-unicode string data types.

    Hi,
    Did you try using a data conversion task??
    check :
    http://www.mssqltips.com/sqlservertip/1393/import-excel-unicode-data-with-sql-server-integration-services/
    http://www.mssqltips.com/sqlservertip/3046/sql-server-integration-services-data-type-conversion-testing/
    Thanks,
    Jay
    <If the post was helpful mark as 'Helpful' and if the post answered your query, mark as 'Answered'>

  • Executing xml sql using jdbc adapter for date conversion

    Hi experts,
    I am following the fllowing blog for date format conversion for a jdbc receiver.
    /people/alessandro.berta/blog/2005/10/04/datetime-datatypes-and-oracle-database
    I constructed my graphical mapping to generate the following query
    DateField in receiver structure = TO_DATE('2008-03-24','DD-MON-YY')
    attribute hasQuot = No
    The result that i want is 24-MAR-08
    I am getting the error in communication channel monitoring as does not match string format.
    The database gets successfully updated without this date conversion. But when i try to use this, it give the above error.
    Is there any other configuration to be done to make the adapter execute this statement?
    Regards,
    Shamly

    The issue is solved.
    The SQL statement was wrong.
    The correct version is,( as was specified in the blog ) :-
    DateField in receiver structure = TO_DATE('2008-03-24','YYYY-MM-DD')
    Automatically in the database it is converted to 24-MAR-2008
    Edited by: Shamly MM on Mar 27, 2008 8:01 AM

  • GL Data Conversion from Legacy to Oracle EBS

    Hi All,
    I am tasked with converting legacy data into GL. I have worked on other conversions like supplier, AR and AP conversions but never worked on GL conversion, so I don't know how and where to start, what are the pre-requisites for entering data into gl_interface table how to ensure that data is correct in the .csv file etc.
    Kindly request you all to guide me in right direction. Hope to hear from you all very soon!!! :)
    Regards

    Hi,
    When you talk about GL-Data it is the trial balance to be loaded from legacy to oracle applications.
    You can use Web-ADI to upload it ,the check list are
    The balance for each account comibnation in the legacy system to be mapped to GL-Oracle code combination balance
    With respect to open AR, AP Invoices if the invoices are converted using a control account for migration in GL then
    the the balance transfered from AP,AR need not be reversed in GL from the source receivables and payables.
    In case if the same account combination are for migrating the balances from AP,AR to GL ..Then the balances transferred from AP,AR should be reversed ..so that it does not affect the TB-GL-Balance
    Finally ensure that the balance for the TB-tallys with your legacy system and upload it using Web-ADI ,import and
    review and post it.
    Hope this points helps your GL-Data conversion.
    Regards,
    Ramaa

  • Data conversion strategy for new SOB

    Dear Viewers
    on 11.5.10
    We are creating a new SOB with a change in currency from Feb-11 as this is the requirement
    For the same, we need to do data conversion.
    I have a confusion for Purchase Orders and Sales Orders
    Purchase Orders:
    Open purchase orders will be converted, means the unfulfilled PO`s i.e the ones not received and are fully open.
    The PO`s which have been recieved but not delivered, Requested the users to clear the intransit receipts.
    The PO's which are partially received, what to be done for them?
    If a PO is fully received and Delivered will not me converted to the new SOB as its not an open PO
    but If invoice comes after Feb-11, than how the matching will be done?
    What if a return has to be made moving forward in FEB-11 under new SOB
    Sales Orders:
    Open sales orders will be converted, that is the ones that have been entered and not yet booked.
    Users have been requested to clear off the Sales order lines which are already pick confirmed but not yet shipped, hence they will be shipped and interfaced to AR
    For the Sales orders that have been booked, those lines that are not yet processed further will also be converted.
    Now what if a receipt comes after feb 11, how to handle this as the sales order wiould not have been converted?
    Please give your advise on the data migration strategy for PO`s and SO's.
    Please do add any point that may have been missed by me
    Appreciate your help
    Thanks
    Emm

    Hi David,
    for master data conversion you can use LSMW and the RE-FX BAPIs. (please refer to SAP note  [782947|https://service.sap.com/sap/support/notes/782947] ).
    Regards, Franz

  • Data conversion for new sob

    Dear Viewers
    on 11.5.10
    We are creating a new SOB with a change in currency from Feb-11 as this is the requirement
    For the same, we need to do data conversion.
    I have a confusion for Purchase Orders and Sales Orders
    Purchase Orders:
    Open purchase orders will be converted, means the unfulfilled PO`s i.e the ones not received and are fully open.
    The PO`s which have been recieved but not delivered, Requested the users to clear the intransit receipts.
    The PO's which are partially received, what to be done for them?
    If a PO is fully received and Delivered will not me converted to the new SOB as its not an open PO
    but If invoice comes after Feb-11, than how the matching will be done?
    What if a return has to be made moving forward in FEB-11 under new SOB
    Sales Orders:
    Open sales orders will be converted, that is the ones that have been entered and not yet booked.
    Users have been requested to clear off the Sales order lines which are already pick confirmed but not yet shipped, hence they will be shipped and interfaced to AR
    For the Sales orders that have been booked, those lines that are not yet processed further will also be converted.
    Now what if a receipt comes after feb 11, how to handle this as the sales order wiould not have been converted?
    Please give your advise on the data migration strategy for PO`s and SO's.
    Please do add any point that may have been missed by me
    Appreciate your help
    Thanks
    Emm

    emm wrote:
    Purchase Orders:
    Open purchase orders will be converted, means the unfulfilled PO`s i.e the ones not received and are fully open.
    The PO`s which have been recieved but not delivered, Requested the users to clear the intransit receipts.
    The PO's which are partially received, what to be done for them?
    If a PO is fully received and Delivered will not me converted to the new SOB as its not an open PO
    but If invoice comes after Feb-11, than how the matching will be done? <br>Business needs to take a decision whether they are fine with matching the POs manually (i.e. referring the documents and verify), in this case you may capture the PO information in a DFF in the Invoice distribution. Otherwise if it has to be converted identifying the POs under this scenario, you may consider converting those maintaining receipt close tolerance as 100% and matching type as 2 -way (again business approval needed to handle audit issues) in order to avoid the receipts/delivery conversion etc.<br>
    What if a return has to be made moving forward in FEB-11 under new SOB<br>Ideally returns can be done using Miscellaneous/Account Alias Issues specifying the appropriate transaction reasons to clarify the scenario.<br>

  • How to compare result from sql query with data writen in html input tag?

    how to compare result
    from sql query with data
    writen in html input tag?
    I need to compare
    user and password in html form
    with all user and password in database
    how to do this?
    or put the resulr from sql query
    in array
    please help me?

    Hi dejani
    first get the user name and password enter by the user
    using
    String sUsername=request.getParameter("name of the textfield");
    String sPassword=request.getParameter("name of the textfield");
    after executeQuery() statement
    int exist=0;
    while(rs.next())
    String sUserId= rs.getString("username");
    String sPass_wd= rs.getString("password");
    if(sUserId.equals(sUsername) && sPass_wd.equals(sPassword))
    exist=1;
    if(exist==1)
    out.println("user exist");
    else
    out.println("not exist");

  • How can I do for a row of a query be data provider for a variable?

    Hi friends, I have a problem !
    How can I do for a row of a query be data provider for a variable?
    I need that a value of variable be stored when the user select a row in a query. At the BPS we can do this configuring the variable selector in WIB, and in a WAB how I can do this ?
    Best regards,
    Gustavo Liberado

    In this case when I press the key to call other forms I need to wait for the response in the secondary form and then process the result.That is exactly what a "modal JDialog" (or JOptionPane) are used for.
    Try it. Create a short demo program. All you need is a JFrame with a single button to show the modal dialog. All you modal dialog needs is a single button to close the dialog. After you show the modal dialog add a System.out.println(...) statement in your code and you will see that it is not executed until the dialog is closed.
    Then once you understand the basics you add the code to your real program.
    If you need further help then you need to create a [Short, Self Contained, Compilable and Executable, Example Program (SSCCE)|http://homepage1.nifty.com/algafield/sscce.html], that demonstrates the incorrect behaviour.
    Don't forget to use the Code Formatting Tags so the posted code retains its original formatting. That is done by selecting the code and then clicking on the "Code" button above the question input area.

Maybe you are looking for