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

Selection screen

Former Member
0 Likes
840

Hi

Can we add custom control on selection screen( i.e. 1000 ) ?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
782

Hi,

what do u mean by custom Control.?

U can add push button,Icon etc in Selection Screen in Application Toolbar .

Regards

Sandipan

7 REPLIES 7
Read only

Former Member
0 Likes
783

Hi,

what do u mean by custom Control.?

U can add push button,Icon etc in Selection Screen in Application Toolbar .

Regards

Sandipan

Read only

0 Likes
782

Hi Sandipan,

thanks for your responce.

How to put pushbuttons and icons on selection screen.Is there any procedure to do that?

Plz do needful.

Read only

0 Likes
782

Hi,

Try this code for push buttons




TABLES sscrfields.
TYPE-POOLS icon.

SELECTION-SCREEN:
      PUSHBUTTON 2(10)  but1 USER-COMMAND cli1,
      PUSHBUTTON 12(30) but2 USER-COMMAND cli2
                           VISIBLE LENGTH 10.

try this for adding Buuton beside F8.


TABLES sscrfields.
TYPE-POOLS icon.

SELECTION-SCREEN:
     PUSHBUTTON 2(10)  but1 USER-COMMAND cli1,
      PUSHBUTTON 12(30) but2 USER-COMMAND cli2
                           VISIBLE LENGTH 10.
*
*
*

*
SELECTION-SCREEN: BEGIN OF BLOCK b01 WITH FRAME TITLE text-001.
SELECTION-SCREEN: FUNCTION KEY 1.
SELECTION-SCREEN:END OF BLOCK b01.


INITIALIZATION.
*
** Add displayed ICON  to application toolbar.
  MOVE icon_xls TO sscrfields-functxt_01.

There was some mistake in the previous code.

Try This One.

Regards

Sandipan

Edited by: Sandipan Ghosh on Mar 27, 2008 2:22 PM

Read only

Former Member
0 Likes
782

hi ramesh,

it is possible ...here is the process for creating a logo in the selection-screen..

REPORT Zf13 .

DATA:docking TYPE REF TO cl_gui_docking_container,

picture_control_1 TYPE REF TO cl_gui_picture,

url(256) TYPE c .

DATA : begin of imakt occurs 0,

matnr like makt-matnr,

spras like makt-spras,

maktx like makt-maktx,

end of imakt.

DATA: itrepid LIKE sy-repid.

itrepid = sy-repid.

parameters:p_matnr like makt-matnr.

select matnr spras maktx from makt into table imakt where matnr = p_matnr.

loop at imakt.

write:/ imakt-matnr,

imakt-spras,

imakt-maktx.

endloop.

AT SELECTION-SCREEN OUTPUT.

PERFORM show_pic.

*&----


**& Form show_pic

*&----


FORM show_pic.

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 = 55

left = 750

top = 08

width = 350.

CALL METHOD picture_control_1->load_picture_from_url

EXPORTING

url = 'C:\zpic.gif'.

*here you give the path where your pic is stored on the desktop

IF sy-subrc NE 0.

ENDIF.

ENDFORM.

regards,

venkat.

Read only

Former Member
0 Likes
782
Read only

Former Member
0 Likes
782

HI,

It is very much possible to put the custom control on default selection screen number '1000' for that program.

Go to SE80, Select type 'Program' and give your report name and press ennter, Under Screen it will display the screen number 1000, just double click on that and press the Layout button and do what ever you want.

Reward if it helpfull..

Regards,

Sivaram

Read only

Former Member
0 Likes
782

hi use this prog for push button...

&----


*& Report ZSELECTIONSCREEN001

*&

&----


*&

*&

&----


REPORT ZSELECTIONSCREEN001.

tables:mara,

marc,

mard,

sscrfields.

data: begin of it_mara occurs 0,

matnr like mara-matnr,

meins like mara-meins,

mtart like mara-mtart,

pstat like mara-pstat,

ernam like mara-ernam,

end of it_mara.

selection-screen begin of screen 100 as subscreen.

selection-screen begin of block b1 with frame title text-001.

select-options:matno for mara-matnr.

selection-screen end of block b1.

selection-screen end of screen 100.

selection-screen begin of screen 200 as subscreen.

selection-screen begin of block b2 with frame title text-002.

select-options:industry for mara-meins.

selection-screen end of block b2.

selection-screen end of screen 200.

selection-screen begin of screen 300 as subscreen.

selection-screen begin of block b3 with frame title text-003.

select-options:mattype for mara-mtart.

selection-screen end of block b3.

selection-screen end of screen 300.

SELECTION-SCREEN: FUNCTION KEY 1,

FUNCTION KEY 2.

SELECTION-SCREEN: BEGIN OF TABBED BLOCK SUB FOR 15 LINES,

END OF BLOCK SUB.

initialization.

SSCRFIELDS-FUNCTXT_01 = '@0D@'.

SSCRFIELDS-FUNCTXT_02 = '@0E@'.

SUB-PROG = SY-REPID.

SUB-DYNNR = 100.

AT SELECTION-SCREEN.

CASE SY-DYNNR.

WHEN 100.

IF SSCRFIELDS-UCOMM = 'FC01'.

SUB-DYNNR = 300.

ELSEIF SSCRFIELDS-UCOMM = 'FC02'.

SUB-DYNNR = 200.

ENDIF.

WHEN 200.

IF SSCRFIELDS-UCOMM = 'FC01'.

SUB-DYNNR = 100.

ELSEIF SSCRFIELDS-UCOMM = 'FC02'.

SUB-DYNNR = 300.

ENDIF.

WHEN 300.

IF SSCRFIELDS-UCOMM = 'FC01'.

SUB-DYNNR = 200.

ELSEIF SSCRFIELDS-UCOMM = 'FC02'.

SUB-DYNNR = 100.

ENDIF.

ENDCASE.

START-OF-SELECTION.

select matnr

meins

mtart

pstat

ernam

from mara

into table it_mara

up to 100 rows

where matnr in matno.

loop at it_mara.

write:/ it_mara-matnr,

it_mara-meins,

it_mara-mtart,

it_mara-pstat,

it_mara-ernam.

endloop.

end-of-selection.

regards,

venkat.