on 01-06-2015 6:15 PM
Hi All,
As I am finding NW gateway support date in YYYYMMDD format. At times we are getting dates from ECC which are in YYYYDDMM format and we are getting error with status '500'. Is their any way put conversion on date fields so it always convert date to YYYYMMDD format.
Other option is to changes service FM to convert it to supported format before populating the value..
Please suggest if we can handle it without coding.
Thanks & Regards,
Rajesh
Hello Rajesh,
In the GW level the format which GW understands is YYYYMMDD. Only then it will be able to display the Date in a Correct Format in the response.
You can use Edm.DateTime or DATS in ABAP Editor.
If you are sending YYYYDDMM to GW and expecting to work, you are bound to get error.
Regards,
Ashwin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Bind the data element to ABAP data element with type DATS. It always has YYYYMMDD format.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Atanu, Thats what we are doing.. problem is when date comes in YYYYDDMM or other format ( value '20153112' ) it gives error..
User can maintain/change the date setting in their user profile setting. However date is saved in DB as YYYYMMDD format only.
At times we are getting date in format other then YYYYMMDD as per their date setting (From dependent custom methods). We can change the date formatting to required format for service field attribute using FM - CONVERT_DATE_TO_INTERNAL while populating data for service.
I am Checking if we have other way to handle conversion apart from coding, if we have some options.
Thanks
Rajesh
If the underlying datatype is DATS then the format should always be 'YYYYMMDD'. As you correctly mentioned changing the user profile setting does not affect the data format stored in the DB. So it is always YYYYMMDD.
Now if you are using some custom function module then there may be come kind of handling of DATS field as STRING which may cause this problem.
So you need to take care of it(by coding) at the place where you get the data before passing to Gateway.
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.