添加行ME51N

2020-08-14 06:06发布

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

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


大家好!

我正在尝试通过Access表在ME51N中添加行。 下面的代码填充了显示的前10行,但是当我需要添加另一行时,出现错误。 如何在不出错的情况下添加行? 谢谢!

对于i = 0到NumeroRecord-1'popola campi riga 0 SapSession.findById(" wnd [0]/usr/subSUB0:SAPLMEGUI:0013/subSUB2:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI: 3212/cntlGRIDCONTROL/shellcont/shell")。modifyCell i," KNTTP",myArray0(i)'categoria SapSession.findById(" wnd [0]/usr/subSUB0:SAPLMEGUI:0013/subSUB2:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS :: 1200/subSUB1:SAPLMEGUI:3212/cntlGRIDCONTROL/shellcont/shell")。modifyCell i," MATNR",myArray1(i)'materiale SapSession.findById(" wnd [0]/usr/subSUB0:SAPLMEGUI:0013/subSUB2: SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:3212/cntlGRIDCONTROL/shellcont/shell")。modifyCell i," TXZ01",myArray2(i)'descrizione SapSession.findById(" wnd [0]/usr/subSUB0 :SAPLMEGUI:0013/subSUB2:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:3212/cntlGRIDCONTROL/shellcont/shell")。modifyCell i," MENGE",myArray3(i)'quantitàSapSession.findById(" wnd [0]/usr/subSUB0:SAPLMEGUI:0013/subSUB2:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1: SAPLMEGUI:3212/cntlGRIDCONTROL/shellcont/shell")。modifyCell i," MEINS",myArray4(i)'unitàmisura SapSession.findById(" wnd [0]/usr/subSUB0:SAPLMEGUI:0013/subSUB2:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:3212/cntlGRIDCONTROL/shellcont/shell")。modifyCell i," WGBEZ",myArray5(i)'gruppo merci SapSession.findById(" wnd [0]/usr/subSUB0:SAPLMEGUI: 0013/subSUB2:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:3212/cntlGRIDCONTROL/shellcont/shell")。modifyCell i," NAME1",myArray6(i)'divinge SapSession.findById(" wnd [0] /usr/subSUB0:SAPLMEGUI:0013/subSUB2:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:3212/cntlGRIDCONTROL/shellcont/shell").modifyCell i," LGOBE",myArray7(i)'magazzino SapSession。 findById(" wnd [0]/usr/subSUB0:SAPLMEGUI:0013/subSUB2:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:3212/cntlGRIDCONTROL/shellcont/shell")。modifyCell i," EKGRP",myArray8 (i)'GrA SapSession.findById(" wnd [0]/usr/subSUB0:SAPLMEGUI:0013/subSUB2:SAPLMEVIEW S:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:3212/cntlGRIDCONTROL/shellcont/shell")。modifyCell i," AFNAM",myArray9(i)'richiedente SapSession.findById(" wnd [0]/usr/subSUB0 :SAPLMEGUI:0013/subSUB2:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:3212/cntlGRIDCONTROL/shellcont/shell")。modifyCell i," LIFNR",myArray10(i)'fornitore SapSession.findById(" wnd [0]/usr/subSUB0:SAPLMEGUI:0013/subSUB2:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:3212/cntlGRIDCONTROL/shellcont/shell")。modifyCell i," PREIS",myArray11(i)' PrezzoValorizzazione下一个

1.jpg

1.jpg (74.0 kB)

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

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


大家好!

我正在尝试通过Access表在ME51N中添加行。 下面的代码填充了显示的前10行,但是当我需要添加另一行时,出现错误。 如何在不出错的情况下添加行? 谢谢!

