02-07-2018 6:09 PM
Hi,
My requirement is if user enters basic salary greater than 10,000 for wage type-1000 then i have to raise the error message.
For this I have written the logic in HRPAD00INFTY~AFTER_INPUT method.
I am facing the following issues-
1.If user enters the salary Ex: 12,000 then error message 'Salary range exceeded' will appear on the PA30 Infotype 8 screen and if user click the save button also the error message is triggering.But after user enters the salary Ex:7000 and presses enter then it is showing warning message 'This entry deletes the record' and again presses the enter then it is going back to PA30 Main screen and shows record created message.
2.My issue is after warning message if user presses enter the screen should be in Infotype 8 and should display message 'Save your entries'.But the sy-ucomm = 'UPD' is saving after error message is triggered which will causing directly saving the correct entered value.
Where I need to write the validation/control check for raising error message logic in BADI
HRPAD00INFTY~AFTER_INPUT method (OR) HRPAD00INFTY~IN_UPDATE method ?
Regards,
Shabbir
02-07-2018 8:45 PM
Hi Shabbir Ahmed,
Write the validations inside AFTER_INPUT. The HRPAD00INFTY~AFTER_INPUT method will trigger in both 'Enter' and 'SAVE' button is pressed.
"My issue is after warning message if user presses enter the screen should be in Infotype 8 and should display message 'Save your entries'.
If the validation code is written inside HRPAD00INFTY~AFTER_INPUT method, after the amount is entered in basic pay(7000) in infotype 0008 once ENTER button, your custom warning message will be populated(which is written in your exit), on pressing enter one more message 'Save your entries' will be populated. It won't save unless user presses save button.
If directly SAVE button is pressed, again HRPAD00INFTY~AFTER_INPUT method will trigger and the warning message(which is written in your exit) will be populated in screenand once enter button is pressed, it will save the values directly. It won't stop like above, this is standard behavior.
Regards
Rajkumar Narasimman
02-07-2018 8:45 PM
Hi Shabbir Ahmed,
Write the validations inside AFTER_INPUT. The HRPAD00INFTY~AFTER_INPUT method will trigger in both 'Enter' and 'SAVE' button is pressed.
"My issue is after warning message if user presses enter the screen should be in Infotype 8 and should display message 'Save your entries'.
If the validation code is written inside HRPAD00INFTY~AFTER_INPUT method, after the amount is entered in basic pay(7000) in infotype 0008 once ENTER button, your custom warning message will be populated(which is written in your exit), on pressing enter one more message 'Save your entries' will be populated. It won't save unless user presses save button.
If directly SAVE button is pressed, again HRPAD00INFTY~AFTER_INPUT method will trigger and the warning message(which is written in your exit) will be populated in screenand once enter button is pressed, it will save the values directly. It won't stop like above, this is standard behavior.
Regards
Rajkumar Narasimman
02-08-2018 9:03 AM
Hi Raj,
Thanks for the reply.
The issue is resolved with your inputs.
Regards,
Shabbir
02-08-2018 7:14 AM
Did you raise the ERROR_WITH_MESSAGE exception in the BAdI implementation?
You could also play with this exception and using some MESSADE DISPLAY LIKE to fulfill your requirement. (e.g. Raising as an error displayed like a warning only once)