cancel
Showing results for 
Search instead for 
Did you mean: 

Personas - hidden tabs still showing in SAPGui but ok in Webgui.

robyn
Discoverer
0 Kudos

Hi,  We have created a flavour for MM02 and hidden views e.g. accounting 2.   However, when the user clicks enter key through the views, the hidden views are still shown.  Script has been assigned to skip the hidden views, this works in webgui but not in SAPGui or Business Client.

Tested on Business Client 7.7, patch level 9 and also upgraded business client to 8, patch level 7.

Appreciate your help in how to be able to hide views and bypass them when clicking enter to next view.

Thanks, Robyn

 

View Entire Topic
robyn
Discoverer
0 Kudos

Thanks for quick response, appreciate your help.

To clarify - We have hidden tabs in MM02.   However if you click the 'enter' key to move from one tab to the next, it stops on the hidden tab.

In Webgui - the tab is greyed out and a message shown 'this tab cannot be displayed'.   User must hit enter to move past this tab to the next one.   For example, we've hidden Accounting 2 tab.   User clicks enter from accounting 1, it shows accounting 2 with message 'this tab cannot be displayed', user clicks enter to move to Costing 1.

Ideally, if the tab is hidden, the flavour would automatically skip it, but as it's not, we created a script to click enter key on behalf of user and assigned it to the 'on enter' script event.    

Initially, it seems to be a personas issue, as would not expect to need script to skip the hidden tab.  However, if script is required, the script works in webgui, but when we test in sapgui and Business Client, the script does not work, behaviour is to ignore the script and show the hidden tabs. 

Script:

