IDoc string field to JDBC date field - Not working

Hello everyone,
Once again I must ask you something that is keeping me..
I had a interface type RFC ASync to JDBC SQL Server, it was working fine. Then, I was asked to change to a type iDoc ASync to JDBC SQL Server.
At first, it was not a problem, just manual work. But them, I am getting an error.
In the RFC, I had a date field, that was directly related to the date field on the JDBC destination, so the mapping was pretty much straight forward. The SQL INSERT command was working fine on this cenario.
Now, in iDoc, this field was automatically converted to a string, and somehow, PI is not understanding that string has to be mapped to a date field in the JDBC.
Is there any 'workaround' for me to do this?
Thanks!
Ricardo Sancio Lóra
Brazil

The issue here is that somehow, the same SQL insert command that was working, does not work anymore.
This is the SQL command took from RWB log monitor:
INSERT INTO  aniversariantes_sap (matricula, nome, nascimento, unidade) VALUES (00000070, 'Ricardo Lora', '19851216', 00000000)
If I run this query on my DB it works.
But, in PI, it's not, here is the error:
Could not execute statement for table/stored proc. "aniversariantes_sap" (structure "ANIVERSARIANTES_SAP") due to com.microsoft.sqlserver.jdbc.SQLServerException: Syntax error converting datetime from character string.
I´ve tried cast() and convert() using mapping 'habilities', but also, does not work. Work if I run in the DB, but not if PI runs it.
Wierd..
Ricardo

