usingSystem;usingERPConnect;// Set your ERPConnect licenseLIC.SetLic("xxxx");usingvarconnection=newR3Connection(host:"server.acme.org",systemNumber:00,userName:"user",password:"passwd",language:"EN",client:"001"){Protocol=ClientProtocol.NWRFC,};connection.Open();try{// Create a function object, fill parameters and executeRFCFunctionf=connection.CreateFunction("BAPI_OUTB_DELIVERY_CHANGE");//Fill in values for HEADER_DATA SAP Import StructureRFCStructurefHeader=f.Exports["HEADER_DATA"].ToStructure();fHeader["DELIV_NUMB"]="0080016236";f.Exports["DELIVERY"].ParamValue="0080016236";// first BatchRFCTablefPosT=f.Tables["ITEM_DATA"];RFCStructurefPos=fPosT.AddRow();fPos["DELIV_NUMB"]="0080016236";fPos["DELIV_ITEM"]="000010";fPos["MATERIAL"]="100-302";fPos["BATCH"]="EIGEN_HALB";fPos["HIERARITEM"]="10";fPos["USEHIERITM"]="1";fPos["DLV_QTY"]=1;fPos["DLV_QTY_IMUNIT"]=1;fPos["FACT_UNIT_NOM"]="1";fPos["FACT_UNIT_DENOM"]="1";fPos["SALES_UNIT"]="ST";//Second BatchfPos=fPosT.AddRow();fPos["DELIV_NUMB"]="0080016236";fPos["DELIV_ITEM"]="000010";fPos["MATERIAL"]="100-302";fPos["BATCH"]="FREMD_HALB";fPos["HIERARITEM"]="10";fPos["USEHIERITM"]="1";fPos["DLV_QTY"]=2;fPos["DLV_QTY_IMUNIT"]=2;fPos["FACT_UNIT_NOM"]="1";fPos["FACT_UNIT_DENOM"]="1";fPos["SALES_UNIT"]="ST";//Fill in values for ITEM_CONTROL TableRFCTablefPosCtrlT=f.Tables["ITEM_CONTROL"];RFCStructurefPosCtrl=fPosCtrlT.AddRow();fPosCtrl["DELIV_NUMB"]="0080016236";fPosCtrl["DELIV_ITEM"]="000010";fPosCtrl["CHG_DELQTY"]="X";// Execute functionf.Execute();//Create commit function objectRFCFunctionfuncCommit=r3Connection1.CreateFunction("BAPI_TRANSACTION_COMMIT");funcCommit.Exports["WAIT"].ParamValue="X";// Execute commit functionfuncCommit.Execute();}catch(Exceptione1){Console.WriteLine(e1.Message);}connection.Close();