on 2024 Oct 21 10:36 AM
I was trying to release the block of an invoice document. However, I have encountered an issue wherein the payment block in RBKP in SE16 is still present after successfully releasing the invoice.
I've used BAPI_INCOMINGINVOICE_RELEASE for releasing the invoice and BAPI_INCOMINGINVOICE_CHANGE to remove the payment block value in RBKP table.
The flow is this:
Call BAPI_INCOMINGINVOICE_RELEASE to release the payment block of the invoice. After that, BAPI_INCOMING_CHANGE will be called.
CALL FUNCTION 'BAPI_INCOMINGINVOICE_RELEASE'
EXPORTING
invoicedocnumber = ls_blocked_inv-belnr
fiscalyear = ls_blocked_inv-gjahr
TABLES
return = it_return.
lx_header-INV_DOC_NO = ls_blocked_inv-belnr.
lx_header-INV_YEAR = ls_blocked_inv-gjahr.
lx_header-pmnt_block = ' '.
lx_headerX-PMNT_BLOCK = ' '.(Here I've tried to use X and R but no success)
CALL FUNCTION 'BAPI_INCOMINGINVOICE_CHANGE'
EXPORTING
invoicedocnumber = ls_blocked_inv-belnr
fiscalyear = ls_blocked_inv-gjahr
headerdata_change = lx_header
headerdata-changex = lx_headerx
TABLES
return = it_return.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
Request clarification before answering.
User | Count |
---|---|
33 | |
21 | |
16 | |
8 | |
7 | |
6 | |
5 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.