In fact HR_INFOTYPE_OPERATION is calling HR_MAINTAIN_MASTERDATA(BDC of PA30 actually), and it has a table parameter called PROPOSED_VALUES as below:
we can simply insert below data into it can set value for Q0000-MASSN:
then we can see the field be filled:
Test code as below:
CALL FUNCTION 'HR_INFOTYPE_OPERATION' EXPORTING infty = '0000' number = p_pernr subtype = pa0000-subty objectid = pa0000-objps lockindicator = pa0000-sprps validityend = pa0000-endda validitybegin = pa0000-begda recordnumber = '000' record = l_p0000 " data will change to operation = 'MOD' dialog_mode = '1' IMPORTING return = l_bapireturn key = bapipakey_tab.
Supported operations of this FM:
*COP = Copy
*DEL = Delete
*DIS = Display
*EDQ = Lock/unlock
*INS = Create
*LIS9 = Delimit
*MOD = Change
*INSS = Create for Actions is not converted to Change
Note:
1. For doing this, we have to create implicit enhancement in top of FM HR_MAINTAIN_MASTERDATA to add the data of Q0000-MASSN into table PROPOSED_VALUES as I mentioned above.
2. The solution has been tested successfully in my system.