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: 

Date Conversion Problem in BDC

Former Member
0 Kudos
325

Hi Friends,

I have come across with date and time problem in my BDC program

as I have date in YYYYDDMM e.g. 20070309

and in my transaction i need to pass it as MM/DD/YYYY format?

what should I do.

l_date type char10.

I am passing wa_date to l_date using edit mask '__/__/____'.

but it is not solving my problem.

kindly help it's urgent.

regards,

pradeep.

4 REPLIES 4

Former Member
91

Hi,

Dont use mask..

DATA : w_date(10) TYPE n.

WRITE : <your date variable> TO w_date.

Pass w_date to the BDC table..

Thanks and Regards,

Vikas Bittera.

raymond_giuseppi
Active Contributor
0 Kudos
91

When you fill a BDC data, its better to use WRITE than MOVE instruction to fill the value, especially amounts and dates.

Also insure to be in the same language when building BDC as when executing it.

Regards

Former Member
0 Kudos
91

use following line of code for your requirement

CONCATENATE

sy-datum+6(2) '/'

sy-datum+4(2) '/'

sy-datum+0(4)

INTO date.

make sure that date is of char 10.

former_member200338
Active Contributor
0 Kudos
91

Hi,

goto the transcation. Find the field name. give some value to the field. Then switch on the debugger.

check how the data is stored. u can convert it as required.

Regards,

Niyaz