Skip to Content
Former Member
Oct 19, 2012 at 08:24 AM

Use empty line



I am new in scripting.

I need to automate some actions using vbs, For example I want to add some materials using CN22.

The problem is that there are different number of materials already existing in the different NTWs and I need the new material to be inserted in the first empty line.

Please help me if you know any way to solve this using vbs.

'For example: In this case there is one material existing already and empty line used for new material is [1]

'but how to choose line [2 or other] if different number of materials already exist?

session.findById("wnd[0]/usr/tabsTABSTRIP_2700/tabpALLE/ssubSUBSCR_2000:SAPLCOMK:2701/tblSAPLCOMKTCTRL_2701/ctxtRESBD-MATNR[1,1]").text = "Material"

Thank you!