Generally material creation, PO creation, Sales order creation etc is not done directly by inserting data into standard table. It done thorough calling standard transaction. Transaction will ultimately insert data into table.
Advantage of using transaction is that all authorization and validation is handled by transaction.
In your BAPI you will find CALL Transaction statement.
Let me know if this make sense to you.
Regards,
Jigar Thakkar.