SAP standard report H37_SELECT_ADIANTAMENTO (selecting employees for a payroll process) shows the use of this FM :
wa_fval = payid.
perform fill tables proposed_values using '0267' "#EC NOTEXT
'P0267-PAYID' "#EC NOTEXT
wa_fval
'00'. "#EC NOTEXT
call function 'HR_MAINTAIN_MASTERDATA'
EXPORTING
pernr = pernr-pernr
actio = 'INS'
tclas = 'A'
begda = bondt
IMPORTING
return = rc
return1 = rc1
TABLES
proposed_values = proposed_values.
* Check for errors (mostly, personnel number is blocked)
if ( not ( rc-type = 'E' ) ) or "#EC NOTEXT
( not ( rc1-type = 'E' ) ). "#EC NOTEXT
reject.
endif.
Apart from the parameters passed above, there is one important parameter DIALOG_MODE (not used above) which can be used to control how the infotypes are called and maintained
DIALOG_MODE = '0' Updated using mode 'N' of BDC (Background without errors)
DIALOG_MODE = '1' Stops at error
DIALOG_MODE = '2' Updated in Foreground, infotype screens appear in sequence of updation.