使用Excel宏创建SAP发票

2020-08-25 07:26发布

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

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


嗨,我是Excel Macro的新手,并试图在SAP GUI中进行自动化。

我需要帮助将销售订单号复制到GSAP中。

当前,我改用Range(" D3")并想更改为variable,所以我可以继续进行循环功能。

预先感谢

这是我当前的脚本

ub GSAP_VF01()'设置与sap的连接:昏暗的应用程序,连接,会话作为对象设置SapGuiAuto = GetObject(" SAPGUI")设置App = SapGuiAuto.GetScriptingEngine设置连接= App.Children(0)设置会话=连接 .Children(0)

session.findById(" wnd [0]")。resizeWorkingPane 138,23,False session.findById(" wnd [0]/tbar [0]/okcd")。Text =" vf01" session.findById(" wnd [0]")。sendVKey 0 session.findById(" wnd [0]/usr/cmbRV60A-FKART")。Key =" ZF5" session.findById(" wnd [0]/usr/ctxtRV60A-FKDAT")。 文本= Range(" D3")session.findById(" wnd [0]/usr/tblSAPMV60ATCTRL_ERF_FAKT/ctxtKOMFK-VBELN [0,0]")。Text = Range(" C3")session.findById(" wnd [0] ").sendVKey 0 session.findById(" wnd [0]/usr/btnTC_OUTPUT")。press session.findById(" wnd [0]/usr/tblSAPDV70ATC_NAST3/ctxtDNAST-KSCHL [1,1]")。Text =" zina" session.findById(" wnd [0]/usr/tblSAPDV70ATC_NAST3/ctxtDNAST-KSCHL [1,2]")。Text =" zinb" session.findById(" wnd [0]/usr/tblSAPDV70ATC_NAST3/ctxtDNAST-KSCHL [ 1,2]")。SetFocus session.findById(" wnd [0]/usr/tblSAPDV70ATC_NAST3/ctxtDNAST-KSCHL [1,2]")。caretPosition = 4 session.findById(" wnd [0]")。sendVKey 0 session.findById(" wnd [0]/usr/tblSAPDV70ATC_NAST3")。getAbsoluteRow(0).Selected = True session.findById(" wnd [0]/usr/tblSAPDV70ATC_NAST3")。getAbsoluteRow(1).S 当选= True session.findById(" wnd [0]/usr/tblSAPDV70ATC_NAST3")。getAbsoluteRow(2).Selected = True session.findById(" wnd [0]/usr/tblSAPDV70ATC_NAST3/lblDV70A-STATUSICON [0,2]" ).SetFocus session.findById(" wnd [0]/usr/tblSAPDV70ATC_NAST3/lblDV70A-STATUSICON [0,2]")。caretPosition = 0 session.findById(" wnd [0]/tbar [1]/btn [2] ").press session.findById(" wnd [0]/usr/ctxtNAST-LDEST")。Text =" CBJ02P167_SMPS" session.findById(" wnd [0]/usr/ctxtNAST-LDEST")。caretPosition = 14个会话。 findById(" wnd [0]")。sendVKey 0 session.findById(" wnd [0]/tbar [0]/btn [3]")。press session.findById(" wnd [0]/tbar [1]/btn [2]")。press session.findById(" wnd [0]/usr/ctxtNAST-LDEST")。Text =" CBJ02P167_SMPS" session.findById(" wnd [0]/usr/ctxtNAST-LDEST")。caretPosition = 14 session.findById(" wnd [0]")。sendVKey 0 session.findById(" wnd [0]/tbar [0]/btn [3]")。press session.findById(" wnd [0]/tbar [1]/btn [2]")。press session.findById(" wnd [0]/usr/ctxtNAST-LDEST")。Text =" CBJ02P167_SMPS" session.findById(" wnd [0]/usr/ctxtNAST-LDEST ").SetFocus session.fi ndById(" wnd [0]/usr/ctxtNAST-LDEST")。caretPosition = 14 session.findById(" wnd [0]")。sendVKey 0 session.findById(" wnd [0]/tbar [0]/btn [ 3]")。press session.findById(" wnd [0]/tbar [0]/btn [11]")。press session.findById(" wnd [0]/tbar [0]/okcd")。Text = "/img/nvf03" session.findById(" wnd [0]")。sendVKey 0 session.findById(" wnd [0]/mbar/menu [0]/menu [11]")。选择session.findById(" wnd [ 1]/usr/tblSAPLVMSGTABCONTROL")。getAbsoluteRow(0).Selected = True session.findById(" wnd [1]/tbar [0]/btn [37]")。press session.findById(" wnd [0]/tbar [0]/okcd")。Text =" pdf!" session.findById(" wnd [0]")。sendVKey 0

结束子

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

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


嗨,我是Excel Macro的新手,并试图在SAP GUI中进行自动化。

我需要帮助将销售订单号复制到GSAP中。

当前,我改用Range(" D3")并想更改为variable,所以我可以继续进行循环功能。

