什么时候SAPExecuteCommand Refresh不起作用?

2020-09-12 12:34发布

点击此处---> 群内免费提供SAP练习系统(在群公告中)加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中)你好 我试图以编程方式刷新/重...

         点击此处--->   EasySAP.com群内免费提供SAP练习系统(在群公告中)

加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中)


你好

我试图以编程方式刷新/重新显示工作表中的数据源,但是Application.Run(" SAPExecuteCommand"," Refresh"," DS_1")的输出始终为0,这意味着执行失败。 我需要具备什么条件才能成功?

注意:运行以下代码时,

lresult = Application.Run(" SAPSetRefreshBehaviour","关闭")l

Application.Run(" SAPMoveDimension"," DS_1"," 0CURRENCY"," ROWS")

lresult = Application.Run(" SAPSetRefreshBehaviour","打开")

如果我将输出结果打印出来,则会得到以下结果:

1

0

1

我不确定是否有帮助,但我想我会把它放在那里。

谢谢

3条回答
clever101
2020-09-12 12:53

您好 Dimitar Stratiev

Application.Run(" SAPExecuteCommand"," Refresh"," DS_1")-如果数据源不存在或无法刷新,则返回0

Application.Run(" SAPExecuteCommand"," Refresh"," DS_1")-只要存在数据源并能够刷新,它就会返回1。

BTW,Application.Run(" SAPExecuteCommand"," Refresh"," DS_1")不验证是否刷新了它。 没有任何先决条件,它将刷新

我在下面的代码中执行

lResult = Application.Run(" SAPSetRefreshBehaviour","关闭")

MsgBox(lResult)

lResult = Application.Run(" SAPSetFilter"," DS_1"," 0BC_VEND1__0BC_EVAL"," 1")

MsgBox(lResult)

lResult = Application.Run(" SAPSetRefreshBehaviour","开")

MsgBox(lResult)

lResult = Application.Run(" SAPExecuteCommand","刷新"," DS_1")

MsgBox(lResult)

它返回

1

1

1

1

希望这会有所帮助

感谢与问候,
Subhash

一周热门 更多>