Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

BDC

Former Member
0 Kudos

How to handle user specific settings as time and date in the BDC?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Try this piece of code :

select single * from usr02 where bname = sy-uname.

if sy-subrc = 0.

if usr02-tzone is initial.

usr02-tzone = 'PST'.

endif.

call function 'TZ_SYSTEM_TO_LOCAL'

exporting

date_system = sy-datum

timezone = usr02-tzone

time_system = sy-uzeit

importing

date_local = w_datlo

timestamp_local = w_timestamp

time_local = w_timlo

exceptions

no_parameters = 1

too_many_parameters = 2

conversion_error = 3

others = 4.

You can pass the date and time to BDC.

Reward points if useful..

Amruta

5 REPLIES 5

Former Member
0 Kudos

Try this piece of code :

select single * from usr02 where bname = sy-uname.

if sy-subrc = 0.

if usr02-tzone is initial.

usr02-tzone = 'PST'.

endif.

call function 'TZ_SYSTEM_TO_LOCAL'

exporting

date_system = sy-datum

timezone = usr02-tzone

time_system = sy-uzeit

importing

date_local = w_datlo

timestamp_local = w_timestamp

time_local = w_timlo

exceptions

no_parameters = 1

too_many_parameters = 2

conversion_error = 3

others = 4.

You can pass the date and time to BDC.

Reward points if useful..

Amruta

Former Member
0 Kudos

Just use WRITE as follows

data: v_date(10), v_time(8).

write sy-datum to v_date.

write sy-uzeit to v_time.

Now use v_date and v_time in your BDC.

Former Member
0 Kudos

CONVERT_DATE_TO_INTERN_FORMAT -> This FM Will convert the date into user profile date format

CONVERT_TIME_INPUT -> this fm will convert time into user profile time format

Thanks

Seshu

Former Member
0 Kudos

Hi john,

use the below function modules for date conversion

CONVERSION_EXIT_PDATE_OUTPUT

CONVERT_TIME_INPUT

regards,

srinu reddy.

Former Member
0 Kudos

Hi john,

use the below function modules for date conversion

CONVERSION_EXIT_PDATE_OUTPUT

CONVERT_TIME_INPUT

regards,

srinu reddy.