cancel
Showing results for 
Search instead for 
Did you mean: 

Choosing the select option in persona script

john_p_joseph
Discoverer
0 Kudos

Hello,

Trying to improve my SAP Persona script coding. Come across an issue with choosing the select option values. The script needed to choose an amount with greater than sign">" and I am not able to get it worked.

Sample code to get the select option working will be a great help.

Thanks

John

I am still not able to get it worked. Please see below the script that i am trying to make it work.

session.callTransaction("fchn"); session.findById("wnd[0]").sendVKey(0); session.findById("wnd[0]/usr/ctxtSEL_ZBUK-LOW").text = "FIX"; session.findById("wnd[0]/usr/tabsTABSTRIP_CHK/tabpUCOMM1/ssub%_SUBSCREEN_CHK:RFCHKN10:0001/ctxtSEL_WAER-LOW").text = "USD"; session.findById("wnd[0]/usr/tabsTABSTRIP_CHK/tabpUCOMM1/ssub%_SUBSCREEN_CHK:RFCHKN10:0001/txtSEL_RWBT-LOW").text = "200"; session.findById("wnd[0]/usr/tabsTABSTRIP_CHK/tabpUCOMM1/ssub%_SUBSCREEN_CHK:RFCHKN10:0001/txtSEL_RWBT-LOW").setFocus(); session.findById("wnd[0]/usr/tabsTABSTRIP_CHK/tabpUCOMM1/ssub%_SUBSCREEN_CHK:RFCHKN10:0001/txtSEL_RWBT-LOW").executeWebRequest("post", "action", "2", "cursorobj=M0%3A46%3A1%3A2B277%3A%3A5%3A34&cursor=0", null); session.findById("wnd[1]/usr/cntlOPTION_CONTAINER/shellcont/shell").executeWebRequest("post", "action", "53", "row_index=4&column_index=1", null); session.findById("wnd[1]/usr/cntlOPTION_CONTAINER/shellcont/shell").setFocus(); session.findById("wnd[1]/usr/cntlOPTION_CONTAINER/shellcont/shell").executeWebRequest("post", "action", "44", null, null); session.findById("wnd[1]/usr/cntlOPTION_CONTAINER/shellcont/shell").executeWebRequest("post", "action", "147", "row=4", null); session.findById("wnd[1]/usr/cntlOPTION_CONTAINER/shellcont/shell").executeWebRequest("post", "action", "47", "rows=%3B4%3B", null);

nabheetscn
Active Contributor
0 Kudos

Hello John

I tried with sample Material report and below code is able to set the great than value for plant in my case. Did you do the recording. It records the index of greater than , less button etc and presses it. Check the row_index variable which is responsible in my case for choosing whether you need less than or greater than.

session.findById("wnd[0]/usr/ctxtEM_WERKS-LOW").setFocus();
session.findById("wnd[0]/usr/btn%_EM_WERKS_%_APP_%-VALU_PUSH").press();


session.findById("wnd[1]/usr/tabsTAB_STRIP/tabpSIVA/ssubSCREEN_HEADER:SAPLALDB:3010/tblSAPLALDBSINGLE").modifyCell(0,"RSCSEL_255-SLOW_I","1000");
session.findById("wnd[1]/usr/tabsTAB_STRIP/tabpSIVA/ssubSCREEN_HEADER:SAPLALDB:3010/tblSAPLALDBSINGLE/btnRSCSEL_255-SOP_I[0,0]").setFocus();
session.findById("wnd[1]/usr/tabsTAB_STRIP/tabpSIVA/ssubSCREEN_HEADER:SAPLALDB:3010/tblSAPLALDBSINGLE/btnRSCSEL_255-SOP_I[0,0]").press();


session.findById("wnd[2]/usr/cntlOPTION_CONTAINER/shellcont/shell").executeWebRequest("post", "action", "53", "row_index=5&column_index=1", null);
session.findById("wnd[2]/usr/cntlOPTION_CONTAINER/shellcont/shell").setFocus();
session.findById("wnd[2]/usr/cntlOPTION_CONTAINER/shellcont/shell").executeWebRequest("post", "action", "44", null, null);
session.findById("wnd[2]/usr/cntlOPTION_CONTAINER/shellcont/shell").executeWebRequest("post", "action", "147", "row=4", null);
session.findById("wnd[2]/usr/cntlOPTION_CONTAINER/shellcont/shell").executeWebRequest("post", "action", "47", "rows=%3B4%3B", null);
session.findById("wnd[2]/usr/cntlOPTION_CONTAINER/shellcont/shell").executeWebRequest("post", "action", "53", "row_index=4&column_index=1", null);
session.findById("wnd[2]/usr/cntlOPTION_CONTAINER/shellcont/shell").executeWebRequest("post", "action", "147", "row=4", null);
session.findById("wnd[2]/usr/cntlOPTION_CONTAINER/shellcont/shell").executeWebRequest("post", "action", "47", "rows=%3B4%3B", null);
session.findById("wnd[2]/usr/cntlOPTION_CONTAINER/shellcont/shell").executeWebRequest("post", "action", "53", "row_index=4&column_index=1", null);
session.findById("wnd[2]/usr/cntlOPTION_CONTAINER/shellcont/shell").executeWebRequest("post", "action", "147", "row=4", null);
session.findById("wnd[2]/usr/cntlOPTION_CONTAINER/shellcont/shell").executeWebRequest("post", "action", "47", "rows=%3B4%3B", null);
session.findById("wnd[2]/usr/cntlOPTION_CONTAINER/shellcont/shell").executeWebRequest("post", "action", "53", "row_index=4&column_index=1", null);
session.findById("wnd[2]/usr/cntlOPTION_CONTAINER/shellcont/shell").executeWebRequest("post", "action", "2", "row_index=4&column_index=1", null);


session.findById("wnd[1]/usr/tabsTAB_STRIP/tabpSIVA/ssubSCREEN_HEADER:SAPLALDB:3010/tblSAPLALDBSINGLE/btnRSCSEL_255-SOP_I[0,0]").setFocus();

Accepted Solutions (0)

Answers (0)