05-19-2020 4:42 PM
Hi,
I am creating a program in which i am using BAPI BAPI_BILLINGDOC_CREATEMULTIPLE , but not sure how to use lock object functionality before calling this BAPI
Please help me in this
05-19-2020 5:04 PM
05-19-2020 9:29 PM
05-20-2020 11:33 AM
Hi,
Thanks for your quick response.
I am using this bapi for creating invoices....i don't know about the object which bapi has used internally.....can u pls help me in this.
05-20-2020 11:44 AM
Hi ak6155
There is no need for you to lock the billing document. Actually, it is not possible, because the billing document does not exist, yet. You are about to create it.
What you could lock, possibly, but I'm not sure if it is needed in your case, is a Sales Order or a Delivery document. Example for Sales Order lock below.
CALL FUNCTION 'ENQUEUE_EVVBAKE'
EXPORTING
vbeln = lv_sales_order
EXCEPTIONS
foreign_lock = 1
system_failure = 2
OTHERS = 3.
IF sy-subrc = 0.
" document locked successfully
ELSE.
" error locking document
ENDIF.
Regards,05-20-2020 1:09 PM
Hello,
not need to lock explicitly anything before to use BAPI. BAPI will manage lock itself and return error message in RETURN table if an error occurs.
05-20-2020 12:17 PM
I still don't understand what you want to achieve with a lock... What is the relationship between the BAPI and the lock?