Esta rutina permite modificar algún campo de cabecera que visualiza la transacción FB02:
REPORT Z_UPDATE_XBLNR.
DATA:
T_BKPF TYPE STANDARD TABLE OF BKPF,
S_BKPF LIKE LINE OF T_BKPF,
S_RETURN TYPE BAPIRET2.
REFRESH: T_BKPF[]. CLEAR: S_BKPF, S_RETURN.
S_BKPF-MANDT = SY-MANDT.
S_BKPF-BUKRS = 'CL12'.
S_BKPF-BELNR = '0180001083'.
S_BKPF-GJAHR = '2019'.
S_BKPF-XBLNR = '11'.
APPEND S_BKPF TO T_BKPF.
CALL FUNCTION 'FI_HEADER_UPDATE'
TABLES
T_BKPF = T_BKPF.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = ABAP_ON
IMPORTING
RETURN = S_RETURN.
No hay comentarios:
Publicar un comentario