Similar Messages

  • Conversion from string "20041023 " to type 'Date' is not valid.

    Hi ,
       I have a table with one of the column(EmpHiredate) datatype is char(10). It has value like "20141023". I need to display this value as date format(dd/mm/yyyy) in report. 
    Following methods i tried in textbox expression but no luck.
    =Format(Fields!EmpHireDate.Value,"dd/MM/yyyy")
    =Cdate(Fields!EmpHireDate.Value)
    Error:
    [rsRuntimeErrorInExpression] The Value expression for the textrun ‘EmpHireDate.Paragraphs[0].TextRuns[0]’ contains an error: Conversion from string "20041023  " to type 'Date' is not valid.
    Is it possible to convert string to date using SSRS textbox expression ? Can anyone help me with the solution.
    Thanks,
    Kittu

    Hi Jmcmullen,
         Found one more issue on the same. I have one value like "00000000" for the column(EmpHiredate)
    , when i use above expression values(ex:"20141023")
    are displaying in dd/MM/yyyy format in report except value like "00000000" and giving following error:
    [rsRuntimeErrorInExpression] The Value expression for the textrun ‘EmpHireDate.Paragraphs[0].TextRuns[0]’ contains an error: Conversion from string "0000/00/00" to type 'Date' is not valid.
    Even i tried to pass its original value("00000000") as below but no luck.
    =IIF(Fields!EmpHireDate.Value = "00000000","00000000",Format(CDATE(MID(Fields!EmpHireDate.Value,1,4) + "/" + MID(Fields!EmpHireDate.Value,5,2) + "/" + MID(Fields!EmpHireDate.Value,7,2)),"dd/MM/yyyy"))
    Also tried this:
    =IIF(Fields!EmpHireDate.Value = "00000000","2000/10/21",Format(CDATE(MID(Fields!EmpHireDate.Value,1,4) + "/" + MID(Fields!EmpHireDate.Value,5,2) + "/" + MID(Fields!EmpHireDate.Value,7,2)),"dd/MM/yyyy"))
    Please Suggest. 
    Thanks ,
    Kittu

  • Javascript Date() function not working

    Hi,
    I'm experiencing some problems with the Date() function in javascript. The problem is that the function doesn't seem to work. For example when I do "var date = new Date(); xfa.host.messageBox(date);" in the enter event of a date field, I get "Date is not a function" error message in de javascript debugger.
    Is there anyone out there who knows how why the Date function is not working in LiveCycle Designer. Am I using the Date function in an improper way or maybe I am using the wrong function?
    Please can anyone help me out?

    Hi Paul,
    Thanx for you reply. It worked fine.
    I also found out that following works as well:
    var MyDate = util.scand("dd-mm-yyyy",new Date());
    console.println("this date: "+util.printd("dd-mm-yyyy", MyDate));

  • Update using date picker not working?

    Hello,
    This might be simple for a lot of people here but I can't get it going...
    The problem is that, I have a tabular form with 1 text field and 1 date field. I am using a PL/SQL anonymous block transaction to insert/update a view based on the field values. Insert is fine but update on the date field is not working - but no errors. The date field is a date picker('DD-MON-YYYY') column. Kindly help check the problem. Thank you.
    Below are some codes that might be helpful
    -- update statement in the block
    update  del_ignore_conchold_v
    set     conc_prog_name = apex_application.g_f03(v_row)
           ,remove_entry_date = apex_application.g_f04(v_row)
    where   row_id = apex_application.g_f02(v_row);
    -- update trigger on the view
    CREATE OR REPLACE TRIGGER APPS_TEST.del_ignore_conchold_v_upd_tr
       instead of update
       ON APPS_TEST.DEL_IGNORE_CONCHOLD_V referencing new as new old as old
       for each row
    begin
       update apps.del_ignore_conchold_tbl@PROD
          set conc_prog_name = :new.conc_prog_name,
              remove_entry_date = :new.remove_entry_date
        where conc_prog_name = :old.conc_prog_name
        and   remove_entry_date = :old.remove_entry_date;
    end;Thanks,
    Rownald

    Hello,
    The output for g_f03(v_row) and g_f04(v_row) appear to be fine. g_f03 only has the actual text and g_f04 has the date(from date picker field) with format like 22-OCT-2009. Below is an excerpt of the code & debug log - might be of help.
    Thanks as always.
            if apex_application.g_f02(v_row) is not null then
                wwv_flow.debug('MY PROCESS: g_f02 ' || apex_application.g_f02(v_row));
                wwv_flow.debug('MY PROCESS: g_f03 ' || apex_application.g_f03(v_row));
                wwv_flow.debug('MY PROCESS: g_f04 ' || apex_application.g_f04(v_row));
                -- update stmt
                update  del_ignore_conchold_v
                set     conc_prog_name = apex_application.g_f03(v_row)
                       ,remove_entry_date = apex_application.g_f04(v_row)
                where   row_id = apex_application.g_f02(v_row);
                wwv_flow.debug('MY PROCESS: g_f03 ' || apex_application.g_f03(v_row));
                wwv_flow.debug('MY PROCESS: g_f04 ' || apex_application.g_f04(v_row));
    -- debug log --
    0.09: ...Do not run process "AddRows", process point=AFTER_SUBMIT, condition type=, when button pressed=ADD
    0.09: ...Process "Save_Transaction": PLSQL (AFTER_SUBMIT) declare v_row binary_integer; begin for i in 1..apex_application.g_f01.count loop v_row := apex_application.g_f01(i); if apex_application.g_f02(v_row) is not null then wwv_flow.debug('MY PROCESS: g_f02 ' || apex_appli
    0.09: MY PROCESS: g_f02 AAE2DlAHKAAAA0qAAB
    0.10: MY PROCESS: g_f03 Delete data from temporary table
    0.10: MY PROCESS: g_f04 22-OCT-2009
    0.11: MY PROCESS: g_f03 Delete data from temporary table
    0.11: MY PROCESS: g_f04 22-OCT-2009
    0.15: ...Process "Reset Pagination": RESET_PAGINATION (AFTER_SUBMIT) reset_pagination
    0.15: Branch point: AFTER_PROCESSINGRownald

  • DOCUMENT SETTING that ALLOW FUTURE POSTING DATE does not work in PL34

    Hi Expert,
    I am now using SAP B1 2005B (7.40.252) sp:00 pl:34 and realised that the ALLOW Future Posting Date was not working. 
    I still can remember while I was using pl:11 at B1 2005A, there is no such problem and wish to know when can the bug fix up? in which sp/pl?
    Wish to hear goods news ASAP .
    Thank you.
    Joan.

    Basically can you please clarrify your requirement as to what you want to change ..what I understand you would need to change the code for ABAP - RFEBBE00
    Value Date code in the above abap
            IF PAR_VALD = 'X'.
              MOVE C2-VALDT TO HLP_VALDT.  "  VALUE DATE
             write hlp_valdt to umsatz-budat dd/mm/yy.
            ELSE.
              MOVE C8-BALDT TO HLP_BALDT.
              MOVE HLP_BALDT TO HLP_VALDT.
            write hlp_valdt to umsatz-budat dd/mm/yy.
            ENDIF.
               MOVE HLP_VALDT(2) TO UMSATZ-BUDAT.
               MOVE HLP_VALDT2(2) TO UMSATZ-BUDAT3.
               MOVE HLP_VALDT4(2) TO UMSATZ-BUDAT6.
    Regards
    Anurag
    Message was edited by: Anurag Bankley

  • The Restriction option to NOT ALLOW CHANGES to Mobile or Cellular data does not work why is this ?

    The Restriction option to NOT ALLOW CHANGES to Mobile or Cellular data does not work why is this ?

    Hi there,
    You may want to try force closing all open apps and resetting the device as an initial troubleshooting step. Take a look at the articles below for more information.
    iOS: Force an app to close
    http://support.apple.com/kb/ht5137
    Turn your iOS device off and on (restart) and reset
    http://support.apple.com/kb/ht1430
    Additionally, you may want to try completely disabling and re-enabling restrictions.
    -Griff W.

  • Umm I just got this iPhone 5 and cellular data is not working, can't access apps, heck can't even download any and Safari...ummm yeah not happening.  I'm with Sprint if that makes any difference.

    Umm I just got this iPhone 5 and cellular data is not working, can't access apps, heck can't even download any and Safari...ummm yeah not happening.  I'm with Sprint if that makes any difference.

    Are you in an area where there is no coverage?
    You can try a reset, hold down the home/sleep button together until you see the apple logo and then release, then wait for the phone to boot back up.
    If that doesn't help, then yOu'll need to contact Sprint again.

  • HT1976 my cellular data is not working , how do i fix it

    my cellular data is not working
    when i turn it on it doesnt show
    but ym wirless network works
    i need help.
    thanks

    My cellular data stopped working when i update my iphone 5c to ios7.1 any help please

  • Idoc- File scenario: Read a data field in IDOC and name the file with it

    Hi All,
    I am configuring an IDOC to File scenario.
    I have a requirement where I need to read one of the IDOC data field and use that as the name of the File.
    E.g: If the IDOC data field-1 = '123456', then I need to name the output file as '123456'.
    Is it possible to do this. Appreciate your help on same.
    Thanks
    Shirin

    Try this code..
    desired field from IDoc will be input parameter to UDF
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    conf.put(key,a);  // a is input parameter
    String ourSourceFileName = conf.get(key);
    return  ourSourceFileName; 
    Also, check Adapter specific message attributes in file adapter, check  filename

  • Newly added field in the data Source not getting populated

    Hello All,
    We have added few fields in the Data Source. The Data Source is based on the InfoSet. We have included the field in the Infoset and have updated the code to fetch the value for the newly added fields.
    When we perform the test extraction for this Data Source in RSA3, the newly added fields are not getting populdated with the value. In the system generated query's selection list, the newly added fields are not selected.
    Please let mw know how to get the newly added field selected in the system generated query of the infoset.
    Regards,
    -Purnima

    Hi,
    As you said you have added the filed in Info Set. Have you included the same in data source? try if not.
    If you are trying to create a query in source system to check the data. I guess in R/3 (ECC) then you have to include the new field in slection critera (ther is an option available on top menu).
    I would suggest before creating any query go to RSO2 select the data source. Display the field structure and check if the filed is there or not. You maysee Infoset level data directly by data display from top menu. Try that optionas well to check.
    I hope it will help.
    THanks,
    S

  • In "add a field" the word Date is not high lighted and I can't add anything to it.  How do I get this to open?

    I have an iMac desktop and I can't get the word "Date" to open in my iCal.  It is not highlighted.  How do I get this to open?

    An event can only have one date. There is already a date field. Why do you want another date field, perhaps we can find another way?

  • Date Field Calendar Select F4 - F2 Not Working

    Gosh this really seems like a simple question, but I can't seem to find an answer to it.
    I am sure somebody has run into this before:
    When populating a date field, you should be able to highlight the field, hit F4 to pull up the calendar and F2 will then populate the field with the current date.
    The problem is, F2 is only highlighting the current date; not entering it into the field.
    This creates an extra step for order entry.
    Has anyone had this problem before and know a way to resolve it?

    Dear
    I think your best bet is to check for SAP notes on this topic.
    For example note:
    Note 94052 - Equipment master: F2 key does not work
    Example of solution of this note (but probably applicable for other issues as well)
    Enhance interface status to activate the F2 key. You receive its name via menu option System -> Status. Then change the status for program 'SAPMIEQ0' using Transaction SE41 as follows:
    In the 'Recommended function key settings' section enter 'OA' for the F2 key in the first column and 'Display object' in the second column.
    Kind regards
    Tom

  • Displaying "N/A" in report fields where Number data is not valid using a formatting formula

    Post Author: Horizon57
    CA Forum: General
    I have many reports which are populated by "Number" data. However, there are certain charts and tables where the number data is not appropriate and the summation of such data does not add value to the report. In these instances I would like to display "N/A", however the formula I am using keeps giving me an error that I need to use a "Number" data type. Please note this is a formatting formula.
    Formatting Formula
    DO{TREND.EPTP1} = 'N/A' AND{TREND.EPTP2} = 'N/A' AND{@Trend %}    = 'N/A'  WHILE {TREND.POS2} = 'TOTAL';
    Can anyone assist me with displaying "N/A"?

    Post Author: V361
    CA Forum: General
    Try this
    DOtotext ( {TREND.EPTP1} ) = 'N/A' ANDtotext ( {TREND.EPTP2} ) = 'N/A' ANDtotext ( {@Trend %} )    = 'N/A'  WHILE {TREND.POS2} = 'TOTAL'; 

  • Additional Fields for ESS-Business Card Not Working for Certain Countries

    Dear Experts,
    We were trying to configure the additional fields to be displayed in Business Card - Overview Screen for all countries. We don't have problem configure and get the new fields display for Malaysia (Molga = 14) but having problem for the field to display for Hong Kong (Molga = 27) and Singapore (Molga - 25).
    The strange thing is I am following the same steps as I configured for Malaysia. Somehow it is not working for Hong Kong and Singapore. As I understand, there is only 1 place to configure in SPRO for this requirement:
    Personnel Management -> Employee Self-Service -> Service-Specific Settings -> Own Data -> Customizing of Personal Information Screens -> Determine Fields for Business Card on Overview Screen
    Please help!

    Hi Siddhart,
    Thank you for the information. We are currently in EhP3 with below Support Components installed.
    Software Component: SAP_HR
    Release: 600
    Level: 60
    Highest Support Package: SAPKE60060
    Software Component: EA-HR
    Release: 603
    Level: 34
    Highest Support Package: SAPK-60334INEAHR
    The note 1159911 provided is within SAPK-60304INEAHR. Thus, I don't think this is the root cause of this inconsistency base on the Highest Support Package installed in our system.
    Anymore hint? Anyone? Please...

  • Using a parmater field for a Date field using the "in the period" selection

    Users would like to fetch records using the "in the period" record selection. They would like to be prompted on the period to run the report. ie
    MonthToDate
    YearToDate
    Last7Days
    Last4WeeksToSun
    LastFullWeek
    LastFullMonth
    AllDatesToToday
    etc...
    I've created a parameter with a dropdown list of values. However the parmeter field I created isn't available as a value in the date field in the "Select Record Expert" function.
    Is there a work around?

    Ron,
    Unfortunately you still have a little bit more work to do... but not much.
    You need to add a formula to your selection criteria. Something along these lines:
    IF {?DateRange} = "MonthToDate" THEN {TableName.DateField} in MonthToDate ELSE
    IF {?DateRange} = "YearToDate" THEN {TableName.DateField} in YearToDate ELSE
    IF {?DateRange} = "Last7Days" THEN {TableName.DateField} in Last7Days ELSE
    IF {?DateRange} = "Last4WeeksToSun" THEN {TableName.DateField} in Last4WeeksToSun ELSE
    IF {?DateRange} = "LastFullWeek" THEN {TableName.DateField} in LastFullWeek ELSE
    IF {?DateRange} = "LastFullMonth" THEN {TableName.DateField} in LastFullMonth ELSE
    IF {?DateRange} = "AllDatesToToday" THEN {TableName.DateField} in AllDatesToToday
    On the plus side, you'll be able to go back into your parameter and add some spaces to list options... which will look better for the end users.
    HTH,
    Jason

Maybe you are looking for

  • LOGS PROVIDER HAS STOPPED ,WHAT DO I DO TO FIX PROBLEM?

    GALAXY S4  -"LOGS PROVIDER HAS STOPPED .HOW DO I FIX PROBLEM?

  • What is the OEM telling me?

    I am trying to figure out how to properly read OEM's Performance graph. During a point of high activity on my database, users complained of having very slow query times and some unresponsiveness from our application. OEM shows high levels of Network,

  • "retrieve disk item references" error

    using the "save PDF to folder as jpg" option below the printer>pdf button , I get a "retrieve disk item references" error, but save PDF to folder as tiff is still working. What is going wrong ??

  • How to enable STAT transaction

    Hi, I want to find what transactions a particular user was running for a given period, for that I need to enable transaction "STAT". What are the steps that I need to follow to enable STAT transaction. Is there any pre-requisite? Thanks in advance. M

  • CS5 and Lightroom 4-different camera raw versions

    Lightroom 4 has a camer raw version 7 and my CS5 has 6.7? Trying to figure out the easiest way to get them both to be 6.6 which appears to be the latest versions and I have no idea how I got the versions I have. When converting from lightroom to CS5