预先感谢

这是我当前的脚本

ub GSAP_VF01()'设置与sap的连接:昏暗的应用程序,连接,会话作为对象设置SapGuiAuto = GetObject(" SAPGUI")设置App = SapGuiAuto.GetScriptingEngine设置连接= App.Children(0)设置会话=连接 .Children(0)

session.findById(" wnd [0]")。resizeWorkingPane 138,23,False session.findById(" wnd [0]/tbar [0]/okcd")。Text =" vf01" session.findById(" wnd [0]")。sendVKey 0 session.findById(" wnd [0]/usr/cmbRV60A-FKART")。Key =" ZF5" session.findById(" wnd [0]/usr/ctxtRV60A-FKDAT")。 文本= Range(" D3")session.findById(" wnd [0]/usr/tblSAPMV60ATCTRL_ERF_FAKT/ctxtKOMFK-VBELN [0,0]")。Text = Range(" C3")session.findById(" wnd [0] ").sendVKey 0 session.findById(" wnd [0]/usr/btnTC_OUTPUT")。press session.findById(" wnd [0]/usr/tblSAPDV70ATC_NAST3/ctxtDNAST-KSCHL [1,1]")。Text =" zina" session.findById(" wnd [0]/usr/tblSAPDV70ATC_NAST3/ctxtDNAST-KSCHL [1,2]")。Text =" zinb" session.findById(" wnd [0]/usr/tblSAPDV70ATC_NAST3/ctxtDNAST-KSCHL [ 1,2]")。SetFocus session.findById(" wnd [0]/usr/tblSAPDV70ATC_NAST3/ctxtDNAST-KSCHL [1,2]")。caretPosition = 4 session.findById(" wnd [0]")。sendVKey 0 session.findById(" wnd [0]/usr/tblSAPDV70ATC_NAST3")。getAbsoluteRow(0).Selected = True session.findById(" wnd [0]/usr/tblSAPDV70ATC_NAST3")。getAbsoluteRow(1).S 当选= True session.findById(" wnd [0]/usr/tblSAPDV70ATC_NAST3")。getAbsoluteRow(2).Selected = True session.findById(" wnd [0]/usr/tblSAPDV70ATC_NAST3/lblDV70A-STATUSICON [0,2]" ).SetFocus session.findById(" wnd [0]/usr/tblSAPDV70ATC_NAST3/lblDV70A-STATUSICON [0,2]")。caretPosition = 0 session.findById(" wnd [0]/tbar [1]/btn [2] ").press session.findById(" wnd [0]/usr/ctxtNAST-LDEST")。Text =" CBJ02P167_SMPS" session.findById(" wnd [0]/usr/ctxtNAST-LDEST")。caretPosition = 14个会话。 findById(" wnd [0]")。sendVKey 0 session.findById(" wnd [0]/tbar [0]/btn [3]")。press session.findById(" wnd [0]/tbar [1]/btn [2]")。press session.findById(" wnd [0]/usr/ctxtNAST-LDEST")。Text =" CBJ02P167_SMPS" session.findById(" wnd [0]/usr/ctxtNAST-LDEST")。caretPosition = 14 session.findById(" wnd [0]")。sendVKey 0 session.findById(" wnd [0]/tbar [0]/btn [3]")。press session.findById(" wnd [0]/tbar [1]/btn [2]")。press session.findById(" wnd [0]/usr/ctxtNAST-LDEST")。Text =" CBJ02P167_SMPS" session.findById(" wnd [0]/usr/ctxtNAST-LDEST ").SetFocus session.fi ndById(" wnd [0]/usr/ctxtNAST-LDEST")。caretPosition = 14 session.findById(" wnd [0]")。sendVKey 0 session.findById(" wnd [0]/tbar [0]/btn [ 3]")。press session.findById(" wnd [0]/tbar [0]/btn [11]")。press session.findById(" wnd [0]/tbar [0]/okcd")。Text = "/img/nvf03" session.findById(" wnd [0]")。sendVKey 0 session.findById(" wnd [0]/mbar/menu [0]/menu [11]")。选择session.findById(" wnd [ 1]/usr/tblSAPLVMSGTABCONTROL")。getAbsoluteRow(0).Selected = True session.findById(" wnd [1]/tbar [0]/btn [37]")。press session.findById(" wnd [0]/tbar [0]/okcd")。Text =" pdf!" session.findById(" wnd [0]")。sendVKey 0

结束子

付费偷看设置
发送
1条回答
粗暴的香蕉
1楼 · 2020-08-25 07:58.采纳回答

嗨,

恐怕您的问题与SAP Intelligent Robotic Process Automation产品无关,而与Microsoft Excel宏有关。

但是,如果您尝试通过Excel文件自动创建发票,则可以使用SAP Intelligent RPA轻松地完成此操作。

您可以参考我们的门户网站,以获取有关以下内容的更多详细信息: 产品

此致

J。

一周热门 更多>