Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the tables parameter to feedback the error #17

Closed
li2575250 opened this issue Nov 7, 2019 · 1 comment
Closed

Add the tables parameter to feedback the error #17

li2575250 opened this issue Nov 7, 2019 · 1 comment

Comments

@li2575250
Copy link

There is no problem using the following code

c, _ := gorfc.ConnectionFromParams(abapSystem())
	/**var t *testing.T**/
	
	in_date1, _ := time.Parse("20060102", "20190101")
	in_date2, _ := time.Parse("20060102", "20190701")
	params := map[string]interface{}{
		"I_FDATE": in_date1,
		"I_TDATE": in_date2,
		"I_RFC": "RFC",
	}

but add the tables parameter to feedback the error

c, _ := gorfc.ConnectionFromParams(abapSystem())
	/**var t *testing.T**/
	
	in_date1, _ := time.Parse("20060102", "20190101")
	in_date2, _ := time.Parse("20060102", "20190701")
	params := map[string]interface{}{
		"I_FDATE": in_date1,
		"I_TDATE": in_date2,
		"I_RFC": "RFC",
		"T_BUKRS": map[string]interface{}{
			"BUKRS": "1270",
		},	
	}

error info:

[root@localhost example]# go run hello_gorfc.go
panic: reflect: call of reflect.Value.Index on map Value

goroutine 1 [running]:
reflect.Value.Index(0x4c65a0, 0xc420068180, 0x15, 0x0, 0x15, 0xc42009a300, 0x0)
	/usr/local/go/src/reflect/value.go:894 +0x1a8
github.com/sap/gorfc/gorfc.fillTable(0xe221d0, 0xe1c740, 0x4c65a0, 0xc420068180, 0x0, 0xe16a10)
	/root/Code/go/src/github.com/sap/gorfc/gorfc/gorfc.go:245 +0x18e
github.com/sap/gorfc/gorfc.fillVariable(0x5, 0xe16610, 0xc42008e420, 0x4c65a0, 0xc420068180, 0xe221d0, 0x0, 0x0)
	/root/Code/go/src/github.com/sap/gorfc/gorfc/gorfc.go:152 +0x769
github.com/sap/gorfc/gorfc.fillFunctionParameter(0xe15a90, 0xe16610, 0x4e065b, 0x7, 0x4c65a0, 0xc420068180, 0x0, 0x0)
	/root/Code/go/src/github.com/sap/gorfc/gorfc/gorfc.go:126 +0x297
github.com/sap/gorfc/gorfc.(*Connection).Call(0xc420068150, 0x4e3516, 0x19, 0x4c65a0, 0xc4200681b0, 0x0, 0x0, 0x0)
	/root/Code/go/src/github.com/sap/gorfc/gorfc/gorfc.go:1073 +0x3b6
main.main()
	/root/Code/go/src/github.com/sap/gorfc/example/hello_gorfc.go:40 +0x46c
exit status 2

BUKRS type is char

Ask everybody elder brother to help have a look. tks...

@bsrdjan
Copy link
Contributor

bsrdjan commented May 4, 2021

Closing due to the sunset of the project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants