10-01-2008 1:24 PM
Hi,
I need a clarification here.
When we deal with date, normally we convert it into external format of user by using 'WRITE TO' statement.
But in my current program, it does not have any format conversions for date. However, they are uploading to BDC structure in YYYYMMDD basic internal format.
I heard it like, if u supply date with this internal format, it just get converted to specific user format on the screen.( Suppose if user format mm/dd/yyyy, if u spply in YYYYMMDD. Then it will convert to mm/DD/YYYY automatically)
Is this true??
Because the same program working properly on PRD system and in QAT it is throwing date format error.
Can any pls confirm...
Thanks,
Praneeth
10-01-2008 1:44 PM
Hi
In general, based on user settings the date gets changed.
Regards,
Vishwa.
10-01-2008 1:52 PM
>Is this true??
yes it is true. if you load it internal format, conversion will takes place automatically according to settings.
10-01-2008 2:03 PM
Vijay,
As I mentioned in only one system it is working properly, the other systems is giving error.
Any specific settings required for this conversion? OR can we take help of SAP?
Please suggest.
Thanks & Regards,
Praneeth
10-01-2008 2:05 PM
Vijay,
As I mentioned in only one system it is working properly, the other systems is giving error.
Any specific settings required for this conversion? OR can we take help of SAP?
Please suggest.
Thanks & Regards,
Praneeth
10-01-2008 2:30 PM
if you use the sy-datum format that will work automatically.
>Any specific settings required for this conversion?
I don't see any need in that. i feel the problem lies in the bdcdata population for the datefield. check it once in Debug mode in other system if you can..
10-01-2008 3:48 PM
yes, I debugged and it is giving the following error on FB05 screen.
" Formatting error for BKPF-BLDAT".
Any suggestion?
Thanks,
Praneeth
10-01-2008 4:43 PM
Just check the below setting in the quality system.
From menu options system-->User Profile -->Own Data --> Open the tab Defaults.
Check the date format over there. The date format from the file and the date format over here should sink.
11-18-2008 12:39 PM
Hi Praneet,
Here is the solution.
OK, first the problem.
This problem is due to user settings. So it is not a good idea to hardcode the format it according to user settings, since we will not know in which system your program will be executed.
Solution.
=======================
Data: begda(10) type C.
Write p0001-begda to begda.
========================
Important point to note.
Source field (p0001-begda), must be of DATE format.
Destination field(begda) must be of char type.
WRITE statement will automatically convert the date to user format.
Thanks
Krishna