on 01-08-2009 5:52 AM
Hello Experts,
Hello All,
I am using BAdi HRPAD00INFTY (before output) for chnaging some values of the HR infotypes before display such as Salary.I am accessing those values by using following code.
data : I0008 TYPE P0008.
CALL METHOD CL_HR_PNNNN_TYPE_CAST=>PRELP_TO_PNNNN
EXPORTING
PRELP = INNNN
IMPORTING
PNNNN = I0008.
All the values all populating in I0008 but when i change the value of bet01(I0008-bet01 = 123456.) , it is not displaying on screen.
any idea?? Is there any other way to process the data of SAP HR screen before display?
Thanks,
Prashant
After you get the data in I0008 structure , you have to again change in to PNNNN structure.For that use this method CL_HR_PNNNN_TYPE_CAST=>PNNNN_TO_PRELP. Please give points if this reply helps you.
regards,
Bhagyashree
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Bhagyashree for your prompt reply. I have done this also. I have written following code :
CALL METHOD CL_HR_PNNNN_TYPE_CAST=>PRELP_TO_PNNNN
EXPORTING
PRELP = INNNN
IMPORTING
PNNNN = I0008.
I0008-bet01 = 123456.
CALL METHOD CL_HR_PNNNN_TYPE_CAST=>PNNNN_TO_PRELP
EXPORTING
PNNNN = I0008
IMPORTING
PRELP = INNNN.
but screen is not getting refreshed!!
Is I am missing anyrhing??
Regards,
Prashant
Edited by: Prashant Jagdale (Genius) on Jan 8, 2009 11:34 AM
Thanks you all for your valuable help!!!
I did the same using field-symbols. I have used following code.
data : sub_area_salary TYPE P0008-bet01.
field-symbols <fs_Salary> type any.
if sy-dynnr = 2010 or sy-dynnr = 2000 .
sub_area_salary = SoapResponse-DATA_OUT.
assign ('(MP000800)p0008-bet01') to <fs_Salary>.
<fs_Salary> = sub_area_salary.
endif.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Prashant
your code may be working fine i guess , but you wont be able to see it while changing
just save the record come out of PA30 & then check again in if the changed value is there ( and you may see the changed value now ) the problem in Infotype -8 is it has screen fields of Q structure so some times you dont see the changes immediately.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Also Please give points if my reply has helped you !!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think badi wont work becoz it has only import parameters. try using exit EXIT_SAPFP50M_001 . This exit is trigerred while saving any infotype. It has INNNN as importing and exporting paramters.
In this badi chek for infotype
IF innnn-infty = '0008'.
CALL METHOD CL_HR_PNNNN_TYPE_CAST=>PRELP_TO_PNNNN
EXPORTING
PRELP = INNNN
IMPORTING
PNNNN = I0008.
I0008-bet01 = 123456.
CALL METHOD CL_HR_PNNNN_TYPE_CAST=>PNNNN_TO_PRELP
EXPORTING
PNNNN = I0008
IMPORTING
PRELP = INNNN.
endif.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.