Skip to Content
0

PA30 Infotye 8 validation in HRPAD00INFTY BadI SAP ABAP?

Feb 07 at 06:09 PM

50

avatar image

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Rajkumar Narasimman Feb 07 at 08:45 PM
0

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

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hi Raj,

Thanks for the reply.

The issue is resolved with your inputs.

Regards,

Shabbir

0
Raymond Giuseppi
Feb 08 at 07:14 AM
0

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)

Share
10 |10000 characters needed characters left characters exceeded