on 07-01-2011 10:58 PM
Hi All,
I am using SAP MII 12.
I have a strange problem. I am extracting Data from SAP (RFC) and trying to write to SQL Server.
Since SAP Returns Date and Time Seperately i am using the datetoxmlformat function. The usage of this i found in one of the sample SAP MII BLS transactions. Below is the usage
Function:
datetoxmlformat(Repeater_ForEveryActivityInGroup.Output{/item/CREATED_DT}& " " & Repeater_ForEveryActivityInGroup.Output{/item/CREATED_TM}, "yyyy-MM-dd HH:mm:ss")
When I evaluate this (in the Designer or when execute the BLS) i get the error :
[ERROR]: STEP EXCEPTION (Sequence_2) : Expression Evaluation error: Invalid date format of parameters in: datetoxmlformat.
But when i replace
Repeater_ForEveryActivityInGroup.Output{/item/CREATED_DT}& " " & Repeater_ForEveryActivityInGroup.Output{/item/CREATED_TM}
with a static date like "2008-09-09 06:01:01" in the expression editor as below
datetoxmlformat( "2008-09-09 06:01:01", "yyyy-MM-dd HH:mm:ss" )
MII returns : 2008-09-09T06:01:01 (which is the result expected).
Can you please help me find out what is the issue and why i keep getting the error ?:
Invalid date format of parameters in: datetoxmlformat
Help is greatly appriciated.
Regards
Suraj
Edited by: Suraj Prabhu on Jul 1, 2011 11:59 PM
Hi,
what is the output of
(Repeater_ForEveryActivityInGroup.Output{/item/CREATED_DT} & " " & Repeater_ForEveryActivityInGroup.Output{/item/CREATED_TM}
Regards,
Musarrat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Musarrat & Manoj.
You guided me in the right direction. I was able to identify 2 issues and resolve the problem
1. While I was testing the RFC from the UI using my User ID, the Batch / Communication User used by MII was not returning the same date format.
2. I also found that the once the security issue was resolved, one of the filed was not a Date + time string but was a SAP Time stamp which MII was not able to decipher.
I have not found the root cause and should be able to fix the problem.
Thanks again.
Suraj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Suraj,
As Musarat suggested first check your expression
(epeater_ForEveryActivityInGroup.Output{/item/CREATED_DT}& " " & Repeater_ForEveryActivityInGroup.Output{/item/CREATED_TM} )alue
Following is example.
suppose your expression is giving "2011-07-04 00:00:00" than use following code
datetoxmlformat("2011-07-04 00:00:00", "yyyy-MM-dd HH:mm:ss")
or your expression is giving "20110704 000000" than use following code
datetoxmlformat("20110704 000000", "yyyyMMdd HHmmss")
you have to pass date format based on your date string pattern.
Hope this Helps!!
Regards,
Manoj Bilthare
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
12 | |
7 | |
3 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.