10-21-2021 1:24 PM
Hi Experts
The code is following
erdat LIKE vbrp-erdat,
erzet LIKE vbrk-erzet,
send_date type string,
CONCATENATE gw_vbrk-erdat gw_vbrk-erzet into gw_send-send_date.
Now the string format is follwing
20211006094324
I hope I get following string format.
2021-10-06 10:00:00
Can you help me ? Thanks.
10-21-2021 1:53 PM
10-21-2021 5:29 PM
10-21-2021 2:15 PM
my_field = |{ my_date DATE = USER }{ my_time TIME=USER }|
something like that ?
10-23-2021 5:54 AM
Instead of DATE = USER, your String Template could use XSD = YES to always format in YYYY-MM-DD format, and it could be the same for the time format to avoid 12-hours formats.
DATA(date) = CONV d( '20211023' ).
DATA(time) = CONV t( '114800' ).
DATA(my_field) = |{ date XSD = YES } { time XSD = YES }|.
ASSERT my_field = '2021-10-23 11:48:00'.
10-25-2021 9:30 AM
10-23-2021 5:51 AM
It seems you frequently write blog posts in your own Web site to explain what you finally did, and you just post a link to refer to it. You did it repeatedly in your recent questions, I think you shouldn't, as per Engagement Rules "unacceptable content":
Instead, include your answer here. Anyway, note that the answer in your blog post is using a non-released function module, and that's not the way to do it in SAP. Frederic answer is the way to do it, with String Templates (as per Horst link), by taking the user's date and time formats. Or you may choose specific date formats so that to always use the YYYY-MM-DD format (like COUNTRY or XSD option).
10-23-2021 4:15 PM