Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

hi gurus

Former Member
0 Likes
785

hi gurus,

can any body tell me standard program............

to change my first screen...........logon screen where we r entering client user password

i need change first screen .......they want multiple client on that screen...........

also want to change screen after login ........

thanks in advance,

regards,

Imran

4 REPLIES 4
Read only

Former Member
0 Likes
742

Hi,

Please deny these kind of requirements. There is no way you can meet this. how can u login into multiple clients through a single login screen.

null

Read only

sreeramkumar_madisetty
Active Contributor
0 Likes
742

Hi

Then go for Single-Sign-On server.

Regards,

Sree

Read only

Former Member
0 Likes
742

Hi Imran

To create a logo u have to remember one thing is u have to upload that logo through OAER or SE78

for uploading logo in OAER

Enter class name as PICTURES

Class type as OT

Object key the name of ur logo want to upload

then press F8 or execute

Then it will automatically creates a folder for ur LOGO and upload ur logo in that folder

After that In the left side bottom of the page u can c the following options

1)Detail

2)Document Info

3)Keywords

4)Create

goto Detail in which u can find the Object Id

which u have to paste in the function module of this program

Check this program1

*&---------------------------------------------------------------------*
*& Report  ZREPORT_LOGO                                                *
*&                                                                     *
*&---------------------------------------------------------------------*
*&                                                                     *
*&                                                                     *
*&---------------------------------------------------------------------*

REPORT  ZREPORT_LOGO.
DATA:
docking TYPE REF TO cl_gui_docking_container,
picture_control_1 TYPE REF TO cl_gui_picture,
url(256) TYPE c .
DATA : sum(4) , num1(4) , num2(4).
PARAMETERS: p_dummy(4) DEFAULT '4' .
PARAMETERS: p_dummy1(4) DEFAULT '5' .


AT SELECTION-SCREEN OUTPUT.




PERFORM show_pic.

START-OF-SELECTION.


num1 = p_dummy.
num2 = p_dummy1.

sum = num1 + num2.

WRITE : / sum.



*&---------------------------------------------------------------------*
*& Form show_pic
*&---------------------------------------------------------------------*
FORM show_pic.

DATA: repid LIKE sy-repid.

repid = sy-repid.


CREATE OBJECT picture_control_1 EXPORTING parent = docking.

CHECK sy-subrc = 0.
CALL METHOD picture_control_1->set_3d_border
EXPORTING
border = 5.

CALL METHOD picture_control_1->set_display_mode
EXPORTING
display_mode = cl_gui_picture=>display_mode_stretch.
CALL METHOD picture_control_1->set_position
EXPORTING
height = 100
left = 500
top = 10
width = 300.

CALL METHOD picture_control_1->load_picture_from_url
EXPORTING
url = 'c:/pic.bmp'.
IF sy-subrc NE 0.


ENDIF.

ENDFORM. "show_pic

Check this program 2

program zsap_picture_demo.

set screen 200.

TYPE-POOLS cndp.

************************************************************************
* CLASS    c_event_receiver
* DEFINITION
************************************************************************
class c_event_receiver definition.
* The class is used to test the events raised by the cl_gui_picture
* class
 public section.
   methods event_handler_picture_dblclick
           for event picture_dblclick of cl_gui_picture
           importing mouse_pos_x mouse_pos_y sender.
   methods event_handler_context_menu
           for event context_menu of cl_gui_picture
           importing sender.
   methods event_handler_context_menu_sel
           for event context_menu_selected of cl_gui_picture
           importing fcode sender.
 endclass.


************************************************************************
* DATA
************************************************************************
 data function like sy-ucomm.         " OK-Code field in screen 200
 data url  type cndp_url.                " URL-field in screen 200
 data url2 type cndp_url.               " URL-field in screen 200
 data picture_control_1 type ref to cl_gui_picture.
 data picture_control_2 type ref to cl_gui_picture.
 data container_1 type ref to cl_gui_custom_container.
 data container_2 type ref to cl_gui_custom_container.
 data event_receiver  type ref to c_event_receiver.
 data event_tab type cntl_simple_events.
 data event_tab_line type cntl_simple_event.
 data return type i.

************************************************************************
* PBO
* before_output
************************************************************************
module before_output output.
 set pf-status 'MAIN0001'.
 IF PICTURE_CONTROL_1 IS INITIAL.

* Create controls
   create object container_1
     exporting container_name = 'PICTURE_CONTROL_1'.
   create object container_2
     exporting container_name = 'PICTURE_CONTROL_2'.

   CREATE OBJECT PICTURE_CONTROL_1 exporting parent = container_1.
   CREATE OBJECT PICTURE_CONTROL_2 exporting parent = container_2.

* Register the events
   EVENT_TAB_LINE-EVENTID = CL_GUI_PICTURE=>EVENTID_PICTURE_DBLCLICK.
   append EVENT_TAB_LINE to EVENT_TAB.
   EVENT_TAB_LINE-EVENTID = CL_GUI_PICTURE=>EVENTID_CONTEXT_MENU.
   append EVENT_TAB_LINE to EVENT_TAB.
 EVENT_TAB_LINE-EVENTID = CL_GUI_PICTURE=>EVENTID_CONTEXT_MENU_SELECTED.
   append EVENT_TAB_LINE to EVENT_TAB.

   CALL METHOD PICTURE_CONTROL_1->SET_REGISTERED_EVENTS
     exporting
       EVENTS = event_tab.

   CALL METHOD PICTURE_CONTROL_2->SET_REGISTERED_EVENTS
     exporting
       EVENTS = event_tab.

* Create the event_receiver object and set the handlers for the events
* of the picture controls
   create object event_receiver.
   set handler event_receiver->event_handler_picture_dblclick
               FOR PICTURE_CONTROL_1.
   set handler event_receiver->event_handler_context_menu
               FOR PICTURE_CONTROL_1.
   set handler event_receiver->event_handler_context_menu_sel
               FOR PICTURE_CONTROL_1.
   set handler event_receiver->event_handler_picture_dblclick
               FOR PICTURE_CONTROL_2.
   set handler event_receiver->event_handler_context_menu
               FOR PICTURE_CONTROL_2.
   set handler event_receiver->event_handler_context_menu_sel
               FOR PICTURE_CONTROL_2.

* Set the display mode to 'normal' (0)
   CALL METHOD PICTURE_CONTROL_1->SET_DISPLAY_MODE
        EXPORTING DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_NORMAL.
   CALL METHOD PICTURE_CONTROL_2->SET_DISPLAY_MODE
        EXPORTING DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_NORMAL.

* Set 3D Border
   CALL METHOD PICTURE_CONTROL_1->SET_3D_BORDER
      exporting border = 1.
   CALL METHOD PICTURE_CONTROL_2->SET_3D_BORDER
      exporting border = 1.


* new async implementation since 4.6C
CALL FUNCTION 'DP_PUBLISH_WWW_URL'
 EXPORTING
   OBJID                       = 'HTMLCNTL_TESTHTM2_SAP_AG'
   LIFETIME                    = cndp_lifetime_transaction
 IMPORTING
   URL                         = url
 EXCEPTIONS
   OTHERS                      = 1.

* Load the picture by using the url generated by the data provider.
   if sy-subrc = 0.
     CALL METHOD PICTURE_CONTROL_1->LOAD_PICTURE_FROM_URL_ASYNC
        exporting url = url.
   endif.

CALL FUNCTION 'DP_PUBLISH_WWW_URL'
 EXPORTING
   OBJID                       = 'DEMOWORD97SAPLOGO'
   LIFETIME                    = cndp_lifetime_transaction
 IMPORTING
   URL                         = url2
 EXCEPTIONS
   OTHERS                      = 1.

* load image
   if sy-subrc = 0.
     CALL METHOD PICTURE_CONTROL_2->LOAD_PICTURE_FROM_URL_async
        exporting url = url2.
   endif.

 endif.
endmodule.


************************************************************************
* PAI
* after_input
************************************************************************
module after_input input.
 case function.
* At the end of the program destroy the control
   when 'BACK'.
     CALL METHOD container_1->FREE.
     CALL METHOD container_2->FREE.
     leave to screen 0.

* Change the display mode
   when 'NORMAL'.
     CALL METHOD PICTURE_CONTROL_1->SET_DISPLAY_MODE
          EXPORTING DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_NORMAL.
     CALL METHOD PICTURE_CONTROL_2->SET_DISPLAY_MODE
          EXPORTING DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_NORMAL.
   when 'STRETCH'.
     CALL METHOD PICTURE_CONTROL_1->SET_DISPLAY_MODE
        EXPORTING DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_STRETCH.
     CALL METHOD PICTURE_CONTROL_2->SET_DISPLAY_MODE
        EXPORTING DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_STRETCH.
   when 'FIT'.
     CALL METHOD PICTURE_CONTROL_1->SET_DISPLAY_MODE
          EXPORTING DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_FIT.
     CALL METHOD PICTURE_CONTROL_2->SET_DISPLAY_MODE
          EXPORTING DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_FIT.
   when 'NORMAL_CTR'.
     CALL METHOD PICTURE_CONTROL_1->SET_DISPLAY_MODE
   EXPORTING DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_NORMAL_CENTER.
     CALL METHOD PICTURE_CONTROL_2->SET_DISPLAY_MODE
   EXPORTING DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_NORMAL_CENTER.
   when 'FIT_CTR'.
     CALL METHOD PICTURE_CONTROL_1->SET_DISPLAY_MODE
     EXPORTING DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_FIT_CENTER.
     CALL METHOD PICTURE_CONTROL_2->SET_DISPLAY_MODE
     EXPORTING DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_FIT_CENTER.

* Clear the picture
   when 'CLEAR'.
     CALL METHOD PICTURE_CONTROL_1->CLEAR_PICTURE.

* Load a new picture
   when space.
     CALL METHOD PICTURE_CONTROL_1->LOAD_PICTURE_FROM_URL
          exporting url = url
          importing result = return.
     call method cl_gui_cfw=>flush.
     if return = 0.
       url = text-000.
     endif.

 endcase.

 clear function.
endmodule.


************************************************************************
* CLASS   c_event_receiver
* IMPLEMENTATION
************************************************************************
CLASS C_event_receiver implementation.

************************************************************************
* CLASS   c_event_receiver
* METHOD  event_handler_picture_dblclick
************************************************************************
 METHOD EVENT_HANDLER_PICTURE_DBLCLICK.
*        for event picture_dblclick of c_picture_control
*        importing mouse_pos_x mouse_pos_y.
   DATA pos_x(5) type c.
   DATA pos_y(5) type c.
   pos_x = mouse_pos_x.
   pos_y = mouse_pos_y.

   IF SENDER = PICTURE_CONTROL_1.
     MESSAGE I000(0K) WITH
       'DoubleClick' 'Upper Picture' POS_X POS_Y. "#EC NOTEXT
   else.
     MESSAGE I000(0K) WITH
       'DoubleClick' 'Lower Picture' POS_X POS_Y. "#EC NOTEXT
   endif.
 endmethod.

************************************************************************
* CLASS   c_event_receiver
* METHOD  event_handler_context_menu
************************************************************************
 METHOD EVENT_HANDLER_CONTEXT_MENU.
   data menu type ref to cl_ctmenu.
   create object menu.
   call method menu->ADD_FUNCTION exporting
     fcode = text-001
     TEXT = TEXT-001.
   call method menu->ADD_FUNCTION exporting
     FCODE = TEXT-002
     TEXT = TEXT-002.
   call method menu->ADD_FUNCTION exporting
     FCODE = TEXT-003
     TEXT = TEXT-003.
   call method menu->ADD_FUNCTION exporting
     FCODE = TEXT-004
     TEXT = TEXT-004.
   call method menu->ADD_FUNCTION exporting
     FCODE = TEXT-005
     TEXT = TEXT-005.

   CALL METHOD SENDER->DISPLAY_CONTEXT_MENU
     EXPORTING CONTEXT_MENU = MENU.
 endmethod.

************************************************************************
* CLASS   c_event_receiver
* METHOD  event_handler_context_menu_sel
************************************************************************
 METHOD EVENT_HANDLER_CONTEXT_MENU_sel.
   DATA DISPLAY_MODE TYPE I.
   IF FCODE = TEXT-001.
     DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_NORMAL.
   ENDIF.
   IF FCODE = TEXT-002.
     DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_STRETCH.
   ENDIF.
   IF FCODE = TEXT-003.
     DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_FIT.
   ENDIF.
   IF FCODE = TEXT-004.
     DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_NORMAL_CENTER.
   ENDIF.
   IF FCODE = TEXT-005.
     DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_FIT_CENTER.
   ENDIF.
   CALL METHOD SENDER->SET_DISPLAY_MODE
        EXPORTING DISPLAY_MODE = DISPLAY_MODE.

 endmethod.

endclass.

Note: While creating this program I had observed the thing is it will accepts the logo which was having the URL so try to create a logo of URL but u can display the Standard SAP logo using this program

To upload the the logo image on the right hand side of the SAP screen.

Transaction codeSMW0

X - Binary data for WebRFC application

Hit Enter

Click Execute

Click Settings -> Maintain MIME types

Click the Create button

Fill in :- TYPE : image/gif EXTENSION : .GIF

Click Save

Click Back to the Binary data for WebRFC

Click Create

Fill in :- Obj. name : ZXXXX.GIF Description : Company Logo

Click Import and specify the filename where your GIF file is located.File type is BIN. Finish press the Transfer button.

If successful, your logo will be shown in the Binary data for WebRFC.


Transaction codeSM30 - Table/View - SSM_CUST
Click Maintain
Click New Entries
Name                     Value to be set
START_IMAGE      ZXXXX.GIF
RESIZE_IMAGE     NO
Logoff and Login again
data: ws_c_logo TYPE REF TO cl_dd_area.
"Instance for the logo

Split your document container for logo
CALL METHOD wcl_docum->vertical_split
EXPORTING split_area = wcl_docum
split_width = '70%'
IMPORTING right_area = ws_c_logo.

then,
CALL METHOD ws_c_logo->add_picture
EXPORTING picture_id = c_logo.

where: c_logo TYPE sdydo_key VALUE 'CC0040' . "logo for co.code 0040

<i><b>The image should be stored in your business document. You may use BDS_OBJECT_SAVE or BDS_BUSINESSDOCUMENT_CREATEF to store the image in the business document server and then retrieve in your ALV.</b></i>

Check this link

http://www.sap-img.com/fu002.htm

Reward if helpfull

Regards

Pavan

Read only

Former Member
0 Likes
742

you may refer to this document to know all about pictures in SAP.

http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCCIIMAGE/BCCIIMAGE.pdf

Regards

Pavan