gorfc
gorfc copied to clipboard
How to add the tables parameter
In changes v0.1.0 says - Table parameter accepts also array of variables. Because this method https://github.com/SAP/gorfc/issues/17 now work, I'm trying to put an array of variables
params := map[string]interface{}{ "ATHDRLEVELS": []string{"000001000825"} } r, _ := c.Call("Z_IEXT_PRODORDCONF_CREATE_HDR", params)
This parameter is substituted only for the ORDERID field. Could you explain how to use an array of variables in the tables parameter. Thanks.
This way can work in my test when you want to add table param:
table_data := map[string]interface{}{
"BLDAT": time.Date(2024, 2, 14, 0, 0, 0, 0, time.Local),
"EBELN": "4500000003",
"EBELP": "00010",
}
params := map[string]interface{}{
"IV_ZWMSLX": "A",
"IV_BWART": "101",
"IV_CODE": "01",
"ITAB": []interface{}{table_data}, // table param
}
r, e := conn.Call("ZMM_001", params)