cancel
Showing results for 
Search instead for 
Did you mean: 

Date Format changing while Printing in SAPSCRIPT

Former Member
0 Kudos

Hi,

The date format is changing to DD.MM.YYYY only for few invoices and for the rest of invoices its printing in the format MM/DD/YYY. I had not faced this issue earlier. This has happened for the first time.

I have not used any SET Country Key Statement in my Program and am not modifying the date field anywhere in my sapscript. Am just using &bkpf-bldat& to print the date field.

So am not getting how it would be possible to get two different formats for the same field?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hold on, if you're not using [SET COUNTRY|http://help.sap.com/saphelp_erp60_sp/helpdata/en/d1/8031f7454211d189710000e8322d00/frameset.htm] or [SET DATE MASK|http://help.sap.com/saphelp_erp60_sp/helpdata/en/d1/8031dd454211d189710000e8322d00/frameset.htm] in your SAPscript, then I'd check if there's different users creating those invoices (or to be more precise - triggering the form output) that look different with possibly different default date settings in SU3.

Cheers, harald

Former Member
0 Kudos

Solved

Former Member
0 Kudos

Hi Pushkara,

          I have a similar problem. The date is appearing different for different users while printing invoice from sapscript. I had checked SU3 but no problem there. Please can you tell me how you solved it.

Thanks in advance,

Priya

Sandra_Rossi
Active Contributor
0 Kudos

You're right, there must be a SET COUNTRY somewhere. Start an sql trace via ST05, select buffered tables. After you have generated the sapscript forms, look for T005X table in the trace. Then click the "reach abap source" button to locate where the "set country" is.

Note that you may also have the sapscript commands /: SET COUNTRY and /: SET DATE MASK = 'date_mask'. The first will be detected by the sql trace, while second is just an ABAP formatting made by subroutine CN_DATE in include LSTXVFCN (you may add a break-point).