【发布时间】:2022-11-10 23:26:22
【问题描述】:
我有这个 RFC
如何设置 I_VALUE_DATA 键的内部值?
<z_atcws_t_test>
<I_W_INFORMATION>str</I_W_INFORMATION>
<I_VALUE_DATA>
<E_DATA1>st</E_DATA1>
</I_VALUE_DATA>
</z_atcws_t_test>
public static void TEST() throws JCoException{
String RFC_NAME = "TEST";
System.out.println(RFC_NAME);
JCoDestination destination = JCoDestinationManager.getDestination(DestinationConcept.Destinations.TEST);
JCoFunction function = destination.getRepository().getFunction(RFC_NAME);
if (function == null) throw new RuntimeException(RFC_NAME + " not found in SAP.");
try {
JCoParameterList input = function.getImportParameterList();
function.getImportParameterList().setValue("I_W_INFORMATION", "str");
// Set the internal value here
function.getImportParameterList().setValue("I_VALUE_DATA", "str");
function.setAbapClassExceptionMode(AbapClassException.Mode.FULL);
function.execute(destination);
} catch (AbapException e) {
System.out.println(e);
return;
} catch (JCoException e) {
System.out.println(e);
return;
}
}
【问题讨论】:
-
我不知道这个 XML 代表什么。我猜你的意思是
I_VALUE_DATA是你的启用RFC的功能模块Z_ATCWS_T_TEST的结构化导入参数,其中包含组件E_DATA1,你问如何设置该组件的值? -
如何设置字段 E_DATA1 ?