07-05-2006 7:47 PM
Hi,
I wrote a BDC program. I programmed it for the date format mm/dd/yyyy. This works fine when I run the BDC session on my R/3 client.
When the support group runs the same BDC session, they get an error message "Enter date in mm.dd.yyyy".
Question:
Why is there a difference when I run the program, or, when a person from the support group runs the program on a different client of the same server.
Could we both be having different settings for date entry for the R/3 client?
If so where can I change the settings for a client from the mm.dd.yyyy format to mm/dd/yyyy format or vice versa?
The code I am using to create the mm/dd/yyyy date from Sy-datum is:
move sy-datum to adjdat.
CONCATENATE adjdat-mm '/' adjdat-dd '/' adjdat-yyyy INTO formatted_date.
Is there any generic code I can write so the date adjusts to the current user settings?
Thank you for your help.
Sumit.
07-05-2006 7:51 PM
Use a single WRITE:
WRITE sy-datum to formatted_date.
From this way, system take the date user format.
Regards.
07-05-2006 7:51 PM
Use a single WRITE:
WRITE sy-datum to formatted_date.
From this way, system take the date user format.
Regards.
07-05-2006 8:01 PM
07-05-2006 7:51 PM
Hi,
the date fomate will be different from user to user. you can change the format using the path
From the SAP easy access screen
System-> user profile-> own data->defaults
sudheer.A
Message was edited by: sudheer Addepalli
Message was edited by: sudheer Addepalli
07-05-2006 8:01 PM
07-05-2006 7:52 PM
07-05-2006 8:02 PM
Rich, Thanks for the quick response. Much appreciated.
Best Wishes Sumit.
07-05-2006 7:53 PM
define a variable of length of 10 char and use write statement. Using write statement fill the date into this variable. This variable is filled with the required format.
data : v_date(10) type c.
write sy-datum to v_date.
hope this helps.
thanks,
vamshi
07-05-2006 8:03 PM
07-05-2006 7:53 PM
If you simply:
WRITE sy-datum to formatted_date.
It should work. Make sure that formatted_date is declared as 10 characters.
Rob
07-05-2006 8:13 PM
07-05-2006 8:15 PM
07-05-2006 8:49 PM
No matter what, if you are creating BDC sessions to be processed later by either RSBDCSUB program or SM35, the user who ran the program that created the sessions and the user who is processing the sessions should be using the same date format. So let us say you wrote program ZTEST which creates BDC sessions for VA01. User X runs your program and creates the sessions. User Y then goes to SM35 to process those sessions. Both X an Y should be using the same date format in their profile for the session to work properly. That is the theory behind this. Instead, in your ZTEST program, if you do a submit of RSBDCSUB, then you will not run into this issue because the same user will be involved in both creating and processing the sessions.