Hi Sergey,
I have also the same requirement.
Good to know that there is a BAPI for the same.
If i execute the BAPI in SE37, it is showing 'Program SAPLBOS04 contains syntax error.
What does that mean?
Do i need to activate ECC-DIMP?
If not the code given by you is an enhancement or you have copied the standard to a custom FM.
Thanks in advance.
Regards,
Sankar Roy
SAP ABAP Consultant