I'm using a batch input on FB60 so as to generate a parked invoice. Furthermore, I'm calling it in complex posting 'cause sometimes it implies posting on asset (posting keys 70 and 75).
The point is that the batch input works fine, but sometimes in the exact same situtation, with non rationnal explanation.
I'm using this :
sl_bdcoption-dismode = 'N'.
sl_bdcoption-racommit = 'X'.
sl_bdcoption-nobinpt = 'X'.
sl_bdcoption-updmode = 'L'. " or A or S, still the same
CALL TRANSACTION 'FB60' USING tl_bdcdata
MESSAGES INTO tl_messtab
OPTIONS FROM sl_bdcoption.
COMMIT WORK AND WAIT.
so that I can catch the number of my created invoice from the message table. Indeed I need this to update BKPF which has some custom fields (on the Basis Data tab). All the transactional controls on my custom fields are deactivated through an Export to Memory and I know how the screen displays with the option sl_bdcoption-nobinpt = 'X', both set before the call.
First I thought my bug was coming from the Update Mode in structure sl_bdcoption, but I've tried to set it to A, S or even L. I've tried many options from that structure, but the bug remains random...
How can I be sure that the call is ended and that my new invoice is created ?
Any oher way I can do this ? Any BAPI I haven't found ?
Thx in advance for your help,