RYZYKOWNIE:
TABLES: PAnnnn.
UPDATE PAnnnn
SET <field1> = <value1>
WHERE <field2> = <value2>
IF SY-SUBRC = 0.
ENDIF.
WRITE: SY-DBCNT.
BEZPIECZNIE:
DATA: Pnnnn LIKE Pnnnn.
DATA: bapi_return TYPE bapireturn1.
DATA: bapi_pakey TYPE bapipakey.
CALL FUNCTION ‘HR_INFOTYPE_OPERATION’
EXPORTING
INFTY = ‘nnnn‘
NUMBER = <pernr>
SUBTYPE = <subty>
* OBJECTID =
* LOCKINDICATOR =
VALIDITYEND = <begda>
VALIDITYBEGIN = <endda>
* RECORDNUMBER =
RECORD = Pnnnn
OPERATION =
* DIALOG_MODE =
* NOCOMMIT =
IMPORTING
RETURN = BAPI_RETURN
KEY = BAPI_PAKEY.