Hi Hector,
Now I created some series for deposits and I execute your code, and always the deposit is created with the default series. I believe that is a bug, but can be business rule.
Maybe someone in this board have another approach or you can contact SAP about this.
Another topic(old) that describes the same problem, without solution
Default series in document numbers through SDK | SCN
P.S: SAP B1 9.1 PL 11
Good Luck.
Best regards,
Diego Lother
Message was edited by: DIEGO LOTHER