How to set value of Q0000-MASSN in FM HR_INFOTYPE_OPERATION


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:

How to set value of Q0000-MASSN in FM HR_INFOTYPE_OPERATION_第1张图片

we can simply insert below data into it can set value for Q0000-MASSN:

How to set value of Q0000-MASSN in FM HR_INFOTYPE_OPERATION_第2张图片

then we can see the field be filled:

How to set value of Q0000-MASSN in FM HR_INFOTYPE_OPERATION_第3张图片


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.


similar requirement of other fields in the screen can follow this way too.


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.

你可能感兴趣的:(type,action,Q0000-MASSN)