You may search the forum/SAP Web site with your favorite Web search engine. I see many answers for search below. Based on the results, if it still doesn't solve, you may anyway refine your query/provide more information.
BAPI create data element site:sap.com
BAPI create domain site:sap.com
BAPI create table site:sap.com