Application Development and Automation 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: 
Read only

Date format for call transaction

Former Member
0 Likes
1,031

Hi,

What is the best solution for passing a date field to a call transaction in the date format that the user has in his settings?.

Rgds

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
823

Hi,

Lets say the date field is G_DATE ..

Then declare 2 fields,

DATA: L_DATE type sy-datum.

Data: C_date(10) type c.

Move: G_date to L_date.

Write L_Date to C_Date.

Then this C_date Field will have the User format date

Regards

Sudheerq

Hi,

What is the best solution for passing a date field to a call transaction in the date format that the user has in his settings?.

Rgds

3 REPLIES 3
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
823

The best solution is to define a character field of length 10. Then WRITE the date to the BDC_DATE and then use this variable when passing to BDC.

data: bdc_date(10) type c.

write sy-datum to bdc_Date.

Regards,

Rich Heilman

Read only

Former Member
0 Likes
824

Hi,

Lets say the date field is G_DATE ..

Then declare 2 fields,

DATA: L_DATE type sy-datum.

Data: C_date(10) type c.

Move: G_date to L_date.

Write L_Date to C_Date.

Then this C_date Field will have the User format date

Regards

Sudheerq

Read only

Former Member
0 Likes
823

Hi Jose,

Always,

data v_date type char10.

write <Sourcefield> to v_date.

Regards

KER