cancel
Showing results for 
Search instead for 
Did you mean: 

SET DATE MASK is not working for PEKKO-LFDAT

Former Member
0 Kudos

Hi All,

In script when I am using /:SET DATE MASK = 'YYYY.MM.DD'

I see in the print preview that for &ekko-bedat& date format is changing into YYYY.MM.DD, But there is one more field &PEKKO-LFDAT&, date format is not changing for this and its in original format which is DD.MM.YYYY

I noticed one thing when I saw their technical attributes in data dictionary I saw that ekko-bedat is of 8 characters but pekko-lfdat is of 10 characters. It is making the difference, what could be the solution for this.

I want to know what could be the reason that I do not get the right format for

pekko-lfdat date. Should I write the code in an external format or with in SAP script I can change it like the way ekko-bedat is changing.

Kindly throw some light on my query.

Thanks,

Mark

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Mark,

As you correctly identify the field pekko-lfdat is char 10 rather than date format. It seems that the print progam is taking the delivery date and writing it (rather than moving it) to the LFDAT field, this results in the DD.MM.YYYY format. As the field is not a date type the command to SET DATE MASK is not considered. If you are able to change the print program you could change the point where LFDAT is filled and arrange the structure there.

In theory, if you changed your user default date format to 'YYYY.MM.DD' this would be applied when the print program fills the field LFDAT and be passed to the SAPscript.

Your other alternative is to format the date piece by piece in the SAPscript, something like;

&PEKKO-LFDAT6(4)&.&PEKKO-LFDAT3(2)&.&PEKKO-LFDAT(2)&.

Regards,

Nick