Hi Wade, i had the requirement to change the incoming phone number.
As Andrei correctly described, it is necessary to change functions in header_jscripts.js.
Since it was not possible to change header_jscripts.js directly, I had to override JavaScript functions by redefineing them after the include of the header_jscripts.js file.
Here my coding for showing a text instead of the In-bound phone-number:
Component: ICCMP_HEADER HeaderViewSet.htm
.
.
.
<script type="text/Javascript" language="Javascript" src="/sap(====)/bc/bsp/sap/crmcmp_ic_frame/header_jscripts.js"></script><%-- Inboud-Processing --%>
<% data lv_thema type ZCRM_THEMA_TELE.%>
<script type="text/javascript">
ContextAreaMCMDisplay.prototype.setDnis = function( Dnis )
{
var element = this.myParent.getDnisDisplayElement( );
if( null != element )
{
if( " " != Dnis )
{
Dnis=EscapeHTML(Dnis);
element.innerHTML = Dnis;
Dnis = Dnis.replace(/\D/g,'');
<%
data: lt_thema type table of ZCRM_THEMA_TELE,
ls_thema type ZCRM_THEMA_TELE.
select * from ZCRM_THEMA_TELE into CORRESPONDING FIELDS OF TABLE lt_thema.
loop at lt_thema into ls_thema.
%>
var tel = "<%= ls_thema-TELEFONNR %>";
if ( Dnis.indexOf(tel) != -1 ){
Dnis = "<%= ls_thema-THEMA %>";
}
<%
ENDLOOP.
%>
element.innerHTML = Dnis;
element.title = Dnis;
} else
{
element.innerHTML = Dnis;
element.title = "";
}
}
}
}
contextArea.MCMDisplay.setDnis( sDnis );
</script>
.
.
.