on 08-03-2016 2:45 AM
I have an inbound "create deep entity" process that passes a date to the SAP Gateway. The target field is a date field of type "EDATU_VBAK". When it goes into the "create deep entity" process I do a " read_entry_data" method on the data. In this method it does a "transformation" statement to transform the date from RAW XML into the deep structure which accepts it. At this point the date has one day less than what was entered on the UI.
How do I get the Gateway system to treat the date correctly and process it into the correct time zone? In the attachment you can see the first line, this is how the date is passed into the Gateway (1470744000000) and it shows the date if parsed by the browser to be Wed 10th August. Once it is transformed into my deep structure in the Gateway it is Wed 9th of August. So clearly a day has been lost due to the time zone issue.
Any advice on this would be appreciated.
Note: I know this might sound rude but if you don't have the answer please don't post on this thread. In the past when I have posted questions I have had multiple people post suggestions and wild proposals that they had no idea if they worked. They simply wanted me to go and try them and see what happens. I actually am hoping someone can give me some concrete advice which can solve the problem instead of sending me on a wild goose chase.
Thanks, any good advice will be appreciated.
Regards, Martin.
I did not get to follow this up as the issue was closed with the client so I will close this thread.
Martin.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Any suggestions for this one? Advice will be much appreciated.
Martin.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Atanu,
I tried your suggestion but when I change the Edm Core Type of the property it throws an exception. I think this is because it Edm.DateTimeOffset is not compatible with the dictionary structure date type (EDATU_VBAK). So I need a corresponding dictionary type to use in my structure that can accept the DateTimeOffset type. Any advice on finding a data type like this?
Thanks.
Martin.
Hi Atanu, I found this link:
http://help.sap.com/saphelp_nw74/helpdata/de/54/a326519eff236ee10000000a445394/content.htm
It gives a great mapping for Edm types to ABAP dictionary types. Will try that.
Thanks.
Martin.
The Edm to abap mapping can be found here https://help.sap.com/saphelp_nw74/helpdata/en/54/a326519eff236ee10000000a445394/content.htm
Check for suitable data type in this link.
May be a little bit of custom coding in MPC_EXT and proper data type assignment will solve the error ,
If you are changing the type of the property by manual coding
don't forget to change the internal type to cl_abap_typedescr=>typekind_packed and edm type to ' Edm.DateTimeOffset'.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
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.