Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Powersheel Script - Set a checkbox as true

PierreD
Newcomer
0 Kudos

Hi,

I am working on a project to automate work order creation in PM. I try to use Powershell with SAP Script.

I have an issue with a checkbox (VIQMEL/MSAUS). I would like to check it but I cannot find the way.

This is the code I tried :

$ID = Invoke-Method -object $session -methodName "findById" -methodParameter @("wnd[0]/usr/subSUB_ALL:SAPLCOIH:3001/ssubSUB_LEVEL:SAPLCOIH:1100/tabsTS_1100/tabpIHKZ/ssubSUB_AUFTRAG:SAPLCOIH:1120/subNOTIFICATION_DATA:SAPLIQS0:7010/tabsTSTRIP_7010/tabp$TS01/ssubTSTRIP_SCREEN:SAPLIQS0:7020/chkVIQMEL-MSAUS");
Set-Property -object $ID -propertyName "selected" -propertyValue @($true); 

See the Script code (which works) : Session.findById("wnd[0]/usr/subSUB_ALL:SAPLCOIH:3001/ssubSUB_LEVEL:SAPLCOIH:1100/tabsTS_1100/tabpIHKZ/ssubSUB_AUFTRAG:SAPLCOIH:1120/subNOTIFICATION_DATA:SAPLIQS0:7010/tabsTSTRIP_7010/tabp$TS01/ssubTSTRIP_SCREEN:SAPLIQS0:7020/chkVIQMEL-MSAUS").Selected = True

PierreD_0-1709813326503.png

Do you have a idea how I could manage that?

Thanks a lot for you help

0 REPLIES 0