sapFunctions.Connection = sapConnection
Set sapMaterialUpd = sapFunctions.Add(”Z_SD_BAPI_SALES_DATA_UPD”)
With sapMaterialUpd
’set exports
.Exports(”PA_GLPUPDLEVEL”) = “S”
.Exports(”PA_VKORG”) = “FI14″
‘append table row
.Tables(”IT_SALES_DATA_UPD”).AppendRow
.Tables(”IT_SALES_DATA_UPD”)(1, “VKORG”) = “FI14″
.Tables(”IT_SALES_DATA_UPD”)(1, “MATNR”) = “W_3100″
.Tables(”IT_SALES_DATA_UPD”)(1, “DATBI”) = “99991231″
.Tables(”IT_SALES_DATA_UPD”)(1, “DATAB”) = “20041231″
.Tables(”IT_SALES_DATA_UPD”)(1, “KBETR”) = “2222″
.Tables(”IT_SALES_DATA_UPD”)(1, “KONWA”) = “EUR”
End With
‘call the function module
If sapMaterialUpd.Call() = True Then
‘do something with the return tables here…Else
Debug.Print sapMaterialUpd.Exception
End If