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 PPP.YYYY

Former Member
0 Likes
3,251

Hi ,

in the selection screen i need data field as select-options and like MMM.YYYY format so is there any field like this in SAP and i need to validate that field also is there any manual validation is there like sy-datum.Please help me .

THX..

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,267

Hi:

There are so many data element to display MMYYYY like PDUV37 etc but it display it in MMMYYYY format, you have to call a function module to convert it.

Regards

Shashi

7 REPLIES 7
Read only

Former Member
0 Likes
2,267

You have to handle this logic manually, i dont think we have field like this. If you find please reply

Read only

Former Member
0 Likes
2,267

You can use any data element which have domain of CHAR 8 and further you can validate with

Sy-datum using offsets.

Read only

Former Member
0 Likes
2,268

Hi:

There are so many data element to display MMYYYY like PDUV37 etc but it display it in MMMYYYY format, you have to call a function module to convert it.

Regards

Shashi

Read only

GauthamV
Active Contributor
0 Likes
2,267

Use this data element.

JAHRPER

Read only

Former Member
0 Likes
2,267

hi,

use this function module....

call function 'CONVERT_DATE_TO_EXTERNAL'

exporting

date_internal = sy-datum

importing

date_external = v_date " variable

exceptions

date_internal_is_invalid = 1

others = 2.

if sy-subrc <> 0.

endif.

Read only

naveen_inuganti2
Active Contributor
0 Likes
2,267

Hi,

It might not 002.2009 for this month.

It may be Feb.2009, Mar.2009, Apr.2009 ..etc.,

We can do this with function modules by converting the month into 3 letter format.

--Naveen Inuganti

Read only

0 Likes
2,267

Hi,

Use this data element

JAHRPERALT.

Best Regards,

Surendar Reddy.