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 Manipulation

Former Member
0 Likes
662

I am extracting the manufacturing date 06/28/2007, but when I display it in ALV report it appears as 8//20/06/2

I need to display it mm/dd/yyyy

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
630

I am getting the date of manufacturing from the classification data in batches using fm 'CLAF_CLASSIFICATION_OF_OBJECTS'. The date is stored in AUSP1 TYPE ATWRT CHAR 30

When i display it using write it comes out properly for eg 06/28/2007

But when I move it into bestand-vfdat type mcha-vfdat which is the data element for manufacturing date, it does not display it properly in ALY report . It appears as 8//20/06/2

5 REPLIES 5
Read only

Former Member
0 Likes
630

Hi,

Can u paste some part of your code where you are doing date manipulation ?

Regards,

Mukul

Read only

Former Member
0 Likes
631

I am getting the date of manufacturing from the classification data in batches using fm 'CLAF_CLASSIFICATION_OF_OBJECTS'. The date is stored in AUSP1 TYPE ATWRT CHAR 30

When i display it using write it comes out properly for eg 06/28/2007

But when I move it into bestand-vfdat type mcha-vfdat which is the data element for manufacturing date, it does not display it properly in ALY report . It appears as 8//20/06/2

Read only

0 Likes
630

Hi Megan,

Date generally stored in internal format as yyyymmdd, So change the character format into this format and send this to date vairable.

Check this code.

data: v_dd(2) type n, v_mm(2) type n, v_yy(4) type n, v_date(8)..

split ausp1 at '/' into v_dd v_mm v_yy.

concatenate v_yy v_mm v_dd into v_date.

bestand-vfdat = v_date.

Thanks,

Vinay

Read only

0 Likes
630

Hi Megan,

Try to remove the two '/' in 06/28/2007and then move the rest of the value to bestand-vfdat type mcha-vfdat which is the data element for manufacturing date.

Hope this helps.

Please reward if useful.

Thanks,

Srinivasa

Read only

Former Member
0 Likes
630

Call function PERIOD_AND_DATE_CONVERT_INPUT passing in your date stored as text. INTERNAL_DATE will return date converted to a date format.