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 formatting

Former Member
0 Likes
598

hi,

i want to print the date as dd.mm.yy format. i want this format to be assigned to a variable and when i print the variable it should print like dd.mm.yy format.

i am getting the code to print the date in this format but i am not getting how to assign it to a variable and print.

can anyone help me out?

regards,

Santosh.

5 REPLIES 5
Read only

Former Member
0 Likes
574

Hi,

HRGPBS_HESA_DATE_FORMAT : Format the date in dd/mm/yyyy format

Regards,

Priya.

Read only

Former Member
0 Likes
574

You can achieve this by using the FM:

HRGPBS_TPS_DATE_FORMAT

Short Text

Format a date valid for TPS: DDMMYY

Functionality

This module returns a given date in string format "dd/mm/yyyy" with dd =

day, mm = month and yyyy = year.

An empty date is returned as space.

This is the required format for HESA reporting.

Example

"19991224" is returned as "24/12/1999".

"00000000" is returned as " " (ten spaces).

Parameters

P_DATE

DATESTRING

Exceptions

-


Hope this helps

Regards

Vinayak

Read only

Former Member
0 Likes
574

Write like this :

data : v_date(8) ,

v_date1 like sy-datum.

v_date1 = sy-datum.

write v_date1 to v_date using edit mask '__.__.__'.

write 😕 v_date.

Read only

Former Member
0 Likes
574

Hi,

assume date as your system date.

DATA formatdate (10)+

CONCATENATE p_date+6(2)

p_date+4(2)

p_date(4)

INTO c_date SEPARATED BY '.'.

Rgs.

Read only

Former Member
0 Likes
574

Hi,

PLease use the FM CONVERSION_EXIT_PDATE_OUTPUT.

Thanks,

Sriram Ponna.