10-13-2008 8:40 AM
Hi,
I've created several enhanced/extended fields in IT0759/P0759 with the CI_P0759 include structure, I've generated the ZP075900 include and the screens as well. Hence i need to maintain it via PA30. and i'm using the HRPAD00INFTY BADI with the AFTER_INPUT method. I've hiden the enhanced field at the screen. At the method i'm updating the table usng the HR_INFOTYPE_OPERATIONS FM and ofcourse i've enque and deque the pernr.
Currently i'm facing a major probelm. The table is creating a duplicate record, 1 which is a full record with the original fields along with the enhanced fields being populated, and the duplicate record is only being populated with the original 0759 fields(meaning the extended fields are empty). Hence i believe the Badi Implementation Is populating the 1st record (original + enhanced fields) and the standard module (MP075900) is populating the 2nd record(original 0759 fields, enhanced fields empty. same pernr, same date, but they differentiate themselves using the SEQNR). So my question is there any possible way that i can hijack the and pass in the extended fields value into the standard sap module pool (mp075900) or is there any other way to maintain an enhanced infotype. Please advise.
Thank you
10-13-2008 9:38 AM
In the class method, all you need to do is populate your extra fields into the structure - the standard processing will perform the table update.
Something like:
data: w_0759 type pa0759.
* get the values from input
CALL METHOD CL_HR_PNNNN_TYPE_CAST=>PRELP_TO_PNNNN
EXPORTING
PRELP = i_prelp
IMPORTING
PNNNN = w_0759.
* "Populate your fields here in w_0759 structure
* Put back to sap structure
CALL METHOD CL_HR_PNNNN_TYPE_CAST=>PNNNN_TO_PRELP
EXPORTING
PNNNN = w_0759
IMPORTING
PRELP = o_prelp.
I dont have a SAP system to check at present, and am not sure of the parameter names - but think there is an input / output (or perhaps changing) PRELP parameter for the method you are using.
No need to call Infotype operation FM, or enque / deque
Andrew
10-13-2008 9:38 AM
In the class method, all you need to do is populate your extra fields into the structure - the standard processing will perform the table update.
Something like:
data: w_0759 type pa0759.
* get the values from input
CALL METHOD CL_HR_PNNNN_TYPE_CAST=>PRELP_TO_PNNNN
EXPORTING
PRELP = i_prelp
IMPORTING
PNNNN = w_0759.
* "Populate your fields here in w_0759 structure
* Put back to sap structure
CALL METHOD CL_HR_PNNNN_TYPE_CAST=>PNNNN_TO_PRELP
EXPORTING
PNNNN = w_0759
IMPORTING
PRELP = o_prelp.
I dont have a SAP system to check at present, and am not sure of the parameter names - but think there is an input / output (or perhaps changing) PRELP parameter for the method you are using.
No need to call Infotype operation FM, or enque / deque
Andrew