We have a requirement to trigger billing document once goods issue is completed for an OBD. Thus, we configured a custom output where medium is set to 'special function (8)'. In this function, billing BAPI
'BAPI_BILLINGDOC_CREATEFROMDATA' is called IN BACKGROUND TASK.
This approach works fine when output processing time is not immediate. However, optimally it should be called and immediately create the billing once OBD has goods issue completed. Strangely, when we maintained output condition record with Dispatch time '4 send immediately' no billing is created and nothing is retuned in processing log, although output is green. During the analysis, I put a breakpoint inside the BAPI before FUNCTION
CALL 'GN_INVOICE_CREATE' and noticed when I executed few initial SINGLE steps then hit continue (F8), billing will be generating successfully.
ECC System :
EHP7 FOR SAP ERP 6.0 and SPS11