on 03-12-2008 4:56 AM
Hi Experts,
I am new to BADI (though I know the general steps for implementation - se18 and se19) and would like to know how to implement the method IN_UPDATE from the BADI - HRPAD00INFTY. I am not able to figure out what the parameters IPSPAR, OLD_IMAGE, NEW_IMAGE, OLD_PREF_IMAGE, NEW_PREF_IMAGE are for and how they can be used in coding (am looking for info in addition to what is in the documentation). According to the requirement I need to fill the supervisor ID field P0001MSTBR and display it when the user saves the infotype record. Any sample code for implementing this method would be very helpful.
Thanks
Sri
Edited by: Sri Maddineni on Mar 12, 2008 5:57 AM
Hello Sri,
i am not sure about the method IN_UPDATE , but why dont you try the method AFTER_INPUT in the same badi.It should solve your requirement . Infact you can go for the userexit PBAS0001 .
data : i0001 type p0001.
CALL METHOD cl_hr_pnnnn_type_cast=>prelp_to_pnnnn
EXPORTING
prelp = innnn
IMPORTING
pnnnn = i0001.
Move supervisorarea to i0001-MSTBR.
CALL METHOD cl_hr_pnnnn_type_cast=>pnnnn_to_prelp
EXPORTING
pnnnn = i0001
IMPORTING
prelp = innnn.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sri ,
Forget the badi , do your coding in the userexit PBAS0001 AFTER INPUT. this function module(EXIT_SAPFP50M_002) has an input parameter INNNN (both import & export) .
The method cl_hr_pnnnn_type_cast=>prelp_to_pnnnn maps INNNN to your infotype structure which is i0001( i0001 like p0001 )
Now you can modify i0001( i0001 will have MSTBR field) according to your requirement and export your changes using the method
cl_hr_pnnnn_type_cast=>pnnnn_to_prelp
Hi Experts,
I am hoping somebody would help me out. I am struck in a new issue. None of the parameters of IN_UPDATE method in HRPAD00INFTY BADI have the field MSTBR which I need to update. Could you please suggest me how to work around this?
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I agree with Balaji that you should use AFTER_INPUT instead of IN_UPDATE.
You'll need to define a data area like this:
DATA i0001 TYPE p0001.
You will need to make sure you are in this method for infotype 1 with a case statement:
CASE new_innnn-infty.
When '0001'.
Then you move your new_innnn to your work area:
move new_innnn to i0001.
If you only want to do this on Save, you can check sy-ucomm = 'UPD' in your case statement before performing any logic.
| User | Count |
|---|---|
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.