Skip to Content
Former Member
Jan 19, 2012 at 10:16 AM

Call SAP function module through Excel VBA


Hi experts,

I try to call the remote-enabled function module SWNC_COLLECTOR_GET_SYSTEMLOAD from Excel VBA to save the workload data of the system and to create some graphs etc.

Logon to SAP works fine for now, but I have no idea how to hande the import parameter (which is an export parameter from the view of the function module).

Here is an coding excerpt:


Set oParam1 = objDisplay.exports("COMPONENT")

oParam1.Value = "TOTAL"

Set oParam2 = objDisplay.exports("PERIODTYPE")

oParam2.Value = "D"

Set oParam3 = objDisplay.exports("PERIODSTRT")

oParam3.Value = "01012012"


Set oParam4 = objDisplay.imports("T_SYSTEMLOAD")

' Call FM


Debug.Print oParam4

The debug-print gives an error 0. I have no clue what the error means.

Could anybody help me to solve the issue?