Thank you Cheryl. I read his blog and followed him. But there is a problem. The first function worked, but the second did not. Curiously, I called the function on the step 5, but it prompted me "Calling the given WEBRFC failed" with the step 2 of the script. I tested the function Z_WEBRFC_READ_DATA_SH and it works well.
Here is the script button:
{"Id":"3deaadeb-7655-4d1a-9b82-df269a920cb1","Actions":[{"ActionCategory":"0","Action":"4099","ControlID":"ses[0]\/wnd[1]\/usrUSRAREA\/loopcntSAPLSDH40600\/ctxtG_SIMFIELDSVALUE[0]","Content":"selvalue"},{"ActionCategory":"0","Action":"1","ControlID":"ses[0]\/wnd[1]\/tbar[0]\/btn[12]","Content":""},{"ActionCategory":"0","Action":"4103","ControlID":"ses[0]","Content":""},{"ActionCategory":"0","Action":"4104","ControlID":"ses[0]","Content":"args.rand = Math.random();"},{"ActionCategory":"0","Action":"4105","ControlID":"ses[0]","Content":"http:\/\/sap.suv.com:8000\/sap\/bc\/webrfc?_FUNCTION=Z_WEBRFC_READ_DATA_SH&_rand={rand}"},{"ActionCategory":"0","Action":"4100","ControlID":"Personas\/f4b26cf4-842a-49f9-a095-668ed7b14aa1","Content":"fieldname"},{"ActionCategory":"1","Action":"4353","ControlID":"Personas\/f4b26cf4-842a-49f9-a095-668ed7b14aa1","Content":"GSDM"},{"ActionCategory":"2","Action":"4100","ControlID":"Personas\/94106d02-2a0a-4355-9b9b-29987c32efd8","Content":"selvalue"},{"ActionCategory":"1","Action":"4353","ControlID":"Personas\/f4b26cf4-842a-49f9-a095-668ed7b14aa1","Content":"YHM"},{"ActionCategory":"2","Action":"4100","ControlID":"Personas\/244eddf2-c06c-43a5-b754-9e8d6233f2fe","Content":"selvalue"}]}