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

uploading date format

Former Member
0 Likes
1,504

hi everybody ,

i am uploading data to Tcode ie01

when user enters the date it should take all the format

<u>my internal table</u>

1)datsl LIKE rm63e-datsl,

2)inbdt LIKE itob-inbdt,

<u>recoding</u>

1)perform bdc_field using 'RM63E-DATSL'

file_int-datsl.

2)perform bdc_field using 'ITOB-INBDT'

file_int-inbdt.

for this edit mask or any code where and how should code plz suggest me give the code and any sample program

will be helpful

thank's &regards

soorya

6 REPLIES 6
Read only

vinod_gunaware2
Active Contributor
0 Likes
1,086

<b>CONVERT_DATE_TO_EXTERNAL

CONVERT_DATE_TO_INTERNAL</b> Converts internal date to user-specific format string and vice versa. Import/Export : YYYYMMDD;

Export/Import : user specific date string. Can be for import either without or within delimiters, but for export only without delimiters.

See field DATFM in the USR01 table. Can be set up via System -> User Profile -> User Defaults or using su50.

<b>DATUMSAUFBEREITUNG</b> Country-specific date formatting for the current user. Examples of output: MM/YY, MM/YYYY, DD.MM, M/D/YYYY, DD/MM/YYYY, WW/YY, WW/YYYY.

<b>CONVERT_DATE_INPUT</b> – Conversion exit routine for inverted date

<b>CONVERT_DATE_TO_EXTERNAL</b> – Formats date from internal to display format

<b>CONVERT_DATE_TO_INTERNAL</b> – Formats date from display to internal format

regards

vinod

Read only

Former Member
0 Likes
1,086

Hi,

When you do a BDC the date format should be the external format of the user.

So, either you can use the conversion routine or simply WRITE date to varaible and use the variable in the BDC.

Regards,

Ravi

Note : Please mark all the helpful answers

Read only

0 Likes
1,086

can u ple give me any sample code

Read only

Former Member
0 Likes
1,086

Hi,

pass it in the format of <b>YYYYMMDD</b> , this will take care of the format.

Regards

vijay

Read only

Former Member
0 Likes
1,086

Hi,

Use CONVERT_DATE_TO_INTERN_FORMAT

pass DTYPE = 'DATS'.

This FM will take care of use settings and accordingly convert to the proper format.

(ie: internal format)

REgards,

Anjali

Read only

Former Member
0 Likes
1,086

Hi soorya,

1. Do not worry about the format, or user format.

2. just use like this :

data : datestr(10) type c.

<b>write sy-datum into datestr.</b>

<b>

(Write will AUTOMATICALLY write into the variable

in the USER FORMAT)</b>

3. Now use this DATESTR

for your bdc value.

regards,

amit m.