const Screens = [
[1,"wnd[0]/usr/tabsTABSPR1/tabpSP01/ssubTABFRA1:SAPLMGMM:2004/subSUB1:SAPLMGD1:1002/ctxtRMMG1-MATNR",session.findById("wnd[0]/usr/tabsTABSPR1/tabpSP01").visible],
[2,"wnd[0]/usr/tabsTABSPR1/tabpSP02/ssubTABFRA1:SAPLMGMM:2004/subSUB1:SAPLMGD1:1002/ctxtRMMG1-MATNR",session.findById("wnd[0]/usr/tabsTABSPR1/tabpSP02").visible],
[4,"wnd[0]/usr/tabsTABSPR1/tabpSP04/ssubTABFRA1:SAPLMGMM:2000/subSUB1:SAPLMGD1:1004/ctxtRMMG1-MATNR",session.findById("wnd[0]/usr/tabsTABSPR1/tabpSP04").visible],
[5,"wnd[0]/usr/tabsTABSPR1/tabpSP05/ssubTABFRA1:SAPLMGMM:2000/subSUB1:SAPLMGD1:1004/ctxtRMMG1-MATNR",session.findById("wnd[0]/usr/tabsTABSPR1/tabpSP05").visible],
[6,"wnd[0]/usr/tabsTABSPR1/tabpSP06/ssubTABFRA1:SAPLMGMM:2000/subSUB1:SAPLMGD1:1001/ctxtRMMG1-MATNR",session.findById("wnd[0]/usr/tabsTABSPR1/tabpSP06").visible],
[7,"wnd[0]/usr/tabsTABSPR1/tabpSP07/ssubTABFRA1:SAPLMGMM:2004/subSUB1:SAPLMGD1:1001/ctxtRMMG1-MATNR",session.findById("wnd[0]/usr/tabsTABSPR1/tabpSP07").visible],
[8,"wnd[0]/usr/tabsTABSPR1/tabpSP08/ssubTABFRA1:SAPLMGMM:2010/subSUB1:SAPLMGD1:1004/ctxtRMMG1-MATNR",session.findById("wnd[0]/usr/tabsTABSPR1/tabpSP08").visible],
[9,"wnd[0]/usr/tabsTABSPR1/tabpSP09/ssubTABFRA1:SAPLMGMM:2000/subSUB1:SAPLMGD1:1001/ctxtRMMG1-MATNR",session.findById("wnd[0]/usr/tabsTABSPR1/tabpSP09").visible],
[10,"wnd[0]/usr/tabsTABSPR1/tabpSP10/ssubTABFRA1:SAPLMGMM:2000/subSUB2:SAPLMGD1:1001/ctxtRMMG1-MATNR",session.findById("wnd[0]/usr/tabsTABSPR1/tabpSP10").visible],
[11,"wnd[0]/usr/tabsTABSPR1/tabpSP11/ssubTABFRA1:SAPLMGMM:2010/subSUB1:SAPLMGD1:1002/ctxtRMMG1-MATNR",session.findById("wnd[0]/usr/tabsTABSPR1/tabpSP11").visible],
[12,"wnd[0]/usr/tabsTABSPR1/tabpSP12/ssubTABFRA1:SAPLMGMM:2000/subSUB1:SAPLMGD1:1001/ctxtRMMG1-MATNR",session.findById("wnd[0]/usr/tabsTABSPR1/tabpSP12").visible],
[13,"wnd[0]/usr/tabsTABSPR1/tabpSP13/ssubTABFRA1:SAPLMGMM:2000/subSUB1:SAPLMGD1:1001/ctxtRMMG1-MATNR",session.findById("wnd[0]/usr/tabsTABSPR1/tabpSP13").visible],
[14,"wnd[0]/usr/tabsTABSPR1/tabpSP14/ssubTABFRA1:SAPLMGMM:2000/subSUB1:SAPLMGD1:1001/ctxtRMMG1-MATNR",session.findById("wnd[0]/usr/tabsTABSPR1/tabpSP14").visible],
[15,"wnd[0]/usr/tabsTABSPR1/tabpSP15/ssubTABFRA1:SAPLMGMM:2000/subSUB1:SAPLMGD1:1005/ctxtRMMG1-MATNR",session.findById("wnd[0]/usr/tabsTABSPR1/tabpSP15").visible],
[17,"wnd[0]/usr/tabsTABSPR1/tabpSP17/ssubTABFRA1:SAPLMGMM:2000/subSUB1:SAPLMGD1:1001/ctxtRMMG1-MATNR",session.findById("wnd[0]/usr/tabsTABSPR1/tabpSP17").visible],
[19,"wnd[0]/usr/tabsTABSPR1/tabpSP19/ssubTABFRA1:SAPLMGMM:2000/subSUB1:SAPLMGD1:1005/ctxtRMMG1-MATNR",session.findById("wnd[0]/usr/tabsTABSPR1/tabpSP19").visible],
[20,"wnd[0]/usr/tabsTABSPR1/tabpSP20/ssubTABFRA1:SAPLMGMM:2000/subSUB1:SAPLMGD1:1005/ctxtRMMG1-MATNR",session.findById("wnd[0]/usr/tabsTABSPR1/tabpSP20").visible],
[21,"wnd[0]/usr/tabsTABSPR1/tabpSP21/ssubTABFRA1:SAPLMGMM:2000/subSUB1:SAPLMGD1:1011/ctxtRMMG1-MATNR",session.findById("wnd[0]/usr/tabsTABSPR1/tabpSP21").visible],
[22,"wnd[0]/usr/tabsTABSPR1/tabpSP22/ssubTABFRA1:SAPLMGMM:2000/subSUB1:SAPLMGD1:1006/ctxtRMMG1-MATNR",session.findById("wnd[0]/usr/tabsTABSPR1/tabpSP22").visible],
[23,"wnd[0]/usr/tabsTABSPR1/tabpSP23/ssubTABFRA1:SAPLMGMM:2000/subSUB1:SAPLMGD1:1001/ctxtRMMG1-MATNR",session.findById("wnd[0]/usr/tabsTABSPR1/tabpSP23").visible],
[24,"wnd[0]/usr/tabsTABSPR1/tabpSP24/ssubTABFRA1:SAPLMGMM:2000/subSUB1:SAPLMGD1:1008/ctxtRMMG1-MATNR",session.findById("wnd[0]/usr/tabsTABSPR1/tabpSP24").visible],
[25,"wnd[0]/usr/tabsTABSPR1/tabpSP25/ssubTABFRA1:SAPLMGMM:2000/subSUB1:SAPLMGD1:1008/ctxtRMMG1-MATNR",session.findById("wnd[0]/usr/tabsTABSPR1/tabpSP25").visible],
[26,"wnd[0]/usr/tabsTABSPR1/tabpSP26/ssubTABFRA1:SAPLMGMM:2000/subSUB1:SAPLMGD1:1009/ctxtRMMG1-MATNR",session.findById("wnd[0]/usr/tabsTABSPR1/tabpSP26").visible],
[27,"wnd[0]/usr/tabsTABSPR1/tabpSP27/ssubTABFRA1:SAPLMGMM:2000/subSUB1:SAPLMGD1:1009/ctxtRMMG1-MATNR",session.findById("wnd[0]/usr/tabsTABSPR1/tabpSP27").visible],
[28,"wnd[0]/usr/tabsTABSPR1/tabpSP28/ssubTABFRA1:SAPLMGMM:2000/subSUB1:SAPLMGD1:1001/ctxtRMMG1-MATNR",session.findById("wnd[0]/usr/tabsTABSPR1/tabpSP28").visible],
[29,"wnd[0]/usr/tabsTABSPR1/tabpSP29/ssubTABFRA1:SAPLMGMM:2000/subSUB1:SAPLMGD1:1005/ctxtRMMG1-MATNR",session.findById("wnd[0]/usr/tabsTABSPR1/tabpSP29").visible],
[30,"wnd[0]/usr/tabsTABSPR1/tabpSP30/ssubTABFRA1:SAPLMGMM:2000/subSUB1:SAPLMGD1:1002/ctxtRMMG1-MATNR",session.findById("wnd[0]/usr/tabsTABSPR1/tabpSP30").visible],
[31,"wnd[0]/usr/tabsTABSPR1/tabpSP31/ssubTABFRA1:SAPLMGMM:2004/subSUB1:SAPLMGD1:1002/ctxtRMMG1-MATNR",session.findById("wnd[0]/usr/tabsTABSPR1/tabpSP31").visible]]
function ScreenNumber() {
        for ( let i = 0; i< Screens.length;i++) {
            if (session.idExists(Screens[i][1])) {
            return [Screens[i][1].slice(29,31),i]
        }}return ["na",-1]
        }
function NextScreen() {



    var x = ScreenNumber()[1];
    var flag = true;
    var text = '';
    while (flag && x < Screens.length-1) {
        x += 1;

        if (Screens[x][2]) {
            flag = false;
            break;

        }

}

if (ScreenNumber()[1] == x){return false;} else{

if (!flag) {
session.findById(Screens[x][1].slice(0,31)).select()
}
return true;}
}

return NextScreen();
tamas_hoznek
Product and Topic Expert
Product and Topic Expert
0 Kudos

That "this tab cannot be displayed" message is a strange one... I don't remember seeing it yet. However, it is true that if the tab is hidden, then it is not supposed to show up at all in a browser, greyed out or not. So, just to verify: Do you have absolutely no required fields in that hidden tab under any circumstances that could remain unpopulated?
Also, what Personas SP are you working with and are you fully up to date with all notes?