Ela bloqueava todos registros que só eram desbloqueados quando a janela do programa que chamava a bapi era fechado.
Mesmo problema relatado neste link:
Primeiro fazia a chamada da BAPI, em seguida chamava a bapi BAPI_TRANSACTION_COMMIT.
Para resolver o problema, fiz a chamada da bapi da seguinte forma:
CALL FUNCTION 'BAPI_SHIPMENT_CHANGE' STARTING NEW TASK sy-uzeit
EXPORTING
headerdata = lwa_headerdata
headerdataaction = lwa_headerdataaction
TABLES
return = lt_return.
READ TABLE lt_return INTO lwa_return WITH KEY type = 'E'.
IF sy-subrc = 0 AND
( NOT okcode = 'DELE' OR
( okcode = 'DELE' AND NOT v_ck_prg IS INITIAL ) ).
MESSAGE w208(00) WITH lwa_return-message.
* ENDIF.
ELSE.
WAIT UP TO 2 SECONDS.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
EXPORTING
headerdata = lwa_headerdata
headerdataaction = lwa_headerdataaction
TABLES
return = lt_return.
READ TABLE lt_return INTO lwa_return WITH KEY type = 'E'.
IF sy-subrc = 0 AND
( NOT okcode = 'DELE' OR
( okcode = 'DELE' AND NOT v_ck_prg IS INITIAL ) ).
MESSAGE w208(00) WITH lwa_return-message.
* ENDIF.
ELSE.
WAIT UP TO 2 SECONDS.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
Fica aqui a dica