cancel
Showing results for 
Search instead for 
Did you mean: 

Property 'selectedTab' does not exist on type 'IGuiComponent' on GuiTabStrip

0 Kudos

I am trying to hide the tab in a tabstrip dynamically using script in personas. But in script I am getting the below error.

"Property 'selectedTab' does not exist on type 'IGuiComponent'."

if (session.findById("wnd[0]/usr/subSUB_ALL:SAPLCOIH:*/ssubSUB_LEVEL:SAPLCOIH:*/tabsTS_1100/tabp+CUK/ssubSUB_AUFTRAG:SAPLCOIH:1180/ssubCUSTSCR1:SAPLXWOC:0900/tabsTC").selectedTab.id === "wnd[0]/usr/subSUB_ALL:SAPLCOIH:*/ssubSUB_LEVEL:SAPLCOIH:*/tabsTS_1100/tabp+CUK/ssubSUB_AUFTRAG:SAPLCOIH:1180/ssubCUSTSCR1:SAPLXWOC:0900/tabsTC/tabpRAM"){
    session.findById("wnd[0]/usr/subSUB_ALL:SAPLCOIH:*/ssubSUB_LEVEL:SAPLCOIH:*/tabsTS_1100/tabp+CUK/ssubSUB_AUFTRAG:SAPLCOIH:1180/ssubCUSTSCR1:SAPLXWOC:0900/tabsTC/tabpFSMSCE").select();
}

The same type of code is working on other tabs. The only difference is this is Tab inside Tab.

Could anyone please let me know what is the issue ?

Accepted Solutions (0)

Answers (1)

Answers (1)

bwills
Contributor
0 Kudos

Hello,

First look to see if the tab is on the screen, then second hide the tab (you can also select or show the tab in the if statement. See my example code below.

if(session.idExists("wnd[0]/usr/tabsTAB_GROUP_10/tabp10\\TAB19"))
{
	//session.findById("wnd[0]/usr/tabsTAB_GROUP_10/tabp10\\TAB19").select();  //This selects the tab
	//session.findById("wnd[0]/usr/tabsTAB_GROUP_10/tabp10\\TAB19").hide();    //This hides the tab
	//session.findById("wnd[0]/usr/tabsTAB_GROUP_10/tabp10\\TAB19").show();    //This show the tab
}

Hope this helps.

Thanks,

Brian

0 Kudos

Yes . I have tried this as well. Even if I record I am getting the same code. BUt still giving same error as mentioned above.

0 Kudos

Hi Brian ,

I am using the same logic to hide the default tab in tcode LS03n . Its working in GUI screens but the same is not reflecting on my FIORI screen. Can you please help me what I am missing . I have created an global script in my flavor and bind it on the onLoad event .

bwills
Contributor
0 Kudos

I am not using Fiori screens, so this is out of scope of my knowledge.