对于i = 0到NumeroRecord-1'popola campi riga 0 SapSession.findById(" wnd [0]/usr/subSUB0:SAPLMEGUI:0013/subSUB2:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI: 3212/cntlGRIDCONTROL/shellcont/shell")。modifyCell i," KNTTP",myArray0(i)'categoria SapSession.findById(" wnd [0]/usr/subSUB0:SAPLMEGUI:0013/subSUB2:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS :: 1200/subSUB1:SAPLMEGUI:3212/cntlGRIDCONTROL/shellcont/shell")。modifyCell i," MATNR",myArray1(i)'materiale SapSession.findById(" wnd [0]/usr/subSUB0:SAPLMEGUI:0013/subSUB2: SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:3212/cntlGRIDCONTROL/shellcont/shell")。modifyCell i," TXZ01",myArray2(i)'descrizione SapSession.findById(" wnd [0]/usr/subSUB0 :SAPLMEGUI:0013/subSUB2:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:3212/cntlGRIDCONTROL/shellcont/shell")。modifyCell i," MENGE",myArray3(i)'quantitàSapSession.findById(" wnd [0]/usr/subSUB0:SAPLMEGUI:0013/subSUB2:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1: SAPLMEGUI:3212/cntlGRIDCONTROL/shellcont/shell")。modifyCell i," MEINS",myArray4(i)'unitàmisura SapSession.findById(" wnd [0]/usr/subSUB0:SAPLMEGUI:0013/subSUB2:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:3212/cntlGRIDCONTROL/shellcont/shell")。modifyCell i," WGBEZ",myArray5(i)'gruppo merci SapSession.findById(" wnd [0]/usr/subSUB0:SAPLMEGUI: 0013/subSUB2:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:3212/cntlGRIDCONTROL/shellcont/shell")。modifyCell i," NAME1",myArray6(i)'divinge SapSession.findById(" wnd [0] /usr/subSUB0:SAPLMEGUI:0013/subSUB2:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:3212/cntlGRIDCONTROL/shellcont/shell").modifyCell i," LGOBE",myArray7(i)'magazzino SapSession。 findById(" wnd [0]/usr/subSUB0:SAPLMEGUI:0013/subSUB2:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:3212/cntlGRIDCONTROL/shellcont/shell")。modifyCell i," EKGRP",myArray8 (i)'GrA SapSession.findById(" wnd [0]/usr/subSUB0:SAPLMEGUI:0013/subSUB2:SAPLMEVIEW S:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:3212/cntlGRIDCONTROL/shellcont/shell")。modifyCell i," AFNAM",myArray9(i)'richiedente SapSession.findById(" wnd [0]/usr/subSUB0 :SAPLMEGUI:0013/subSUB2:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:3212/cntlGRIDCONTROL/shellcont/shell")。modifyCell i," LIFNR",myArray10(i)'fornitore SapSession.findById(" wnd [0]/usr/subSUB0:SAPLMEGUI:0013/subSUB2:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:3212/cntlGRIDCONTROL/shellcont/shell")。modifyCell i," PREIS",myArray11(i)' PrezzoValorizzazione下一个

1.jpg

1.jpg (74.0 kB)
付费偷看设置
发送
5条回答
当学会了学习
1楼-- · 2020-08-14 06:40

你好,有人遇到同样的问题吗? 我真的不知道该如何处理;-(

太Q了
2楼-- · 2020-08-14 06:36

如果您想获得答案,请使用Windows的UI SAP GUI标签重新标记您的问题。

南山jay
3楼-- · 2020-08-14 06:48
< p>我不直接熟悉ME51N,但是不存在未加载到网格中的数据,您需要查找可见的行数,然后在到达可见的末尾并开始时添加分页向下事件

SAP小菜
4楼-- · 2020-08-14 06:48

这听起来像是一个嵌套循环。对于每个i,您都有一个j。或至少一个可以添加到脚本中的嵌套逻辑块 处理事件。

即,一旦您单击" check button"(执行按钮),您将执行其他一些逻辑以使ith记录有效以移至ith + 1记录

奄奄一息的小鱼
5楼-- · 2020-08-14 06:55

感谢您重播。

我明白了,但我不知道如何更改代码。

关于此问题的另一件事是:

在图片1中,我显示了一个隐藏的区域,因为我没有单击"检查按钮"或按Enter。 之后,我将访问一个必须填充的字段,以使SAP接受我的数据。

如果我在" For cycle"中调用" Enter event",则会出现错误,并且无法继续填充剩余的行。

它在第一行之后停止,我不知道如何处理此问题以及添加新页面。

1.jpg 2.jpg

一周热门 更多>