Error using SAP BAPI "CSAP_MAT_BOM_MAINTAIN"
I am trying to use the SAP BAPI "CSAP_MAT_BOM_MAINTAIN" to create a BOM in SAP but i get error.

IFunctionTemplate ft = mRepository.getFunctionTemplate("CSAP_MAT_BOM_MAINTAIN");
	    System.out.println(" Functional Template Created ");
	      
		if (ft == null){return;}
			
		JCO.Function function = ft.getFunction();
		JCO.ParameterList importparams =function.getImportParameterList();
		
		//  Setting HeadData Structure Information
		
		//importparams.setValue("C000000609", "CHANGE_NO");
		importparams.setValue("CPF10104", "MATERIAL");
		importparams.setValue("1", "BOM_USAGE");
		importparams.setValue("0001", "PLANT");
		importparams.setValue("01", "ALTERNATIVE");
		importparams.setValue("11.11.2011", "VALID_FROM");		
		importparams.setValue("X", "FL_COMMIT_AND_WAIT");
		importparams.setValue("X", "FL_BOM_CREATE");
		importparams.setValue("X", "FL_NEW_ITEM");
		importparams.setValue("X", "FL_COMPLETE");
		importparams.setValue("X", "FL_DEFAULT_VALUES");
		
		JCO.Structure headStructure = importparams.getStructure("I_STKO");
		headStructure.setValue("01", "BOM_STATUS");
		headStructure.setValue("1", "BASE_QUAN");
		headStructure.setValue("KG", "BASE_UNIT");
		headStructure.setValue("BOM01", "BOM_GROUP");

		JCO.Table stpo = function.getTableParameterList().getTable("T_STPO");
		stpo.appendRow();
		stpo.setValue("BOM Position 2.1", "ITEM_TEXT1");
		stpo.setValue("L", "ITEM_CATEG");
		stpo.setValue("L", "ID_ITM_CTG");
		stpo.setValue("0010", "ITEM_NO");
		stpo.setValue("0010", "ID_ITEM_NO");
		stpo.setValue("13", "COMP_QTY");
		stpo.setValue("KG", "COMP_UNIT");
		stpo.setValue("00000001", "ITEM_NODE");
		stpo.setValue("00000001", "ITEM_COUNT");
		stpo.setValue("000000000000000000", "DEP_LINK");
		stpo.setValue("12345-R6000001", "COMPONENT");		
		//stpo.setValue("12345-R6000001", "ID_COMP");
		
		JCO.Table stpu = function.getTableParameterList().getTable("T_STPU");
		stpu.appendRow();
		stpu.setValue("0", "POINTER");
		stpu.setValue("00000000", "STLKN");
		stpu.setValue("0010", "STPOZ");
		stpu.setValue("0001", "UPOSZ");
		stpu.setValue("46", "UPMNG");
		stpu.setValue("T1", "EBORT");

I get error: 

**Exception in thread "main" com.sap.mw.jco.JCO$AbapException: (126) ERROR: Terminate processing.**

After searching over the internet i found that this error comes when we have wrong input params.
But i am unable to find the error.

Please note that i have limited knowledge about SAP ABAP programming.

Can any one help me?
Error using SAP BAPI "CSAP_MAT_BOM_MAINTAIN"
===

I am trying to use the SAP BAPI "CSAP_MAT_BOM_MAINTAIN" to create a BOM in SAP but i get error.

IFunctionTemplate ft = mRepository.getFunctionTemplate("CSAP_MAT_BOM_MAINTAIN");
	    System.out.println(" Functional Template Created ");
	      
		if (ft == null){return;}
			
		JCO.Function function = ft.getFunction();
		JCO.ParameterList importparams =function.getImportParameterList();
		
		//  Setting HeadData Structure Information
		
		//importparams.setValue("C000000609", "CHANGE_NO");
		importparams.setValue("CPF10104", "MATERIAL");
		importparams.setValue("1", "BOM_USAGE");
		importparams.setValue("0001", "PLANT");
		importparams.setValue("01", "ALTERNATIVE");
		importparams.setValue("11.11.2011", "VALID_FROM");		
		importparams.setValue("X", "FL_COMMIT_AND_WAIT");
		importparams.setValue("X", "FL_BOM_CREATE");
		importparams.setValue("X", "FL_NEW_ITEM");
		importparams.setValue("X", "FL_COMPLETE");
		importparams.setValue("X", "FL_DEFAULT_VALUES");
		
		JCO.Structure headStructure = importparams.getStructure("I_STKO");
		headStructure.setValue("01", "BOM_STATUS");
		headStructure.setValue("1", "BASE_QUAN");
		headStructure.setValue("KG", "BASE_UNIT");
		headStructure.setValue("BOM01", "BOM_GROUP");

		JCO.Table stpo = function.getTableParameterList().getTable("T_STPO");
		stpo.appendRow();
		stpo.setValue("BOM Position 2.1", "ITEM_TEXT1");
		stpo.setValue("L", "ITEM_CATEG");
		stpo.setValue("L", "ID_ITM_CTG");
		stpo.setValue("0010", "ITEM_NO");
		stpo.setValue("0010", "ID_ITEM_NO");
		stpo.setValue("13", "COMP_QTY");
		stpo.setValue("KG", "COMP_UNIT");
		stpo.setValue("00000001", "ITEM_NODE");
		stpo.setValue("00000001", "ITEM_COUNT");
		stpo.setValue("000000000000000000", "DEP_LINK");
		stpo.setValue("12345-R6000001", "COMPONENT");		
		//stpo.setValue("12345-R6000001", "ID_COMP");
		
		JCO.Table stpu = function.getTableParameterList().getTable("T_STPU");
		stpu.appendRow();
		stpu.setValue("0", "POINTER");
		stpu.setValue("00000000", "STLKN");
		stpu.setValue("0010", "STPOZ");
		stpu.setValue("0001", "UPOSZ");
		stpu.setValue("46", "UPMNG");
		stpu.setValue("T1", "EBORT");

I get error: 

**Exception in thread "main" com.sap.mw.jco.JCO$AbapException: (126) ERROR: Terminate processing.**

After searching over the internet i found that this error comes when we have wrong input params.
But i am unable to find the error.

Please note that i have limited knowledge about SAP ABAP programming.

Can any one help me?