Skip to Content
0
Former Member
Sep 19, 2007 at 12:51 PM

How to..Show a wait dialog when data loads, then hide once data loads

32 Views

Description: This code will have the SAP default wait dialog become visible when the page loads and hidden after the data is returned for the table.

1. Place this code within the head tags.

<head>

<SCRIPT Language="JavaScript">

function show_wait_dialog () {

document.body.style.cursor = "wait";

document.getElementById("SAPBWProcessBoxSpan").style.setAttribute("display", "block", false);

document.getElementById("SAPBWProcessBoxSpan").style.setAttribute("visibility", "visible", false);

document.getElementById("SAPBWProcessBoxSpan").style.setAttribute("overflow", "auto", false);

document.getElementById("SAPBWProcessBoxSpan").style.setAttribute("width", "255", false);

document.getElementById("SAPBWProcessBoxSpan").style.setAttribute("left", document.body.offsetWidth/2-125, false); document.getElementById("SAPBWProcessBoxSpan").style.setAttribute("top",

document.body.offsetHeight/2-38, false);

}

function hide_wait_dialog () {

document.body.style.cursor = "auto";

document.getElementById("SAPBWProcessBoxSpan").style.setAttribute("display", "block", false);

document.getElementById("SAPBWProcessBoxSpan").style.setAttribute("visibility", "hidden", false);

document.getElementById("SAPBWProcessBoxSpan").style.setAttribute("overflow", "auto", false);

document.getElementById("SAPBWProcessBoxSpan").style.setAttribute("width", "255", false);

document.getElementById("SAPBWProcessBoxSpan").style.setAttribute("left", document.body.offsetWidth/2-125, false); document.getElementById("SAPBWProcessBoxSpan").style.setAttribute("top", document.body.offsetHeight/2-38, false);

}

</script>

</head>

2. Place this code right after the <body> tag.

<body>

<!-- New Code -->

<script>

show_wait_dialog()

</script>

3. Lastly, place this code below right after the Table Item and before the </body> tag. (in this case GR1Table)

<object>

<param name="OWNER" value="SAP_BW"/>

<param name="CMD" value="GET_ITEM"/>

<param name="NAME" value="GR1Table"/>

<param name="ITEM_CLASS" value="CL_RSR_WWW_ITEM_GRID"/>

<param name="DATA_PROVIDER" value="DP"/>

<param name="WIDTH" value="700"/>

<param name="BLOCK_SIZE" value="3000"/>

<param name="SHOW_PAGING_AREA_TOP" value="X"/>

<param name="HELP_SERVICE" value="ZPRINTING"/>

<param name="HELP_SERVICE_CLASS" value="Z_PRINTING_HELP_SERVICE"/>

ITEM: GR1Table

</object></P>

<P>

<!┬ŚNew code --&#61664;

<script>

hide_wait_dialog ()

</script>

</body>