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

f module

Former Member
0 Likes
858

Hi all ,

I got a date field eg 12.06.2006 Whn i give this in parameters i am getting the reverse of the date eg 20060612.Is there any f module to reverse the process.I want the result as 12062006.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
817

Use one of the FMS

CONVERT_DATE_INTERNAL

CONVERT_DATE_EXTERNAL

Rewards points if found useful

Saurabh

7 REPLIES 7
Read only

Former Member
0 Likes
817

Hi

Its not reverse. Its the default format for date YYYYMMDD.

Use a Character varaible to get the date in the DDMMYYYY using <b>offset</b> functionality.

Regards,

Raj

Read only

Former Member
0 Likes
818

Use one of the FMS

CONVERT_DATE_INTERNAL

CONVERT_DATE_EXTERNAL

Rewards points if found useful

Saurabh

Read only

Former Member
0 Likes
817

Hi,

Try FM "CONVERT_DATE_TO_INTERN_FORMAT" and also it depends on the user settings.

Other way around is pass it as a string STRING_REVERSE FM.

Reward if helpful.

Rgds

Read only

Former Member
0 Likes
817

Hi Alex,

You can use std. FM 'CONVERSION_EXIT_PDATE_INPUT'

Read only

Former Member
0 Likes
817

Hi Alex,

u can change it using the code as give in the the link..,

http://www.sap-img.com/abap/abap-program-output-of-date-format.htm

Hope it helps..,

Regards,

Raja

Read only

Former Member
0 Likes
817

Hi,

You can use WRITE: SY-DATUM TO W_VARIABLE DD/MM/YYYY. The '/' will be decided form user profile(whether it is dot. or slash /).

Thanks and Regards,

Bharat Kumar Reddy.V

Read only

Former Member
0 Likes
817

Alex,

If you have defined the parameter like sy-datum(basically and date field) ...the value in the parameter would be validated for date and stored in YYYYMMDD. In that case you can use the write statement to store it in different format in char field.

WRITE pdate to cdate DD/MM/YYYY.

Otherwise you can change your parameter to be of character type and it would take the value as you have entered but make sure that you would need to validate the date.

Regards

Anurag