07-26-2012 8:39 AM
Hi,
I have implemented a BADI to raise a error message when hiring is initiated in PA40 and values are entered. Once the user presses enter AFTER_INPUT method needs to be triggered. This method is triggering for all the other infotypes on pressing ENTER but it is not triggering for IT0000. It is triggered when SAVE is pressed. I want to throw a error message before the personnel number is generated.
Is this is how BADI HRPAD00INFTY works?
Any help would be appreciated
Thanks,
Arunsri B.S
07-26-2012 9:00 AM
07-26-2012 9:03 AM
Thanks for the reply Abhijit, but sorry that does not resolve my query.
07-26-2012 10:47 AM
Hi,
I checked it in PA40. I executed in pa40 screen then it called the 0000 infotype screen.
After inputs, it triggered AFTER_INPUT method.
Would you check it again please?
Regards.
07-26-2012 10:50 AM
Hello,
I have also checked it and it's triggering AFTER_INPUT method because of that I gave the above reference.
Thanks,
Abhijit
07-26-2012 10:53 AM
Hi Kadir/Abhijit,
Only one pressing save it is getting triggered. Is there any flag in any table to set for this?
07-26-2012 2:05 PM
Hi,
You would debug it why it isn't triggered. Pressing Enter, it is triggered in my code.
PERFORM badi_after_input(sapfp50m).
FORM BADI_AFTER_INPUT.
* Business Add-In: get implementation information and instance
CALL FUNCTION 'HR_GET_BUSINESS_ADD_IN'
EXPORTING
EXIT_NAME = INFTY_BADI_NAME
FLT_VAL = SPACE "MELN1633153
IMPORTING
IS_IMPLEMENTED = IS_IMPLEMENTED
CHANGING
INSTANCE = INFTY_BADI_EXIT.
IF NOT IS_IMPLEMENTED IS INITIAL.
SY-SUBRC = 0.
CLEAR: SY-MSGNO, SY-MSGTY, SY-MSGID,
SY-MSGV1, SY-MSGV2, SY-MSGV3, SY-MSGV4.
* Business Add-In: call method
CALL METHOD INFTY_BADI_EXIT->AFTER_INPUT
EXPORTING
TCLAS = PSPAR-TCLAS
* OLD_INNNN = cprel "N0312574
* NEW_INNNN = csave "N0312574
OLD_INNNN = CSAVE "N0312574
NEW_INNNN = CPREL "N0312574
IPSYST = PSYST
I001P = T001P
I503 = T503
IPREF = PREF "XPVPH0K010030
EXCEPTIONS
ERROR_WITH_MESSAGE = 1.
07-26-2012 2:20 PM
Hi Kadir,
I just debugged and checked it. In that FM, the structure ACTIVE_IMPS does not have any value, eventhough my implementation is active and it is called for other infotypes.
Could you please let me know why it is not filled?
Thanks,
Arunsri B.S
07-27-2012 8:24 AM
Hi all,
This is because of a switch in T77S0 CCURE GLEMP, which is set for concurrent employment. If we remove this switch it would got to MP000000 and trigger the badi on pressing ENTER. But in our case, we need that switch to be in place.
So still trying to find a work around. If any guys know any other BADI, please let me know.
Thanks,
Arunsri B.S
07-27-2012 8:52 AM
Hi Arunsri,
You would use badi: HRFPM_FTE_DISPATCHER . It has also After_input method in 0000 infotype.
Regards.
Kadir