‎2007 May 17 2:32 PM
Hi,
strange problem. I have three char 10 fields which I need to mimic the standard SAP date functionality i.e. popup calendar. I did this by using the EXT_DATE search help.
They are also allowed manually type the date so it should be clever like the standard e.g. 010107 becomes 01.01.2007. For this I used the conversion exit INVDT. This works well except for one strange issue....
The screen has the 3 fields.
four examples
1.
Field1 010107
Field2 020207
Field3 030307
Press return, exit checked, converted to
Field1 01.01.2007
Field2 02.02.2007
Field3 03.03.2007
<b>OK</b>
2.
Field1 01.<b>99</b>.2007
Field2 02.01.2007
Field3 03.03.2007
Press Return
Message says 'invalid date' - <b>OK</b>
3.
Field1 01.01.2007
Field2 <b>99</b>.01.2007
Field3 03.03.2007
Press Return
Field1 <b>79928898</b>
Field2 99.01.2007
Field3 03.03.2007
<b>NOT OK</b>
4.
Field1 01.01.2007
Field2 01.01.2007
Field3 99.03.2007
Press Return
Field1 <b>79928898</b>
Field2 <b>79928898</b>
Field3 <b>99</b>.03.2007
<b>NOT OK</b>
Any ideas how to get around this?
Thanks.
‎2007 May 17 5:30 PM
Hi,
From debugging, it looks like the error is happening because the program is being kicked out by an 'Error' message in the INPUT exit so it never gets to the OUTPUT exit to re-format, hence it is stuck on the Inverted Date.
Any way around this?
Thanks.
‎2007 May 17 5:34 PM
HI Kroc,
U can use other logic..
why dont u validate the eneterd date in selection screen itself...
use AT SELECTION-SCREEN OUPUT.
CHECK FOR DATE+0(2) FOR DATE, DATE + 3(2) FOR MONTH EXCLUDING . OR /
IF DATE+0(2) GT 31.
MESSAGE E000(00) WITH 'ENTER A VALID DATE'.
ENDIF.
same as for other fields..
So until user enters correct date u dont proceed further...
Regards
SAB
‎2007 May 17 5:38 PM
Thanks SAB.
The fields are SPL Code Characteristics which are appended to the end of the table used in the standard transaction GB01 so I don't have access to the code. There are user-exits I could start to use but, if possible, I would like to stay 'standard'.
Kroc.