[英]Get value from global data
How to identify the value contained in the following global variable, into lv_local
variable?如何将下面全局变量中包含的值识别为
lv_local
变量?
data lv_local type string.
lv_local = '(SAPLMIGO)LCL_MIGO_GLOBALS=>KERNEL->S_CONTROL-VGART'.
You can assign the variable to a field symbol and read the value out of it.您可以将变量分配给字段符号并从中读取值。 Example:
例子:
CONSTANTS:
lco_migo_vgart_path TYPE string VALUE '(SAPLMIGO)LCL_MIGO_GLOBALS=>KERNEL->S_CONTROL-VGART'.
FIELD-SYMBOLS:
<migo_vgart> TYPE any.
DATA:
lv_vgart TYPE vgart.
ASSIGN (lco_migo_vgart_path) to <migo_vgart>.
IF sy-subrc = 0.
lv_vgart = <migo_vgart>.
ENDIF.
Be aware that accessing variables from the call stack like this is not ideal for productive usage, so looking for an alternative implementation is strongly recommended.请注意,像这样从调用堆栈访问变量对于生产用途来说并不理想,因此强烈建议寻找替代实现。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.