2008 Aug 07 5:54 PM
Hi all,
I am using the user exit CATS0003 to validate the receiver cost center, receiver fund, receiver order and the receiver functional area.That is if any one of this fields are initial it will give an error message.
But when I try to change an existing record and try to change the order number (say if its blank - some records are with with blank internal order nos since we just implemented this validation , and I try to input a value in the time sheet ) and when I do check for errors it is still giving out the error message which it is supposed to give when all the fields are initial.When I debug I dont see my order number value which I gave on the time sheet
entry.the filed is just blank/initial so its giving my error message.
I am wondering is there any other user exit should we use to get the changed value to the user exit? If so please let me know.
Please help and thanks in advance.Following is my code
CHECK fields-workdate >= '20060701'.
Regular time
IF ( fields-awart = '1000' OR
fields-awart = '1030' OR
fields-awart = '1035' OR
fields-awart = '1180' OR
fields-awart = '1250' OR
fields-awart = '2000' OR
fields-awart = '2005' OR
fields-awart = '2010' OR
fields-awart = '2015' OR
fields-awart = '2020' OR
fields-awart = '2025' OR
fields-awart = '2030' OR
fields-awart = '2035' OR
fields-awart = '2045' OR
fields-awart = '2055' OR
fields-awart = '2060' OR
fields-awart = '2065' OR
fields-awart = '2070' OR
fields-awart = '2080' OR
fields-awart = '2085' OR
fields-awart = '3000' OR
fields-awart = '3005' OR
fields-awart = '3010' OR
fields-awart = '3015' OR
fields-awart = '3020' ).
no additional account assignments are allowed.
IF ( fields-rkostl <> 0 OR
fields-raufnr <> 0 OR
fields-fund <> 0 OR
fields-func_area <> 0 ).
MESSAGE e027(zmps).
ENDIF.
Extended hours
ELSEIF ( fields-awart = '1020' OR
fields-awart = '1040' OR
fields-awart = '1050' OR
fields-awart = '1060' OR
fields-awart = '1070' OR
fields-awart = '1080' OR
fields-awart = '1090' OR
fields-awart = '1100' OR
fields-awart = '1110' OR
fields-awart = '1120' OR
fields-awart = '1130' OR
fields-awart = '1140' OR
fields-awart = '1150' OR
fields-awart = '1170' OR
fields-awart = '1190' OR
fields-awart = '1200' OR
fields-awart = '1210' OR
fields-awart = '1220' OR
fields-awart = '1230' OR
fields-awart = '1240'). " OR
Give error message when ( Cost center or Fund or Function area ) or
( Cost center or Fund or Function area or Internal order ) is initial.
IF fields-workdate >= '20080705'.
IF ( fields-rkostl IS INITIAL OR fields-fund IS INITIAL OR
fields-func_area IS INITIAL OR fields-raufnr IS INITIAL ).
MESSAGE e030(zmps).
ENDIF.
ELSE.
IF ( fields-rkostl IS INITIAL OR fields-fund IS INITIAL OR
fields-func_area IS INITIAL )." OR fields-raufnr IS INITIAL ).
MESSAGE e028(zmps).
ENDIF.
ENDIF.
ENDIF.
Hi all,
I am using the user exit CATS0003 to validate the receiver cost center, receiver fund, receiver order and the receiver functional area.That is if any one of this fields are initial it will give an error message.
But when I try to change an existing record and try to change the order number (say if its blank - some records are with with blank internal order nos since we just implemented this validation , and I try to input a value in the time sheet ) and when I do check for errors it is still giving out the error message which it is supposed to give when all the fields are initial.When I debug I dont see my order number value which I gave on the time sheet
entry.the filed is just blank/initial so its giving my error message.
I am wondering is there any other user exit should we use to get the changed value to the user exit? If so please let me know.
Please help and thanks in advance.Following is my code
CHECK fields-workdate >= '20060701'.
Regular time
IF ( fields-awart = '1000' OR
fields-awart = '1030' OR
fields-awart = '1035' OR
fields-awart = '1180' OR
fields-awart = '1250' OR
fields-awart = '2000' OR
fields-awart = '2005' OR
fields-awart = '2010' OR
fields-awart = '2015' OR
fields-awart = '2020' OR
fields-awart = '2025' OR
fields-awart = '2030' OR
fields-awart = '2035' OR
fields-awart = '2045' OR
fields-awart = '2055' OR
fields-awart = '2060' OR
fields-awart = '2065' OR
fields-awart = '2070' OR
fields-awart = '2080' OR
fields-awart = '2085' OR
fields-awart = '3000' OR
fields-awart = '3005' OR
fields-awart = '3010' OR
fields-awart = '3015' OR
fields-awart = '3020' ).
no additional account assignments are allowed.
IF ( fields-rkostl <> 0 OR
fields-raufnr <> 0 OR
fields-fund <> 0 OR
fields-func_area <> 0 ).
MESSAGE e027(zmps).
ENDIF.
Extended hours
ELSEIF ( fields-awart = '1020' OR
fields-awart = '1040' OR
fields-awart = '1050' OR
fields-awart = '1060' OR
fields-awart = '1070' OR
fields-awart = '1080' OR
fields-awart = '1090' OR
fields-awart = '1100' OR
fields-awart = '1110' OR
fields-awart = '1120' OR
fields-awart = '1130' OR
fields-awart = '1140' OR
fields-awart = '1150' OR
fields-awart = '1170' OR
fields-awart = '1190' OR
fields-awart = '1200' OR
fields-awart = '1210' OR
fields-awart = '1220' OR
fields-awart = '1230' OR
fields-awart = '1240'). " OR
Give error message when ( Cost center or Fund or Function area ) or
( Cost center or Fund or Function area or Internal order ) is initial.
IF fields-workdate >= '20080705'.
IF ( fields-rkostl IS INITIAL OR fields-fund IS INITIAL OR
fields-func_area IS INITIAL OR fields-raufnr IS INITIAL ).
MESSAGE e030(zmps).
ENDIF.
ELSE.
IF ( fields-rkostl IS INITIAL OR fields-fund IS INITIAL OR
fields-func_area IS INITIAL )." OR fields-raufnr IS INITIAL ).
MESSAGE e028(zmps).
ENDIF.
ENDIF.
ENDIF.
2008 Aug 07 7:41 PM
Looks like the error checks are being made before the values are transferred from screen to internal table and work area.
If you get the blank value for the field, also try to use function module DYNP_VALUES_READ to read values from screen field inside the user exit. If it comes back with value, validate against that value.
Edited by: Sharad Agrawal on Aug 7, 2008 2:41 PM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |