Skip to Content

Simple Implicit Enhancement to change SAP Logo in NWBC Home page

Working on SAP SRM 7.02 using NWBC for HTML, my requirement is to customize the home page of NWBC and designing Login page/change password pages of NWBC, as a part of this requirement, we need to change the NWBC home page SAP logo on top left corner. I implemented a simple implicit enhancement for changing SAP Logo on NWBC home page. Actually SAP has provided Configuration table (NWBC_CFG) for NWBC Home page customization (SAP Help link), but not for SAP logo. Many SAP NWBC folks recommended, designing your own theme and add your own logo instead of sap provided. Finally I found a solution to change the  logo by implementing implicit enhancement in the SAP repository program NWBC_FILE_REPOSITORY_SRC. This report program contains only one local class and get_file method. This program loads into the memory whenever starts the SAP server and it can only read the encoded logo image to base64 format. Please follow the below listed steps to achieve this requirement.

Step 1:

Encode image into base64 format using below link. The SAP Logo image maximum size is 248X24 pixel.

http://www.base64-image.de/


Step 2:

SAP has provided standard themes to change the NWBC look and feel. Based on the standard themes, the variable (lv_file_name) condition value will change. Here, I have added the following condition and logic in my enhancement.


Implement implicit enhancement at end of the GET_FILE method and add the following logic.

ENHANCEMENT ZMOURI_EI_LOGO_FILE.


IF lv_file_name EQ ‘logo_nwbc.jpg’ or
lv_file_name
EQ ‘logo.jpg’.

CLEAR: lv_string_base64,<lv_file_content>,er_file_content,lv_xstring.

CONCATENATE lv_string_base64
‘/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAIBAQIBAQICAgICAgICAwUDAwMDAwYEBAMFBwYHBwcGBwcICQsJCAgKCAcHCg0KCgsMDAwMBwkODw0MDgsMDAz/2wBDAQICAgMDAwYDAwYMCAcIDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAz/wAARCAAaAPIDASIAAhEBAxEB/8Q’ “#EC * 

. . . . .

‘eZX0Fuo3UDOd/Z6l+Ilp8K7CL4pXOh3njGNnW6n0m4M1vMm4+Wx/cxBXK43IqsqnIDuPmPbfbfesvdRuoEan233orL3UUAf/Z’ “#EC *

INTO lv_string_base64 .


create data er_file_content type (lv_data_type).

assign er_file_content->* to <lv_file_content>.

lv_xstring = cl_http_utility=>decode_x_base64( lv_string_base64 ).

if lv_xstring is not initial.
<lv_file_content>
= lv_xstring.
endif.
ENDIF.


ENDENHANCEMENT.


Step 3:

Restart the SAP server after activate the implicit enhancement.


Step 4:

Now login into the SAP NWBC system and SAP logo is changed with my company MOURITECH logo.


Home_page.jpg

8 Comments
You must be Logged on to comment or reply to a post.