on 03-28-2012 4:50 PM
Hi All,
I really wanted to just vent my spleen at how annoying BPM is around handling Date values passed from Java / Web Dynpro front end and mapping them as input into an RFC call.
I've seen many recommendations to use an EJB mapping function but I just can't believe that is the only way. Presently, I'm using a CAF service in between my BPM and RFC due to other historic reasons but due to changes, I'd like to remove this CAF layer to simplify the build. However, in doing so I hit the issue with converting dates. So frustrating!
What am I missing?
Gareth.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jun,
As I thought, if I use the date-from-dateTime() function I get the following syntax error:
"Incompatible expression type.
Expected:date
Found:xsd:date"
Unless I'm being completely stupid (possible!) I'm really annoyed and frustrated that what should be a very common mapping in BPM is not straight forward. I cannot believe there isn't an easy way to pass a Java/XSD type date from BPM directly in to an RFC call.
I think the problem comes from the RFC import defining its own data type for date fields which is of type:
urn:sap-com:document:sap:rfc:functions:date
This is defined as:
<xsd:simpleType name="date">
<xsd:union xmlns="urn:sap-com:document:sap:rfc:functions" memberTypes="xsd:date genericDate" />
</xsd:simpleType>
I'm very tired at the moment so not thinking clearly but I'm struggling to see an easy way of mapping an xsd:date to the date type shown above.
Any suggestions?
Thanks,
Gareth.
p.s. genericDate is defined as:
<xsd:simpleType name="genericDate">
<xsd:restriction base="xsd:string">
<xsd:pattern value="....-..-.." />
</xsd:restriction>
</xsd:simpleType>
Message was edited by: Gareth Ryan
Hi Karthik,
It is puzzling why this would change from one Ehp to the next...
The type "date" itself is anytype because it contents can be "xsd:date" XOR "genericDate". You should be able to simply 'cast as xsd:date' to get the result you want. i.e it is a cast not a convert or map.
A few help links (from CE 7.2 but shouldn't have changed)
http://help.sap.com/saphelp_nwce72/helpdata/en/c3/fdb196a56b41b38bd7215accabba48/frameset.htm
http://help.sap.com/saphelp_nwce72/helpdata/en/63/9f9ca5bb234502bd7b02c91ac6040a/frameset.htm
regards, Nick
User | Count |
---|---|
81 | |
25 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.