title: JCO transmits erroneous parameters to "CSAP_MAT_BOM_MAINTAIN"
body: <p>I am trying to call the function module &quot;CSAP_MAT_BOM_MAINTAIN&quot; to create a BOM in SAP but i get error.</p>
  <pre><code>    IFunctionTemplate ft = mRepository.getFunctionTemplate(&quot;CSAP_MAT_BOM_MAINTAIN&quot;);
      System.out.println(&quot; Functional Template Created &quot;);
        
      if (ft == null){return;}
          
      JCO.Function function = ft.getFunction();
      JCO.ParameterList importparams =function.getImportParameterList();
      
      //  Setting HeadData Structure Information
      
      //importparams.setValue(&quot;C000000609&quot;, &quot;CHANGE_NO&quot;);
      importparams.setValue(&quot;CPF10104&quot;, &quot;MATERIAL&quot;);
      importparams.setValue(&quot;1&quot;, &quot;BOM_USAGE&quot;);
      importparams.setValue(&quot;0001&quot;, &quot;PLANT&quot;);
      importparams.setValue(&quot;01&quot;, &quot;ALTERNATIVE&quot;);
      importparams.setValue(&quot;11.11.2011&quot;, &quot;VALID_FROM&quot;);      
      importparams.setValue(&quot;X&quot;, &quot;FL_COMMIT_AND_WAIT&quot;);
      importparams.setValue(&quot;X&quot;, &quot;FL_BOM_CREATE&quot;);
      importparams.setValue(&quot;X&quot;, &quot;FL_NEW_ITEM&quot;);
      importparams.setValue(&quot;X&quot;, &quot;FL_COMPLETE&quot;);
      importparams.setValue(&quot;X&quot;, &quot;FL_DEFAULT_VALUES&quot;);
      
      JCO.Structure headStructure = importparams.getStructure(&quot;I_STKO&quot;);
      headStructure.setValue(&quot;01&quot;, &quot;BOM_STATUS&quot;);
      headStructure.setValue(&quot;1&quot;, &quot;BASE_QUAN&quot;);
      headStructure.setValue(&quot;KG&quot;, &quot;BASE_UNIT&quot;);
      headStructure.setValue(&quot;BOM01&quot;, &quot;BOM_GROUP&quot;);
  
      JCO.Table stpo = function.getTableParameterList().getTable(&quot;T_STPO&quot;);
      stpo.appendRow();
      stpo.setValue(&quot;BOM Position 2.1&quot;, &quot;ITEM_TEXT1&quot;);
      stpo.setValue(&quot;L&quot;, &quot;ITEM_CATEG&quot;);
      stpo.setValue(&quot;L&quot;, &quot;ID_ITM_CTG&quot;);
      stpo.setValue(&quot;0010&quot;, &quot;ITEM_NO&quot;);
      stpo.setValue(&quot;0010&quot;, &quot;ID_ITEM_NO&quot;);
      stpo.setValue(&quot;13&quot;, &quot;COMP_QTY&quot;);
      stpo.setValue(&quot;KG&quot;, &quot;COMP_UNIT&quot;);
      stpo.setValue(&quot;00000001&quot;, &quot;ITEM_NODE&quot;);
      stpo.setValue(&quot;00000001&quot;, &quot;ITEM_COUNT&quot;);
      stpo.setValue(&quot;000000000000000000&quot;, &quot;DEP_LINK&quot;);
      stpo.setValue(&quot;12345-R6000001&quot;, &quot;COMPONENT&quot;);       
      //stpo.setValue(&quot;12345-R6000001&quot;, &quot;ID_COMP&quot;);
      
      JCO.Table stpu = function.getTableParameterList().getTable(&quot;T_STPU&quot;);
      stpu.appendRow();
      stpu.setValue(&quot;0&quot;, &quot;POINTER&quot;);
      stpu.setValue(&quot;00000000&quot;, &quot;STLKN&quot;);
      stpu.setValue(&quot;0010&quot;, &quot;STPOZ&quot;);
      stpu.setValue(&quot;0001&quot;, &quot;UPOSZ&quot;);
      stpu.setValue(&quot;46&quot;, &quot;UPMNG&quot;);
      stpu.setValue(&quot;T1&quot;, &quot;EBORT&quot;);
  </code></pre>
  <p>I get error:</p>
  <p><strong>Exception in thread &quot;main&quot; com.sap.mw.jco.JCO$AbapException: (126) ERROR: Terminate processing.</strong></p>
  <p>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.</p>
  <p>Please note that i have limited knowledge about ABAP programming.</p>
  <p>Can any one help me?</p>