Purpose
Call a non-RFC function module (MEASUREM_DOCUM_READ_LAST)

The Open Call Interface allows us to call up function modules which are not RFC-released. For security reasons the Open Call Interface nevertheless checks the user rights for calling the function module remotely so that you can control which function modules should be callable by GuiXT (authorization object S_RFC).

Example
For a given measuring point we read the last measurement via the function module MEASUREM_DOCUM_READ_LAST.

 
GuiXT Script


//set a test value
Set V[point] "8"

// create output structure
CreateStructure V[measurement] recdv recdu

// read last measurement
Call "MEASUREM_DOCUM_READ_LAST" _
 
export.POINT="point" _
 
import.IMRG_WA="measurement"

// display value and unit
Message "&V[measurement.recdv] &V[measurement.recdu]"

You may use a JavaScript routine to convert the floating point number into decimal format, see Converting a floating point number. Alternatively you can use another SAP function module:

// convert value to decimal
Set V[float] "&V[measurement.recdv]"

Call MD_CONV_QUANTITY_FLOAT_TO_PACK _
 
export.IV_MENGE="float" _
 
import.EV_MENGE="dec"

// remove 0-decimals using GuiXT calculation
Set V[dec] &V[dec] + 0

// display value and unit
Message "&V[dec] &V[measurement.recdu]"


Components
InputAssistant